Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 18389549 | 331 days ago | IN | 0 ETH | 0.01568848 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
StakingV2
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.9; // OpenZeppelin Contracts (last updated v4.8.1) (proxy/utils/Initializable.sol) // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 functionCallWithValue( target, data, 0, "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" ); (bool success, bytes memory returndata) = target.call{value: value}( data ); return verifyCallResultFromTarget( target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget( target, success, returndata, errorMessage ); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or 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 { _revert(returndata, errorMessage); } } function _revert( bytes memory returndata, string memory errorMessage ) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require( !_initializing && _initialized < version, "Initializable: contract is already initialized" ); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } } // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing {} function __Context_init_unchained() internal onlyInitializing {} function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; } /** * @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 OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; } // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @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); } contract StakingV2 is Initializable, OwnableUpgradeable, PausableUpgradeable { uint256 public planId; IERC20Upgradeable public token; struct Plan { uint256 minAmount; uint256 maxAmount; uint256 startTime; uint256 endTime; uint256 minLock; bool isActive; } struct UserStake { uint256 amount; uint256 planNo; uint256 startTime; uint256 endTime; } mapping(uint256 => Plan) public plan; mapping(address => uint256) public userId; mapping(address => mapping(uint256 => UserStake)) public userStake; event StakePlanUpdated(uint256 _planId, Plan _plan, uint256 timestamp); event StakeCreated( address user, uint256 _userId, uint256 amount, uint256 _planId, uint256 _startTime, uint256 endTime ); event StakeRemoved( address user, uint256 _userId, uint256 amount, uint256 timestamp ); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize(address _token) external initializer { require(_token != address(0), "Zero token address"); __Pausable_init_unchained(); __Ownable_init_unchained(); token = IERC20Upgradeable(_token); } function createStakePlans( Plan[] calldata _plans ) external onlyOwner returns (bool) { require(_plans.length > 0, "Zero plans"); for (uint i; i < _plans.length; ) { require( _plans[i].maxAmount > _plans[i].minAmount && _plans[i].minAmount >= 0, "Invalid min and max stake values" ); require( _plans[i].endTime > _plans[i].startTime && _plans[i].startTime > block.timestamp, "Invalid start and end times" ); plan[planId] = _plans[i]; emit StakePlanUpdated(planId, _plans[i], block.timestamp); unchecked { ++planId; ++i; } } return true; } function updateStakePlans( uint256[] calldata _planIds, Plan[] calldata _plans ) external onlyOwner returns (bool) { for (uint i; i < _plans.length; ) { require(_planIds[i] < planId, "Invalid Plan Id"); require( _plans[i].maxAmount > _plans[i].minAmount && _plans[i].minAmount >= 0, "Invalid min and max stake values" ); plan[_planIds[i]] = _plans[i]; emit StakePlanUpdated(_planIds[i], _plans[i], block.timestamp); unchecked { ++i; } } return true; } function updateStakePlanStatus( uint256[] calldata _planIds, bool[] calldata _status ) external onlyOwner returns (bool) { for (uint i; i < _planIds.length; ) { require(_planIds[i] < planId, "Invalid Plan Id"); plan[_planIds[i]].isActive = _status[i]; emit StakePlanUpdated( _planIds[i], plan[_planIds[i]], block.timestamp ); unchecked { ++i; } } return true; } function createStake( uint256 _planId, uint256 amount ) external returns (bool) { require(_planId < planId, "Invalid Plan Id"); Plan memory _plan = plan[_planId]; require(_plan.isActive, "Plan disabled"); require( amount <= _plan.maxAmount && amount >= _plan.minAmount, "Invalid stake amount" ); require( block.timestamp >= _plan.startTime && block.timestamp <= _plan.endTime, "Invalid stake time for this plan" ); userStake[msg.sender][userId[msg.sender]] = UserStake( amount, _planId, block.timestamp, block.timestamp + _plan.minLock ); userId[msg.sender]++; token.transferFrom(msg.sender, address(this), amount); emit StakeCreated( msg.sender, userId[msg.sender], amount, _planId, block.timestamp, block.timestamp + _plan.minLock ); return true; } function removeStake(uint256 _userId) external returns (bool) { require(_userId < userId[msg.sender], "Invalid user Id"); UserStake memory _userStake = userStake[msg.sender][_userId]; require(_userStake.amount > 0, "Invalid user stake Id"); require(block.timestamp >= _userStake.endTime, "Can't withdraw early"); token.transfer(msg.sender, _userStake.amount); delete userStake[msg.sender][_userId]; emit StakeRemoved( msg.sender, _userId, _userStake.amount, block.timestamp ); return true; } function userAllStakes( address _user ) external view returns (UserStake[] memory) { UserStake[] memory _userStakes = new UserStake[](userId[_user]); for (uint i; i < userId[_user]; ) { _userStakes[i] = userStake[_user][i]; unchecked { ++i; } } return _userStakes; } function userStakes( address _user, uint256[] memory _userStakeIds ) external view returns (UserStake[] memory) { require(_userStakeIds.length > 0, "Zero array length"); UserStake[] memory _userStakes = new UserStake[](_userStakeIds.length); for (uint i; i < _userStakeIds.length; ) { _userStakes[i] = userStake[_user][_userStakeIds[i]]; unchecked { ++i; } } return _userStakes; } function userActiveStakesIds( address _user ) external view returns (uint256[] memory, uint256) { uint256[] memory _userIds = new uint256[](userId[_user]); uint256 j; for (uint i; i < userId[_user]; ) { if (userStake[_user][i].amount > 0) { _userIds[j] = i; j++; } unchecked { ++i; } } return (_userIds, j); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_userId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_planId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"StakeCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_planId","type":"uint256"},{"components":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minLock","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"indexed":false,"internalType":"struct StakingV2.Plan","name":"_plan","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StakePlanUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"_userId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"StakeRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256","name":"_planId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"createStake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minLock","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct StakingV2.Plan[]","name":"_plans","type":"tuple[]"}],"name":"createStakePlans","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"plan","outputs":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minLock","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"planId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_userId","type":"uint256"}],"name":"removeStake","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_planIds","type":"uint256[]"},{"internalType":"bool[]","name":"_status","type":"bool[]"}],"name":"updateStakePlanStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_planIds","type":"uint256[]"},{"components":[{"internalType":"uint256","name":"minAmount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"minLock","type":"uint256"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct StakingV2.Plan[]","name":"_plans","type":"tuple[]"}],"name":"updateStakePlans","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userActiveStakesIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"userAllStakes","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"planNo","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct StakingV2.UserStake[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userStake","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"planNo","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256[]","name":"_userStakeIds","type":"uint256[]"}],"name":"userStakes","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"planNo","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"internalType":"struct StakingV2.UserStake[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001961001e565b6100de565b600054610100900460ff161561008a5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100dc576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b611aec806100ed6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063ab79205c116100a2578063d4cb4c9a11610071578063d4cb4c9a146102f5578063d7fa023d14610316578063e1f181ce14610329578063f2fde38b1461033c578063fc0c546a1461034f57600080fd5b8063ab79205c14610244578063bd300089146102b9578063c4d66de8146102c2578063d2bd9e0e146102d557600080fd5b8063715018a6116100e9578063715018a6146101dc57806372bb1922146101e65780638a423a31146101f95780638da5cb5b1461020c578063939624ab1461023157600080fd5b8063376fe1021461011b5780633937ea4f1461014e5780634067f650146101ae5780635c975abb146101d1575b600080fd5b61013b61012936600461152f565b609a6020526000908152604090205481565b6040519081526020015b60405180910390f35b61018e61015c366004611551565b609b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610145565b6101c16101bc36600461160c565b610362565b6040519015158152602001610145565b60655460ff166101c1565b6101e4610536565b005b6101c16101f4366004611678565b61054a565b6101c16102073660046116d8565b6106d2565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610145565b6101c161023f36600461171a565b610925565b61028a61025236600461171a565b609960205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff1686565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c001610145565b61013b60975481565b6101e46102d036600461152f565b610b52565b6102e86102e3366004611749565b610cd2565b604051610145919061181a565b61030861030336600461152f565b610e45565b60405161014592919061187e565b6101c16103243660046118c6565b610f34565b6102e861033736600461152f565b611253565b6101e461034a36600461152f565b61138b565b609854610219906001600160a01b031681565b600061036c611404565b60005b8281101561052a5760975486868381811061038c5761038c6118e8565b90506020020135106103b95760405162461bcd60e51b81526004016103b0906118fe565b60405180910390fd5b8383828181106103cb576103cb6118e8565b905060c00201600001358484838181106103e7576103e76118e8565b905060c002016020013511801561041a5750600084848381811061040d5761040d6118e8565b905060c002016000013510155b6104665760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d696e20616e64206d6178207374616b652076616c75657360448201526064016103b0565b838382818110610478576104786118e8565b905060c0020160996000888885818110610494576104946118e8565b90506020020135815260200190815260200160002081816104b59190611935565b9050507fbdb56c94aa4ae5587db4e77ff2bf1ddfe01556958f5e8553dd939222671f4f048686838181106104eb576104eb6118e8565b90506020020135858584818110610504576105046118e8565b905060c002014260405161051a93929190611989565b60405180910390a160010161036f565b50600195945050505050565b61053e611404565b610548600061145e565b565b6000610554611404565b60005b8481101561052a57609754868683818110610574576105746118e8565b90506020020135106105985760405162461bcd60e51b81526004016103b0906118fe565b8383828181106105aa576105aa6118e8565b90506020020160208101906105bf91906119e8565b609960008888858181106105d5576105d56118e8565b90506020020135815260200190815260200160002060050160006101000a81548160ff0219169083151502179055507fbdb56c94aa4ae5587db4e77ff2bf1ddfe01556958f5e8553dd939222671f4f04868683818110610637576106376118e8565b9050602002013560996000898986818110610654576106546118e8565b905060200201358152602001908152602001600020426040516106c29392919092835281546020840152600182015460408401526002820154606084015260038201546080840152600482015460a084015260059091015460ff16151560c083015260e08201526101000190565b60405180910390a1600101610557565b60006106dc611404565b816107165760405162461bcd60e51b815260206004820152600a6024820152695a65726f20706c616e7360b01b60448201526064016103b0565b60005b8281101561091b57838382818110610733576107336118e8565b905060c002016000013584848381811061074f5761074f6118e8565b905060c002016020013511801561078257506000848483818110610775576107756118e8565b905060c002016000013510155b6107ce5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d696e20616e64206d6178207374616b652076616c75657360448201526064016103b0565b8383828181106107e0576107e06118e8565b905060c00201604001358484838181106107fc576107fc6118e8565b905060c002016060013511801561082d575042848483818110610821576108216118e8565b905060c0020160400135115b6108795760405162461bcd60e51b815260206004820152601b60248201527f496e76616c696420737461727420616e6420656e642074696d6573000000000060448201526064016103b0565b83838281811061088b5761088b6118e8565b905060c0020160996000609754815260200190815260200160002081816108b29190611935565b9050507fbdb56c94aa4ae5587db4e77ff2bf1ddfe01556958f5e8553dd939222671f4f046097548585848181106108eb576108eb6118e8565b905060c002014260405161090193929190611989565b60405180910390a160978054600190810190915501610719565b5060019392505050565b336000908152609a602052604081205482106109755760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d5cd95c881259608a1b60448201526064016103b0565b336000908152609b6020908152604080832085845282529182902082516080810184528154808252600183015493820193909352600282015493810193909352600301546060830152610a025760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081d5cd95c881cdd185ad9481259605a1b60448201526064016103b0565b8060600151421015610a4d5760405162461bcd60e51b815260206004820152601460248201527343616e2774207769746864726177206561726c7960601b60448201526064016103b0565b609854815160405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad49190611a05565b50336000818152609b6020908152604080832087845282528083208381556001810184905560028101849055600301929092558351825193845290830186905282820152426060830152517fd9323ca80faaaf047170c44ee78d4bd7218de745b437ba055aaf1871e0e6e9049181900360800190a150600192915050565b600054610100900460ff1615808015610b725750600054600160ff909116105b80610b8c5750303b158015610b8c575060005460ff166001145b610bef5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103b0565b6000805460ff191660011790558015610c12576000805461ff0019166101001790555b6001600160a01b038216610c5d5760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b60448201526064016103b0565b610c656114b0565b610c6d6114e3565b609880546001600160a01b0319166001600160a01b0384161790558015610cce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60606000825111610d195760405162461bcd60e51b81526020600482015260116024820152700b4cae4de40c2e4e4c2f240d8cadccee8d607b1b60448201526064016103b0565b6000825167ffffffffffffffff811115610d3557610d35611733565b604051908082528060200260200182016040528015610d9157816020015b610d7e6040518060800160405280600081526020016000815260200160008152602001600081525090565b815260200190600190039081610d535790505b50905060005b8351811015610e3d576001600160a01b0385166000908152609b602052604081208551909190869084908110610dcf57610dcf6118e8565b60200260200101518152602001908152602001600020604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050828281518110610e2a57610e2a6118e8565b6020908102919091010152600101610d97565b509392505050565b6001600160a01b0381166000908152609a602052604081205460609190819067ffffffffffffffff811115610e7c57610e7c611733565b604051908082528060200260200182016040528015610ea5578160200160208202803683370190505b5090506000805b6001600160a01b0386166000908152609a6020526040902054811015610f29576001600160a01b0386166000908152609b6020908152604080832084845290915290205415610f215780838381518110610f0857610f086118e8565b602090810291909101015281610f1d81611a38565b9250505b600101610eac565b509094909350915050565b60006097548310610f575760405162461bcd60e51b81526004016103b0906118fe565b600083815260996020908152604091829020825160c08101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460ff16151560a08201819052610fef5760405162461bcd60e51b815260206004820152600d60248201526c141b185b88191a5cd8589b1959609a1b60448201526064016103b0565b80602001518311158015611004575080518310155b6110475760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081cdd185ad948185b5bdd5b9d60621b60448201526064016103b0565b8060400151421015801561105f575080606001514211155b6110ab5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964207374616b652074696d6520666f72207468697320706c616e60448201526064016103b0565b60405180608001604052808481526020018581526020014281526020018260800151426110d89190611a53565b9052336000818152609b60209081526040808320609a80845282852080548652918452828520875181558785015160018201559287015160028401556060909601516003909201919091559282529290925280549161113683611a38565b90915550506098546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561118d57600080fd5b505af11580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c59190611a05565b50336000818152609a602052604090205460808301517f3565f48109c628ce039ba3b5f6daa7004ca580280fd8101024bd193fd606457892919086908890429061120f9082611a53565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c00160405180910390a15060019392505050565b6001600160a01b0381166000908152609a60205260408120546060919067ffffffffffffffff81111561128857611288611733565b6040519080825280602002602001820160405280156112e457816020015b6112d16040518060800160405280600081526020016000815260200160008152602001600081525090565b8152602001906001900390816112a65790505b50905060005b6001600160a01b0384166000908152609a6020526040902054811015611384576001600160a01b0384166000908152609b6020908152604080832084845282529182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460608201528251839083908110611371576113716118e8565b60209081029190910101526001016112ea565b5092915050565b611393611404565b6001600160a01b0381166113f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b0565b6114018161145e565b50565b6033546001600160a01b031633146105485760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b0565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166114d75760405162461bcd60e51b81526004016103b090611a6b565b6065805460ff19169055565b600054610100900460ff1661150a5760405162461bcd60e51b81526004016103b090611a6b565b6105483361145e565b80356001600160a01b038116811461152a57600080fd5b919050565b60006020828403121561154157600080fd5b61154a82611513565b9392505050565b6000806040838503121561156457600080fd5b61156d83611513565b946020939093013593505050565b60008083601f84011261158d57600080fd5b50813567ffffffffffffffff8111156115a557600080fd5b6020830191508360208260051b85010111156115c057600080fd5b9250929050565b60008083601f8401126115d957600080fd5b50813567ffffffffffffffff8111156115f157600080fd5b60208301915083602060c0830285010111156115c057600080fd5b6000806000806040858703121561162257600080fd5b843567ffffffffffffffff8082111561163a57600080fd5b6116468883890161157b565b9096509450602087013591508082111561165f57600080fd5b5061166c878288016115c7565b95989497509550505050565b6000806000806040858703121561168e57600080fd5b843567ffffffffffffffff808211156116a657600080fd5b6116b28883890161157b565b909650945060208701359150808211156116cb57600080fd5b5061166c8782880161157b565b600080602083850312156116eb57600080fd5b823567ffffffffffffffff81111561170257600080fd5b61170e858286016115c7565b90969095509350505050565b60006020828403121561172c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561175c57600080fd5b61176583611513565b915060208084013567ffffffffffffffff8082111561178357600080fd5b818601915086601f83011261179757600080fd5b8135818111156117a9576117a9611733565b8060051b604051601f19603f830116810181811085821117156117ce576117ce611733565b6040529182528482019250838101850191898311156117ec57600080fd5b938501935b8285101561180a578435845293850193928501926117f1565b8096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561187157815180518552868101518786015285810151868601526060908101519085015260809093019290850190600101611837565b5091979650505050505050565b604080825283519082018190526000906020906060840190828701845b828110156118b75781518452928401929084019060010161189b565b50505092019290925292915050565b600080604083850312156118d957600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b6020808252600f908201526e125b9d985b1a5908141b185b881259608a1b604082015260600190565b801515811461140157600080fd5b81358155602082013560018201556040820135600282015560608201356003820155608082013560048201556005810160a083013561197381611927565b815490151560ff1660ff19919091161790555050565b60006101008201905084825283356020830152602084013560408301526040840135606083015260608401356080830152608084013560a083015260a08401356119d281611927565b151560c083015260e09091019190915292915050565b6000602082840312156119fa57600080fd5b813561154a81611927565b600060208284031215611a1757600080fd5b815161154a81611927565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a4c57611a4c611a22565b5060010190565b60008219821115611a6657611a66611a22565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220c211f164a8f0ad1252a19c311a0e92306c3e6ec9e2e40932e0b12ecebbcef07e64736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101165760003560e01c8063ab79205c116100a2578063d4cb4c9a11610071578063d4cb4c9a146102f5578063d7fa023d14610316578063e1f181ce14610329578063f2fde38b1461033c578063fc0c546a1461034f57600080fd5b8063ab79205c14610244578063bd300089146102b9578063c4d66de8146102c2578063d2bd9e0e146102d557600080fd5b8063715018a6116100e9578063715018a6146101dc57806372bb1922146101e65780638a423a31146101f95780638da5cb5b1461020c578063939624ab1461023157600080fd5b8063376fe1021461011b5780633937ea4f1461014e5780634067f650146101ae5780635c975abb146101d1575b600080fd5b61013b61012936600461152f565b609a6020526000908152604090205481565b6040519081526020015b60405180910390f35b61018e61015c366004611551565b609b60209081526000928352604080842090915290825290208054600182015460028301546003909301549192909184565b604080519485526020850193909352918301526060820152608001610145565b6101c16101bc36600461160c565b610362565b6040519015158152602001610145565b60655460ff166101c1565b6101e4610536565b005b6101c16101f4366004611678565b61054a565b6101c16102073660046116d8565b6106d2565b6033546001600160a01b03165b6040516001600160a01b039091168152602001610145565b6101c161023f36600461171a565b610925565b61028a61025236600461171a565b609960205260009081526040902080546001820154600283015460038401546004850154600590950154939492939192909160ff1686565b6040805196875260208701959095529385019290925260608401526080830152151560a082015260c001610145565b61013b60975481565b6101e46102d036600461152f565b610b52565b6102e86102e3366004611749565b610cd2565b604051610145919061181a565b61030861030336600461152f565b610e45565b60405161014592919061187e565b6101c16103243660046118c6565b610f34565b6102e861033736600461152f565b611253565b6101e461034a36600461152f565b61138b565b609854610219906001600160a01b031681565b600061036c611404565b60005b8281101561052a5760975486868381811061038c5761038c6118e8565b90506020020135106103b95760405162461bcd60e51b81526004016103b0906118fe565b60405180910390fd5b8383828181106103cb576103cb6118e8565b905060c00201600001358484838181106103e7576103e76118e8565b905060c002016020013511801561041a5750600084848381811061040d5761040d6118e8565b905060c002016000013510155b6104665760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d696e20616e64206d6178207374616b652076616c75657360448201526064016103b0565b838382818110610478576104786118e8565b905060c0020160996000888885818110610494576104946118e8565b90506020020135815260200190815260200160002081816104b59190611935565b9050507fbdb56c94aa4ae5587db4e77ff2bf1ddfe01556958f5e8553dd939222671f4f048686838181106104eb576104eb6118e8565b90506020020135858584818110610504576105046118e8565b905060c002014260405161051a93929190611989565b60405180910390a160010161036f565b50600195945050505050565b61053e611404565b610548600061145e565b565b6000610554611404565b60005b8481101561052a57609754868683818110610574576105746118e8565b90506020020135106105985760405162461bcd60e51b81526004016103b0906118fe565b8383828181106105aa576105aa6118e8565b90506020020160208101906105bf91906119e8565b609960008888858181106105d5576105d56118e8565b90506020020135815260200190815260200160002060050160006101000a81548160ff0219169083151502179055507fbdb56c94aa4ae5587db4e77ff2bf1ddfe01556958f5e8553dd939222671f4f04868683818110610637576106376118e8565b9050602002013560996000898986818110610654576106546118e8565b905060200201358152602001908152602001600020426040516106c29392919092835281546020840152600182015460408401526002820154606084015260038201546080840152600482015460a084015260059091015460ff16151560c083015260e08201526101000190565b60405180910390a1600101610557565b60006106dc611404565b816107165760405162461bcd60e51b815260206004820152600a6024820152695a65726f20706c616e7360b01b60448201526064016103b0565b60005b8281101561091b57838382818110610733576107336118e8565b905060c002016000013584848381811061074f5761074f6118e8565b905060c002016020013511801561078257506000848483818110610775576107756118e8565b905060c002016000013510155b6107ce5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d696e20616e64206d6178207374616b652076616c75657360448201526064016103b0565b8383828181106107e0576107e06118e8565b905060c00201604001358484838181106107fc576107fc6118e8565b905060c002016060013511801561082d575042848483818110610821576108216118e8565b905060c0020160400135115b6108795760405162461bcd60e51b815260206004820152601b60248201527f496e76616c696420737461727420616e6420656e642074696d6573000000000060448201526064016103b0565b83838281811061088b5761088b6118e8565b905060c0020160996000609754815260200190815260200160002081816108b29190611935565b9050507fbdb56c94aa4ae5587db4e77ff2bf1ddfe01556958f5e8553dd939222671f4f046097548585848181106108eb576108eb6118e8565b905060c002014260405161090193929190611989565b60405180910390a160978054600190810190915501610719565b5060019392505050565b336000908152609a602052604081205482106109755760405162461bcd60e51b815260206004820152600f60248201526e125b9d985b1a59081d5cd95c881259608a1b60448201526064016103b0565b336000908152609b6020908152604080832085845282529182902082516080810184528154808252600183015493820193909352600282015493810193909352600301546060830152610a025760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a59081d5cd95c881cdd185ad9481259605a1b60448201526064016103b0565b8060600151421015610a4d5760405162461bcd60e51b815260206004820152601460248201527343616e2774207769746864726177206561726c7960601b60448201526064016103b0565b609854815160405163a9059cbb60e01b815233600482015260248101919091526001600160a01b039091169063a9059cbb90604401602060405180830381600087803b158015610a9c57600080fd5b505af1158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad49190611a05565b50336000818152609b6020908152604080832087845282528083208381556001810184905560028101849055600301929092558351825193845290830186905282820152426060830152517fd9323ca80faaaf047170c44ee78d4bd7218de745b437ba055aaf1871e0e6e9049181900360800190a150600192915050565b600054610100900460ff1615808015610b725750600054600160ff909116105b80610b8c5750303b158015610b8c575060005460ff166001145b610bef5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016103b0565b6000805460ff191660011790558015610c12576000805461ff0019166101001790555b6001600160a01b038216610c5d5760405162461bcd60e51b81526020600482015260126024820152715a65726f20746f6b656e206164647265737360701b60448201526064016103b0565b610c656114b0565b610c6d6114e3565b609880546001600160a01b0319166001600160a01b0384161790558015610cce576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b60606000825111610d195760405162461bcd60e51b81526020600482015260116024820152700b4cae4de40c2e4e4c2f240d8cadccee8d607b1b60448201526064016103b0565b6000825167ffffffffffffffff811115610d3557610d35611733565b604051908082528060200260200182016040528015610d9157816020015b610d7e6040518060800160405280600081526020016000815260200160008152602001600081525090565b815260200190600190039081610d535790505b50905060005b8351811015610e3d576001600160a01b0385166000908152609b602052604081208551909190869084908110610dcf57610dcf6118e8565b60200260200101518152602001908152602001600020604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050828281518110610e2a57610e2a6118e8565b6020908102919091010152600101610d97565b509392505050565b6001600160a01b0381166000908152609a602052604081205460609190819067ffffffffffffffff811115610e7c57610e7c611733565b604051908082528060200260200182016040528015610ea5578160200160208202803683370190505b5090506000805b6001600160a01b0386166000908152609a6020526040902054811015610f29576001600160a01b0386166000908152609b6020908152604080832084845290915290205415610f215780838381518110610f0857610f086118e8565b602090810291909101015281610f1d81611a38565b9250505b600101610eac565b509094909350915050565b60006097548310610f575760405162461bcd60e51b81526004016103b0906118fe565b600083815260996020908152604091829020825160c08101845281548152600182015492810192909252600281015492820192909252600382015460608201526004820154608082015260059091015460ff16151560a08201819052610fef5760405162461bcd60e51b815260206004820152600d60248201526c141b185b88191a5cd8589b1959609a1b60448201526064016103b0565b80602001518311158015611004575080518310155b6110475760405162461bcd60e51b8152602060048201526014602482015273125b9d985b1a59081cdd185ad948185b5bdd5b9d60621b60448201526064016103b0565b8060400151421015801561105f575080606001514211155b6110ab5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964207374616b652074696d6520666f72207468697320706c616e60448201526064016103b0565b60405180608001604052808481526020018581526020014281526020018260800151426110d89190611a53565b9052336000818152609b60209081526040808320609a80845282852080548652918452828520875181558785015160018201559287015160028401556060909601516003909201919091559282529290925280549161113683611a38565b90915550506098546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd90606401602060405180830381600087803b15801561118d57600080fd5b505af11580156111a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c59190611a05565b50336000818152609a602052604090205460808301517f3565f48109c628ce039ba3b5f6daa7004ca580280fd8101024bd193fd606457892919086908890429061120f9082611a53565b604080516001600160a01b0390971687526020870195909552938501929092526060840152608083015260a082015260c00160405180910390a15060019392505050565b6001600160a01b0381166000908152609a60205260408120546060919067ffffffffffffffff81111561128857611288611733565b6040519080825280602002602001820160405280156112e457816020015b6112d16040518060800160405280600081526020016000815260200160008152602001600081525090565b8152602001906001900390816112a65790505b50905060005b6001600160a01b0384166000908152609a6020526040902054811015611384576001600160a01b0384166000908152609b6020908152604080832084845282529182902082516080810184528154815260018201549281019290925260028101549282019290925260039091015460608201528251839083908110611371576113716118e8565b60209081029190910101526001016112ea565b5092915050565b611393611404565b6001600160a01b0381166113f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103b0565b6114018161145e565b50565b6033546001600160a01b031633146105485760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103b0565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600054610100900460ff166114d75760405162461bcd60e51b81526004016103b090611a6b565b6065805460ff19169055565b600054610100900460ff1661150a5760405162461bcd60e51b81526004016103b090611a6b565b6105483361145e565b80356001600160a01b038116811461152a57600080fd5b919050565b60006020828403121561154157600080fd5b61154a82611513565b9392505050565b6000806040838503121561156457600080fd5b61156d83611513565b946020939093013593505050565b60008083601f84011261158d57600080fd5b50813567ffffffffffffffff8111156115a557600080fd5b6020830191508360208260051b85010111156115c057600080fd5b9250929050565b60008083601f8401126115d957600080fd5b50813567ffffffffffffffff8111156115f157600080fd5b60208301915083602060c0830285010111156115c057600080fd5b6000806000806040858703121561162257600080fd5b843567ffffffffffffffff8082111561163a57600080fd5b6116468883890161157b565b9096509450602087013591508082111561165f57600080fd5b5061166c878288016115c7565b95989497509550505050565b6000806000806040858703121561168e57600080fd5b843567ffffffffffffffff808211156116a657600080fd5b6116b28883890161157b565b909650945060208701359150808211156116cb57600080fd5b5061166c8782880161157b565b600080602083850312156116eb57600080fd5b823567ffffffffffffffff81111561170257600080fd5b61170e858286016115c7565b90969095509350505050565b60006020828403121561172c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561175c57600080fd5b61176583611513565b915060208084013567ffffffffffffffff8082111561178357600080fd5b818601915086601f83011261179757600080fd5b8135818111156117a9576117a9611733565b8060051b604051601f19603f830116810181811085821117156117ce576117ce611733565b6040529182528482019250838101850191898311156117ec57600080fd5b938501935b8285101561180a578435845293850193928501926117f1565b8096505050505050509250929050565b602080825282518282018190526000919060409081850190868401855b8281101561187157815180518552868101518786015285810151868601526060908101519085015260809093019290850190600101611837565b5091979650505050505050565b604080825283519082018190526000906020906060840190828701845b828110156118b75781518452928401929084019060010161189b565b50505092019290925292915050565b600080604083850312156118d957600080fd5b50508035926020909101359150565b634e487b7160e01b600052603260045260246000fd5b6020808252600f908201526e125b9d985b1a5908141b185b881259608a1b604082015260600190565b801515811461140157600080fd5b81358155602082013560018201556040820135600282015560608201356003820155608082013560048201556005810160a083013561197381611927565b815490151560ff1660ff19919091161790555050565b60006101008201905084825283356020830152602084013560408301526040840135606083015260608401356080830152608084013560a083015260a08401356119d281611927565b151560c083015260e09091019190915292915050565b6000602082840312156119fa57600080fd5b813561154a81611927565b600060208284031215611a1757600080fd5b815161154a81611927565b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a4c57611a4c611a22565b5060010190565b60008219821115611a6657611a66611a22565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220c211f164a8f0ad1252a19c311a0e92306c3e6ec9e2e40932e0b12ecebbcef07e64736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 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.