Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CvxMining
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-08-26 */ // File: contracts\interfaces\ICvx.sol // SPDX-License-Identifier: MIT pragma solidity 0.6.12; interface ICvx { function reductionPerCliff() external view returns(uint256); function totalSupply() external view returns(uint256); function totalCliffs() external view returns(uint256); function maxSupply() external view returns(uint256); } // File: contracts\interfaces\CvxMining.sol pragma solidity 0.6.12; library CvxMining{ ICvx public constant cvx = ICvx(0x4e3FBD56CD56c3e72c1403e103b45Db9da5B9D2B); function ConvertCrvToCvx(uint256 _amount) external view returns(uint256){ uint256 supply = cvx.totalSupply(); uint256 reductionPerCliff = cvx.reductionPerCliff(); uint256 totalCliffs = cvx.totalCliffs(); uint256 maxSupply = cvx.maxSupply(); uint256 cliff = supply / reductionPerCliff; //mint if below total cliffs if(cliff < totalCliffs){ //for reduction% take inverse of current cliff uint256 reduction = totalCliffs - cliff; //reduce _amount = _amount * reduction / totalCliffs; //supply cap check uint256 amtTillMax = maxSupply - supply; if(_amount > amtTillMax){ _amount = amtTillMax; } //mint return _amount; } return 0; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ConvertCrvToCvx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cvx","outputs":[{"internalType":"contract ICvx","name":"","type":"ICvx"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61032f610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100405760003560e01c80638487474514610045578063923c1d6114610074575b600080fd5b6100626004803603602081101561005b57600080fd5b5035610098565b60408051918252519081900360200190f35b61007c6102e1565b604080516001600160a01b039092168252519081900360200190f35b600080734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100e857600080fd5b505afa1580156100fc573d6000803e3d6000fd5b505050506040513d602081101561011257600080fd5b50516040805163553a731160e11b81529051919250600091734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9163aa74e622916004808301926020929190829003018186803b15801561016557600080fd5b505afa158015610179573d6000803e3d6000fd5b505050506040513d602081101561018f57600080fd5b505160408051631f96e76f60e01b81529051919250600091734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b91631f96e76f916004808301926020929190829003018186803b1580156101e257600080fd5b505afa1580156101f6573d6000803e3d6000fd5b505050506040513d602081101561020c57600080fd5b50516040805163d5abeb0160e01b81529051919250600091734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9163d5abeb01916004808301926020929190829003018186803b15801561025f57600080fd5b505afa158015610273573d6000803e3d6000fd5b505050506040513d602081101561028957600080fd5b50519050600083858161029857fe5b049050828110156102d25780830383888202816102b157fe5b049750858303808911156102c3578098505b889750505050505050506102dc565b6000955050505050505b919050565b734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b8156fea26469706673582212201089085ce342756d6576e73093ff6d698aede57ecc775f6fdb48dc94ffd2dc3364736f6c634300060c0033
Deployed Bytecode
0x733c75bfe6fbfda3a94e7e7e8c2216afc684de534330146080604052600436106100405760003560e01c80638487474514610045578063923c1d6114610074575b600080fd5b6100626004803603602081101561005b57600080fd5b5035610098565b60408051918252519081900360200190f35b61007c6102e1565b604080516001600160a01b039092168252519081900360200190f35b600080734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156100e857600080fd5b505afa1580156100fc573d6000803e3d6000fd5b505050506040513d602081101561011257600080fd5b50516040805163553a731160e11b81529051919250600091734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9163aa74e622916004808301926020929190829003018186803b15801561016557600080fd5b505afa158015610179573d6000803e3d6000fd5b505050506040513d602081101561018f57600080fd5b505160408051631f96e76f60e01b81529051919250600091734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b91631f96e76f916004808301926020929190829003018186803b1580156101e257600080fd5b505afa1580156101f6573d6000803e3d6000fd5b505050506040513d602081101561020c57600080fd5b50516040805163d5abeb0160e01b81529051919250600091734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b9163d5abeb01916004808301926020929190829003018186803b15801561025f57600080fd5b505afa158015610273573d6000803e3d6000fd5b505050506040513d602081101561028957600080fd5b50519050600083858161029857fe5b049050828110156102d25780830383888202816102b157fe5b049750858303808911156102c3578098505b889750505050505050506102dc565b6000955050505050505b919050565b734e3fbd56cd56c3e72c1403e103b45db9da5b9d2b8156fea26469706673582212201089085ce342756d6576e73093ff6d698aede57ecc775f6fdb48dc94ffd2dc3364736f6c634300060c0033
Deployed Bytecode Sourcemap
443:977:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;551:866;;;;;;;;;;;;;;;;-1:-1:-1;551:866:0;;:::i;:::-;;;;;;;;;;;;;;;;467:75;;;:::i;:::-;;;;-1:-1:-1;;;;;467:75:0;;;;;;;;;;;;;;551:866;615:7;634:14;499:42;-1:-1:-1;;;;;651:15:0;;:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;651:17:0;707:23;;;-1:-1:-1;;;707:23:0;;;;651:17;;-1:-1:-1;679:25:0;;499:42;;707:21;;:23;;;;;651:17;;707:23;;;;;;;499:42;707:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;707:23:0;763:17;;;-1:-1:-1;;;763:17:0;;;;707:23;;-1:-1:-1;741:19:0;;499:42;;763:15;;:17;;;;;707:23;;763:17;;;;;;;499:42;763:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;763:17:0;811:15;;;-1:-1:-1;;;811:15:0;;;;763:17;;-1:-1:-1;791:17:0;;499:42;;811:13;;:15;;;;;763:17;;811:15;;;;;;;499:42;811:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;811:15:0;;-1:-1:-1;839:13:0;864:17;855:6;864:17;855:26;;;;;839:42;;941:11;933:5;:19;930:461;;;1048:19;;;:11;1114:19;;;1048:11;1114:33;;;;;;-1:-1:-1;1217:18:0;;;1253:20;;;1250:79;;;1303:10;1293:20;;1250:79;1372:7;1365:14;;;;;;;;;;;930:461;1408:1;1401:8;;;;;;;551:866;;;;:::o;467:75::-;499:42;467:75;:::o
Swarm Source
ipfs://1089085ce342756d6576e73093ff6d698aede57ecc775f6fdb48dc94ffd2dc33
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.