ERC-20
Overview
Max Total Supply
44,038.043163017852039766 crvCVXETH
Holders
227
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.000000084127691807 crvCVXETHValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
Vyper_contract
Compiler Version
vyper:0.3.1
Contract Source Code (Vyper language format)
# @version 0.3.1 """ @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)
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"},{"name":"SetName","inputs":[{"name":"old_name","type":"string","indexed":false},{"name":"old_symbol","type":"string","indexed":false},{"name":"name","type":"string","indexed":false},{"name":"symbol","type":"string","indexed":false},{"name":"owner","type":"address","indexed":false},{"name":"time","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":360},{"stateMutability":"nonpayable","type":"function","name":"transfer","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":78662},{"stateMutability":"nonpayable","type":"function","name":"transferFrom","inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":116646},{"stateMutability":"nonpayable","type":"function","name":"approve","inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":39181},{"stateMutability":"nonpayable","type":"function","name":"increaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_added_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41711},{"stateMutability":"nonpayable","type":"function","name":"decreaseAllowance","inputs":[{"name":"_spender","type":"address"},{"name":"_subtracted_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":41737},{"stateMutability":"nonpayable","type":"function","name":"mint","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":80902},{"stateMutability":"nonpayable","type":"function","name":"mint_relative","inputs":[{"name":"_to","type":"address"},{"name":"frac","type":"uint256"}],"outputs":[{"name":"","type":"uint256"}],"gas":81224},{"stateMutability":"nonpayable","type":"function","name":"burnFrom","inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"outputs":[{"name":"","type":"bool"}],"gas":80954},{"stateMutability":"nonpayable","type":"function","name":"set_minter","inputs":[{"name":"_minter","type":"address"}],"outputs":[],"gas":37875},{"stateMutability":"nonpayable","type":"function","name":"set_name","inputs":[{"name":"_name","type":"string"},{"name":"_symbol","type":"string"}],"outputs":[],"gas":231779},{"stateMutability":"view","type":"function","name":"name","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":13079},{"stateMutability":"view","type":"function","name":"symbol","inputs":[],"outputs":[{"name":"","type":"string"}],"gas":10838},{"stateMutability":"view","type":"function","name":"balanceOf","inputs":[{"name":"arg0","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3116},{"stateMutability":"view","type":"function","name":"allowance","inputs":[{"name":"arg0","type":"address"},{"name":"arg1","type":"address"}],"outputs":[{"name":"","type":"uint256"}],"gas":3412},{"stateMutability":"view","type":"function","name":"totalSupply","inputs":[],"outputs":[{"name":"","type":"uint256"}],"gas":2910},{"stateMutability":"view","type":"function","name":"minter","inputs":[],"outputs":[{"name":"","type":"address"}],"gas":2940}]
Contract Creation Code
6020610cf3608039608051610cf301604060208260803960805111610cee5780602081608039608051602001808260e03950505060206020610cf301608039608051610cf301602060208260803960805111610cee578060208160803960805160200180826101403950505060e0806000602082510160c060006003818352015b8260c0516020021115610092576100b1565b60c05160200285015160c0518501558151600101808352811415610080575b505050505050610140806003602082510160c060006002818352015b8260c05160200211156100df576100fe565b60c05160200285015160c05185015581516001018083528114156100cd575b505050505050336008553360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000610180526020610180a3610cd656600436101561000d57610b8e565b60046000601c3760005134610b945763313ce567811861003257601260e052602060e0f35b63a9059cbb81186100d6576004358060a01c610b945760e05260053360a05260805260406080208054602435808210610b945780820390509050815550600560e05160a052608052604060802080546024358181830110610b94578082019050905081555060e051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602435610100526020610100a36001610100526020610100f35b6323b872dd811861020d576004358060a01c610b945760e0526024358060a01c610b945761010052600560e05160a05260805260406080208054604435808210610b94578082039050905081555060056101005160a052608052604060802080546044358181830110610b945780820190509050815550600660e05160a05260805260406080203360a052608052604060802054610120527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012051146101cb5761012051604435808210610b945780820390509050600660e05160a05260805260406080203360a0526080526040608020555b6101005160e0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef604435610140526020610140a36001610140526020610140f35b63095ea7b38118610285576004358060a01c610b945760e05260243560063360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602435610100526020610100a36001610100526020610100f35b63395093518118610333576004358060a01c610b945760e05260063360a052608052604060802060e05160a0526080526040608020546024358181830110610b945780820190509050610100526101005160063360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561010051610120526020610120a36001610120526020610120f35b63a457c2d781186103df576004358060a01c610b945760e05260063360a052608052604060802060e05160a052608052604060802054602435808210610b945780820390509050610100526101005160063360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561010051610120526020610120a36001610120526020610120f35b6340c10f198118610483576004358060a01c610b945760e0526008543318610b9457600780546024358181830110610b945780820190509050815550600560e05160a052608052604060802080546024358181830110610b94578082019050905081555060e05160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602435610100526020610100a36001610100526020610100f35b636962f845811861056f576004358060a01c610b945760e0526008543318610b94576007546101005261010051602435808202821582848304141715610b945790509050670de0b6b3a7640000808204905090506101205260006101205111156105605761010051610120518181830110610b945780820190509050600755600560e05160a05260805260406080208054610120518181830110610b94578082019050905081555060e05160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61012051610140526020610140a35b61012051610140526020610140f35b6379cc6790811861060f576004358060a01c610b945760e0526008543318610b945760078054602435808210610b945780820390509050815550600560e05160a05260805260406080208054602435808210610b945780820390509050815550600060e0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602435610100526020610100a36001610100526020610100f35b631652e9fc8118610639576004358060a01c610b945760e0526008543318610b945760e051600855005b63e1430e068118610990576004356004016040813511610b9457808035602001808260e0375050506024356004016020813511610b945780803560200180826101403750505033638da5cb5b610180526020610180600461019c6008545afa6106a7573d600060003e3d6000fd5b601f3d1115610b94576101805118610b9457600080610180602082540160c060006003818352015b8260c05160200211156106e157610700565b60c05185015460c05160200285015281516001018083528114156106cf575b5050505050506003806101e0602082540160c060006002818352015b8260c051602002111561072e5761074d565b60c05185015460c051602002850152815160010180835281141561071c575b50505050505060e0806000602082510160c060006003818352015b8260c051602002111561077a57610799565b60c05160200285015160c0518501558151600101808352811415610768575b505050505050610140806003602082510160c060006002818352015b8260c05160200211156107c7576107e6565b60c05160200285015160c05185015581516001018083528114156107b5575b5050505050507f68ed9e6681c98d0e2744ce6c08d46c045e098a479b120b5b7253fa95e4c489546102208060c08082528083018061018080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905081019050602082019150808252808301806101e080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190506020820191508082528083018060e080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190506020820191508082528083018061014080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f8201039050905090508101905060208201915033825260208201915042825290509050610220a1005b6306fdde038118610a335760e08060208082528083018060008082602082540160c060006003818352015b8260c05160200211156109cd576109ec565b60c05185015460c05160200285015281516001018083528114156109bb575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118610ad65760e08060208082528083018060038082602082540160c060006002818352015b8260c0516020021115610a7057610a8f565b60c05185015460c0516020028501528151600101808352811415610a5e575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6370a082318118610b0b576004358060a01c610b945760e052600560e05160a052608052604060802054610100526020610100f35b63dd62ed3e8118610b5e576004358060a01c610b945760e0526024358060a01c610b945761010052600660e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b6318160ddd8118610b755760075460e052602060e0f35b63075461728118610b8c5760085460e052602060e0f35b505b60006000fd5b600080fd5b61013d610cd60361013d60003961013d610cd6036000f35b600080fd00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d4375727665204356582d4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096372764356584554480000000000000000000000000000000000000000000000
Deployed Bytecode
0x600436101561000d57610b8e565b60046000601c3760005134610b945763313ce567811861003257601260e052602060e0f35b63a9059cbb81186100d6576004358060a01c610b945760e05260053360a05260805260406080208054602435808210610b945780820390509050815550600560e05160a052608052604060802080546024358181830110610b94578082019050905081555060e051337fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602435610100526020610100a36001610100526020610100f35b6323b872dd811861020d576004358060a01c610b945760e0526024358060a01c610b945761010052600560e05160a05260805260406080208054604435808210610b94578082039050905081555060056101005160a052608052604060802080546044358181830110610b945780820190509050815550600660e05160a05260805260406080203360a052608052604060802054610120527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61012051146101cb5761012051604435808210610b945780820390509050600660e05160a05260805260406080203360a0526080526040608020555b6101005160e0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef604435610140526020610140a36001610140526020610140f35b63095ea7b38118610285576004358060a01c610b945760e05260243560063360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925602435610100526020610100a36001610100526020610100f35b63395093518118610333576004358060a01c610b945760e05260063360a052608052604060802060e05160a0526080526040608020546024358181830110610b945780820190509050610100526101005160063360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561010051610120526020610120a36001610120526020610120f35b63a457c2d781186103df576004358060a01c610b945760e05260063360a052608052604060802060e05160a052608052604060802054602435808210610b945780820390509050610100526101005160063360a052608052604060802060e05160a05260805260406080205560e051337f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92561010051610120526020610120a36001610120526020610120f35b6340c10f198118610483576004358060a01c610b945760e0526008543318610b9457600780546024358181830110610b945780820190509050815550600560e05160a052608052604060802080546024358181830110610b94578082019050905081555060e05160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602435610100526020610100a36001610100526020610100f35b636962f845811861056f576004358060a01c610b945760e0526008543318610b94576007546101005261010051602435808202821582848304141715610b945790509050670de0b6b3a7640000808204905090506101205260006101205111156105605761010051610120518181830110610b945780820190509050600755600560e05160a05260805260406080208054610120518181830110610b94578082019050905081555060e05160007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef61012051610140526020610140a35b61012051610140526020610140f35b6379cc6790811861060f576004358060a01c610b945760e0526008543318610b945760078054602435808210610b945780820390509050815550600560e05160a05260805260406080208054602435808210610b945780820390509050815550600060e0517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef602435610100526020610100a36001610100526020610100f35b631652e9fc8118610639576004358060a01c610b945760e0526008543318610b945760e051600855005b63e1430e068118610990576004356004016040813511610b9457808035602001808260e0375050506024356004016020813511610b945780803560200180826101403750505033638da5cb5b610180526020610180600461019c6008545afa6106a7573d600060003e3d6000fd5b601f3d1115610b94576101805118610b9457600080610180602082540160c060006003818352015b8260c05160200211156106e157610700565b60c05185015460c05160200285015281516001018083528114156106cf575b5050505050506003806101e0602082540160c060006002818352015b8260c051602002111561072e5761074d565b60c05185015460c051602002850152815160010180835281141561071c575b50505050505060e0806000602082510160c060006003818352015b8260c051602002111561077a57610799565b60c05160200285015160c0518501558151600101808352811415610768575b505050505050610140806003602082510160c060006002818352015b8260c05160200211156107c7576107e6565b60c05160200285015160c05185015581516001018083528114156107b5575b5050505050507f68ed9e6681c98d0e2744ce6c08d46c045e098a479b120b5b7253fa95e4c489546102208060c08082528083018061018080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f82010390509050905081019050602082019150808252808301806101e080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190506020820191508082528083018060e080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190506020820191508082528083018061014080516020018083828460045afa905050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f8201039050905090508101905060208201915033825260208201915042825290509050610220a1005b6306fdde038118610a335760e08060208082528083018060008082602082540160c060006003818352015b8260c05160200211156109cd576109ec565b60c05185015460c05160200285015281516001018083528114156109bb575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6395d89b418118610ad65760e08060208082528083018060038082602082540160c060006002818352015b8260c0516020021115610a7057610a8f565b60c05185015460c0516020028501528151600101808352811415610a5e575b5050505050508051806020830101818260206001820306601f8201039050033682375050805160200160206001820306601f820103905090509050810190509050905060e0f35b6370a082318118610b0b576004358060a01c610b945760e052600560e05160a052608052604060802054610100526020610100f35b63dd62ed3e8118610b5e576004358060a01c610b945760e0526024358060a01c610b945761010052600660e05160a05260805260406080206101005160a052608052604060802054610120526020610120f35b6318160ddd8118610b755760075460e052602060e0f35b63075461728118610b8c5760085460e052602060e0f35b505b60006000fd5b600080fd
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d4375727665204356582d4554480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096372764356584554480000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _name (string): Curve CVX-ETH
Arg [1] : _symbol (string): crvCVXETH
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [3] : 4375727665204356582d45544800000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [5] : 6372764356584554480000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.