Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set_minter | 14928386 | 1351 days ago | IN | 0 ETH | 0.00323637 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.2.16
Contract Source Code (Vyper language format)
# @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 = _symbolContract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"name":"Transfer","inputs":[{"name":"_from","type":"address","indexed":true},{"name":"_to","type":"address","indexed":true},{"name":"_value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"name":"Approval","inputs":[{"name":"_owner","type":"address","indexed":true},{"name":"_spender","type":"address","indexed":true},{"name":"_value","type":"uint256","indexed":false}],"anonymous":false,"type":"event"},{"stateMutability":"nonpayable","type":"constructor","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"outputs":[]},{"stateMutability":"view","type":"function","name":"decimals","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":288},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":78640},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":116582},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39121},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41665},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41689},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":80879},{"stateMutability":"nonpayable","type":"function","name":"burnFrom","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":80897},{"stateMutability":"nonpayable","type":"function","name":"set_minter","inputs":[{"name":"_minter","type":"address"}],"outputs":[],"gas":37785},{"stateMutability":"nonpayable","type":"function","name":"set_name","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"outputs":[],"gas":181462},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":12918},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":10671},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":2963},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3208},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2808},{"stateMutability":"view","type":"function","name":"minter","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2838}]Contract Creation Code
60406109db61014039606060206109db60c03960c0516109db0161018039604060206109db60c03960c05160040135116109d6576040602060206109db0160c03960c0516109db01610200396020602060206109db0160c03960c05160040135116109d657610180806000602082510161012060006003818352015b8261012051602002111561008e576100b0565b61012051602002850151610120518501555b815160010180835281141561007b575b505050505050610200806004602082510161012060006002818352015b826101205160200211156100e057610102565b61012051602002850151610120518501555b81516001018083528114156100cd575b50505050505033600a553360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610260808080600081525050602090509050610260a36109be56600436101561000d57610868565b600035601c526000513461086e5763313ce56781141561003257601260005260206000f35b63a9059cbb8114156100db5760043560a01c61086e5760073360e05260c052604060c020805460243580821061086e5780820390509050815550600760043560e05260c052604060c0208054602435818183011061086e5780820190509050815550600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b6323b872dd8114156102115760043560a01c61086e5760243560a01c61086e57600760043560e05260c052604060c020805460443580821061086e5780820390509050815550600760243560e05260c052604060c0208054604435818183011061086e5780820190509050815550600860043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156101c8576101405160443580821061086e5780820390509050600860043560e05260c052604060c0203360e05260c052604060c020555b6024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61016080808060443581525050602090509050610160a3600160005260206000f35b63095ea7b381141561028e5760043560a01c61086e5760243560083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014080808060243581525050602090509050610140a3600160005260206000f35b63395093518114156103415760043560a01c61086e5760083360e05260c052604060c02060043560e05260c052604060c02054602435818183011061086e5780820190509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b63a457c2d78114156103f25760043560a01c61086e5760083360e05260c052604060c02060043560e05260c052604060c0205460243580821061086e5780820390509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b6340c10f1981141561049c5760043560a01c61086e57600a5433141561086e5760098054602435818183011061086e5780820190509050815550600760043560e05260c052604060c0208054602435818183011061086e578082019050905081555060043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b6379cc67908114156105425760043560a01c61086e57600a5433141561086e576009805460243580821061086e5780820390509050815550600760043560e05260c052604060c020805460243580821061086e578082039050905081555060006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b631652e9fc81141561056a5760043560a01c61086e57600a5433141561086e57600435600a55005b63e1430e06811415610684576060600435600401610140376040600435600401351161086e5760406024356004016101c0376020602435600401351161086e573360206102806004638da5cb5b6102205261023c600a545afa1561086e57601f3d111561086e5760005061028051141561086e57610140806000602082510161012060006003818352015b826101205160200211156106085761062a565b61012051602002850151610120518501555b81516001018083528114156105f5575b5050505050506101c0806004602082510161012060006002818352015b8261012051602002111561065a5761067c565b61012051602002850151610120518501555b8151600101808352811415610647575b505050505050005b6306fdde0381141561072157600080610180602082540161012060006003818352015b826101205160200211156106ba576106dc565b61012051850154610120516020028501525b81516001018083528114156106a7575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b418114156107be57600480610180602082540161012060006002818352015b8261012051602002111561075757610779565b61012051850154610120516020028501525b8151600101808352811415610744575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6370a082318114156107ee5760043560a01c61086e57600760043560e05260c052604060c0205460005260206000f35b63dd62ed3e8114156108365760043560a01c61086e5760243560a01c61086e57600860043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6318160ddd81141561084e5760095460005260206000f35b630754617281141561086657600a5460005260206000f35b505b60006000fd5b600080fd5b61014b6109be0361014b60003961014b6109be036000f35b600080fd00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001243757276652e666920465241582f55534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076372764652415800000000000000000000000000000000000000000000000000
Deployed Bytecode
0x600436101561000d57610868565b600035601c526000513461086e5763313ce56781141561003257601260005260206000f35b63a9059cbb8114156100db5760043560a01c61086e5760073360e05260c052604060c020805460243580821061086e5780820390509050815550600760043560e05260c052604060c0208054602435818183011061086e5780820190509050815550600435337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b6323b872dd8114156102115760043560a01c61086e5760243560a01c61086e57600760043560e05260c052604060c020805460443580821061086e5780820390509050815550600760243560e05260c052604060c0208054604435818183011061086e5780820190509050815550600860043560e05260c052604060c0203360e05260c052604060c02054610140527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101405118156101c8576101405160443580821061086e5780820390509050600860043560e05260c052604060c0203360e05260c052604060c020555b6024356004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61016080808060443581525050602090509050610160a3600160005260206000f35b63095ea7b381141561028e5760043560a01c61086e5760243560083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561014080808060243581525050602090509050610140a3600160005260206000f35b63395093518114156103415760043560a01c61086e5760083360e05260c052604060c02060043560e05260c052604060c02054602435818183011061086e5780820190509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b63a457c2d78114156103f25760043560a01c61086e5760083360e05260c052604060c02060043560e05260c052604060c0205460243580821061086e5780820390509050610140526101405160083360e05260c052604060c02060043560e05260c052604060c02055600435337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256101608080806101405181525050602090509050610160a3600160005260206000f35b6340c10f1981141561049c5760043560a01c61086e57600a5433141561086e5760098054602435818183011061086e5780820190509050815550600760043560e05260c052604060c0208054602435818183011061086e578082019050905081555060043560007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b6379cc67908114156105425760043560a01c61086e57600a5433141561086e576009805460243580821061086e5780820390509050815550600760043560e05260c052604060c020805460243580821061086e578082039050905081555060006004357fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61014080808060243581525050602090509050610140a3600160005260206000f35b631652e9fc81141561056a5760043560a01c61086e57600a5433141561086e57600435600a55005b63e1430e06811415610684576060600435600401610140376040600435600401351161086e5760406024356004016101c0376020602435600401351161086e573360206102806004638da5cb5b6102205261023c600a545afa1561086e57601f3d111561086e5760005061028051141561086e57610140806000602082510161012060006003818352015b826101205160200211156106085761062a565b61012051602002850151610120518501555b81516001018083528114156105f5575b5050505050506101c0806004602082510161012060006002818352015b8261012051602002111561065a5761067c565b61012051602002850151610120518501555b8151600101808352811415610647575b505050505050005b6306fdde0381141561072157600080610180602082540161012060006003818352015b826101205160200211156106ba576106dc565b61012051850154610120516020028501525b81516001018083528114156106a7575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6395d89b418114156107be57600480610180602082540161012060006002818352015b8261012051602002111561075757610779565b61012051850154610120516020028501525b8151600101808352811415610744575b50505050505061018051806101a001818260206001820306601f82010390500336823750506020610160526040610180510160206001820306601f8201039050610160f35b6370a082318114156107ee5760043560a01c61086e57600760043560e05260c052604060c0205460005260206000f35b63dd62ed3e8114156108365760043560a01c61086e5760243560a01c61086e57600860043560e05260c052604060c02060243560e05260c052604060c0205460005260206000f35b6318160ddd81141561084e5760095460005260206000f35b630754617281141561086657600a5460005260206000f35b505b60006000fd5b600080fd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001243757276652e666920465241582f55534443000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000076372764652415800000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Curve.fi FRAX/USDC
Arg [1] : _symbol (string): crvFRAX
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [3] : 43757276652e666920465241582f555344430000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [5] : 6372764652415800000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.