Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 11 from a total of 11 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 11474230 | 1508 days ago | IN | 0 ETH | 0.00572707 | ||||
Claim | 11399678 | 1520 days ago | IN | 0 ETH | 0.00188202 | ||||
Claim | 11339662 | 1529 days ago | IN | 0 ETH | 0.00339481 | ||||
Claim | 11339635 | 1529 days ago | IN | 0 ETH | 0.00135707 | ||||
Claim | 11339104 | 1529 days ago | IN | 0 ETH | 0.00090386 | ||||
Claim | 11338890 | 1529 days ago | IN | 0 ETH | 0.00079055 | ||||
Claim | 11308542 | 1534 days ago | IN | 0 ETH | 0.00314086 | ||||
Claim | 11306622 | 1534 days ago | IN | 0 ETH | 0.00161199 | ||||
Claim | 11306480 | 1534 days ago | IN | 0 ETH | 0.00155706 | ||||
Claim | 11305761 | 1534 days ago | IN | 0 ETH | 0.00105579 | ||||
Claim | 11305454 | 1534 days ago | IN | 0 ETH | 0.00133905 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
RefReward
Compiler Version
v0.6.0+commit.26b70077
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2020-11-14 */ // Dependency file: @openzeppelin/contracts/math/SafeMath.sol // SPDX-License-Identifier: MIT // pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be 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; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // Root file: contracts/Mint/RefReward.sol pragma solidity ^0.6; // import "@openzeppelin/contracts/math/SafeMath.sol"; interface IRef { function scoreOf(address a) external view returns (uint256); } interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); } contract RefReward { using SafeMath for uint256; address public developer; uint8 public first_ratio = 10; mapping(address => uint256) public claimed; IRef public constant ref = IRef(0x08b8C77A770BbE8E19A8b2E7d90516F0ED7a6D57); IERC20 public constant token = IERC20( 0x2c4Cd2DeCa2397B12f0982eee383C56895dfD31b ); IERC20 public sgToken = IERC20(0x523EEAfdaC23FA2CB0C3873CdA4818cdc80e28E8); uint256 public sgTokenLimit = 10 * 1e18; modifier onlyDeveloper() { require(msg.sender == developer, "You're not developer"); _; } constructor() public { developer = msg.sender; } function claim() external { if (sgToken.balanceOf(msg.sender) >= sgTokenLimit) { uint256 score = ref.scoreOf(msg.sender); uint256 delta = score - claimed[msg.sender]; token.transfer(msg.sender, delta.mul(first_ratio).div(100)); claimed[msg.sender] = score; } } function setSgTokenLimit(uint256 _limit) external onlyDeveloper { sgTokenLimit = _limit; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"developer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"first_ratio","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ref","outputs":[{"internalType":"contract IRef","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setSgTokenLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sgToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sgTokenLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405260008054600560a11b60ff60a01b19909116179055600280546001600160a01b03191673523eeafdac23fa2cb0c3873cda4818cdc80e28e8179055678ac7230489e8000060035534801561005757600080fd5b50600080546001600160a01b031916331790556105b0806100796000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063ac66ea8d11610066578063ac66ea8d146100fe578063c884ef8314610106578063ca4b208b1461012c578063f099304c14610134578063fc0c546a1461015157610093565b806321a78f68146100985780632a934a32146100bc5780634e71d92d146100d65780638574e23f146100e0575b600080fd5b6100a0610159565b604080516001600160a01b039092168252519081900360200190f35b6100c4610171565b60408051918252519081900360200190f35b6100de610177565b005b6100e8610365565b6040805160ff9092168252519081900360200190f35b6100a0610375565b6100c46004803603602081101561011c57600080fd5b50356001600160a01b0316610384565b6100a0610396565b6100de6004803603602081101561014a57600080fd5b50356103a5565b6100a0610400565b7308b8c77a770bbe8e19a8b2e7d90516f0ed7a6d5781565b60035481565b600354600254604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156101c557600080fd5b505afa1580156101d9573d6000803e3d6000fd5b505050506040513d60208110156101ef57600080fd5b505110610363576040805163099d7a2b60e11b815233600482015290516000917308b8c77a770bbe8e19a8b2e7d90516f0ed7a6d579163133af45691602480820192602092909190829003018186803b15801561024b57600080fd5b505afa15801561025f573d6000803e3d6000fd5b505050506040513d602081101561027557600080fd5b5051336000818152600160205260408120549054929350830391732c4cd2deca2397b12f0982eee383c56895dfd31b9163a9059cbb916102d3906064906102c7908790600160a01b900460ff16610418565b9063ffffffff61047a16565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561032257600080fd5b505af1158015610336573d6000803e3d6000fd5b505050506040513d602081101561034c57600080fd5b505033600090815260016020526040902091909155505b565b600054600160a01b900460ff1681565b6002546001600160a01b031681565b60016020526000908152604090205481565b6000546001600160a01b031681565b6000546001600160a01b031633146103fb576040805162461bcd60e51b81526020600482015260146024820152732cb7ba93b932903737ba103232bb32b637b832b960611b604482015290519081900360640190fd5b600355565b732c4cd2deca2397b12f0982eee383c56895dfd31b81565b60008261042757506000610474565b8282028284828161043457fe5b04146104715760405162461bcd60e51b815260040180806020018281038252602181526020018061055a6021913960400191505060405180910390fd5b90505b92915050565b600061047183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836105435760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105085781810151838201526020016104f0565b50505050905090810190601f1680156105355780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161054f57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220babeed376d705e7d1754f6c664900f692f81202fc367da1b3558d40627a4d45a64736f6c63430006000033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063ac66ea8d11610066578063ac66ea8d146100fe578063c884ef8314610106578063ca4b208b1461012c578063f099304c14610134578063fc0c546a1461015157610093565b806321a78f68146100985780632a934a32146100bc5780634e71d92d146100d65780638574e23f146100e0575b600080fd5b6100a0610159565b604080516001600160a01b039092168252519081900360200190f35b6100c4610171565b60408051918252519081900360200190f35b6100de610177565b005b6100e8610365565b6040805160ff9092168252519081900360200190f35b6100a0610375565b6100c46004803603602081101561011c57600080fd5b50356001600160a01b0316610384565b6100a0610396565b6100de6004803603602081101561014a57600080fd5b50356103a5565b6100a0610400565b7308b8c77a770bbe8e19a8b2e7d90516f0ed7a6d5781565b60035481565b600354600254604080516370a0823160e01b815233600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b1580156101c557600080fd5b505afa1580156101d9573d6000803e3d6000fd5b505050506040513d60208110156101ef57600080fd5b505110610363576040805163099d7a2b60e11b815233600482015290516000917308b8c77a770bbe8e19a8b2e7d90516f0ed7a6d579163133af45691602480820192602092909190829003018186803b15801561024b57600080fd5b505afa15801561025f573d6000803e3d6000fd5b505050506040513d602081101561027557600080fd5b5051336000818152600160205260408120549054929350830391732c4cd2deca2397b12f0982eee383c56895dfd31b9163a9059cbb916102d3906064906102c7908790600160a01b900460ff16610418565b9063ffffffff61047a16565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561032257600080fd5b505af1158015610336573d6000803e3d6000fd5b505050506040513d602081101561034c57600080fd5b505033600090815260016020526040902091909155505b565b600054600160a01b900460ff1681565b6002546001600160a01b031681565b60016020526000908152604090205481565b6000546001600160a01b031681565b6000546001600160a01b031633146103fb576040805162461bcd60e51b81526020600482015260146024820152732cb7ba93b932903737ba103232bb32b637b832b960611b604482015290519081900360640190fd5b600355565b732c4cd2deca2397b12f0982eee383c56895dfd31b81565b60008261042757506000610474565b8282028284828161043457fe5b04146104715760405162461bcd60e51b815260040180806020018281038252602181526020018061055a6021913960400191505060405180910390fd5b90505b92915050565b600061047183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250600081836105435760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105085781810151838201526020016104f0565b50505050905090810190601f1680156105355780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161054f57fe5b049594505050505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220babeed376d705e7d1754f6c664900f692f81202fc367da1b3558d40627a4d45a64736f6c63430006000033
Deployed Bytecode Sourcemap
5926:1138:0:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5926:1138:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6105:75;;;:::i;:::-;;;;-1:-1:-1;;;;;6105:75:0;;;;;;;;;;;;;;6376:39;;;:::i;:::-;;;;;;;;;;;;;;;;6614:335;;;:::i;:::-;;6018:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;6293:74;;;:::i;6056:42::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6056:42:0;-1:-1:-1;;;;;6056:42:0;;:::i;5987:24::-;;;:::i;6957:104::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6957:104:0;;:::i;6187:97::-;;;:::i;6105:75::-;6137:42;6105:75;:::o;6376:39::-;;;;:::o;6614:335::-;6688:12;;6655:7;;:29;;;-1:-1:-1;;;6655:29:0;;6673:10;6655:29;;;;;;-1:-1:-1;;;;;6655:7:0;;;;:17;;:29;;;;;;;;;;;;;;;:7;:29;;;5:2:-1;;;;30:1;27;20:12;5:2;6655:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6655:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6655:29:0;:45;6651:291;;6733:23;;;-1:-1:-1;;;6733:23:0;;6745:10;6733:23;;;;;;6717:13;;6137:42;;6733:11;;:23;;;;;;;;;;;;;;;6137:42;6733:23;;;5:2:-1;;;;30:1;27;20:12;5:2;6733:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6733:23:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;6733:23:0;6803:10;6771:13;6795:19;;;:7;6733:23;6795:19;;;;;6866:11;;6733:23;;-1:-1:-1;6787:27:0;;;6235:42;;6829:14;;6856:31;;6883:3;;6856:22;;6787:27;;-1:-1:-1;;;6866:11:0;;;;6856:9;:22::i;:::-;:26;:31;:26;:31;:::i;:::-;6829:59;;;;;;;;;;;;;-1:-1:-1;;;;;6829:59:0;-1:-1:-1;;;;;6829:59:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6829:59:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6829:59:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;6911:10:0;6903:19;;;;:7;6829:59;6903:19;;;;:27;;;;-1:-1:-1;6651:291:0;6614:335::o;6018:29::-;;;-1:-1:-1;;;6018:29:0;;;;;:::o;6293:74::-;;;-1:-1:-1;;;;;6293:74:0;;:::o;6056:42::-;;;;;;;;;;;;;:::o;5987:24::-;;;-1:-1:-1;;;;;5987:24:0;;:::o;6957:104::-;6482:9;;-1:-1:-1;;;;;6482:9:0;6468:10;:23;6460:56;;;;;-1:-1:-1;;;6460:56:0;;;;;;;;;;;;-1:-1:-1;;;6460:56:0;;;;;;;;;;;;;;;7032:12:::1;:21:::0;6957:104::o;6187:97::-;6235:42;6187:97;:::o;2358:471::-;2416:7;2661:6;2657:47;;-1:-1:-1;2691:1:0;2684:8;;2657:47;2728:5;;;2732:1;2728;:5;:1;2752:5;;;;;:10;2744:56;;;;-1:-1:-1;;;2744:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2820:1;-1:-1:-1;2358:471:0;;;;;:::o;3305:132::-;3363:7;3390:39;3394:1;3397;3390:39;;;;;;;;;;;;;;;;;4053:7;4088:12;4081:5;4073:28;;;;-1:-1:-1;;;4073:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;4073:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4112:9;4128:1;4124;:5;;;;;;;3933:312;-1:-1:-1;;;;;3933:312:0:o
Swarm Source
ipfs://babeed376d705e7d1754f6c664900f692f81202fc367da1b3558d40627a4d45a
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.