Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 900 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Unstake | 19696104 | 139 days ago | IN | 0 ETH | 0.00067211 | ||||
Unstake | 19692310 | 140 days ago | IN | 0 ETH | 0.00079561 | ||||
Claim Earned | 19690959 | 140 days ago | IN | 0 ETH | 0.00325741 | ||||
Unstake | 19690842 | 140 days ago | IN | 0 ETH | 0.00350814 | ||||
Stake | 19690369 | 140 days ago | IN | 0 ETH | 0.0025436 | ||||
Stake | 19690367 | 140 days ago | IN | 0 ETH | 0.00241082 | ||||
Stake | 19690363 | 140 days ago | IN | 0 ETH | 0.00246696 | ||||
Stake | 19690357 | 140 days ago | IN | 0 ETH | 0.00480316 | ||||
Unstake | 19689175 | 140 days ago | IN | 0 ETH | 0.00118789 | ||||
Unstake | 19689150 | 140 days ago | IN | 0 ETH | 0.00231202 | ||||
Unstake | 19685611 | 141 days ago | IN | 0 ETH | 0.00069663 | ||||
Claim Earned | 19685580 | 141 days ago | IN | 0 ETH | 0.00082059 | ||||
Unstake | 19685580 | 141 days ago | IN | 0 ETH | 0.00110648 | ||||
Stake | 19685576 | 141 days ago | IN | 0 ETH | 0.00031075 | ||||
Stake | 19685574 | 141 days ago | IN | 0 ETH | 0.00163376 | ||||
Unstake | 19685328 | 141 days ago | IN | 0 ETH | 0.0009327 | ||||
Claim Earned | 19685328 | 141 days ago | IN | 0 ETH | 0.00077693 | ||||
Unstake | 19685327 | 141 days ago | IN | 0 ETH | 0.00091782 | ||||
Claim Earned | 19685326 | 141 days ago | IN | 0 ETH | 0.00089012 | ||||
Unstake | 19685316 | 141 days ago | IN | 0 ETH | 0.00238287 | ||||
Claim Earned | 19685314 | 141 days ago | IN | 0 ETH | 0.00202902 | ||||
Unstake | 19685306 | 141 days ago | IN | 0 ETH | 0.00121705 | ||||
Unstake | 19685300 | 141 days ago | IN | 0 ETH | 0.00126697 | ||||
Claim Earned | 19685299 | 141 days ago | IN | 0 ETH | 0.00082771 | ||||
Unstake | 19685298 | 141 days ago | IN | 0 ETH | 0.00119297 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
NODIFI1Staking
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** Website: https://nodifi.ai Telegram: https://t.me/NodifiAI Twitter: https://twitter.com/NodifiAI Bot: https://t.me/NodifiAIBot Marketplace : https://nodes.nodifi.ai Youtube : https://www.youtube.com/@NodifiAI Gitbook : https://nodifi-ai.gitbook.io/nodifi.ai/ Medium : https://medium.com/@NodifiAI Discord : https://discord.com/invite/NodifiAI Privacy Policy : https://nodifi.ai/nodesprivacypolicy Free RPC : https://rpc.nodifi.ai/api/rpc/free */ pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ 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) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { 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) { unchecked { // 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) { unchecked { 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) { unchecked { 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) { return a + b; } /** * @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 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) { return a * b; } /** * @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. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { 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) { 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) { unchecked { 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. * * 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) { unchecked { 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) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File: /Address.sol // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: /IERC20.sol // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); } // File: /SafeERC20.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @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 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' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _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 require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } // File: /ReentrancyGuard.sol // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File: /Context.sol // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: /Ownable.sol // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: /tAOSHARDstaking.sol //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; abstract contract IERC20Staking is ReentrancyGuard, Ownable { struct Plan { uint256 overallStaked; uint256 stakesCount; uint256 apr; uint256 stakeDuration; uint256 depositDeduction; uint256 withdrawDeduction; uint256 earlyPenalty; bool initialPool; bool conclude; } struct Staking { uint256 amount; uint256 stakeAt; uint256 endstakeAt; } mapping(uint256 => mapping(address => Staking[])) public stakes; mapping(uint256 => mapping(address => uint256)) public totalRewardsPerWalletPerPlan; address public stakingToken; mapping(uint256 => Plan) public plans; mapping(address => uint256) public s_balances; constructor(address _stakingToken) { stakingToken = _stakingToken; } function stake(uint256 _stakingId, uint256 _amount) public virtual; function canWithdrawAmount(uint256 _stakingId, address account) public virtual view returns (uint256, uint256); function unstake(uint256 _stakingId, uint256 _amount) public virtual; function earnedToken(uint256 _stakingId, address account) public virtual view returns (uint256); function claimEarned(uint256 _stakingId) public virtual; function getStakedPlans(address _account) public virtual view returns (bool[] memory); } contract NODIFI1Staking is IERC20Staking { using SafeMath for uint256; using SafeERC20 for IERC20; uint256 public periodicTime = 60 days; uint256 public planLimit = 1; uint256 minAPR = 2; uint256 maxDepositDeduction = 300; uint256 maxWithdrawDeduction = 300; uint256 maxEarlyPenalty = 30; address public deployerWallet; constructor(address _stakingToken) IERC20Staking(_stakingToken) { plans[0].apr = 1000; plans[0].stakeDuration = 30 days; plans[0].depositDeduction = 0; plans[0].withdrawDeduction = 0; plans[0].earlyPenalty = 0; } function stake(uint256 _stakingId, uint256 _amount) public nonReentrant override { require(_amount > 0, "Staking Amount cannot be zero"); require( IERC20(stakingToken).balanceOf(msg.sender) >= _amount, "Balance is not enough" ); require(_stakingId < planLimit, "Staking is unavailable"); Plan storage plan = plans[_stakingId]; require(!plan.conclude, "Staking in this pool is concluded"); uint256 beforeBalance = IERC20(stakingToken).balanceOf(address(this)); IERC20(stakingToken).transferFrom(msg.sender, address(this), _amount); uint256 afterBalance = IERC20(stakingToken).balanceOf(address(this)); uint256 amount = afterBalance - beforeBalance; uint256 deductionAmount = amount.mul(plan.depositDeduction).div(1000); if(deductionAmount > 0) { IERC20(stakingToken).transfer(stakingToken, deductionAmount); } uint256 stakelength = stakes[_stakingId][msg.sender].length; if(stakelength == 0) { plan.stakesCount += 1; } stakes[_stakingId][msg.sender].push(); Staking storage _staking = stakes[_stakingId][msg.sender][stakelength]; _staking.amount = amount.sub(deductionAmount); _staking.stakeAt = block.timestamp; _staking.endstakeAt = block.timestamp + plan.stakeDuration; plan.overallStaked = plan.overallStaked.add( amount.sub(deductionAmount) ); } function canWithdrawAmount(uint256 _stakingId, address account) public override view returns (uint256, uint256) { uint256 _stakedAmount = 0; uint256 _canWithdraw = 0; for (uint256 i = 0; i < stakes[_stakingId][account].length; i++) { Staking storage _staking = stakes[_stakingId][account][i]; _stakedAmount = _stakedAmount.add(_staking.amount); _canWithdraw = _canWithdraw.add(_staking.amount); } return (_stakedAmount, _canWithdraw); } function earnedToken(uint256 _stakingId, address account) public override view returns (uint256) { uint256 _earned = 0; Plan storage plan = plans[_stakingId]; for (uint256 i = 0; i < stakes[_stakingId][account].length; i++) { Staking storage _staking = stakes[_stakingId][account][i]; _earned = _earned.add( _staking.amount .mul(block.timestamp - _staking.stakeAt) .div(periodicTime) .mul(plan.apr) .div(100) ); } return _earned; } function unstake(uint256 _stakingId, uint256 _amount) public nonReentrant override { uint256 _stakedAmount; uint256 _canWithdraw; Plan storage plan = plans[_stakingId]; (_stakedAmount, _canWithdraw) = canWithdrawAmount( _stakingId, msg.sender ); require( _canWithdraw >= _amount, "Withdraw Amount is not enough" ); uint256 deductionAmount = _amount.mul(plans[_stakingId].withdrawDeduction).div(1000); uint256 tamount = _amount - deductionAmount; uint256 amount = _amount; uint256 _earned = 0; uint256 _penalty = 0; for (uint256 i = stakes[_stakingId][msg.sender].length; i > 0; i--) { Staking storage _staking = stakes[_stakingId][msg.sender][i-1]; if (amount >= _staking.amount) { if (block.timestamp >= _staking.endstakeAt) { _earned = _earned.add( _staking.amount .mul(block.timestamp - _staking.stakeAt) .div(periodicTime) .mul(plan.apr) .div(100) ); } else { _penalty = _penalty.add( _staking.amount .mul(plan.earlyPenalty) .div(100) ); } amount = amount.sub(_staking.amount); _staking.amount = 0; } else { if (block.timestamp >= _staking.endstakeAt) { _earned = _earned.add( amount .mul(block.timestamp - _staking.stakeAt) .div(periodicTime) .mul(plan.apr) .div(100) ); } else { _penalty = _penalty.add( amount .mul(plan.earlyPenalty) .div(100) ); } _staking.amount = _staking.amount.sub(amount); amount = 0; break; } _staking.stakeAt = block.timestamp; } if(deductionAmount > 0) { IERC20(stakingToken).transfer(stakingToken, deductionAmount); } if(tamount > 0) { IERC20(stakingToken).transfer(msg.sender, tamount - _penalty + _earned); totalRewardsPerWalletPerPlan[_stakingId][msg.sender] = totalRewardsPerWalletPerPlan[_stakingId][msg.sender].add(_earned); } plans[_stakingId].overallStaked = plans[_stakingId].overallStaked.sub(_amount); } function claimEarned(uint256 _stakingId) public nonReentrant override { uint256 _earned = 0; Plan storage plan = plans[_stakingId]; require(stakes[_stakingId][msg.sender].length > 0, "No stakes found"); for (uint256 i = 0; i < stakes[_stakingId][msg.sender].length; i++) { Staking storage _staking = stakes[_stakingId][msg.sender][i]; _earned = _earned.add( _staking .amount .mul(plan.apr) .mul(block.timestamp - _staking.stakeAt) .div(periodicTime) .div(100) ); totalRewardsPerWalletPerPlan[_stakingId][msg.sender] = totalRewardsPerWalletPerPlan[_stakingId][msg.sender].add(_earned); _staking.stakeAt = block.timestamp; } require(_earned > 0, "There is no amount to claim"); IERC20(stakingToken).transfer(msg.sender, _earned); } function getStakedPlans(address _account) public override view returns (bool[] memory) { bool[] memory walletPlans = new bool[](planLimit); for (uint256 i = 0; i < planLimit; i++) { walletPlans[i] = stakes[i][_account].length == 0 ? false : true; } return walletPlans; } function setAPR(uint256 _stakingId, uint256 _percent) external onlyOwner { require(_percent >= minAPR); plans[_stakingId].apr = _percent; } function setDepositDeduction(uint256 _stakingId, uint256 _deduction) external onlyOwner { require(_deduction <= maxDepositDeduction); plans[_stakingId].depositDeduction = _deduction; } function setWithdrawDeduction(uint256 _stakingId, uint256 _deduction) external onlyOwner { require(_deduction <= maxWithdrawDeduction); plans[_stakingId].withdrawDeduction = _deduction; } function setEarlyPenalty(uint256 _stakingId, uint256 _penalty) external onlyOwner { require(_penalty <= maxEarlyPenalty); plans[_stakingId].earlyPenalty = _penalty; } function setStakeConclude(uint256 _stakingId, bool _conclude) external onlyOwner { plans[_stakingId].conclude = _conclude; } function getStaked(address account) public view returns (uint256) { return s_balances[account]; } function removeStuckEther() external onlyOwner { uint256 ethBalance = address(this).balance; require(ethBalance > 0, "ETH balance must be greater than 0"); (bool success,) = address(deployerWallet).call{value: ethBalance}(""); require(success, "Failed to clear ETH balance"); } }
{ "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
[{"inputs":[{"internalType":"address","name":"_stakingToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"canWithdrawAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"}],"name":"claimEarned","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deployerWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"earnedToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getStakedPlans","outputs":[{"internalType":"bool[]","name":"","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodicTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"planLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"plans","outputs":[{"internalType":"uint256","name":"overallStaked","type":"uint256"},{"internalType":"uint256","name":"stakesCount","type":"uint256"},{"internalType":"uint256","name":"apr","type":"uint256"},{"internalType":"uint256","name":"stakeDuration","type":"uint256"},{"internalType":"uint256","name":"depositDeduction","type":"uint256"},{"internalType":"uint256","name":"withdrawDeduction","type":"uint256"},{"internalType":"uint256","name":"earlyPenalty","type":"uint256"},{"internalType":"bool","name":"initialPool","type":"bool"},{"internalType":"bool","name":"conclude","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"removeStuckEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"s_balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setAPR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"uint256","name":"_deduction","type":"uint256"}],"name":"setDepositDeduction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"uint256","name":"_penalty","type":"uint256"}],"name":"setEarlyPenalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"bool","name":"_conclude","type":"bool"}],"name":"setStakeConclude","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"uint256","name":"_deduction","type":"uint256"}],"name":"setWithdrawDeduction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakes","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"stakeAt","type":"uint256"},{"internalType":"uint256","name":"endstakeAt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"totalRewardsPerWalletPerPlan","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stakingId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052624f1a006007556001600855600260095561012c600a5561012c600b55601e600c55348015610031575f80fd5b506040516119fa3803806119fa83398101604081905261005091610193565b60015f558061005e33610142565b600480546001600160a01b0319166001600160a01b0392909216919091179055505f80805260056020526103e87f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746be5562278d007f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bf557f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746c08190557f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746c18190557f05b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746c2556101c0565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f602082840312156101a3575f80fd5b81516001600160a01b03811681146101b9575f80fd5b9392505050565b61182d806101cd5f395ff3fe608060405234801561000f575f80fd5b5060043610610153575f3560e01c80638c972702116100bf578063b1427ac111610079578063b1427ac1146102f1578063b16206161461031f578063b19fa166146103c4578063c28fc741146103d7578063e030400b14610401578063f2fde38b14610414575f80fd5b80638c972702146102605780638da5cb5b1461028857806397e90f33146102995780639e2c8a5b146102ac578063a230561b146102bf578063ab32eb69146102d2575f80fd5b80636132df35116101105780636132df35146101f7578063715018a61461020a57806372f702f3146102125780637b0472f01461022557806387dd95c0146102385780638a9640e514610240575f80fd5b806304c10b9a14610157578063399080ec14610173578063399a967b1461019b5780635792c7a4146101a45780635cbf7cb0146101b75780635d60c7be146101cc575b5f80fd5b61016060075481565b6040519081526020015b60405180910390f35b610160610181366004611580565b6001600160a01b03165f9081526006602052604090205490565b61016060085481565b6101606101b2366004611599565b610427565b6101ca6101c53660046115c3565b6104fd565b005b600d546101df906001600160a01b031681565b6040516001600160a01b03909116815260200161016a565b6101ca6102053660046115e3565b610554565b6101ca61077e565b6004546101df906001600160a01b031681565b6101ca6102333660046115c3565b6107b3565b6101ca610c6a565b61025361024e366004611580565b610d91565b60405161016a91906115fa565b61027361026e366004611599565b610e48565b6040805192835260208301919091520161016a565b6001546001600160a01b03166101df565b6101ca6102a73660046115c3565b610ef5565b6101ca6102ba3660046115c3565b610f41565b6101ca6102cd3660046115c3565b611311565b6101606102e0366004611580565b60066020525f908152604090205481565b6103046102ff36600461163f565b61135d565b6040805193845260208401929092529082015260600161016a565b61037c61032d3660046115e3565b600560208190525f918252604090912080546001820154600283015460038401546004850154958501546006860154600790960154949693959294919392909160ff8082169161010090041689565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e083015215156101008201526101200161016a565b6101ca6103d23660046115c3565b6113a7565b6101606103e5366004611599565b600360209081525f928352604080842090915290825290205481565b6101ca61040f36600461167e565b6113f3565b6101ca610422366004611580565b611446565b5f8281526005602052604081208190815b5f8681526002602090815260408083206001600160a01b03891684529091529020548110156104f1575f8681526002602090815260408083206001600160a01b03891684529091528120805483908110610494576104946116ac565b905f5260205f20906003020190506104e66104df60646104d386600201546104d96007546104d38860010154426104cb91906116d4565b8954906114e1565b906114f3565b906114e1565b85906114fe565b935050600101610438565b50909150505b92915050565b6001546001600160a01b031633146105305760405162461bcd60e51b8152600401610527906116e7565b60405180910390fd5b600b5481111561053e575f80fd5b5f91825260056020819052604090922090910155565b60025f54036105755760405162461bcd60e51b81526004016105279061171c565b60025f8181558281526005602090815260408083209382528083203384529091528120549091906105da5760405162461bcd60e51b815260206004820152600f60248201526e139bc81cdd185ad95cc8199bdd5b99608a1b6044820152606401610527565b5f5b5f8481526002602090815260408083203384529091529020548110156106b1575f8481526002602090815260408083203384529091528120805483908110610626576106266116ac565b905f5260205f20906003020190506106656104df60646104d36007546104d386600101544261065591906116d4565b60028a015488546104d9916114e1565b5f86815260036020908152604080832033845290915290205490945061068b90856114fe565b5f86815260036020908152604080832033845290915290205542600191820155016105dc565b505f82116107015760405162461bcd60e51b815260206004820152601b60248201527f5468657265206973206e6f20616d6f756e7420746f20636c61696d00000000006044820152606401610527565b6004805460405163a9059cbb60e01b81523392810192909252602482018490526001600160a01b03169063a9059cbb906044016020604051808303815f875af1158015610750573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107749190611753565b505060015f555050565b6001546001600160a01b031633146107a85760405162461bcd60e51b8152600401610527906116e7565b6107b15f611509565b565b60025f54036107d45760405162461bcd60e51b81526004016105279061171c565b60025f55806108255760405162461bcd60e51b815260206004820152601d60248201527f5374616b696e6720416d6f756e742063616e6e6f74206265207a65726f0000006044820152606401610527565b600480546040516370a0823160e01b8152339281019290925282916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610870573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610894919061176e565b10156108da5760405162461bcd60e51b8152602060048201526015602482015274084c2d8c2dcc6ca40d2e640dcdee840cadcdeeaced605b1b6044820152606401610527565b60085482106109245760405162461bcd60e51b81526020600482015260166024820152755374616b696e6720697320756e617661696c61626c6560501b6044820152606401610527565b5f8281526005602052604090206007810154610100900460ff16156109955760405162461bcd60e51b815260206004820152602160248201527f5374616b696e6720696e207468697320706f6f6c20697320636f6e636c7564656044820152601960fa1b6064820152608401610527565b600480546040516370a0823160e01b815230928101929092525f916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109e0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a04919061176e565b600480546040516323b872dd60e01b81523392810192909252306024830152604482018690529192506001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015610a5e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a829190611753565b50600480546040516370a0823160e01b815230928101929092525f916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610ace573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af2919061176e565b90505f610aff83836116d4565b90505f610b1f6103e86104d38760040154856114e190919063ffffffff16565b90508015610b9b576004805460405163a9059cbb60e01b81526001600160a01b039091169181018290526024810183905263a9059cbb906044016020604051808303815f875af1158015610b75573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b999190611753565b505b5f87815260026020908152604080832033845290915281205490819003610bd6576001866001015f828254610bd09190611785565b90915550505b5f8881526002602090815260408083203384529091528120805460010180825583908110610c0657610c066116ac565b905f5260205f2090600302019050610c27838561155a90919063ffffffff16565b815542600182018190556003880154610c3f91611785565b6002820155610c59610c51858561155a565b8854906114fe565b909655505060015f55505050505050565b6001546001600160a01b03163314610c945760405162461bcd60e51b8152600401610527906116e7565b4780610ced5760405162461bcd60e51b815260206004820152602260248201527f4554482062616c616e6365206d7573742062652067726561746572207468616e604482015261020360f41b6064820152608401610527565b600d546040515f916001600160a01b03169083908381818185875af1925050503d805f8114610d37576040519150601f19603f3d011682016040523d82523d5f602084013e610d3c565b606091505b5050905080610d8d5760405162461bcd60e51b815260206004820152601b60248201527f4661696c656420746f20636c656172204554482062616c616e636500000000006044820152606401610527565b5050565b60605f60085467ffffffffffffffff811115610daf57610daf611798565b604051908082528060200260200182016040528015610dd8578160200160208202803683370190505b5090505f5b600854811015610e41575f8181526002602090815260408083206001600160a01b038816845290915290205415610e15576001610e17565b5f5b828281518110610e2957610e296116ac565b91151560209283029190910190910152600101610ddd565b5092915050565b5f805f805f5b5f8781526002602090815260408083206001600160a01b038a168452909152902054811015610ee9575f8781526002602090815260408083206001600160a01b038a1684529091528120805483908110610eaa57610eaa6116ac565b905f5260205f2090600302019050610ece815f0154856114fe90919063ffffffff16565b8154909450610ede9084906114fe565b925050600101610e4e565b50909590945092505050565b6001546001600160a01b03163314610f1f5760405162461bcd60e51b8152600401610527906116e7565b600a54811115610f2d575f80fd5b5f9182526005602052604090912060040155565b60025f5403610f625760405162461bcd60e51b81526004016105279061171c565b60025f9081558281526005602052604081208190610f808533610e48565b909350915083821015610fd55760405162461bcd60e51b815260206004820152601d60248201527f576974686472617720416d6f756e74206973206e6f7420656e6f7567680000006044820152606401610527565b5f85815260056020819052604082200154610ff9906103e8906104d39088906114e1565b90505f61100682876116d4565b5f888152600260209081526040808320338452909152812054919250879181905b8015611189575f8b815260026020908152604080832033845290915281206110506001846116d4565b81548110611060576110606116ac565b905f5260205f2090600302019050805f015485106110f657806002015442106110b3576110ac6104df60646104d38b600201546104d96007546104d38860010154426104cb91906116d4565b93506110df565b6110dc6110d560646104d38b60060154855f01546114e190919063ffffffff16565b84906114fe565b92505b80546110ec90869061155a565b5f82559450611170565b80600201544210611138576111316104df60646104d38b600201546104d96007546104d388600101544261112a91906116d4565b8d906114e1565b935061115a565b6111576110d560646104d38b60060154896114e190919063ffffffff16565b92505b8054611166908661155a565b90555f9350611189565b4260019091015580611181816117ac565b915050611027565b508415611204576004805460405163a9059cbb60e01b81526001600160a01b039091169181018290526024810187905263a9059cbb906044016020604051808303815f875af11580156111de573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112029190611753565b505b83156112db576004546001600160a01b031663a9059cbb338461122785896116d4565b6112319190611785565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611279573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061129d9190611753565b505f8a81526003602090815260408083203384529091529020546112c190836114fe565b5f8b81526003602090815260408083203384529091529020555b5f8a8152600560205260409020546112f3908a61155a565b5f9a8b52600560205260408b20555050600190975550505050505050565b6001546001600160a01b0316331461133b5760405162461bcd60e51b8152600401610527906116e7565b600954811015611349575f80fd5b5f9182526005602052604090912060020155565b6002602052825f5260405f20602052815f5260405f208181548110611380575f80fd5b5f918252602090912060039091020180546001820154600290920154909450909250905083565b6001546001600160a01b031633146113d15760405162461bcd60e51b8152600401610527906116e7565b600c548111156113df575f80fd5b5f9182526005602052604090912060060155565b6001546001600160a01b0316331461141d5760405162461bcd60e51b8152600401610527906116e7565b5f9182526005602052604090912060070180549115156101000261ff0019909216919091179055565b6001546001600160a01b031633146114705760405162461bcd60e51b8152600401610527906116e7565b6001600160a01b0381166114d55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610527565b6114de81611509565b50565b5f6114ec82846117c1565b9392505050565b5f6114ec82846117d8565b5f6114ec8284611785565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6114ec82846116d4565b80356001600160a01b038116811461157b575f80fd5b919050565b5f60208284031215611590575f80fd5b6114ec82611565565b5f80604083850312156115aa575f80fd5b823591506115ba60208401611565565b90509250929050565b5f80604083850312156115d4575f80fd5b50508035926020909101359150565b5f602082840312156115f3575f80fd5b5035919050565b602080825282518282018190525f9190848201906040850190845b81811015611633578351151583529284019291840191600101611615565b50909695505050505050565b5f805f60608486031215611651575f80fd5b8335925061166160208501611565565b9150604084013590509250925092565b80151581146114de575f80fd5b5f806040838503121561168f575f80fd5b8235915060208301356116a181611671565b809150509250929050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156104f7576104f76116c0565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b5f60208284031215611763575f80fd5b81516114ec81611671565b5f6020828403121561177e575f80fd5b5051919050565b808201808211156104f7576104f76116c0565b634e487b7160e01b5f52604160045260245ffd5b5f816117ba576117ba6116c0565b505f190190565b80820281158282048414176104f7576104f76116c0565b5f826117f257634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212200a03ac126b7ccff055f0b5463fe288907b3c70413c42c5ef2ca484048f05423264736f6c63430008190033000000000000000000000000c4727c419acfb49c8660736506ca023a4e8509e0
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610153575f3560e01c80638c972702116100bf578063b1427ac111610079578063b1427ac1146102f1578063b16206161461031f578063b19fa166146103c4578063c28fc741146103d7578063e030400b14610401578063f2fde38b14610414575f80fd5b80638c972702146102605780638da5cb5b1461028857806397e90f33146102995780639e2c8a5b146102ac578063a230561b146102bf578063ab32eb69146102d2575f80fd5b80636132df35116101105780636132df35146101f7578063715018a61461020a57806372f702f3146102125780637b0472f01461022557806387dd95c0146102385780638a9640e514610240575f80fd5b806304c10b9a14610157578063399080ec14610173578063399a967b1461019b5780635792c7a4146101a45780635cbf7cb0146101b75780635d60c7be146101cc575b5f80fd5b61016060075481565b6040519081526020015b60405180910390f35b610160610181366004611580565b6001600160a01b03165f9081526006602052604090205490565b61016060085481565b6101606101b2366004611599565b610427565b6101ca6101c53660046115c3565b6104fd565b005b600d546101df906001600160a01b031681565b6040516001600160a01b03909116815260200161016a565b6101ca6102053660046115e3565b610554565b6101ca61077e565b6004546101df906001600160a01b031681565b6101ca6102333660046115c3565b6107b3565b6101ca610c6a565b61025361024e366004611580565b610d91565b60405161016a91906115fa565b61027361026e366004611599565b610e48565b6040805192835260208301919091520161016a565b6001546001600160a01b03166101df565b6101ca6102a73660046115c3565b610ef5565b6101ca6102ba3660046115c3565b610f41565b6101ca6102cd3660046115c3565b611311565b6101606102e0366004611580565b60066020525f908152604090205481565b6103046102ff36600461163f565b61135d565b6040805193845260208401929092529082015260600161016a565b61037c61032d3660046115e3565b600560208190525f918252604090912080546001820154600283015460038401546004850154958501546006860154600790960154949693959294919392909160ff8082169161010090041689565b60408051998a5260208a0198909852968801959095526060870193909352608086019190915260a085015260c0840152151560e083015215156101008201526101200161016a565b6101ca6103d23660046115c3565b6113a7565b6101606103e5366004611599565b600360209081525f928352604080842090915290825290205481565b6101ca61040f36600461167e565b6113f3565b6101ca610422366004611580565b611446565b5f8281526005602052604081208190815b5f8681526002602090815260408083206001600160a01b03891684529091529020548110156104f1575f8681526002602090815260408083206001600160a01b03891684529091528120805483908110610494576104946116ac565b905f5260205f20906003020190506104e66104df60646104d386600201546104d96007546104d38860010154426104cb91906116d4565b8954906114e1565b906114f3565b906114e1565b85906114fe565b935050600101610438565b50909150505b92915050565b6001546001600160a01b031633146105305760405162461bcd60e51b8152600401610527906116e7565b60405180910390fd5b600b5481111561053e575f80fd5b5f91825260056020819052604090922090910155565b60025f54036105755760405162461bcd60e51b81526004016105279061171c565b60025f8181558281526005602090815260408083209382528083203384529091528120549091906105da5760405162461bcd60e51b815260206004820152600f60248201526e139bc81cdd185ad95cc8199bdd5b99608a1b6044820152606401610527565b5f5b5f8481526002602090815260408083203384529091529020548110156106b1575f8481526002602090815260408083203384529091528120805483908110610626576106266116ac565b905f5260205f20906003020190506106656104df60646104d36007546104d386600101544261065591906116d4565b60028a015488546104d9916114e1565b5f86815260036020908152604080832033845290915290205490945061068b90856114fe565b5f86815260036020908152604080832033845290915290205542600191820155016105dc565b505f82116107015760405162461bcd60e51b815260206004820152601b60248201527f5468657265206973206e6f20616d6f756e7420746f20636c61696d00000000006044820152606401610527565b6004805460405163a9059cbb60e01b81523392810192909252602482018490526001600160a01b03169063a9059cbb906044016020604051808303815f875af1158015610750573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107749190611753565b505060015f555050565b6001546001600160a01b031633146107a85760405162461bcd60e51b8152600401610527906116e7565b6107b15f611509565b565b60025f54036107d45760405162461bcd60e51b81526004016105279061171c565b60025f55806108255760405162461bcd60e51b815260206004820152601d60248201527f5374616b696e6720416d6f756e742063616e6e6f74206265207a65726f0000006044820152606401610527565b600480546040516370a0823160e01b8152339281019290925282916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610870573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610894919061176e565b10156108da5760405162461bcd60e51b8152602060048201526015602482015274084c2d8c2dcc6ca40d2e640dcdee840cadcdeeaced605b1b6044820152606401610527565b60085482106109245760405162461bcd60e51b81526020600482015260166024820152755374616b696e6720697320756e617661696c61626c6560501b6044820152606401610527565b5f8281526005602052604090206007810154610100900460ff16156109955760405162461bcd60e51b815260206004820152602160248201527f5374616b696e6720696e207468697320706f6f6c20697320636f6e636c7564656044820152601960fa1b6064820152608401610527565b600480546040516370a0823160e01b815230928101929092525f916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156109e0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a04919061176e565b600480546040516323b872dd60e01b81523392810192909252306024830152604482018690529192506001600160a01b03909116906323b872dd906064016020604051808303815f875af1158015610a5e573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a829190611753565b50600480546040516370a0823160e01b815230928101929092525f916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610ace573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af2919061176e565b90505f610aff83836116d4565b90505f610b1f6103e86104d38760040154856114e190919063ffffffff16565b90508015610b9b576004805460405163a9059cbb60e01b81526001600160a01b039091169181018290526024810183905263a9059cbb906044016020604051808303815f875af1158015610b75573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b999190611753565b505b5f87815260026020908152604080832033845290915281205490819003610bd6576001866001015f828254610bd09190611785565b90915550505b5f8881526002602090815260408083203384529091528120805460010180825583908110610c0657610c066116ac565b905f5260205f2090600302019050610c27838561155a90919063ffffffff16565b815542600182018190556003880154610c3f91611785565b6002820155610c59610c51858561155a565b8854906114fe565b909655505060015f55505050505050565b6001546001600160a01b03163314610c945760405162461bcd60e51b8152600401610527906116e7565b4780610ced5760405162461bcd60e51b815260206004820152602260248201527f4554482062616c616e6365206d7573742062652067726561746572207468616e604482015261020360f41b6064820152608401610527565b600d546040515f916001600160a01b03169083908381818185875af1925050503d805f8114610d37576040519150601f19603f3d011682016040523d82523d5f602084013e610d3c565b606091505b5050905080610d8d5760405162461bcd60e51b815260206004820152601b60248201527f4661696c656420746f20636c656172204554482062616c616e636500000000006044820152606401610527565b5050565b60605f60085467ffffffffffffffff811115610daf57610daf611798565b604051908082528060200260200182016040528015610dd8578160200160208202803683370190505b5090505f5b600854811015610e41575f8181526002602090815260408083206001600160a01b038816845290915290205415610e15576001610e17565b5f5b828281518110610e2957610e296116ac565b91151560209283029190910190910152600101610ddd565b5092915050565b5f805f805f5b5f8781526002602090815260408083206001600160a01b038a168452909152902054811015610ee9575f8781526002602090815260408083206001600160a01b038a1684529091528120805483908110610eaa57610eaa6116ac565b905f5260205f2090600302019050610ece815f0154856114fe90919063ffffffff16565b8154909450610ede9084906114fe565b925050600101610e4e565b50909590945092505050565b6001546001600160a01b03163314610f1f5760405162461bcd60e51b8152600401610527906116e7565b600a54811115610f2d575f80fd5b5f9182526005602052604090912060040155565b60025f5403610f625760405162461bcd60e51b81526004016105279061171c565b60025f9081558281526005602052604081208190610f808533610e48565b909350915083821015610fd55760405162461bcd60e51b815260206004820152601d60248201527f576974686472617720416d6f756e74206973206e6f7420656e6f7567680000006044820152606401610527565b5f85815260056020819052604082200154610ff9906103e8906104d39088906114e1565b90505f61100682876116d4565b5f888152600260209081526040808320338452909152812054919250879181905b8015611189575f8b815260026020908152604080832033845290915281206110506001846116d4565b81548110611060576110606116ac565b905f5260205f2090600302019050805f015485106110f657806002015442106110b3576110ac6104df60646104d38b600201546104d96007546104d38860010154426104cb91906116d4565b93506110df565b6110dc6110d560646104d38b60060154855f01546114e190919063ffffffff16565b84906114fe565b92505b80546110ec90869061155a565b5f82559450611170565b80600201544210611138576111316104df60646104d38b600201546104d96007546104d388600101544261112a91906116d4565b8d906114e1565b935061115a565b6111576110d560646104d38b60060154896114e190919063ffffffff16565b92505b8054611166908661155a565b90555f9350611189565b4260019091015580611181816117ac565b915050611027565b508415611204576004805460405163a9059cbb60e01b81526001600160a01b039091169181018290526024810187905263a9059cbb906044016020604051808303815f875af11580156111de573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112029190611753565b505b83156112db576004546001600160a01b031663a9059cbb338461122785896116d4565b6112319190611785565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015611279573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061129d9190611753565b505f8a81526003602090815260408083203384529091529020546112c190836114fe565b5f8b81526003602090815260408083203384529091529020555b5f8a8152600560205260409020546112f3908a61155a565b5f9a8b52600560205260408b20555050600190975550505050505050565b6001546001600160a01b0316331461133b5760405162461bcd60e51b8152600401610527906116e7565b600954811015611349575f80fd5b5f9182526005602052604090912060020155565b6002602052825f5260405f20602052815f5260405f208181548110611380575f80fd5b5f918252602090912060039091020180546001820154600290920154909450909250905083565b6001546001600160a01b031633146113d15760405162461bcd60e51b8152600401610527906116e7565b600c548111156113df575f80fd5b5f9182526005602052604090912060060155565b6001546001600160a01b0316331461141d5760405162461bcd60e51b8152600401610527906116e7565b5f9182526005602052604090912060070180549115156101000261ff0019909216919091179055565b6001546001600160a01b031633146114705760405162461bcd60e51b8152600401610527906116e7565b6001600160a01b0381166114d55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610527565b6114de81611509565b50565b5f6114ec82846117c1565b9392505050565b5f6114ec82846117d8565b5f6114ec8284611785565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6114ec82846116d4565b80356001600160a01b038116811461157b575f80fd5b919050565b5f60208284031215611590575f80fd5b6114ec82611565565b5f80604083850312156115aa575f80fd5b823591506115ba60208401611565565b90509250929050565b5f80604083850312156115d4575f80fd5b50508035926020909101359150565b5f602082840312156115f3575f80fd5b5035919050565b602080825282518282018190525f9190848201906040850190845b81811015611633578351151583529284019291840191600101611615565b50909695505050505050565b5f805f60608486031215611651575f80fd5b8335925061166160208501611565565b9150604084013590509250925092565b80151581146114de575f80fd5b5f806040838503121561168f575f80fd5b8235915060208301356116a181611671565b809150509250929050565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156104f7576104f76116c0565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b5f60208284031215611763575f80fd5b81516114ec81611671565b5f6020828403121561177e575f80fd5b5051919050565b808201808211156104f7576104f76116c0565b634e487b7160e01b5f52604160045260245ffd5b5f816117ba576117ba6116c0565b505f190190565b80820281158282048414176104f7576104f76116c0565b5f826117f257634e487b7160e01b5f52601260045260245ffd5b50049056fea26469706673582212200a03ac126b7ccff055f0b5463fe288907b3c70413c42c5ef2ca484048f05423264736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000c4727c419acfb49c8660736506ca023a4e8509e0
-----Decoded View---------------
Arg [0] : _stakingToken (address): 0xC4727c419AcfB49c8660736506ca023A4e8509E0
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000c4727c419acfb49c8660736506ca023a4e8509e0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.