Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0xcA3d75aC011BF5aD07a98d02f18225F9bD9A6BDF
Balance 0 ETH
Nonce 1
Code Size 3290 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

3290 bytes
0x600436101561000d57610cd4565b600035601c52600051341561002157600080fd5b63313ce56781141561003857601260005260206000f35b63a9059cbb8114156100e95760043560a01c1561005457600080fd5b60023360e05260c052604060c02080546024358082101561007457600080fd5b80820390509050815550600260043560e05260c052604060c02080546024358181830110156100a257600080fd5b8082019050905081555060243561014052600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f35b6323b872dd8114156102335760043560a01c1561010557600080fd5b60243560a01c1561011557600080fd5b600260043560e05260c052604060c02080546044358082101561013757600080fd5b80820390509050815550600260243560e05260c052604060c020805460443581818301101561016557600080fd5b80820190509050815550600360043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156101f45761014051604435808210156101cf57600080fd5b80820390509050600360043560e05260c052604060c0203360e05260c052604060c020555b604435610160526024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610160a3600160005260206000f35b63095ea7b38114156102ac5760043560a01c1561024f57600080fd5b60243560033360e05260c052604060c02060043560e05260c052604060c0205560243561014052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610140a3600160005260206000f35b63395093518114156103615760043560a01c156102c857600080fd5b60033360e05260c052604060c02060043560e05260c052604060c020546024358181830110156102f757600080fd5b80820190509050610140526101405160033360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b63a457c2d78114156104145760043560a01c1561037d57600080fd5b60033360e05260c052604060c02060043560e05260c052604060c02054602435808210156103aa57600080fd5b80820390509050610140526101405160033360e05260c052604060c02060043560e05260c052604060c020556101405161016052600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256020610160a3600160005260206000f35b6340c10f198114156104ca5760043560a01c1561043057600080fd5b600554331461043e57600080fd5b6004805460243581818301101561045457600080fd5b80820190509050815550600260043560e05260c052604060c020805460243581818301101561048257600080fd5b808201905090508155506024356101405260043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f35b636962f8458114156105cf5760043560a01c156104e657600080fd5b60055433146104f457600080fd5b6004546101405261014051602435808202821582848304141761051657600080fd5b80905090509050670de0b6b3a7640000808204905090506101605260006101605111156105c257610140516101605181818301101561055457600080fd5b80820190509050600455600260043560e05260c052604060c02080546101605181818301101561058357600080fd5b80820190509050815550610160516101805260043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610180a35b6101605160005260206000f35b6379cc67908114156106815760043560a01c156105eb57600080fd5b60055433146105f957600080fd5b600480546024358082101561060d57600080fd5b80820390509050815550600260043560e05260c052604060c02080546024358082101561063957600080fd5b808203905090508155506024356101405260006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020610140a3600160005260206000f35b631652e9fc8114156106b35760043560a01c1561069d57600080fd5b60055433146106ab57600080fd5b600435600555005b63e1430e06811415610ace5760606004356004016101403760406004356004013511156106df57600080fd5b60406024356004016101c03760206024356004013511156106ff57600080fd5b3360206102806004638da5cb5b6102205261023c6005545afa61072157600080fd5b601f3d1161072e57600080fd5b600050610280511461073f57600080fd5b60008060c052602060c020610220602082540161012060006003818352015b8261012051602002111561077157610793565b61012051850154610120516020028501525b815160010180835281141561075e575b50505050505060018060c052602060c0206102a0602082540161012060006002818352015b826101205160200211156107cb576107ed565b61012051850154610120516020028501525b81516001018083528114156107b8575b50505050505061014080600060c052602060c020602082510161012060006003818352015b8261012051602002111561082557610847565b61012051602002850151610120518501555b8151600101808352811415610812575b5050505050506101c080600160c052602060c020602082510161012060006002818352015b8261012051602002111561087f576108a1565b61012051602002850151610120518501555b815160010180835281141561086c575b505050505050336103c052426103e05260c061030052610300516103405261022080516020018061030051610340018284600060045af16108e157600080fd5b505061030051610340015180602061030051610340010101818260206001820306601f8201039050033682375050602061030051610340015160206001820306601f82010390506103005101016103005261030051610360526102a080516020018061030051610340018284600060045af161095c57600080fd5b505061030051610340015180602061030051610340010101818260206001820306601f8201039050033682375050602061030051610340015160206001820306601f820103905061030051010161030052610300516103805261014080516020018061030051610340018284600060045af16109d757600080fd5b505061030051610340015180602061030051610340010101818260206001820306601f8201039050033682375050602061030051610340015160206001820306601f820103905061030051010161030052610300516103a0526101c080516020018061030051610340018284600060045af1610a5257600080fd5b505061030051610340015180602061030051610340010101818260206001820306601f8201039050033682375050602061030051610340015160206001820306601f8201039050610300510101610300527f68ed9e6681c98d0e2744ce6c08d46c045e098a479b120b5b7253fa95e4c4895461030051610340a1005b6306fdde03811415610b735760008060c052602060c020610180602082540161012060006003818352015b82610120516020021115610b0c57610b2e565b61012051850154610120516020028501525b8151600101808352811415610af9575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b41811415610c185760018060c052602060c020610180602082540161012060006002818352015b82610120516020021115610bb157610bd3565b61012051850154610120516020028501525b8151600101808352811415610b9e575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6370a08231811415610c4e5760043560a01c15610c3457600080fd5b600260043560e05260c052604060c0205460005260206000f35b63dd62ed3e811415610ca25760043560a01c15610c6a57600080fd5b60243560a01c15610c7a57600080fd5b600360043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6318160ddd811415610cba5760045460005260206000f35b6307546172811415610cd25760055460005260206000f35b505b60006000fd

Verified Source Code Partial Match

Compiler: v0.2.12+commit.2c6842c
Vyper_contract.vy 221 lines
# @version 0.2.12
"""
@title Curve LP Token
@author Curve.Fi
@notice Base implementation for an LP token provided for
        supplying liquidity to `StableSwap`
@dev Follows the ERC-20 token standard as defined at
     https://eips.ethereum.org/EIPS/eip-20
"""

from vyper.interfaces import ERC20

implements: ERC20

interface Curve:
    def owner() -> address: view


event Transfer:
    _from: indexed(address)
    _to: indexed(address)
    _value: uint256

event Approval:
    _owner: indexed(address)
    _spender: indexed(address)
    _value: uint256

event SetName:
    old_name: String[64]
    old_symbol: String[32]
    name: String[64]
    symbol: String[32]
    owner: address
    time: uint256


name: public(String[64])
symbol: public(String[32])

balanceOf: public(HashMap[address, uint256])
allowance: public(HashMap[address, HashMap[address, uint256]])
totalSupply: public(uint256)

minter: public(address)


@external
def __init__(_name: String[64], _symbol: String[32]):
    self.name = _name
    self.symbol = _symbol
    self.minter = msg.sender
    log Transfer(ZERO_ADDRESS, msg.sender, 0)


@view
@external
def decimals() -> uint256:
    """
    @notice Get the number of decimals for this token
    @dev Implemented as a view method to reduce gas costs
    @return uint256 decimal places
    """
    return 18


@external
def transfer(_to : address, _value : uint256) -> bool:
    """
    @dev Transfer token for a specified address
    @param _to The address to transfer to.
    @param _value The amount to be transferred.
    """
    # NOTE: vyper does not allow underflows
    #       so the following subtraction would revert on insufficient balance
    self.balanceOf[msg.sender] -= _value
    self.balanceOf[_to] += _value

    log Transfer(msg.sender, _to, _value)
    return True


@external
def transferFrom(_from : address, _to : address, _value : uint256) -> bool:
    """
     @dev Transfer tokens from one address to another.
     @param _from address The address which you want to send tokens from
     @param _to address The address which you want to transfer to
     @param _value uint256 the amount of tokens to be transferred
    """
    self.balanceOf[_from] -= _value
    self.balanceOf[_to] += _value

    _allowance: uint256 = self.allowance[_from][msg.sender]
    if _allowance != MAX_UINT256:
        self.allowance[_from][msg.sender] = _allowance - _value

    log Transfer(_from, _to, _value)
    return True


@external
def approve(_spender : address, _value : uint256) -> bool:
    """
    @notice Approve the passed address to transfer the specified amount of
            tokens on behalf of msg.sender
    @dev Beware that changing an allowance via this method brings the risk
         that someone may use both the old and new allowance by unfortunate
         transaction ordering. This may be mitigated with the use of
         {increaseAllowance} and {decreaseAllowance}.
         https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    @param _spender The address which will transfer the funds
    @param _value The amount of tokens that may be transferred
    @return bool success
    """
    self.allowance[msg.sender][_spender] = _value

    log Approval(msg.sender, _spender, _value)
    return True


@external
def increaseAllowance(_spender: address, _added_value: uint256) -> bool:
    """
    @notice Increase the allowance granted to `_spender` by the caller
    @dev This is alternative to {approve} that can be used as a mitigation for
         the potential race condition
    @param _spender The address which will transfer the funds
    @param _added_value The amount of to increase the allowance
    @return bool success
    """
    allowance: uint256 = self.allowance[msg.sender][_spender] + _added_value
    self.allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)
    return True


@external
def decreaseAllowance(_spender: address, _subtracted_value: uint256) -> bool:
    """
    @notice Decrease the allowance granted to `_spender` by the caller
    @dev This is alternative to {approve} that can be used as a mitigation for
         the potential race condition
    @param _spender The address which will transfer the funds
    @param _subtracted_value The amount of to decrease the allowance
    @return bool success
    """
    allowance: uint256 = self.allowance[msg.sender][_spender] - _subtracted_value
    self.allowance[msg.sender][_spender] = allowance

    log Approval(msg.sender, _spender, allowance)
    return True


@external
def mint(_to: address, _value: uint256) -> bool:
    """
    @dev Mint an amount of the token and assigns it to an account.
         This encapsulates the modification of balances such that the
         proper events are emitted.
    @param _to The account that will receive the created tokens.
    @param _value The amount that will be created.
    """
    assert msg.sender == self.minter

    self.totalSupply += _value
    self.balanceOf[_to] += _value

    log Transfer(ZERO_ADDRESS, _to, _value)
    return True


@external
def mint_relative(_to: address, frac: uint256) -> uint256:
    """
    @dev Increases supply by factor of (1 + frac/1e18) and mints it for _to
    """
    assert msg.sender == self.minter

    supply: uint256 = self.totalSupply
    d_supply: uint256 = supply * frac / 10**18
    if d_supply > 0:
        self.totalSupply = supply + d_supply
        self.balanceOf[_to] += d_supply
        log Transfer(ZERO_ADDRESS, _to, d_supply)

    return d_supply


@external
def burnFrom(_to: address, _value: uint256) -> bool:
    """
    @dev Burn an amount of the token from a given account.
    @param _to The account whose tokens will be burned.
    @param _value The amount that will be burned.
    """
    assert msg.sender == self.minter

    self.totalSupply -= _value
    self.balanceOf[_to] -= _value

    log Transfer(_to, ZERO_ADDRESS, _value)
    return True


@external
def set_minter(_minter: address):
    assert msg.sender == self.minter
    self.minter = _minter


@external
def set_name(_name: String[64], _symbol: String[32]):
    assert Curve(self.minter).owner() == msg.sender
    old_name: String[64] = self.name
    old_symbol: String[32] = self.symbol
    self.name = _name
    self.symbol = _symbol

    log SetName(old_name, old_symbol, _name, _symbol, msg.sender, block.timestamp)

Read Contract

allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint256
minter 0x07546172 → address
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 10 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address _spender
uint256 _value
returns: bool
burnFrom 0x79cc6790
address _to
uint256 _value
returns: bool
decreaseAllowance 0xa457c2d7
address _spender
uint256 _subtracted_value
returns: bool
increaseAllowance 0x39509351
address _spender
uint256 _added_value
returns: bool
mint 0x40c10f19
address _to
uint256 _value
returns: bool
mint_relative 0x6962f845
address _to
uint256 frac
returns: uint256
set_minter 0x1652e9fc
address _minter
set_name 0xe1430e06
string _name
string _symbol
transfer 0xa9059cbb
address _to
uint256 _value
returns: bool
transferFrom 0x23b872dd
address _from
address _to
uint256 _value
returns: bool

Recent Transactions

No transactions found for this address