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
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*1000000000000000000,ethPrice); levelPrice[2] = SafeMath.div(10*1000000000000000000,ethPrice); levelPrice[3] = SafeMath.div(20*1000000000000000000,ethPrice); levelPrice[4] = SafeMath.div(30*1000000000000000000,ethPrice); levelPrice[5] = SafeMath.div(40*1000000000000000000,ethPrice); levelPrice[6] = SafeMath.div(50*1000000000000000000,ethPrice); levelPrice[7] = SafeMath.div(75*1000000000000000000,ethPrice); levelPrice[8] = SafeMath.div(100*1000000000000000000,ethPrice); levelPrice[9] = SafeMath.div(125*1000000000000000000,ethPrice); levelPrice[10] = SafeMath.div(150*1000000000000000000,ethPrice); levelPrice[11] = SafeMath.div(200*1000000000000000000,ethPrice); levelPrice[12] = SafeMath.div(250*1000000000000000000,ethPrice); levelPrice[13] = SafeMath.div(300*1000000000000000000,ethPrice); levelPrice[14] = SafeMath.div(400*1000000000000000000,ethPrice); levelPrice[15] = SafeMath.div(500*1000000000000000000,ethPrice); levelPrice[16] = SafeMath.div(750*1000000000000000000,ethPrice); levelPrice[17] = SafeMath.div(1000*1000000000000000000,ethPrice); levelPrice[18] = SafeMath.div(1250*1000000000000000000,ethPrice); levelPrice[19] = SafeMath.div(1500*1000000000000000000,ethPrice); levelPrice[20] = SafeMath.div(2000*1000000000000000000,ethPrice); levelPrice[21] = SafeMath.div(3000*1000000000000000000,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
608060405234801561001057600080fd5b5061052d806100206000396000f30060806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630156a55481146100715780635128e61814610088578063aad049b3146100af578063bf4b1990146100c7578063ff186b2e146100dc575b600080fd5b34801561007d57600080fd5b506100866100f1565b005b34801561009457600080fd5b5061009d610329565b60408051918252519081900360200190f35b3480156100bb57600080fd5b5061009d60043561032f565b3480156100d357600080fd5b5061009d610343565b3480156100e857600080fd5b5061009d6103f3565b6100f9610343565b601781905567016345785d8a000060165561011d90674563918244f40000906103f9565b60015560175461013690678ac7230489e80000906103f9565b600255601754610150906801158e460913d00000906103f9565b60035560175461016a906801a055690d9db80000906103f9565b6004556017546101849068022b1c8c1227a00000906103f9565b60055560175461019e906802b5e3af16b1880000906103f9565b6006556017546101b890680410d586a20a4c0000906103f9565b6007556017546101d29068056bc75e2d63100000906103f9565b6008556017546101ec906806c6b935b8bbd40000906103f9565b60095560175461020690680821ab0d4414980000906103f9565b600a5560175461022090680ad78ebc5ac6200000906103f9565b600b5560175461023a90680d8d726b7177a80000906103f9565b600c5560175461025490681043561a8829300000906103f9565b600d5560175461026e906815af1d78b58c400000906103f9565b600e5560175461028890681b1ae4d6e2ef500000906103f9565b600f556017546102a2906828a857425466f80000906103f9565b6010556017546102bc90683635c9adc5dea00000906103f9565b6011556017546102d6906843c33c193756480000906103f9565b6012556017546102f090685150ae84a8cdf00000906103f9565b60135560175461030a90686c6b935b8bbd400000906103f9565b6014556017546103249068a2a15d09519be00000906103f9565b601555565b60165481565b6000816016811061033c57fe5b0154905081565b60008073729d19f657bd0614b4985cf1d82531c67569197b90508073ffffffffffffffffffffffffffffffffffffffff166357de26a46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156103c157600080fd5b505af11580156103d5573d6000803e3d6000fd5b505050506040513d60208110156103eb57600080fd5b505191505090565b60175481565b600061043b83836040805190810160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610442565b9392505050565b600080828185116104eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b0578181015183820152602001610498565b50505050905090810190601f1680156104dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5083858115156104f757fe5b04959450505050505600a165627a7a72305820f884580fe9d6c58c2f91511f7e1fd24f1c2ce937d485f1040383f11b834262fd0029
Deployed Bytecode
0x60806040526004361061006c5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630156a55481146100715780635128e61814610088578063aad049b3146100af578063bf4b1990146100c7578063ff186b2e146100dc575b600080fd5b34801561007d57600080fd5b506100866100f1565b005b34801561009457600080fd5b5061009d610329565b60408051918252519081900360200190f35b3480156100bb57600080fd5b5061009d60043561032f565b3480156100d357600080fd5b5061009d610343565b3480156100e857600080fd5b5061009d6103f3565b6100f9610343565b601781905567016345785d8a000060165561011d90674563918244f40000906103f9565b60015560175461013690678ac7230489e80000906103f9565b600255601754610150906801158e460913d00000906103f9565b60035560175461016a906801a055690d9db80000906103f9565b6004556017546101849068022b1c8c1227a00000906103f9565b60055560175461019e906802b5e3af16b1880000906103f9565b6006556017546101b890680410d586a20a4c0000906103f9565b6007556017546101d29068056bc75e2d63100000906103f9565b6008556017546101ec906806c6b935b8bbd40000906103f9565b60095560175461020690680821ab0d4414980000906103f9565b600a5560175461022090680ad78ebc5ac6200000906103f9565b600b5560175461023a90680d8d726b7177a80000906103f9565b600c5560175461025490681043561a8829300000906103f9565b600d5560175461026e906815af1d78b58c400000906103f9565b600e5560175461028890681b1ae4d6e2ef500000906103f9565b600f556017546102a2906828a857425466f80000906103f9565b6010556017546102bc90683635c9adc5dea00000906103f9565b6011556017546102d6906843c33c193756480000906103f9565b6012556017546102f090685150ae84a8cdf00000906103f9565b60135560175461030a90686c6b935b8bbd400000906103f9565b6014556017546103249068a2a15d09519be00000906103f9565b601555565b60165481565b6000816016811061033c57fe5b0154905081565b60008073729d19f657bd0614b4985cf1d82531c67569197b90508073ffffffffffffffffffffffffffffffffffffffff166357de26a46040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156103c157600080fd5b505af11580156103d5573d6000803e3d6000fd5b505050506040513d60208110156103eb57600080fd5b505191505090565b60175481565b600061043b83836040805190810160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610442565b9392505050565b600080828185116104eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b0578181015183820152602001610498565b50505050905090810190601f1680156104dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5083858115156104f757fe5b04959450505050505600a165627a7a72305820f884580fe9d6c58c2f91511f7e1fd24f1c2ce937d485f1040383f11b834262fd0029
Deployed Bytecode Sourcemap
1674:2026:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1801:1671;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1801:1671:0;;;;;;1740:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1740:21:0;;;;;;;;;;;;;;;;;;;;1707:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;1707:26:0;;;;;3482:207;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3482:207:0;;;;1768:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1768:20:0;;;;1801:1671;1866:16;:14;:16::i;:::-;1857:8;:25;;;1913:9;1903;:19;1949:44;;1962:21;;1949:12;:44::i;:::-;1944:1;1933:60;2056:8;;2020:45;;2033:22;;2020:12;:45::i;:::-;2015:1;2004:61;2128:8;;2092:45;;2105:22;;2092:12;:45::i;:::-;2087:1;2076:61;2200:8;;2164:45;;2177:22;;2164:12;:45::i;:::-;2159:1;2148:61;2272:8;;2236:45;;2249:22;;2236:12;:45::i;:::-;2231:1;2220:61;2344:8;;2308:45;;2321:22;;2308:12;:45::i;:::-;2303:1;2292:61;2416:8;;2380:45;;2393:22;;2380:12;:45::i;:::-;2375:1;2364:61;2489:8;;2452:46;;2465:23;;2452:12;:46::i;:::-;2447:1;2436:62;2562:8;;2525:46;;2538:23;;2525:12;:46::i;:::-;2520:1;2509:62;2636:8;;2599:46;;2612:23;;2599:12;:46::i;:::-;2593:2;2582:63;2710:8;;2673:46;;2686:23;;2673:12;:46::i;:::-;2667:2;2656:63;2784:8;;2747:46;;2760:23;;2747:12;:46::i;:::-;2741:2;2730:63;2858:8;;2821:46;;2834:23;;2821:12;:46::i;:::-;2815:2;2804:63;2932:8;;2895:46;;2908:23;;2895:12;:46::i;:::-;2889:2;2878:63;3006:8;;2969:46;;2982:23;;2969:12;:46::i;:::-;2963:2;2952:63;3080:8;;3043:46;;3056:23;;3043:12;:46::i;:::-;3037:2;3026:63;3155:8;;3117:47;;3130:24;;3117:12;:47::i;:::-;3111:2;3100:64;3230:8;;3192:47;;3205:24;;3192:12;:47::i;:::-;3186:2;3175:64;3305:8;;3267:47;;3280:24;;3267:12;:47::i;:::-;3261:2;3250:64;3380:8;;3342:47;;3355:24;;3342:12;:47::i;:::-;3336:2;3325:64;3455:8;;3417:47;;3430:24;;3417:12;:47::i;:::-;3411:2;3400:64;1801:1671::o;1740:21::-;;;;:::o;1707:26::-;;;;;;;;;;;;;-1:-1:-1;1707:26:0;:::o;3482:207::-;3529:4;3542:23;3568:42;3542:68;;3653:15;3637:37;;;:39;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3637:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3637:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3637:39:0;;-1:-1:-1;3482:207:0;;:::o;1768:20::-;;;;:::o;847:132::-;905:7;932:39;936:1;939;932:39;;;;;;;;;;;;;;;;;;:3;:39::i;:::-;925:46;847:132;-1:-1:-1;;;847:132:0:o;987:278::-;1073:7;;1108:12;1101:5;;;1093:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;1093:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1148:1;1144;:5;;;;;;;;;987:278;-1:-1:-1;;;;;987:278:0:o
Swarm Source
bzzr://f884580fe9d6c58c2f91511f7e1fd24f1c2ce937d485f1040383f11b834262fd
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.