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:
EtherPrice
Compiler Version
v0.4.26+commit.4563c3fc
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-08-29 */ pragma solidity >=0.4.23 <0.5.0; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IMakerPriceFeed { function read() external view returns (bytes32); } contract EtherPrice { uint[22] public levelPrice; uint public regAmount; uint public ethPrice; function updateEtherPrices() public{ ethPrice=getETHUSDPrice(); regAmount=0.1 ether; levelPrice[1] = SafeMath.div(5,ethPrice); levelPrice[2] = SafeMath.div(10,ethPrice); levelPrice[3] = SafeMath.div(20,ethPrice); levelPrice[4] = SafeMath.div(30,ethPrice); levelPrice[5] = SafeMath.div(40,ethPrice); levelPrice[6] = SafeMath.div(50,ethPrice); levelPrice[7] = SafeMath.div(75,ethPrice); levelPrice[8] = SafeMath.div(100,ethPrice); levelPrice[9] = SafeMath.div(125,ethPrice); levelPrice[10] = SafeMath.div(150,ethPrice); levelPrice[11] = SafeMath.div(200,ethPrice); levelPrice[12] = SafeMath.div(250,ethPrice); levelPrice[13] = SafeMath.div(300,ethPrice); levelPrice[14] = SafeMath.div(400,ethPrice); levelPrice[15] = SafeMath.div(500,ethPrice); levelPrice[16] = SafeMath.div(750,ethPrice); levelPrice[17] = SafeMath.div(1000,ethPrice); levelPrice[18] = SafeMath.div(1250,ethPrice); levelPrice[19] = SafeMath.div(1500,ethPrice); levelPrice[20] = SafeMath.div(2000,ethPrice); levelPrice[21] = SafeMath.div(3000,ethPrice); } function getETHUSDPrice() public view returns (uint) { address ethUsdPriceFeed = 0x729D19f657BD0614b4985Cf1D82531c67569197B; return uint( IMakerPriceFeed(ethUsdPriceFeed).read() ); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":false,"inputs":[],"name":"updateEtherPrices","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"regAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"levelPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getETHUSDPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ethPrice","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50610490806100206000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630156a55481146100715780635128e61814610088578063aad049b3146100af578063bf4b1990146100c7578063ff186b2e146100dc575b600080fd5b34801561007d57600080fd5b506100866100f1565b005b34801561009457600080fd5b5061009d61028c565b60408051918252519081900360200190f35b3480156100bb57600080fd5b5061009d600435610292565b3480156100d357600080fd5b5061009d6102a6565b3480156100e857600080fd5b5061009d610356565b6100f96102a6565b601781905567016345785d8a00006016556101169060059061035c565b60015560175461012890600a9061035c565b60025560175461013a9060149061035c565b60035560175461014c90601e9061035c565b60045560175461015e9060289061035c565b6005556017546101709060329061035c565b60065560175461018290604b9061035c565b6007556017546101949060649061035c565b6008556017546101a690607d9061035c565b6009556017546101b89060969061035c565b600a556017546101ca9060c89061035c565b600b556017546101dc9060fa9061035c565b600c556017546101ef9061012c9061035c565b600d55601754610202906101909061035c565b600e55601754610215906101f49061035c565b600f55601754610228906102ee9061035c565b60105560175461023b906103e89061035c565b60115560175461024e906104e29061035c565b601255601754610261906105dc9061035c565b601355601754610274906107d09061035c565b60145560175461028790610bb89061035c565b601555565b60165481565b6000816016811061029f57fe5b0154905081565b60008073729d19f657bd0614b4985cf1d82531c67569197b90508073ffffffffffffffffffffffffffffffffffffffff166357de26a46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561032457600080fd5b505af1158015610338573d6000803e3d6000fd5b505050506040513d602081101561034e57600080fd5b505191505090565b60175481565b600061039e83836040805190810160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506103a5565b9392505050565b6000808281851161044e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104135781810151838201526020016103fb565b50505050905090810190601f1680156104405780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50838581151561045a57fe5b04959450505050505600a165627a7a7230582066b3fe48aaac7780d7552d2826321e77ad7387d0867b02905f7f2cbd528e56f80029
Deployed Bytecode
0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630156a55481146100715780635128e61814610088578063aad049b3146100af578063bf4b1990146100c7578063ff186b2e146100dc575b600080fd5b34801561007d57600080fd5b506100866100f1565b005b34801561009457600080fd5b5061009d61028c565b60408051918252519081900360200190f35b3480156100bb57600080fd5b5061009d600435610292565b3480156100d357600080fd5b5061009d6102a6565b3480156100e857600080fd5b5061009d610356565b6100f96102a6565b601781905567016345785d8a00006016556101169060059061035c565b60015560175461012890600a9061035c565b60025560175461013a9060149061035c565b60035560175461014c90601e9061035c565b60045560175461015e9060289061035c565b6005556017546101709060329061035c565b60065560175461018290604b9061035c565b6007556017546101949060649061035c565b6008556017546101a690607d9061035c565b6009556017546101b89060969061035c565b600a556017546101ca9060c89061035c565b600b556017546101dc9060fa9061035c565b600c556017546101ef9061012c9061035c565b600d55601754610202906101909061035c565b600e55601754610215906101f49061035c565b600f55601754610228906102ee9061035c565b60105560175461023b906103e89061035c565b60115560175461024e906104e29061035c565b601255601754610261906105dc9061035c565b601355601754610274906107d09061035c565b60145560175461028790610bb89061035c565b601555565b60165481565b6000816016811061029f57fe5b0154905081565b60008073729d19f657bd0614b4985cf1d82531c67569197b90508073ffffffffffffffffffffffffffffffffffffffff166357de26a46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b15801561032457600080fd5b505af1158015610338573d6000803e3d6000fd5b505050506040513d602081101561034e57600080fd5b505191505090565b60175481565b600061039e83836040805190810160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506103a5565b9392505050565b6000808281851161044e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104135781810151838201526020016103fb565b50505050905090810190601f1680156104405780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50838581151561045a57fe5b04959450505050505600a165627a7a7230582066b3fe48aaac7780d7552d2826321e77ad7387d0867b02905f7f2cbd528e56f80029
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.