Address Contract Partially Verified
Address
0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC
Balance
0 ETH
Nonce
1
Code Size
2163 bytes
Creator
0x745748bc...d66C at tx 0x15f13803...e4dae5
Indexed Transactions
0 (1 on-chain, 0.9% indexed)
Contract Bytecode
2163 bytes
0x600436101561000d57610868565b600035601c526000513461086e5763313ce56781141561003257601260005260206000f35b63a9059cbb8114156100db5760043560a01c61086e5760073360e05260c052604060c020805460243580821061086e5780820390509050815550600760043560e05260c052604060c0208054602435818183011061086e5780820190509050815550600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b6323b872dd8114156102115760043560a01c61086e5760243560a01c61086e57600760043560e05260c052604060c020805460443580821061086e5780820390509050815550600760243560e05260c052604060c0208054604435818183011061086e5780820190509050815550600860043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156101c8576101405160443580821061086e5780820390509050600860043560e05260c052604060c0203360e05260c052604060c020555b6024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61016080808060443581525050602090509050610160a3600160005260206000f35b63095ea7b381141561028e5760043560a01c61086e5760243560083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014080808060243581525050602090509050610140a3600160005260206000f35b63395093518114156103415760043560a01c61086e5760083360e05260c052604060c02060043560e05260c052604060c02054602435818183011061086e5780820190509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b63a457c2d78114156103f25760043560a01c61086e5760083360e05260c052604060c02060043560e05260c052604060c0205460243580821061086e5780820390509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b6340c10f1981141561049c5760043560a01c61086e57600a5433141561086e5760098054602435818183011061086e5780820190509050815550600760043560e05260c052604060c0208054602435818183011061086e578082019050905081555060043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b6379cc67908114156105425760043560a01c61086e57600a5433141561086e576009805460243580821061086e5780820390509050815550600760043560e05260c052604060c020805460243580821061086e578082039050905081555060006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b631652e9fc81141561056a5760043560a01c61086e57600a5433141561086e57600435600a55005b63e1430e06811415610684576060600435600401610140376040600435600401351161086e5760406024356004016101c0376020602435600401351161086e573360206102806004638da5cb5b6102205261023c600a545afa1561086e57601f3d111561086e5760005061028051141561086e57610140806000602082510161012060006003818352015b826101205160200211156106085761062a565b61012051602002850151610120518501555b81516001018083528114156105f5575b5050505050506101c0806004602082510161012060006002818352015b8261012051602002111561065a5761067c565b61012051602002850151610120518501555b8151600101808352811415610647575b505050505050005b6306fdde0381141561072157600080610180602082540161012060006003818352015b826101205160200211156106ba576106dc565b61012051850154610120516020028501525b81516001018083528114156106a7575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b418114156107be57600480610180602082540161012060006002818352015b8261012051602002111561075757610779565b61012051850154610120516020028501525b8151600101808352811415610744575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6370a082318114156107ee5760043560a01c61086e57600760043560e05260c052604060c0205460005260206000f35b63dd62ed3e8114156108365760043560a01c61086e5760243560a01c61086e57600860043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6318160ddd81141561084e5760095460005260206000f35b630754617281141561086657600a5460005260206000f35b505b60006000fd5b600080fd
Verified Source Code Partial Match
Compiler: v0.2.16+commit.59e1bdd
Vyper_contract.vy 192 lines
# @version ^0.2.0
"""
@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
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 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
self.name = _name
self.symbol = _symbol
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 9 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
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
This address has 1 on-chain transactions, but only 0.9% of the chain is indexed. Transactions will appear as indexing progresses. View on Etherscan →