More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 2 from a total of 2 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add | 5419748 | 64 days ago | IN | 0 S | 0.00731802 | ||||
Add | 5419743 | 64 days ago | IN | 0 S | 0.00893458 |
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xc58a14e3...4C0625a2F The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
TShareRewardPool
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity 0.6.12;import "@openzeppelin/contracts/token/ERC20/IERC20.sol";import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";import "@openzeppelin/contracts/math/SafeMath.sol";// Note that this pool has no minter key of tSHARE (rewards).// Instead, the governance will call tSHARE distributeReward method and send reward to this pool at the beginning.contract TShareRewardPool {using SafeMath for uint256;using SafeERC20 for IERC20;// governanceaddress public operator;// Info of each user.struct UserInfo {uint256 amount; // How many LP tokens the user has provided.uint256 rewardDebt; // Reward debt. See explanation below.}// Info of each pool.struct PoolInfo {IERC20 token; // Address of LP token contract.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.6.0 <0.8.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, with an overflow flag.** _Available since v3.4._*/function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {uint256 c = a + b;if (c < a) return (false, 0);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.6.0 <0.8.0;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/interface IERC20 {/*** @dev Returns the amount of tokens in existence.*/function totalSupply() external view returns (uint256);/*** @dev Returns the amount of tokens owned by `account`.*/function balanceOf(address account) external view returns (uint256);/*** @dev Moves `amount` tokens from the caller's account to `recipient`.** Returns a boolean value indicating whether the operation succeeded.** Emits a {Transfer} event.*/function transfer(address recipient, uint256 amount) external returns (bool);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.6.0 <0.8.0;import "./IERC20.sol";import "../../math/SafeMath.sol";import "../../utils/Address.sol";/*** @title SafeERC20* @dev Wrappers around ERC20 operations that throw on failure (when the token* contract returns false). Tokens that return no value (and instead revert or* throw on failure) are also supported, non-reverting calls are assumed to be* successful.* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.*/library SafeERC20 {using SafeMath for uint256;using Address for address;function safeTransfer(IERC20 token, address to, uint256 value) internal {_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));}function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity >=0.6.2 <0.8.0;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed* ====*/function isContract(address account) internal view returns (bool) {
123456789101112131415161718{"optimizer": {"enabled": true,"runs": 200},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}}}
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_tshare","type":"address"},{"internalType":"uint256","name":"_poolStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"TOTAL_REWARDS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"uint256","name":"_lastRewardTime","type":"uint256"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTime","type":"uint256"},{"internalType":"uint256","name":"_toTime","type":"uint256"}],"name":"getGeneratedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"governanceRecoverUnsupported","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolEndTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTime","type":"uint256"},{"internalType":"uint256","name":"accTSharePerShare","type":"uint256"},{"internalType":"bool","name":"isStarted","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"runningTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tSharePerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tshare","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80635f96dc11116100b857806396805e541161007c57806396805e54146103165780639e63d26114610350578063b3ab15fb14610358578063cf4b55cb1461037e578063e2bbb158146103aa578063ee6822a7146103cd57610137565b80635f96dc11146102b1578063630b5ba1146102b95780636e271dd5146102c157806393f1a40b146102c9578063943f013d1461030e57610137565b8063441a3e70116100ff578063441a3e70146101fa57806351eb05a61461021d5780635312ea8e1461023a57806354575af414610257578063570ca7351461028d57610137565b806309cf60911461013c5780631526fe271461015657806317caf6f1146101aa5780631ab06ee5146101b2578063231f0c6a146101d7575b600080fd5b6101446103d5565b60408051918252519081900360200190f35b6101736004803603602081101561016c57600080fd5b50356103e3565b604080516001600160a01b039096168652602086019490945284840192909252606084015215156080830152519081900360a00190f35b61014461042e565b6101d5600480360360408110156101c857600080fd5b5080359060200135610434565b005b610144600480360360408110156101ed57600080fd5b50803590602001356104e2565b6101d56004803603604081101561021057600080fd5b50803590602001356105a7565b6101d56004803603602081101561023357600080fd5b5035610764565b6101d56004803603602081101561025057600080fd5b50356108c2565b6101d56004803603606081101561026d57600080fd5b506001600160a01b0381358116916020810135916040909101351661095e565b610295610aa6565b604080516001600160a01b039092168252519081900360200190f35b610144610ab5565b6101d5610abb565b610144610ade565b6102f5600480360360408110156102df57600080fd5b50803590602001356001600160a01b0316610ae4565b6040805192835260208301919091528051918290030190f35b610144610b08565b6101d56004803603608081101561032c57600080fd5b508035906001600160a01b0360208201351690604081013515159060600135610b0e565b610144610d0b565b6101d56004803603602081101561036e57600080fd5b50356001600160a01b0316610d11565b6101446004803603604081101561039457600080fd5b50803590602001356001600160a01b0316610d7c565b6101d5600480360360408110156103c057600080fd5b5080359060200135610ed8565b610295611048565b690c99805fe37d3e30000081565b600281815481106103f057fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909160ff1685565b60045481565b6000546001600160a01b0316331461047d5760405162461bcd60e51b815260040180806020018281038252602c81526020018061169b602c913960400191505060405180910390fd5b610485610abb565b60006002838154811061049457fe5b60009182526020909120600590910201600481015490915060ff16156104db576104d7826104d1836001015460045461105790919063ffffffff16565b906110b4565b6004555b6001015550565b60008183106104f3575060006105a1565b600654821061055b57600654831061050d575060006105a1565b60055483116105405761053960075461053360055460065461105790919063ffffffff16565b90611115565b90506105a1565b6105396007546105338560065461105790919063ffffffff16565b600554821161056c575060006105a1565b6005548311610590576105396007546105336005548561105790919063ffffffff16565b600754610539906105338486611057565b92915050565b60003390506000600284815481106105bb57fe5b600091825260208083208784526003825260408085206001600160a01b03881686529092529220805460059092029092019250841115610637576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b61064085610764565b600061067d8260010154610677670de0b6b3a76400006106718760030154876000015461111590919063ffffffff16565b9061116e565b90611057565b905080156106cf5761068f84826111d5565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b84156106f95781546106e19086611057565b825582546106f9906001600160a01b0316858761128b565b6003830154825461071791670de0b6b3a76400009161067191611115565b600183015560408051868152905187916001600160a01b038716917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a3505050505050565b60006002828154811061077357fe5b906000526020600020906005020190508060020154421161079457506108bf565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156107de57600080fd5b505afa1580156107f2573d6000803e3d6000fd5b505050506040513d602081101561080857600080fd5b505190508061081e5750426002909101556108bf565b600482015460ff1661084f576004808301805460ff19166001908117909155830154905461084b916110b4565b6004555b600454156108b65760006108678360020154426104e2565b9050600061088860045461067186600101548561111590919063ffffffff16565b90506108ae6108a38461067184670de0b6b3a7640000611115565b6003860154906110b4565b600385015550505b50426002909101555b50565b6000600282815481106108d157fe5b600091825260208083208584526003825260408085203380875293528420805485825560018201959095556005909302018054909450919291610921916001600160a01b0391909116908361128b565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b6000546001600160a01b031633146109a75760405162461bcd60e51b815260040180806020018281038252602c81526020018061169b602c913960400191505060405180910390fd5b6006546276a70001421015610a8d576001546001600160a01b0384811691161415610a02576040805162461bcd60e51b815260206004820152600660248201526574736861726560d01b604482015290519081900360640190fd5b60025460005b81811015610a8a57600060028281548110610a1f57fe5b6000918252602090912060059091020180549091506001600160a01b0387811691161415610a81576040805162461bcd60e51b815260206004820152600a6024820152693837b7b6173a37b5b2b760b11b604482015290519081900360640190fd5b50600101610a08565b50505b610aa16001600160a01b038416828461128b565b505050565b6000546001600160a01b031681565b60055481565b60025460005b81811015610ada57610ad281610764565b600101610ac1565b5050565b60065481565b60036020908152600092835260408084209091529082529020805460019091015482565b60085481565b6000546001600160a01b03163314610b575760405162461bcd60e51b815260040180806020018281038252602c81526020018061169b602c913960400191505060405180910390fd5b610b60836112dd565b8115610b6e57610b6e610abb565b600554421015610b9a5780610b865750600554610b95565b600554811015610b9557506005545b610bae565b801580610ba657504281105b15610bae5750425b600060055482111580610bc15750428211155b6040805160a0810182526001600160a01b03878116825260208201898152928201868152600060608401818152861580156080870190815260028054600181018255945295517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace600590940293840180546001600160a01b031916919096161790945594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf82015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad082015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad184015590517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad2909201805460ff191692151592909217909155909150610d0457600454610d0090866110b4565b6004555b5050505050565b60075481565b6000546001600160a01b03163314610d5a5760405162461bcd60e51b815260040180806020018281038252602c81526020018061169b602c913960400191505060405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008060028481548110610d8c57fe5b60009182526020808320878452600380835260408086206001600160a01b03808b168852908552818720600590960290930191820154825482516370a0823160e01b815230600482015292519398509596909590949316926370a0823192602480840193829003018186803b158015610e0457600080fd5b505afa158015610e18573d6000803e3d6000fd5b505050506040513d6020811015610e2e57600080fd5b5051600285015490915042118015610e4557508015155b15610ea2576000610e5a8560020154426104e2565b90506000610e7b60045461067188600101548561111590919063ffffffff16565b9050610e9d610e968461067184670de0b6b3a7640000611115565b85906110b4565b935050505b610ecd8360010154610677670de0b6b3a764000061067186886000015461111590919063ffffffff16565b979650505050505050565b6000339050600060028481548110610eec57fe5b600091825260208083208784526003825260408085206001600160a01b0388168652909252922060059091029091019150610f2685610764565b805415610fb2576000610f5e8260010154610677670de0b6b3a76400006106718760030154876000015461111590919063ffffffff16565b90508015610fb057610f7084826111d5565b6040805182815290516001600160a01b038616917fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486919081900360200190a25b505b8315610fde578154610fcf906001600160a01b0316843087611377565b8054610fdb90856110b4565b81555b60038201548154610ffc91670de0b6b3a76400009161067191611115565b600182015560408051858152905186916001600160a01b038616917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a35050505050565b6001546001600160a01b031681565b6000828211156110ae576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008282018381101561110e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082611124575060006105a1565b8282028284828161113157fe5b041461110e5760405162461bcd60e51b81526004018080602001828103825260218152602001806116ed6021913960400191505060405180910390fd5b60008082116111c4576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816111cd57fe5b049392505050565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561122057600080fd5b505afa158015611234573d6000803e3d6000fd5b505050506040513d602081101561124a57600080fd5b505190508015610aa1578082111561127857600154611273906001600160a01b0316848361128b565b610aa1565b600154610aa1906001600160a01b031684845b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610aa19084906113d7565b60025460005b81811015610aa157826001600160a01b03166002828154811061130257fe5b60009182526020909120600590910201546001600160a01b0316141561136f576040805162461bcd60e51b815260206004820181905260248201527f545368617265526577617264506f6f6c3a206578697374696e6720706f6f6c3f604482015290519081900360640190fd5b6001016112e3565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526113d19085906113d7565b50505050565b606061142c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114889092919063ffffffff16565b805190915015610aa15780806020019051602081101561144b57600080fd5b5051610aa15760405162461bcd60e51b815260040180806020018281038252602a81526020018061170e602a913960400191505060405180910390fd5b6060611497848460008561149f565b949350505050565b6060824710156114e05760405162461bcd60e51b81526004018080602001828103825260268152602001806116c76026913960400191505060405180910390fd5b6114e9856115f0565b61153a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106115795780518252601f19909201916020918201910161155a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146115db576040519150601f19603f3d011682016040523d82523d6000602084013e6115e0565b606091505b5091509150610ecd8282866115f6565b3b151590565b6060831561160557508161110e565b8251156116155782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561165f578181015183820152602001611647565b50505050905090810190601f16801561168c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe545368617265526577617264506f6f6c3a2063616c6c6572206973206e6f7420746865206f70657261746f72416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220cc31a79f5029b9c398b320cd28f658ef385bf15821a2858c2a83ee9a94596ffe64736f6c634300060c0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.