Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 7 from a total of 7 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stake | 14606137 | 1012 days ago | IN | 0 ETH | 0.00649411 | ||||
Stake | 14249883 | 1068 days ago | IN | 0 ETH | 0.0111674 | ||||
Stake | 13573588 | 1173 days ago | IN | 0 ETH | 0.01749014 | ||||
Stake | 13193332 | 1232 days ago | IN | 0 ETH | 0.01834898 | ||||
Stake | 13008829 | 1261 days ago | IN | 0 ETH | 0.00457954 | ||||
Stake | 13008024 | 1261 days ago | IN | 0 ETH | 0.00656026 | ||||
Increase Reward ... | 12838713 | 1288 days ago | IN | 0 ETH | 0.00759478 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Staking
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
constantinople EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "solowei/contracts/TwoStageOwnable.sol"; contract Staking is TwoStageOwnable { using SafeMath for uint256; using SafeERC20 for IERC20; struct StakeData { uint256 amount; uint256 rewards; uint256 withdrawn; uint256 startsAt; } uint256 public minStakeAmount; uint256 public revenue; IERC20 public stakingToken; uint256 private _freeSize; uint256 private _intervalsCount; uint256 private _intervalDuration; uint256 private _rewardPool; uint256 private _size; uint256 private _totalStaked; mapping(address => StakeData[]) private _stakedInformation; function getTimestamp() internal virtual view returns (uint256) { return block.timestamp; } function freeSize() public view returns (uint256) { return _freeSize; } function intervalsCount() public view returns (uint256) { return _intervalsCount; } function intervalDuration() public view returns (uint256) { return _intervalDuration; } function requiredRewards() public view returns (uint256) { return _calculateRewards(_totalStaked); } function rewardPool() public view returns (uint256) { return _rewardPool; } function size() public view returns (uint256) { return _size; } function totalStaked() public view returns (uint256) { return _totalStaked; } function availableToWithdraw(address account, uint256 id) public view returns (uint256 amountToWithdraw) { StakeData storage stakeData = _getStake(account, id); uint256 pastIntervalsCount = getTimestamp().sub(stakeData.startsAt).div(_intervalDuration); uint256 intervalRewards = stakeData.rewards.div(_intervalsCount); amountToWithdraw = pastIntervalsCount.mul(intervalRewards); if (stakeData.rewards < amountToWithdraw) { amountToWithdraw = stakeData.rewards; } amountToWithdraw = amountToWithdraw.sub(stakeData.withdrawn); } function getStake(address account, uint256 id) public view returns (StakeData memory) { return _getStake(account, id); } function getStakesCount(address account) public view returns (uint256) { return _stakedInformation[account].length; } function getStakes( address account, uint256 offset, uint256 limit ) public view returns (StakeData[] memory stakeData) { StakeData[] storage stakedInformation = _stakedInformation[account]; uint256 stakedInformationLength = stakedInformation.length; uint256 to = offset.add(limit); if (stakedInformationLength < to) to = stakedInformationLength; stakeData = new StakeData[](to - offset); for (uint256 i = offset; i < to; i++) { stakeData[i - offset] = stakedInformation[stakedInformationLength - i - 1]; } } event MinStakeAmountUpdated(address indexed owner, uint256 value); event Staked(address indexed account, uint256 stakeId, uint256 amount); event RewardPoolDecreased(address indexed owner, uint256 amount); event RewardPoolIncreased(address indexed owner, uint256 amount); event Withdrawn(address indexed account, uint256 stakeId, uint256 amount); constructor( address owner_, IERC20 stakingToken_, uint256 revenue_, uint256 intervalsCount_, uint256 intervalDuration_, uint256 size_ ) public TwoStageOwnable(owner_) { require(revenue_ > 0, "Revenue not positive"); require(intervalsCount_ > 0, "IntervalsCount not positive"); require(intervalDuration_ > 0, "IntervalDuration not positive"); require(size_ > 0, "Size not positive"); stakingToken = stakingToken_; revenue = revenue_; _intervalsCount = intervalsCount_; _intervalDuration = intervalDuration_ * 1 days; _size = size_; _freeSize = size_; } function decreaseRewardPool(uint256 amount) external onlyOwner onlyPositiveAmount(amount) returns (bool) { address caller = msg.sender; uint256 requiredRewards_ = requiredRewards(); require(_rewardPool > requiredRewards_, "No tokens to decrease"); require(amount <= _rewardPool.sub(requiredRewards_), "Not enough amount"); stakingToken.safeTransfer(caller, amount); _rewardPool = _rewardPool.sub(amount); emit RewardPoolDecreased(caller, amount); return true; } function increaseRewardPool(uint256 amount) external onlyOwner onlyPositiveAmount(amount) returns (bool) { address caller = msg.sender; stakingToken.safeTransferFrom(caller, address(this), amount); _rewardPool = _rewardPool.add(amount); emit RewardPoolIncreased(caller, amount); return true; } function setMinStakeAmount(uint256 value) external onlyOwner returns (bool) { minStakeAmount = value; emit MinStakeAmountUpdated(msg.sender, value); return true; } function stake(uint256 amount) external onlyPositiveAmount(amount) returns (bool) { require(amount >= minStakeAmount, "Amount lt minimum stake"); require(amount <= _freeSize, "Amount gt free size"); _freeSize = _freeSize.sub(amount); uint256 rewards = _calculateRewards(amount); require(rewards <= _rewardPool.sub(requiredRewards()), "Not enough rewards"); address caller = msg.sender; uint256 stakeId = _stakedInformation[caller].length; _totalStaked = _totalStaked.add(amount); _stakedInformation[caller].push(); StakeData storage stake_ = _stakedInformation[caller][stakeId]; stake_.amount = amount; stake_.rewards = rewards.add(amount); stake_.startsAt = getTimestamp(); stakingToken.safeTransferFrom(caller, address(this), amount); emit Staked(caller, stakeId, amount); return true; } function withdraw(uint256 id, uint256 amount) external onlyPositiveAmount(amount) returns (bool) { address caller = msg.sender; require(amount <= availableToWithdraw(caller, id), "Not enough available tokens"); uint256 stakeSubAmount = amount.mul(100).div(revenue.add(100)); _rewardPool = _rewardPool.sub(amount.sub(stakeSubAmount)); _totalStaked = _totalStaked.sub(stakeSubAmount); StakeData storage stakeData = _stakedInformation[caller][id]; stakeData.withdrawn = stakeData.withdrawn.add(amount); stakingToken.safeTransfer(caller, amount); emit Withdrawn(caller, id, amount); return true; } function _calculateRewards(uint256 amount) internal view returns (uint256) { return amount.mul(revenue).div(100); } function _getStake(address account, uint256 id) internal view returns (StakeData storage) { require(id < _stakedInformation[account].length, "Invalid stake id"); return _stakedInformation[account][id]; } modifier onlyPositiveAmount(uint256 amount) { require(amount > 0, "Amount not positive"); _; } }
// SPDX-License-Identifier: MIT pragma 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); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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; } }
// SPDX-License-Identifier: MIT pragma 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); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma 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 { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma 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) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; abstract contract TwoStageOwnable { address private _nominatedOwner; address private _owner; function nominatedOwner() public view returns (address) { return _nominatedOwner; } function owner() public view returns (address) { return _owner; } event OwnerChanged(address indexed newOwner); event OwnerNominated(address indexed nominatedOwner); constructor(address owner_) internal { require(owner_ != address(0), "Owner is zero"); _setOwner(owner_); } function acceptOwnership() external returns (bool success) { require(msg.sender == _nominatedOwner, "Not nominated to ownership"); _setOwner(_nominatedOwner); return true; } function nominateNewOwner(address owner_) external onlyOwner returns (bool success) { _nominateNewOwner(owner_); return true; } modifier onlyOwner { require(msg.sender == _owner, "Not owner"); _; } function _nominateNewOwner(address owner_) internal { if (_nominatedOwner == owner_) return; require(_owner != owner_, "Already owner"); _nominatedOwner = owner_; emit OwnerNominated(owner_); } function _setOwner(address newOwner) internal { if (_owner == newOwner) return; _owner = newOwner; _nominatedOwner = address(0); emit OwnerChanged(newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "constantinople", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"contract IERC20","name":"stakingToken_","type":"address"},{"internalType":"uint256","name":"revenue_","type":"uint256"},{"internalType":"uint256","name":"intervalsCount_","type":"uint256"},{"internalType":"uint256","name":"intervalDuration_","type":"uint256"},{"internalType":"uint256","name":"size_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MinStakeAmountUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nominatedOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPoolDecreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPoolIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"stakeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"availableToWithdraw","outputs":[{"internalType":"uint256","name":"amountToWithdraw","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"decreaseRewardPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freeSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getStake","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"}],"internalType":"struct Staking.StakeData","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getStakes","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewards","type":"uint256"},{"internalType":"uint256","name":"withdrawn","type":"uint256"},{"internalType":"uint256","name":"startsAt","type":"uint256"}],"internalType":"struct Staking.StakeData[]","name":"stakeData","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getStakesCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"increaseRewardPool","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"intervalDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"intervalsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minStakeAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"name":"nominateNewOwner","outputs":[{"internalType":"bool","name":"success","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"requiredRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revenue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMinStakeAmount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"size","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200198a3803806200198a833981016040819052620000349162000232565b856001600160a01b03811662000081576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000789062000294565b60405180910390fd5b6200008c81620001c2565b5060008411620000ca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000789062000370565b6000831162000107576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016200007890620002cb565b6000821162000144576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000789062000302565b6000811162000181576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620000789062000339565b600480546001600160a01b0319166001600160a01b0396909616959095179094556003929092556006556201518002600755600981905560055550620003bd565b6001546001600160a01b0382811691161415620001df576200022f565b600180546001600160a01b0383166001600160a01b031991821681179092556000805490911681556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369190a25b50565b60008060008060008060c087890312156200024b578182fd5b86516200025881620003a7565b60208801519096506200026b81620003a7565b6040880151606089015160808a015160a0909a0151989b929a5090989097909650945092505050565b6020808252600d908201527f4f776e6572206973207a65726f00000000000000000000000000000000000000604082015260600190565b6020808252601b908201527f496e74657276616c73436f756e74206e6f7420706f7369746976650000000000604082015260600190565b6020808252601d908201527f496e74657276616c4475726174696f6e206e6f7420706f736974697665000000604082015260600190565b60208082526011908201527f53697a65206e6f7420706f736974697665000000000000000000000000000000604082015260600190565b60208082526014908201527f526576656e7565206e6f7420706f736974697665000000000000000000000000604082015260600190565b6001600160a01b03811681146200022f57600080fd5b6115bd80620003cd6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c806372f702f3116100c3578063949d225d1161007c578063949d225d14610264578063a694fc3a1461026c578063ae9d852e1461027f578063cfd4766314610287578063eb4af045146102a7578063f1887684146102ba5761014d565b806372f702f31461022957806373f0e6a01461023157806379ba509714610239578063817b1cd214610241578063848f39e5146102495780638da5cb5b1461025c5761014d565b80633e9491a2116101155780633e9491a2146101cb578063441a3e70146101d357806353a47bb7146101e6578063549b5bfc146101fb57806366666aa91461020e57806366f294cf146102165761014d565b80631627540c1461015257806316ed99261461017b578063193132b2146101905780632da496e3146101a35780633076dc42146101c3575b600080fd5b610165610160366004610fa0565b6102c2565b6040516101729190611152565b60405180910390f35b610183610309565b6040516101729190611544565b61016561019e366004611038565b61031b565b6101b66101b1366004610fe5565b6103e0565b6040516101729190611104565b6101836104f2565b6101836104f8565b6101656101e1366004611050565b6104fe565b6101ee610659565b60405161017291906110b3565b610183610209366004610fa0565b610668565b610183610683565b610183610224366004610fbb565b610689565b6101ee61070f565b61018361071e565b610165610724565b61018361076a565b610165610257366004611038565b610770565b6101ee61088d565b61018361089c565b61016561027a366004611038565b6108a2565b610183610a1e565b61029a610295366004610fbb565b610a24565b6040516101729190611536565b6101656102b5366004611038565b610a6e565b610183610ae2565b6001546000906001600160a01b031633146102f85760405162461bcd60e51b81526004016102ef90611467565b60405180910390fd5b61030182610ae8565b506001919050565b6000610316600a54610b7a565b905090565b6001546000906001600160a01b031633146103485760405162461bcd60e51b81526004016102ef90611467565b81600081116103695760405162461bcd60e51b81526004016102ef906112d1565b6004543390610383906001600160a01b0316823087610b96565b6008546103909085610bf4565b6008556040516001600160a01b038216907f4698090295330a492472d5c5ace09167b6321763e7e43a4a1dd1aa8f11465eab906103ce908790611544565b60405180910390a25060019392505050565b6001600160a01b0383166000908152600b6020526040812080546060926104078686610bf4565b9050808210156104145750805b85810367ffffffffffffffff8111801561042d57600080fd5b5060405190808252806020026020018201604052801561046757816020015b610454610f61565b81526020019060019003908161044c5790505b509350855b818110156104e757836001828503038154811061048557fe5b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505085888303815181106104d457fe5b602090810291909101015260010161046c565b505050509392505050565b60075490565b60035481565b600081600081116105215760405162461bcd60e51b81526004016102ef906112d1565b3361052c8186610689565b84111561054b5760405162461bcd60e51b81526004016102ef90611391565b60006105776105666064600354610bf490919063ffffffff16565b610571876064610c20565b90610c5a565b905061058f6105868683610c8c565b60085490610c8c565b600855600a5461059f9082610c8c565b600a556001600160a01b0382166000908152600b602052604081208054889081106105c657fe5b906000526020600020906004020190506105ed868260020154610bf490919063ffffffff16565b6002820155600454610609906001600160a01b03168488610cb4565b826001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6888860405161064492919061154d565b60405180910390a25060019695505050505050565b6000546001600160a01b031690565b6001600160a01b03166000908152600b602052604090205490565b60085490565b6000806106968484610cd8565b905060006106b660075461057184600301546106b0610d49565b90610c8c565b905060006106d36006548460010154610c5a90919063ffffffff16565b90506106df8282610c20565b935083836001015410156106f557826001015493505b6002830154610705908590610c8c565b9695505050505050565b6004546001600160a01b031681565b60065490565b600080546001600160a01b0316331461074f5760405162461bcd60e51b81526004016102ef90611430565b600054610764906001600160a01b0316610d4d565b50600190565b600a5490565b6001546000906001600160a01b0316331461079d5760405162461bcd60e51b81526004016102ef90611467565b81600081116107be5760405162461bcd60e51b81526004016102ef906112d1565b3360006107c9610309565b905080600854116107ec5760405162461bcd60e51b81526004016102ef90611335565b6008546107f99082610c8c565b8511156108185760405162461bcd60e51b81526004016102ef9061150b565b60045461082f906001600160a01b03168387610cb4565b60085461083c9086610c8c565b6008556040516001600160a01b038316907f023ebc6c8f9e481c0ce3b94e1c414080128a3c2d8aafe6057a77fd1797d119b29061087a908890611544565b60405180910390a2506001949350505050565b6001546001600160a01b031690565b60095490565b600081600081116108c55760405162461bcd60e51b81526004016102ef906112d1565b6002548310156108e75760405162461bcd60e51b81526004016102ef906111bc565b6005548311156109095760405162461bcd60e51b81526004016102ef90611364565b6005546109169084610c8c565b600555600061092484610b7a565b9050610931610586610309565b8111156109505760405162461bcd60e51b81526004016102ef90611190565b336000818152600b6020526040902054600a5461096d9087610bf4565b600a556001600160a01b0382166000908152600b6020526040812080546001018082558390811061099a57fe5b6000918252602090912060049091020187815590506109b98488610bf4565b60018201556109c6610d49565b60038201556004546109e3906001600160a01b031684308a610b96565b826001600160a01b03167f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90838960405161064492919061154d565b60055490565b610a2c610f61565b610a368383610cd8565b604080516080810182528254815260018301546020820152600283015491810191909152600390910154606082015290505b92915050565b6001546000906001600160a01b03163314610a9b5760405162461bcd60e51b81526004016102ef90611467565b600282905560405133907f6b8209c889d2e447ce78d1b931d24b74266309d74ab510ea34ed8212586ffa7190610ad2908590611544565b60405180910390a2506001919050565b60025481565b6000546001600160a01b0382811691161415610b0357610b77565b6001546001600160a01b0382811691161415610b315760405162461bcd60e51b81526004016102ef90611409565b600080546001600160a01b0319166001600160a01b038316908117825560405190917f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2291a25b50565b6000610a68606461057160035485610c2090919063ffffffff16565b610bee846323b872dd60e01b858585604051602401610bb7939291906110c7565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610dba565b50505050565b600082820183811015610c195760405162461bcd60e51b81526004016102ef906111f3565b9392505050565b600082610c2f57506000610a68565b82820282848281610c3c57fe5b0414610c195760405162461bcd60e51b81526004016102ef906113c8565b6000808211610c7b5760405162461bcd60e51b81526004016102ef906112fe565b818381610c8457fe5b049392505050565b600082821115610cae5760405162461bcd60e51b81526004016102ef90611254565b50900390565b610cd38363a9059cbb60e01b8484604051602401610bb79291906110eb565b505050565b6001600160a01b0382166000908152600b60205260408120548210610d0f5760405162461bcd60e51b81526004016102ef9061122a565b6001600160a01b0383166000908152600b60205260409020805483908110610d3357fe5b9060005260206000209060040201905092915050565b4290565b6001546001600160a01b0382811691161415610d6857610b77565b600180546001600160a01b0383166001600160a01b031991821681179092556000805490911681556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369190a250565b6060610e0f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e499092919063ffffffff16565b805190915015610cd35780806020019051810190610e2d9190611018565b610cd35760405162461bcd60e51b81526004016102ef906114c1565b6060610e588484600085610e60565b949350505050565b60603031831115610e835760405162461bcd60e51b81526004016102ef9061128b565b610e8c85610f22565b610ea85760405162461bcd60e51b81526004016102ef9061148a565b60006060866001600160a01b03168587604051610ec59190611097565b60006040518083038185875af1925050503d8060008114610f02576040519150601f19603f3d011682016040523d82523d6000602084013e610f07565b606091505b5091509150610f17828286610f28565b979650505050505050565b3b151590565b60608315610f37575081610c19565b825115610f475782518084602001fd5b8160405162461bcd60e51b81526004016102ef919061115d565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b80356001600160a01b0381168114610a6857600080fd5b600060208284031215610fb1578081fd5b610c198383610f89565b60008060408385031215610fcd578081fd5b610fd78484610f89565b946020939093013593505050565b600080600060608486031215610ff9578081fd5b6110038585610f89565b95602085013595506040909401359392505050565b600060208284031215611029578081fd5b81518015158114610c19578182fd5b600060208284031215611049578081fd5b5035919050565b60008060408385031215611062578182fd5b50508035926020909101359150565b805182526020810151602083015260408101516040830152606081015160608301525050565b600082516110a981846020870161155b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561114657611133838551611071565b9284019260809290920191600101611120565b50909695505050505050565b901515815260200190565b600060208252825180602084015261117c81604085016020870161155b565b601f01601f19169190910160400192915050565b6020808252601290820152714e6f7420656e6f756768207265776172647360701b604082015260600190565b60208082526017908201527f416d6f756e74206c74206d696e696d756d207374616b65000000000000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526010908201526f125b9d985b1a59081cdd185ad9481a5960821b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b602080825260139082015272416d6f756e74206e6f7420706f73697469766560681b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601590820152744e6f20746f6b656e7320746f20646563726561736560581b604082015260600190565b602080825260139082015272416d6f756e7420677420667265652073697a6560681b604082015260600190565b6020808252601b908201527f4e6f7420656e6f75676820617661696c61626c6520746f6b656e730000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c20b63932b0b23c9037bbb732b960991b604082015260600190565b6020808252601a908201527f4e6f74206e6f6d696e6174656420746f206f776e657273686970000000000000604082015260600190565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b602080825260119082015270139bdd08195b9bdd59da08185b5bdd5b9d607a1b604082015260600190565b60808101610a688284611071565b90815260200190565b918252602082015260400190565b60005b8381101561157657818101518382015260200161155e565b83811115610bee575050600091015256fea264697066735822122051369fdaae2a857e6dcefda428e750c50442d8d94ffc6078059e1963511f71a464736f6c634300060c0033000000000000000000000000806e141f3681199ee5fbb72c98c7099b5574bc9b000000000000000000000000f0c5831ec3da15f3696b4dad8b21c7ce2f007f280000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002da0000000000000000000000000000000000000000000000000005543df729c000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c806372f702f3116100c3578063949d225d1161007c578063949d225d14610264578063a694fc3a1461026c578063ae9d852e1461027f578063cfd4766314610287578063eb4af045146102a7578063f1887684146102ba5761014d565b806372f702f31461022957806373f0e6a01461023157806379ba509714610239578063817b1cd214610241578063848f39e5146102495780638da5cb5b1461025c5761014d565b80633e9491a2116101155780633e9491a2146101cb578063441a3e70146101d357806353a47bb7146101e6578063549b5bfc146101fb57806366666aa91461020e57806366f294cf146102165761014d565b80631627540c1461015257806316ed99261461017b578063193132b2146101905780632da496e3146101a35780633076dc42146101c3575b600080fd5b610165610160366004610fa0565b6102c2565b6040516101729190611152565b60405180910390f35b610183610309565b6040516101729190611544565b61016561019e366004611038565b61031b565b6101b66101b1366004610fe5565b6103e0565b6040516101729190611104565b6101836104f2565b6101836104f8565b6101656101e1366004611050565b6104fe565b6101ee610659565b60405161017291906110b3565b610183610209366004610fa0565b610668565b610183610683565b610183610224366004610fbb565b610689565b6101ee61070f565b61018361071e565b610165610724565b61018361076a565b610165610257366004611038565b610770565b6101ee61088d565b61018361089c565b61016561027a366004611038565b6108a2565b610183610a1e565b61029a610295366004610fbb565b610a24565b6040516101729190611536565b6101656102b5366004611038565b610a6e565b610183610ae2565b6001546000906001600160a01b031633146102f85760405162461bcd60e51b81526004016102ef90611467565b60405180910390fd5b61030182610ae8565b506001919050565b6000610316600a54610b7a565b905090565b6001546000906001600160a01b031633146103485760405162461bcd60e51b81526004016102ef90611467565b81600081116103695760405162461bcd60e51b81526004016102ef906112d1565b6004543390610383906001600160a01b0316823087610b96565b6008546103909085610bf4565b6008556040516001600160a01b038216907f4698090295330a492472d5c5ace09167b6321763e7e43a4a1dd1aa8f11465eab906103ce908790611544565b60405180910390a25060019392505050565b6001600160a01b0383166000908152600b6020526040812080546060926104078686610bf4565b9050808210156104145750805b85810367ffffffffffffffff8111801561042d57600080fd5b5060405190808252806020026020018201604052801561046757816020015b610454610f61565b81526020019060019003908161044c5790505b509350855b818110156104e757836001828503038154811061048557fe5b906000526020600020906004020160405180608001604052908160008201548152602001600182015481526020016002820154815260200160038201548152505085888303815181106104d457fe5b602090810291909101015260010161046c565b505050509392505050565b60075490565b60035481565b600081600081116105215760405162461bcd60e51b81526004016102ef906112d1565b3361052c8186610689565b84111561054b5760405162461bcd60e51b81526004016102ef90611391565b60006105776105666064600354610bf490919063ffffffff16565b610571876064610c20565b90610c5a565b905061058f6105868683610c8c565b60085490610c8c565b600855600a5461059f9082610c8c565b600a556001600160a01b0382166000908152600b602052604081208054889081106105c657fe5b906000526020600020906004020190506105ed868260020154610bf490919063ffffffff16565b6002820155600454610609906001600160a01b03168488610cb4565b826001600160a01b03167f92ccf450a286a957af52509bc1c9939d1a6a481783e142e41e2499f0bb66ebc6888860405161064492919061154d565b60405180910390a25060019695505050505050565b6000546001600160a01b031690565b6001600160a01b03166000908152600b602052604090205490565b60085490565b6000806106968484610cd8565b905060006106b660075461057184600301546106b0610d49565b90610c8c565b905060006106d36006548460010154610c5a90919063ffffffff16565b90506106df8282610c20565b935083836001015410156106f557826001015493505b6002830154610705908590610c8c565b9695505050505050565b6004546001600160a01b031681565b60065490565b600080546001600160a01b0316331461074f5760405162461bcd60e51b81526004016102ef90611430565b600054610764906001600160a01b0316610d4d565b50600190565b600a5490565b6001546000906001600160a01b0316331461079d5760405162461bcd60e51b81526004016102ef90611467565b81600081116107be5760405162461bcd60e51b81526004016102ef906112d1565b3360006107c9610309565b905080600854116107ec5760405162461bcd60e51b81526004016102ef90611335565b6008546107f99082610c8c565b8511156108185760405162461bcd60e51b81526004016102ef9061150b565b60045461082f906001600160a01b03168387610cb4565b60085461083c9086610c8c565b6008556040516001600160a01b038316907f023ebc6c8f9e481c0ce3b94e1c414080128a3c2d8aafe6057a77fd1797d119b29061087a908890611544565b60405180910390a2506001949350505050565b6001546001600160a01b031690565b60095490565b600081600081116108c55760405162461bcd60e51b81526004016102ef906112d1565b6002548310156108e75760405162461bcd60e51b81526004016102ef906111bc565b6005548311156109095760405162461bcd60e51b81526004016102ef90611364565b6005546109169084610c8c565b600555600061092484610b7a565b9050610931610586610309565b8111156109505760405162461bcd60e51b81526004016102ef90611190565b336000818152600b6020526040902054600a5461096d9087610bf4565b600a556001600160a01b0382166000908152600b6020526040812080546001018082558390811061099a57fe5b6000918252602090912060049091020187815590506109b98488610bf4565b60018201556109c6610d49565b60038201556004546109e3906001600160a01b031684308a610b96565b826001600160a01b03167f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90838960405161064492919061154d565b60055490565b610a2c610f61565b610a368383610cd8565b604080516080810182528254815260018301546020820152600283015491810191909152600390910154606082015290505b92915050565b6001546000906001600160a01b03163314610a9b5760405162461bcd60e51b81526004016102ef90611467565b600282905560405133907f6b8209c889d2e447ce78d1b931d24b74266309d74ab510ea34ed8212586ffa7190610ad2908590611544565b60405180910390a2506001919050565b60025481565b6000546001600160a01b0382811691161415610b0357610b77565b6001546001600160a01b0382811691161415610b315760405162461bcd60e51b81526004016102ef90611409565b600080546001600160a01b0319166001600160a01b038316908117825560405190917f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2291a25b50565b6000610a68606461057160035485610c2090919063ffffffff16565b610bee846323b872dd60e01b858585604051602401610bb7939291906110c7565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610dba565b50505050565b600082820183811015610c195760405162461bcd60e51b81526004016102ef906111f3565b9392505050565b600082610c2f57506000610a68565b82820282848281610c3c57fe5b0414610c195760405162461bcd60e51b81526004016102ef906113c8565b6000808211610c7b5760405162461bcd60e51b81526004016102ef906112fe565b818381610c8457fe5b049392505050565b600082821115610cae5760405162461bcd60e51b81526004016102ef90611254565b50900390565b610cd38363a9059cbb60e01b8484604051602401610bb79291906110eb565b505050565b6001600160a01b0382166000908152600b60205260408120548210610d0f5760405162461bcd60e51b81526004016102ef9061122a565b6001600160a01b0383166000908152600b60205260409020805483908110610d3357fe5b9060005260206000209060040201905092915050565b4290565b6001546001600160a01b0382811691161415610d6857610b77565b600180546001600160a01b0383166001600160a01b031991821681179092556000805490911681556040517fa2ea9883a321a3e97b8266c2b078bfeec6d50c711ed71f874a90d500ae2eaf369190a250565b6060610e0f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610e499092919063ffffffff16565b805190915015610cd35780806020019051810190610e2d9190611018565b610cd35760405162461bcd60e51b81526004016102ef906114c1565b6060610e588484600085610e60565b949350505050565b60603031831115610e835760405162461bcd60e51b81526004016102ef9061128b565b610e8c85610f22565b610ea85760405162461bcd60e51b81526004016102ef9061148a565b60006060866001600160a01b03168587604051610ec59190611097565b60006040518083038185875af1925050503d8060008114610f02576040519150601f19603f3d011682016040523d82523d6000602084013e610f07565b606091505b5091509150610f17828286610f28565b979650505050505050565b3b151590565b60608315610f37575081610c19565b825115610f475782518084602001fd5b8160405162461bcd60e51b81526004016102ef919061115d565b6040518060800160405280600081526020016000815260200160008152602001600081525090565b80356001600160a01b0381168114610a6857600080fd5b600060208284031215610fb1578081fd5b610c198383610f89565b60008060408385031215610fcd578081fd5b610fd78484610f89565b946020939093013593505050565b600080600060608486031215610ff9578081fd5b6110038585610f89565b95602085013595506040909401359392505050565b600060208284031215611029578081fd5b81518015158114610c19578182fd5b600060208284031215611049578081fd5b5035919050565b60008060408385031215611062578182fd5b50508035926020909101359150565b805182526020810151602083015260408101516040830152606081015160608301525050565b600082516110a981846020870161155b565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561114657611133838551611071565b9284019260809290920191600101611120565b50909695505050505050565b901515815260200190565b600060208252825180602084015261117c81604085016020870161155b565b601f01601f19169190910160400192915050565b6020808252601290820152714e6f7420656e6f756768207265776172647360701b604082015260600190565b60208082526017908201527f416d6f756e74206c74206d696e696d756d207374616b65000000000000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b60208082526010908201526f125b9d985b1a59081cdd185ad9481a5960821b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b602080825260139082015272416d6f756e74206e6f7420706f73697469766560681b604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601590820152744e6f20746f6b656e7320746f20646563726561736560581b604082015260600190565b602080825260139082015272416d6f756e7420677420667265652073697a6560681b604082015260600190565b6020808252601b908201527f4e6f7420656e6f75676820617661696c61626c6520746f6b656e730000000000604082015260600190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252600d908201526c20b63932b0b23c9037bbb732b960991b604082015260600190565b6020808252601a908201527f4e6f74206e6f6d696e6174656420746f206f776e657273686970000000000000604082015260600190565b6020808252600990820152682737ba1037bbb732b960b91b604082015260600190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b602080825260119082015270139bdd08195b9bdd59da08185b5bdd5b9d607a1b604082015260600190565b60808101610a688284611071565b90815260200190565b918252602082015260400190565b60005b8381101561157657818101518382015260200161155e565b83811115610bee575050600091015256fea264697066735822122051369fdaae2a857e6dcefda428e750c50442d8d94ffc6078059e1963511f71a464736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000806e141f3681199ee5fbb72c98c7099b5574bc9b000000000000000000000000f0c5831ec3da15f3696b4dad8b21c7ce2f007f280000000000000000000000000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000002da0000000000000000000000000000000000000000000000000005543df729c000
-----Decoded View---------------
Arg [0] : owner_ (address): 0x806e141F3681199ee5FBB72c98c7099b5574BC9B
Arg [1] : stakingToken_ (address): 0xF0c5831EC3Da15f3696B4DAd8B21c7Ce2f007f28
Arg [2] : revenue_ (uint256): 50
Arg [3] : intervalsCount_ (uint256): 1
Arg [4] : intervalDuration_ (uint256): 730
Arg [5] : size_ (uint256): 1500000000000000
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000806e141f3681199ee5fbb72c98c7099b5574bc9b
Arg [1] : 000000000000000000000000f0c5831ec3da15f3696b4dad8b21c7ce2f007f28
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000032
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 00000000000000000000000000000000000000000000000000000000000002da
Arg [5] : 0000000000000000000000000000000000000000000000000005543df729c000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.00786 | 8,123,894.2361 | $63,855.22 |
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.