More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 463 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 17002772 | 624 days ago | IN | 0 ETH | 0.00207546 | ||||
Withdraw | 17002765 | 624 days ago | IN | 0 ETH | 0.00237489 | ||||
Withdraw | 16507697 | 694 days ago | IN | 0 ETH | 0.00184864 | ||||
Withdraw | 16507696 | 694 days ago | IN | 0 ETH | 0.00203646 | ||||
Withdraw | 16507693 | 694 days ago | IN | 0 ETH | 0.00232089 | ||||
Withdraw | 16507689 | 694 days ago | IN | 0 ETH | 0.00258573 | ||||
Withdraw | 16492726 | 696 days ago | IN | 0 ETH | 0.00308027 | ||||
Withdraw | 16446318 | 702 days ago | IN | 0 ETH | 0.0013377 | ||||
Withdraw | 16446317 | 702 days ago | IN | 0 ETH | 0.00148141 | ||||
Withdraw | 16446314 | 702 days ago | IN | 0 ETH | 0.00143766 | ||||
Withdraw | 16411874 | 707 days ago | IN | 0 ETH | 0.00145888 | ||||
Withdraw | 16411871 | 707 days ago | IN | 0 ETH | 0.00134646 | ||||
Withdraw | 16411869 | 707 days ago | IN | 0 ETH | 0.00151341 | ||||
Withdraw | 16411840 | 707 days ago | IN | 0 ETH | 0.00149309 | ||||
Withdraw | 16411838 | 707 days ago | IN | 0 ETH | 0.00176695 | ||||
Withdraw | 16407241 | 708 days ago | IN | 0 ETH | 0.00187056 | ||||
Withdraw | 16407224 | 708 days ago | IN | 0 ETH | 0.00257715 | ||||
Withdraw | 16407202 | 708 days ago | IN | 0 ETH | 0.00209966 | ||||
Withdraw | 16399559 | 709 days ago | IN | 0 ETH | 0.0026572 | ||||
Withdraw | 16399557 | 709 days ago | IN | 0 ETH | 0.00314622 | ||||
Withdraw | 16398896 | 709 days ago | IN | 0 ETH | 0.00420652 | ||||
Withdraw | 16398894 | 709 days ago | IN | 0 ETH | 0.00407908 | ||||
Withdraw | 16398606 | 709 days ago | IN | 0 ETH | 0.00396809 | ||||
Withdraw | 16398604 | 709 days ago | IN | 0 ETH | 0.00385361 | ||||
Withdraw | 16398601 | 709 days ago | IN | 0 ETH | 0.00365338 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DunkVault
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract DunkVault is Ownable, Pausable, ReentrancyGuard, IERC721Receiver { using SafeMath for uint256; using EnumerableSet for EnumerableSet.UintSet; struct ERC721Asset { uint lock; uint recur; uint reward; mapping(address => EnumerableSet.UintSet) deposits; mapping(address => mapping(uint256 => uint256)) depositedAt; mapping(address => mapping(uint256 => uint256)) rewardsAccumulationStartAt; } uint private erc20Decimals = 18; address public erc20Address = 0x00E595D4060dcF65c9C5622aA02d6B999F7835db; mapping(address => ERC721Asset) private _assets; constructor() { _pause(); } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function setLock(address _asset, uint256 _seconds) external onlyOwner { _assets[_asset].lock = _seconds; } function setReward(address _asset, uint256 _reward) external onlyOwner { _assets[_asset].reward = _reward; } function setRecurrence(address _asset, uint256 _seconds) external onlyOwner { _assets[_asset].recur = _seconds; } function setAsset(address _asset, uint256 _reward, uint256 _lock, uint256 _recur) external { ERC721Asset storage asset = _assets[_asset]; asset.lock = _lock; asset.recur = _recur; asset.reward = _reward; } function isDeposited(address _asset, uint256 _token) public view returns(bool) { return _assets[_asset].deposits[msg.sender].contains(_token); } function isReleased(address _asset, uint256 _token) public view returns(bool) { return duration(_asset, _token) >= _assets[_asset].lock; } function duration(address _asset, uint256 _token) public view returns(uint256) { if(!isDeposited(_asset, _token) || _assets[_asset].depositedAt[msg.sender][_token] == 0) return 0; return block.timestamp.sub(_assets[_asset].depositedAt[msg.sender][_token]); } function calculateReward(address _asset, uint256 _token) public view returns (uint256) { if(!isDeposited(_asset, _token)) return 0; return (block.timestamp.sub(_assets[_asset].rewardsAccumulationStartAt[msg.sender][_token])).mul(_assets[_asset].reward).div(_assets[_asset].recur); } function calculateRewards(address _asset, uint256[] calldata _tokens) public view returns (uint256[] memory rewards) { rewards = new uint256[](_tokens.length); for(uint256 token; token < _tokens.length; token++) { rewards[token] = calculateReward(_asset, _tokens[token]); } return rewards; } function claimRewards(address _asset, uint256[] calldata _tokens) public whenNotPaused nonReentrant() { uint256 rewards; for(uint256 token; token < _tokens.length; token++) { rewards += calculateReward(_asset, _tokens[token]); _assets[_asset].rewardsAccumulationStartAt[msg.sender][_tokens[token]] = block.timestamp; } if (rewards > 0) IERC20(erc20Address).transfer(msg.sender, rewards * 10 ** erc20Decimals); } function deposit(address _asset, uint256[] calldata _tokens) external whenNotPaused { require(_assets[_asset].reward > 0, "Staking: vault cannot receive this asset"); for(uint256 token; token < _tokens.length; token++) { IERC721(_asset).safeTransferFrom(msg.sender, address(this), _tokens[token]); _assets[_asset].deposits[msg.sender].add(_tokens[token]); _assets[_asset].depositedAt[msg.sender][_tokens[token]] = block.timestamp; _assets[_asset].rewardsAccumulationStartAt[msg.sender][_tokens[token]] = block.timestamp; } } function withdraw(address _asset, uint256[] calldata _tokens) external whenNotPaused { claimRewards(_asset, _tokens); for(uint256 token; token < _tokens.length; token++) { require(isDeposited(_asset, _tokens[token]), "Staking: token not found in deposits"); require(isReleased(_asset, _tokens[token]), "Staking: token locked"); _assets[_asset].deposits[msg.sender].remove(_tokens[token]); IERC721(_asset).safeTransferFrom(address(this), msg.sender, _tokens[token]); } } function withdrawERC20Supply() external onlyOwner { IERC20(erc20Address).transfer(msg.sender, IERC20(erc20Address).balanceOf(address(this))); } function onERC721Received(address, address, uint256, bytes calldata) external pure override returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.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 Pausable is Context { /** * @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. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { 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()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.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 no longer needed starting with Solidity 0.8. 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 substraction 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; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT 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 make 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 20000 }, "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":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":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"calculateReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"calculateRewards","outputs":[{"internalType":"uint256[]","name":"rewards","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20Address","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"isDeposited","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_token","type":"uint256"}],"name":"isReleased","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_reward","type":"uint256"},{"internalType":"uint256","name":"_lock","type":"uint256"},{"internalType":"uint256","name":"_recur","type":"uint256"}],"name":"setAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_seconds","type":"uint256"}],"name":"setLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_seconds","type":"uint256"}],"name":"setRecurrence","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_reward","type":"uint256"}],"name":"setReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256[]","name":"_tokens","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawERC20Supply","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526012600255600380546001600160a01b03191672e595d4060dcf65c9c5622aa02d6b999f7835db1790553480156200003b57600080fd5b50620000473362000068565b6000805460ff60a01b191690556001805562000062620000b8565b6200016a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620000cc600054600160a01b900460ff1690565b15620001115760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586200014d3390565b6040516001600160a01b03909116815260200160405180910390a1565b611ea2806200017a6000396000f3fe608060405234801561001057600080fd5b50600436106101775760003560e01c80635c975abb116100d85780638da5cb5b1161008c578063eacccaf011610066578063eacccaf0146103ba578063f2fde38b146103cd578063f341189e146103e057600080fd5b80638da5cb5b14610376578063a71604e814610394578063b0fc29e6146103a757600080fd5b8063761d2170116100bd578063761d2170146103485780638293744b1461035b5780638456cb591461036e57600080fd5b80635c975abb1461031d578063715018a61461034057600080fd5b80631b3341c91161012f578063276184ae11610114578063276184ae146102895780633f4ba83a146102ce5780634e5d793f146102d657600080fd5b80631b3341c914610263578063216732741461027657600080fd5b8063068c526f11610160578063068c526f146101b9578063150b7a02146101d95780631852e8d91461024257600080fd5b8063030be6b51461017c57806305231dea146101a4575b600080fd5b61018f61018a366004611986565b6103e8565b60405190151581526020015b60405180910390f35b6101b76101b23660046119b0565b610423565b005b6101cc6101c73660046119b0565b6106b1565b60405161019b9190611a36565b6102116101e7366004611a7a565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161019b565b610255610250366004611986565b610750565b60405190815260200161019b565b6101b7610271366004611986565b6107d6565b61018f610284366004611986565b610883565b6003546102a99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101b76108c0565b6101b76102e4366004611b15565b73ffffffffffffffffffffffffffffffffffffffff90931660009081526004602052604090209081556001810192909255600290910155565b60005474010000000000000000000000000000000000000000900460ff1661018f565b6101b761094b565b610255610356366004611986565b6109d6565b6101b76103693660046119b0565b610a79565b6101b7610d7b565b60005473ffffffffffffffffffffffffffffffffffffffff166102a9565b6101b76103a23660046119b0565b610e04565b6101b76103b5366004611986565b611135565b6101b76103c8366004611986565b6111df565b6101b76103db366004611b4e565b61128c565b6101b76113bc565b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604081205461041884846109d6565b101590505b92915050565b60005474010000000000000000000000000000000000000000900460ff16156104ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064015b60405180910390fd5b6002600154141561051a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104a4565b60026001556000805b828110156105ce5761054d8585858481811061054157610541611b69565b90506020020135610750565b6105579083611bc7565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260046020908152604080832033845260050190915281209193504291908686858181106105a2576105a2611b69565b9050602002013581526020019081526020016000208190555080806105c690611bdf565b915050610523565b5080156106a75760035460025473ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb90339061060790600a611d38565b6106119085611d44565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190611d81565b505b5050600180555050565b60608167ffffffffffffffff8111156106cc576106cc611da3565b6040519080825280602002602001820160405280156106f5578160200160208202803683370190505b50905060005b82811015610748576107198585858481811061054157610541611b69565b82828151811061072b5761072b611b69565b60209081029190910101528061074081611bdf565b9150506106fb565b509392505050565b600061075c8383610883565b6107685750600061041d565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020908152604080832060018101546002820154338652600590920184528285208786529093529220546107cf926107c9916107c390429061156d565b90611579565b90611585565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902060010155565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020908152604080832033845260030190915281206107cf9083611591565b60005473ffffffffffffffffffffffffffffffffffffffff163314610941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b6109496115a9565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b61094960006116a2565b60006109e28383610883565b1580610a26575073ffffffffffffffffffffffffffffffffffffffff8316600090815260046020818152604080842033855290920181528183208584529052902054155b15610a335750600061041d565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600460208181526040808420338552909201815281832085845290529020546107cf90429061156d565b60005474010000000000000000000000000000000000000000900460ff1615610afe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104a4565b610b09838383610423565b60005b81811015610d7557610b3684848484818110610b2a57610b2a611b69565b90506020020135610883565b610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5374616b696e673a20746f6b656e206e6f7420666f756e6420696e206465706f60448201527f736974730000000000000000000000000000000000000000000000000000000060648201526084016104a4565b610be384848484818110610bd757610bd7611b69565b905060200201356103e8565b610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5374616b696e673a20746f6b656e206c6f636b6564000000000000000000000060448201526064016104a4565b610c9d838383818110610c5e57610c5e611b69565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600460209081526040808320338452600301825290912093910201359050611717565b508373ffffffffffffffffffffffffffffffffffffffff166342842e0e3033868686818110610cce57610cce611b69565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610d4a57600080fd5b505af1158015610d5e573d6000803e3d6000fd5b505050508080610d6d90611bdf565b915050610b0c565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b610949611723565b60005474010000000000000000000000000000000000000000900460ff1615610e89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902060020154610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616b696e673a207661756c742063616e6e6f74207265636569766520746860448201527f697320617373657400000000000000000000000000000000000000000000000060648201526084016104a4565b60005b81811015610d75578373ffffffffffffffffffffffffffffffffffffffff166342842e0e3330868686818110610f7957610f79611b69565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b5050505061106183838381811061102257611022611b69565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260046020908152604080832033845260030182529091209391020135905061180f565b5073ffffffffffffffffffffffffffffffffffffffff841660009081526004602081815260408084203385529092019052812042918585858181106110a8576110a8611b69565b6020908102929092013583525081810192909252604090810160009081209390935573ffffffffffffffffffffffffffffffffffffffff87168352600482528083203384526005019091528120429185858581811061110957611109611b69565b90506020020135815260200190815260200160002081905550808061112d90611bdf565b915050610f41565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902055565b60005473ffffffffffffffffffffffffffffffffffffffff163314611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902060020155565b60005473ffffffffffffffffffffffffffffffffffffffff16331461130d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff81166113b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a4565b6113b9816116a2565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461143d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb90339083906370a0823190602401602060405180830381865afa1580156114b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d99190611dd2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611549573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b99190611d81565b60006107cf8284611deb565b60006107cf8284611d44565b60006107cf8284611e02565b600081815260018301602052604081205415156107cf565b60005474010000000000000000000000000000000000000000900460ff1661162d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016104a4565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006107cf838361181b565b60005474010000000000000000000000000000000000000000900460ff16156117a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104a4565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586116783390565b60006107cf838361190e565b6000818152600183016020526040812054801561190457600061183f600183611deb565b855490915060009061185390600190611deb565b90508181146118b857600086600001828154811061187357611873611b69565b906000526020600020015490508087600001848154811061189657611896611b69565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806118c9576118c9611e3d565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061041d565b600091505061041d565b60008181526001830160205260408120546119555750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561041d565b50600061041d565b803573ffffffffffffffffffffffffffffffffffffffff8116811461198157600080fd5b919050565b6000806040838503121561199957600080fd5b6119a28361195d565b946020939093013593505050565b6000806000604084860312156119c557600080fd5b6119ce8461195d565b9250602084013567ffffffffffffffff808211156119eb57600080fd5b818601915086601f8301126119ff57600080fd5b813581811115611a0e57600080fd5b8760208260051b8501011115611a2357600080fd5b6020830194508093505050509250925092565b6020808252825182820181905260009190848201906040850190845b81811015611a6e57835183529284019291840191600101611a52565b50909695505050505050565b600080600080600060808688031215611a9257600080fd5b611a9b8661195d565b9450611aa96020870161195d565b935060408601359250606086013567ffffffffffffffff80821115611acd57600080fd5b818801915088601f830112611ae157600080fd5b813581811115611af057600080fd5b896020828501011115611b0257600080fd5b9699959850939650602001949392505050565b60008060008060808587031215611b2b57600080fd5b611b348561195d565b966020860135965060408601359560600135945092505050565b600060208284031215611b6057600080fd5b6107cf8261195d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611bda57611bda611b98565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611c1157611c11611b98565b5060010190565b600181815b80851115611c7157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611c5757611c57611b98565b80851615611c6457918102915b93841c9390800290611c1d565b509250929050565b600082611c885750600161041d565b81611c955750600061041d565b8160018114611cab5760028114611cb557611cd1565b600191505061041d565b60ff841115611cc657611cc6611b98565b50506001821b61041d565b5060208310610133831016604e8410600b8410161715611cf4575081810a61041d565b611cfe8383611c18565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611d3057611d30611b98565b029392505050565b60006107cf8383611c79565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d7c57611d7c611b98565b500290565b600060208284031215611d9357600080fd5b815180151581146107cf57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611de457600080fd5b5051919050565b600082821015611dfd57611dfd611b98565b500390565b600082611e38577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220ee06a169a169740b8749dd39c499e24ad7cf5eac7f5404c5ce23532571f19bb164736f6c634300080a0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101775760003560e01c80635c975abb116100d85780638da5cb5b1161008c578063eacccaf011610066578063eacccaf0146103ba578063f2fde38b146103cd578063f341189e146103e057600080fd5b80638da5cb5b14610376578063a71604e814610394578063b0fc29e6146103a757600080fd5b8063761d2170116100bd578063761d2170146103485780638293744b1461035b5780638456cb591461036e57600080fd5b80635c975abb1461031d578063715018a61461034057600080fd5b80631b3341c91161012f578063276184ae11610114578063276184ae146102895780633f4ba83a146102ce5780634e5d793f146102d657600080fd5b80631b3341c914610263578063216732741461027657600080fd5b8063068c526f11610160578063068c526f146101b9578063150b7a02146101d95780631852e8d91461024257600080fd5b8063030be6b51461017c57806305231dea146101a4575b600080fd5b61018f61018a366004611986565b6103e8565b60405190151581526020015b60405180910390f35b6101b76101b23660046119b0565b610423565b005b6101cc6101c73660046119b0565b6106b1565b60405161019b9190611a36565b6102116101e7366004611a7a565b7f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6040517fffffffff00000000000000000000000000000000000000000000000000000000909116815260200161019b565b610255610250366004611986565b610750565b60405190815260200161019b565b6101b7610271366004611986565b6107d6565b61018f610284366004611986565b610883565b6003546102a99073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161019b565b6101b76108c0565b6101b76102e4366004611b15565b73ffffffffffffffffffffffffffffffffffffffff90931660009081526004602052604090209081556001810192909255600290910155565b60005474010000000000000000000000000000000000000000900460ff1661018f565b6101b761094b565b610255610356366004611986565b6109d6565b6101b76103693660046119b0565b610a79565b6101b7610d7b565b60005473ffffffffffffffffffffffffffffffffffffffff166102a9565b6101b76103a23660046119b0565b610e04565b6101b76103b5366004611986565b611135565b6101b76103c8366004611986565b6111df565b6101b76103db366004611b4e565b61128c565b6101b76113bc565b73ffffffffffffffffffffffffffffffffffffffff821660009081526004602052604081205461041884846109d6565b101590505b92915050565b60005474010000000000000000000000000000000000000000900460ff16156104ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064015b60405180910390fd5b6002600154141561051a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104a4565b60026001556000805b828110156105ce5761054d8585858481811061054157610541611b69565b90506020020135610750565b6105579083611bc7565b73ffffffffffffffffffffffffffffffffffffffff8616600090815260046020908152604080832033845260050190915281209193504291908686858181106105a2576105a2611b69565b9050602002013581526020019081526020016000208190555080806105c690611bdf565b915050610523565b5080156106a75760035460025473ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb90339061060790600a611d38565b6106119085611d44565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190611d81565b505b5050600180555050565b60608167ffffffffffffffff8111156106cc576106cc611da3565b6040519080825280602002602001820160405280156106f5578160200160208202803683370190505b50905060005b82811015610748576107198585858481811061054157610541611b69565b82828151811061072b5761072b611b69565b60209081029190910101528061074081611bdf565b9150506106fb565b509392505050565b600061075c8383610883565b6107685750600061041d565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020908152604080832060018101546002820154338652600590920184528285208786529093529220546107cf926107c9916107c390429061156d565b90611579565b90611585565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610857576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902060010155565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260046020908152604080832033845260030190915281206107cf9083611591565b60005473ffffffffffffffffffffffffffffffffffffffff163314610941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b6109496115a9565b565b60005473ffffffffffffffffffffffffffffffffffffffff1633146109cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b61094960006116a2565b60006109e28383610883565b1580610a26575073ffffffffffffffffffffffffffffffffffffffff8316600090815260046020818152604080842033855290920181528183208584529052902054155b15610a335750600061041d565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600460208181526040808420338552909201815281832085845290529020546107cf90429061156d565b60005474010000000000000000000000000000000000000000900460ff1615610afe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104a4565b610b09838383610423565b60005b81811015610d7557610b3684848484818110610b2a57610b2a611b69565b90506020020135610883565b610bc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f5374616b696e673a20746f6b656e206e6f7420666f756e6420696e206465706f60448201527f736974730000000000000000000000000000000000000000000000000000000060648201526084016104a4565b610be384848484818110610bd757610bd7611b69565b905060200201356103e8565b610c49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f5374616b696e673a20746f6b656e206c6f636b6564000000000000000000000060448201526064016104a4565b610c9d838383818110610c5e57610c5e611b69565b73ffffffffffffffffffffffffffffffffffffffff88166000908152600460209081526040808320338452600301825290912093910201359050611717565b508373ffffffffffffffffffffffffffffffffffffffff166342842e0e3033868686818110610cce57610cce611b69565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610d4a57600080fd5b505af1158015610d5e573d6000803e3d6000fd5b505050508080610d6d90611bdf565b915050610b0c565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610dfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b610949611723565b60005474010000000000000000000000000000000000000000900460ff1615610e89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff8316600090815260046020526040902060020154610f3e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f5374616b696e673a207661756c742063616e6e6f74207265636569766520746860448201527f697320617373657400000000000000000000000000000000000000000000000060648201526084016104a4565b60005b81811015610d75578373ffffffffffffffffffffffffffffffffffffffff166342842e0e3330868686818110610f7957610f79611b69565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b158015610ff557600080fd5b505af1158015611009573d6000803e3d6000fd5b5050505061106183838381811061102257611022611b69565b73ffffffffffffffffffffffffffffffffffffffff8816600090815260046020908152604080832033845260030182529091209391020135905061180f565b5073ffffffffffffffffffffffffffffffffffffffff841660009081526004602081815260408084203385529092019052812042918585858181106110a8576110a8611b69565b6020908102929092013583525081810192909252604090810160009081209390935573ffffffffffffffffffffffffffffffffffffffff87168352600482528083203384526005019091528120429185858581811061110957611109611b69565b90506020020135815260200190815260200160002081905550808061112d90611bdf565b915050610f41565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902055565b60005473ffffffffffffffffffffffffffffffffffffffff163314611260576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff909116600090815260046020526040902060020155565b60005473ffffffffffffffffffffffffffffffffffffffff16331461130d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b73ffffffffffffffffffffffffffffffffffffffff81166113b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a4565b6113b9816116a2565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461143d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a4565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff9091169063a9059cbb90339083906370a0823190602401602060405180830381865afa1580156114b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d99190611dd2565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611549573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b99190611d81565b60006107cf8284611deb565b60006107cf8284611d44565b60006107cf8284611e02565b600081815260018301602052604081205415156107cf565b60005474010000000000000000000000000000000000000000900460ff1661162d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016104a4565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006107cf838361181b565b60005474010000000000000000000000000000000000000000900460ff16156117a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016104a4565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586116783390565b60006107cf838361190e565b6000818152600183016020526040812054801561190457600061183f600183611deb565b855490915060009061185390600190611deb565b90508181146118b857600086600001828154811061187357611873611b69565b906000526020600020015490508087600001848154811061189657611896611b69565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806118c9576118c9611e3d565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061041d565b600091505061041d565b60008181526001830160205260408120546119555750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561041d565b50600061041d565b803573ffffffffffffffffffffffffffffffffffffffff8116811461198157600080fd5b919050565b6000806040838503121561199957600080fd5b6119a28361195d565b946020939093013593505050565b6000806000604084860312156119c557600080fd5b6119ce8461195d565b9250602084013567ffffffffffffffff808211156119eb57600080fd5b818601915086601f8301126119ff57600080fd5b813581811115611a0e57600080fd5b8760208260051b8501011115611a2357600080fd5b6020830194508093505050509250925092565b6020808252825182820181905260009190848201906040850190845b81811015611a6e57835183529284019291840191600101611a52565b50909695505050505050565b600080600080600060808688031215611a9257600080fd5b611a9b8661195d565b9450611aa96020870161195d565b935060408601359250606086013567ffffffffffffffff80821115611acd57600080fd5b818801915088601f830112611ae157600080fd5b813581811115611af057600080fd5b896020828501011115611b0257600080fd5b9699959850939650602001949392505050565b60008060008060808587031215611b2b57600080fd5b611b348561195d565b966020860135965060408601359560600135945092505050565b600060208284031215611b6057600080fd5b6107cf8261195d565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611bda57611bda611b98565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611c1157611c11611b98565b5060010190565b600181815b80851115611c7157817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611c5757611c57611b98565b80851615611c6457918102915b93841c9390800290611c1d565b509250929050565b600082611c885750600161041d565b81611c955750600061041d565b8160018114611cab5760028114611cb557611cd1565b600191505061041d565b60ff841115611cc657611cc6611b98565b50506001821b61041d565b5060208310610133831016604e8410600b8410161715611cf4575081810a61041d565b611cfe8383611c18565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115611d3057611d30611b98565b029392505050565b60006107cf8383611c79565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d7c57611d7c611b98565b500290565b600060208284031215611d9357600080fd5b815180151581146107cf57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600060208284031215611de457600080fd5b5051919050565b600082821015611dfd57611dfd611b98565b500390565b600082611e38577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220ee06a169a169740b8749dd39c499e24ad7cf5eac7f5404c5ce23532571f19bb164736f6c634300080a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.