More Info
Private Name Tags
ContractCreator
Latest 10 from a total of 10 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 17569614 | 524 days ago | IN | 0 ETH | 0.00039632 | ||||
Deposit | 17569510 | 524 days ago | IN | 0 ETH | 0.01905058 | ||||
Deposit | 17565987 | 525 days ago | IN | 0 ETH | 0.00330482 | ||||
Deposit | 17468595 | 538 days ago | IN | 0 ETH | 0.08059447 | ||||
Deposit | 17235016 | 571 days ago | IN | 0 ETH | 0.08216148 | ||||
Deposit | 17229452 | 572 days ago | IN | 0 ETH | 0.01999837 | ||||
Deposit | 17229444 | 572 days ago | IN | 0 ETH | 0.01752754 | ||||
Transfer Ownersh... | 17175886 | 580 days ago | IN | 0 ETH | 0.00265447 | ||||
Launch Staking | 17144651 | 584 days ago | IN | 0 ETH | 0.00105665 | ||||
Set Second Contr... | 17144648 | 584 days ago | IN | 0 ETH | 0.00304758 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TWMStaking
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
///////////////////////////////////////////////////////////////// // KYL // THE WATCHMAKER BANK // TWM STAKING CONTRACT // 2023 // /////////////////////////////////////////////////////////////// // producer: KYL WATCHES LTD // Instagram: @kylwatchesltd // ///////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // ___ _______ __ _______ _______ ___ __ __ _______ /// // | || || || | | || || |_| || | /// // | ||_ _||__|| _____| |_ _|| || || ___| /// // | | | | | |_____ | | | || || |___ /// // | | | | |_____ | | | | || || ___| /// // | | | | _____| | | | | || ||_|| || |___ /// // |___| |___| |_______| |___| |___||_| |_||_______| /// // /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // /// // ./%@@@@@@@#, /// // .*(%&@@@@&&%%%##%%%&&@@@@%#*. ,#@@&#/*,,.....,#@&, /// // *%&@@&(*,.......................,*#@@@@#*******,%@@@@@@@@@@( /// // ,&@@&*.................................... (@@#,******,,,*/#@@@# /// // ,%@@#,............................................%@%*****/(//*,,..&&. /// // ,&@%*.,,,.............................................,%@#****//((#&@@@%. /// // (@&*,,,,,,,,..............................................,@&******,.../@&. /// // /@@,,,,,,,,,,,,...............................................%@(,/%#/,,..,%@, /// // .*%@@@@&&&&%%%@@/,,,,,,,,,,,,,,,..............................................#@#,**#@@/,.*@@. /// // (@@(,.........,&@*.,,,,,,,,,,,,,,,,............................(@(.............. (@(,**,&@,.,%@* /// // .&@/..,/%&(.....#@/.,,,,,,,,,,,,,,,,,,.....................,(%@&/,..................#@(,**(@&.,%@* /// // #@#&@@@@%,......&&,,,,,,,,,,,,,,,,,,,,,,.......... .*#@@@&(. ............... .......&@/**(@@&*&@. /// // .#&(#@&,.../&#*,*@#.,,,,,,,,,,,,,,,,,,,,,,,*/#&@@&%(*..................,/%@@@@@(*.....,@&*,#@*/@&, /// // %@*.,(@@#*,,.*@#.,,,,,,,,,.%&&&@@@&%%#/*,,......................*&@&#*...,@&#@&,..../@#*@% /// // (@&@@%*******/@#.,,,,,,,,,,,,,,,,,,,,,,,,,....................#@&*.#@@@&/..,&@*......%@@&. /// // @&****,(@@*&&.,,,,,,,,,,,,,,,,,,,,,,,,,,..................%@*.,&@@@@@@@@@@@@%* ...(@/ /// // .@&****@@/,.#@*.,,,,,,,,,,,,,,,,,,,,,,,,,,..............*@@%*(@@@@@@@@&&&&&@@@@@@&*,&@, /// // %@/**/@@*,./@%.,,,,/%&@@@@&%%%&&@@&/,,.,,..............&&(@@@@@%@@####%##(((((%@@@@@@%. /// // &@**,#@#,.,%@*.,,*%@@%************#@@@@#,............,&@@@@#(#&@@@&%###%@@@@#(((&@@@@( /// // .%@#,/@@%,*(@%,,,%@@/,**,,/%@@@@@@@@@&#&@#.......... #@@@#(%@@%*/%@@@@@@&(/#@@%((#@@@@. /// // ,@&/@&&@#*%@(,,,./@&&@@@@@@@&&@&&&@@@@@@@(......../@@@((&@&/%@@@@@@@* *%@&(((@@@& /// // .((. .%@&@@*,,,#@@@@#/%*,,,*@(.,,,#/*%@@@&,.....%@@%(%@@/&@@@@@@@@(. ,%&/&@%((&@@@* /// // .(@@*/@@@&,,,,,&#.,,(*..*@/.,,,*@@@#....(@@&(%@&/@@@@@@@@@@@@@@@@/&@#((@@@@% /// // *@@@@@#%@%,.,,,,,,,,,,,,.. /@@/@@@%%@@@@@@%(&@%%@@@@@@@@@@@@@@/&@&((&@@@@& /// // #@@@(.,,.,,,,.,,,*(%&%/, . ,@@@&#/,.#@@&(&@@#&@@@@@@@@@@#%@@#((@@@&/@& /// // %@@&.***,*##(*.&@@@@&, ,,,,,@@@,.....*@@@&(#@@@&&&%%&&@@@&((#@@@@/.(@( /// // &@@@. #@/*. .. *@@&........,%@@@&#(((####(((#&@@@@&*..,&@. /// // (@@@* (, @% #, %@@(............%@@@@@@@@@@@@@@@#......(@/ /// // #@@@((#, (, (&@@@#,...........*#&@%,,*//**............@% /// // *@@@@( ,&* .&* %( .#@@@&%*...............#@/./#&@@@&&@@@&%/,%@* /// // .&@@@@&%, .@/ .#@@@@@#@@,,,.............,%@@%/,...%@%/...,*(%@@@&#* /// // /@@@@@@@@@@@@@@@@@@&*.,#@*.,,............(@%.,,&@/...../&@@@(.,#@@@( /// // /@&*..,*****,..,*(#%&&@@@&(*.........(@@*.....*&@#...,#@@(&@%, /// // /@@/.,,,,*%@@%(/,...,,.,*#&@@@@@@@&(,.........*&@&&&/../@( /// // ,&@%,(@@(,#@#,*,&@/*,**,................,(&@@(......,@&. /// // %@@*,(@&/**,#@#*****,..,,,.*,.....#@@&* .........&@* //// // .%@%**/@@%//**#@@%(*********//((#&@@%*..*,.........#@( ///// // .@@@@@@@@&%@@#(#(,.,/%%%%###((/**,.....,(@%,....... (@/ ////// // *@@(,,,,,,,,,,,,,(@&&&&@@@#/...........%@/ /////// // %@@,.,,,,,,,,,,,,,,,,,........... /@@. //////// // *&@%,,,,,,,,,,,,,,.........,/&@@#. ///////// // ,%@&(,........,,*/#%@@@%(, ////////// // *%@@@@@@@&%(*,. /////////// // //////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // //////// // ████████╗██╗ ██╗███████╗ ██╗ ██╗ █████╗ ████████╗ ██████╗██╗ ██╗███╗ ███╗ █████╗ ██╗ ██╗███████╗██████╗ /// // ╚══██╔══╝██║ ██║██╔════╝ ██║ ██║██╔══██╗╚══██╔══╝██╔════╝██║ ██║████╗ ████║██╔══██╗██║ ██╔╝██╔════╝██╔══██╗ /// // ██║ ███████║█████╗ ██║ █╗ ██║███████║ ██║ ██║ ███████║██╔████╔██║███████║█████╔╝ █████╗ ██████╔╝ /// // ██║ ██╔══██║██╔══╝ ██║███╗██║██╔══██║ ██║ ██║ ██╔══██║██║╚██╔╝██║██╔══██║██╔═██╗ ██╔══╝ ██╔══██╗ /// // ██║ ██║ ██║███████╗ ╚███╔███╔╝██║ ██║ ██║ ╚██████╗██║ ██║██║ ╚═╝ ██║██║ ██║██║ ██╗███████╗██║ ██║ /// // ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ /// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; pragma solidity ^0.8.7; contract TWMStaking is Ownable, ReentrancyGuard { IERC721 public FirstCollection; IERC721 public SecondCollection; IERC721 public ThirdCollection; uint256 public constant SECONDS_IN_DAY = 24 * 60 * 60; address public signerAddress; bool public stakingLaunched; bool public depositPaused; struct Staker { uint256 currentYield; uint256 accumulatedAmount; uint256 lastCheckpoint; uint256[] stakedFIRST; uint256[] stakedSECOND; uint256[] stakedTHIRD; } enum ContractTypes { FIRSTCOL, SECONDCOL, THIRDCOL } mapping(address => uint256) public _baseRates; mapping(address => Staker) private _stakers; mapping(address => mapping(uint256 => address)) private _ownerOfToken; mapping(address => ContractTypes) private _contractTypes; mapping(address => mapping(uint256 => uint256)) private _tokensMultiplier; event Deposit( address indexed staker, address contractAddress, uint256 tokensAmount ); event Withdraw( address indexed staker, address contractAddress, uint256 tokensAmount ); event AutoDeposit( address indexed contractAddress, uint256 tokenId, address indexed owner ); event WithdrawStuckERC721( address indexed receiver, address indexed tokenAddress, uint256 indexed tokenId ); constructor(address _twm, address _signer) { FirstCollection = IERC721(_twm); _contractTypes[_twm] = ContractTypes.FIRSTCOL; _baseRates[_twm] = 25 ether; signerAddress = _signer; } function deposit( address contractAddress, uint256[] memory tokenIds, uint256[] memory tokenTraits, bytes calldata signature ) public nonReentrant { require(!depositPaused, "Deposit paused"); require(stakingLaunched, "Staking is not launched yet"); require( (contractAddress != address(0) && contractAddress == address(FirstCollection)) || contractAddress == address(SecondCollection) || contractAddress == address(ThirdCollection), "Unknown contract" ); ContractTypes contractType = _contractTypes[contractAddress]; if (tokenTraits.length > 0) { require( _validateSignature( signature, contractAddress, tokenIds, tokenTraits ), "Invalid data provided" ); _setTokensValues(contractAddress, tokenIds, tokenTraits); } Staker storage user = _stakers[_msgSender()]; uint256 newYield = user.currentYield; for (uint256 i; i < tokenIds.length; i++) { require( IERC721(contractAddress).ownerOf(tokenIds[i]) == _msgSender(), "Not the owner" ); IERC721(contractAddress).safeTransferFrom( _msgSender(), address(this), tokenIds[i] ); _ownerOfToken[contractAddress][tokenIds[i]] = _msgSender(); newYield += getTokenYield(contractAddress, tokenIds[i]); if (contractType == ContractTypes.FIRSTCOL) { user.stakedFIRST.push(tokenIds[i]); } if (contractType == ContractTypes.SECONDCOL) { user.stakedSECOND.push(tokenIds[i]); } if (contractType == ContractTypes.THIRDCOL) { user.stakedTHIRD.push(tokenIds[i]); } } accumulate(_msgSender()); user.currentYield = newYield; emit Deposit(_msgSender(), contractAddress, tokenIds.length); } function withdraw( address contractAddress, uint256[] memory tokenIds ) public nonReentrant { require( (contractAddress != address(0) && contractAddress == address(FirstCollection)) || contractAddress == address(SecondCollection) || contractAddress == address(ThirdCollection), "Unknown contract" ); ContractTypes contractType = _contractTypes[contractAddress]; Staker storage user = _stakers[_msgSender()]; uint256 newYield = user.currentYield; for (uint256 i; i < tokenIds.length; i++) { require( IERC721(contractAddress).ownerOf(tokenIds[i]) == address(this), "Not the owner" ); _ownerOfToken[contractAddress][tokenIds[i]] = address(0); if (user.currentYield != 0) { uint256 tokenYield = getTokenYield( contractAddress, tokenIds[i] ); newYield -= tokenYield; } if (contractType == ContractTypes.FIRSTCOL) { user.stakedFIRST = _moveTokenInTheList( user.stakedFIRST, tokenIds[i] ); user.stakedFIRST.pop(); } if (contractType == ContractTypes.SECONDCOL) { user.stakedSECOND = _moveTokenInTheList( user.stakedSECOND, tokenIds[i] ); user.stakedSECOND.pop(); } if (contractType == ContractTypes.THIRDCOL) { user.stakedTHIRD = _moveTokenInTheList( user.stakedTHIRD, tokenIds[i] ); user.stakedTHIRD.pop(); } IERC721(contractAddress).safeTransferFrom( address(this), _msgSender(), tokenIds[i] ); } if (user.stakedFIRST.length == 0 && user.stakedSECOND.length == 0) { newYield = 0; } accumulate(_msgSender()); user.currentYield = newYield; emit Withdraw(_msgSender(), contractAddress, tokenIds.length); } function getAccumulatedAmount( address staker ) external view returns (uint256) { return _stakers[staker].accumulatedAmount + getCurrentReward(staker); } function getTokenYield( address contractAddress, uint256 tokenId ) public view returns (uint256) { uint256 tokenYield = _tokensMultiplier[contractAddress][tokenId]; if (tokenYield == 0) { tokenYield = _baseRates[contractAddress]; } return tokenYield; } function getStakerYield(address staker) public view returns (uint256) { return _stakers[staker].currentYield; } function getStakerTokens( address staker ) public view returns (uint256[] memory, uint256[] memory, uint256[] memory) { return ( _stakers[staker].stakedFIRST, _stakers[staker].stakedSECOND, _stakers[staker].stakedTHIRD ); } function isMultiplierSet( address contractAddress, uint256 tokenId ) public view returns (bool) { return _tokensMultiplier[contractAddress][tokenId] > 0; } function _moveTokenInTheList( uint256[] memory list, uint256 tokenId ) internal pure returns (uint256[] memory) { uint256 tokenIndex = 0; uint256 lastTokenIndex = list.length - 1; uint256 length = list.length; for (uint256 i = 0; i < length; i++) { if (list[i] == tokenId) { tokenIndex = i + 1; break; } } require(tokenIndex != 0, "msg.sender is not the owner"); tokenIndex -= 1; if (tokenIndex != lastTokenIndex) { list[tokenIndex] = list[lastTokenIndex]; list[lastTokenIndex] = tokenId; } return list; } function _validateSignature( bytes calldata signature, address contractAddress, uint256[] memory tokenIds, uint256[] memory tokenTraits ) internal view returns (bool) { bytes32 dataHash = keccak256( abi.encodePacked(contractAddress, tokenIds, tokenTraits) ); bytes32 message = ECDSA.toEthSignedMessageHash(dataHash); address receivedAddress = ECDSA.recover(message, signature); return (receivedAddress != address(0) && receivedAddress == signerAddress); } function _setTokensValues( address contractAddress, uint256[] memory tokenIds, uint256[] memory tokenTraits ) internal { require(tokenIds.length == tokenTraits.length, "Wrong arrays provided"); for (uint256 i; i < tokenIds.length; i++) { if (tokenTraits[i] != 0) { _tokensMultiplier[contractAddress][tokenIds[i]] = tokenTraits[ i ]; } } } function getCurrentReward(address staker) public view returns (uint256) { Staker memory user = _stakers[staker]; if (user.lastCheckpoint == 0) { return 0; } return ((block.timestamp - user.lastCheckpoint) * user.currentYield) / SECONDS_IN_DAY; } function accumulate(address staker) internal { _stakers[staker].accumulatedAmount += getCurrentReward(staker); _stakers[staker].lastCheckpoint = block.timestamp; } /** * @dev Returns token owner address (returns address(0) if token is not inside the gateway) */ function ownerOf( address contractAddress, uint256 tokenId ) public view returns (address) { return _ownerOfToken[contractAddress][tokenId]; } function setFirstContract( address _first, uint256 _baseReward ) public onlyOwner { FirstCollection = IERC721(_first); _contractTypes[_first] = ContractTypes.FIRSTCOL; _baseRates[_first] = _baseReward; } function setSecondContract( address _second, uint256 _baseReward ) public onlyOwner { SecondCollection = IERC721(_second); _contractTypes[_second] = ContractTypes.SECONDCOL; _baseRates[_second] = _baseReward; } function setThirdContract( address _third, uint256 _baseReward ) public onlyOwner { ThirdCollection = IERC721(_third); _contractTypes[_third] = ContractTypes.THIRDCOL; _baseRates[_third] = _baseReward; } /** * @dev Function allows admin withdraw ERC721 in case of emergency. */ function emergencyWithdraw( address tokenAddress, uint256[] memory tokenIds ) public onlyOwner { require(tokenIds.length <= 50, "50 is max per tx"); pauseDeposit(true); for (uint256 i; i < tokenIds.length; i++) { address receiver = _ownerOfToken[tokenAddress][tokenIds[i]]; if ( receiver != address(0) && IERC721(tokenAddress).ownerOf(tokenIds[i]) == address(this) ) { IERC721(tokenAddress).transferFrom( address(this), receiver, tokenIds[i] ); emit WithdrawStuckERC721(receiver, tokenAddress, tokenIds[i]); } } } /** * @dev Function allows to pause deposits if needed. Withdraw remains active. */ function pauseDeposit(bool _pause) public onlyOwner { depositPaused = _pause; } /** * @dev Function allows to pause deposits if needed. Withdraw remains active. */ function updateSignerAddress(address _signer) public onlyOwner { signerAddress = _signer; } function launchStaking() public onlyOwner { require(!stakingLaunched, "Staking has been launched already"); stakingLaunched = true; } function updateBaseYield( address _contract, uint256 _yield ) public onlyOwner { _baseRates[_contract] = _yield; } function onERC721Received( address, address, uint256, bytes calldata ) external pure returns (bytes4) { return bytes4( keccak256("onERC721Received(address,address,uint256,bytes)") ); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) 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() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // 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 // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) 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`. * * 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; /** * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
{ "optimizer": { "enabled": true, "runs": 500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_twm","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"AutoDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensAmount","type":"uint256"}],"name":"Deposit","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":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokensAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"WithdrawStuckERC721","type":"event"},{"inputs":[],"name":"FirstCollection","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SECONDS_IN_DAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SecondCollection","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ThirdCollection","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_baseRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"tokenTraits","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getAccumulatedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getCurrentReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getStakerTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"getStakerYield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenYield","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isMultiplierSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"launchStaking","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_pause","type":"bool"}],"name":"pauseDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_first","type":"address"},{"internalType":"uint256","name":"_baseReward","type":"uint256"}],"name":"setFirstContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_second","type":"address"},{"internalType":"uint256","name":"_baseReward","type":"uint256"}],"name":"setSecondContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_third","type":"address"},{"internalType":"uint256","name":"_baseReward","type":"uint256"}],"name":"setThirdContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingLaunched","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_yield","type":"uint256"}],"name":"updateBaseYield","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"updateSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620025a0380380620025a0833981016040819052620000349162000110565b6200003f33620000a3565b60018055600280546001600160a01b039384166001600160a01b031991821681179092556000918252600960209081526040808420805460ff19169055600690915290912068015af1d78b58c4000090556005805492909316911617905562000148565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200010b57600080fd5b919050565b600080604083850312156200012457600080fd5b6200012f83620000f3565b91506200013f60208401620000f3565b90509250929050565b61244880620001586000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063613b54f0116101045780638fa2a9f0116100a2578063c68e516111610071578063c68e516114610484578063dfeaa74c14610497578063e1af5698146104aa578063f2fde38b146104be57600080fd5b80638fa2a9f014610443578063a30a247414610456578063ab04eb3c1461045e578063b50495021461047157600080fd5b8063715018a6116100de578063715018a6146104045780637af617751461040c5780638293744b1461041f5780638da5cb5b1461043257600080fd5b8063613b54f0146103d457806361499ab9146103e757806361a52a36146103fa57600080fd5b806323101e2711610171578063415855d61161014b578063415855d6146103725780634bee21d4146103855780634d307e3f146103ae5780635b7633d0146103c157600080fd5b806323101e271461032c5780632fe8df2c1461034c5780633e304c281461035f57600080fd5b8063150b7a02116101ad578063150b7a02146102335780631ae73557146102845780631f29d2dc146102bc5780632161a2b61461030a57600080fd5b806302befd24146101d457806304129667146101fd57806305513f021461021e575b600080fd5b6005546101e890600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b61021061020b366004611f9a565b6104d1565b6040519081526020016101f4565b61023161022c366004611fb7565b610508565b005b61026b610241366004612025565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b6040516001600160e01b031990911681526020016101f4565b6101e8610292366004611fb7565b6001600160a01b03919091166000908152600a602090815260408083209383529290522054151590565b6102f26102ca366004611fb7565b6001600160a01b03918216600090815260086020908152604080832093835292905220541690565b6040516001600160a01b0390911681526020016101f4565b61031d610318366004611f9a565b61056b565b6040516101f4939291906120d3565b61021061033a366004611f9a565b60066020526000908152604090205481565b61023161035a366004611fb7565b610699565b61023161036d366004611fb7565b6106db565b610231610380366004612116565b610720565b610210610393366004611f9a565b6001600160a01b031660009081526007602052604090205490565b6102106103bc366004611f9a565b610746565b6005546102f2906001600160a01b031681565b6002546102f2906001600160a01b031681565b6102106103f5366004611fb7565b6108d2565b6102106201518081565b61023161091b565b61023161041a3660046121e9565b61092f565b61023161042d36600461227a565b610e9c565b6000546001600160a01b03166102f2565b610231610451366004611f9a565b61145f565b610231611489565b6004546102f2906001600160a01b031681565b6003546102f2906001600160a01b031681565b610231610492366004611fb7565b61150a565b6102316104a536600461227a565b61152e565b6005546101e890600160a01b900460ff1681565b6102316104cc366004611f9a565b6117a6565b60006104dc82610746565b6001600160a01b03831660009081526007602052604090206001015461050291906122e0565b92915050565b61051061181f565b600480546001600160a01b0319166001600160a01b038416908117909155600090815260096020526040902080546002919060ff19166001835b02179055506001600160a01b03909116600090815260066020526040902055565b6001600160a01b038116600090815260076020908152604091829020600381018054845181850281018501909552808552606094859485946004810193600590910192918591908301828280156105e157602002820191906000526020600020905b8154815260200190600101908083116105cd575b505050505092508180548060200260200160405190810160405280929190818152602001828054801561063357602002820191906000526020600020905b81548152602001906001019080831161061f575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561068557602002820191906000526020600020905b815481526020019060010190808311610671575b505050505090509250925092509193909250565b6106a161181f565b600280546001600160a01b0319166001600160a01b0384169081179091556000908152600960205260408120805460ff191660018361054a565b6106e361181f565b600380546001600160a01b0319166001600160a01b038416908117909155600090815260096020526040902080546001919060ff1916828061054a565b61072861181f565b60058054911515600160a81b0260ff60a81b19909216919091179055565b6001600160a01b0381166000908152600760209081526040808320815160c08101835281548152600182015481850152600282015481840152600382018054845181870281018701909552808552869592946060860193909291908301828280156107d057602002820191906000526020600020905b8154815260200190600101908083116107bc575b505050505081526020016004820180548060200260200160405190810160405280929190818152602001828054801561082857602002820191906000526020600020905b815481526020019060010190808311610814575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561088057602002820191906000526020600020905b81548152602001906001019080831161086c575b505050505081525050905080604001516000036108a05750600092915050565b805160408201516201518091906108b79042612309565b6108c1919061231c565b6108cb9190612333565b9392505050565b6001600160a01b0382166000908152600a602090815260408083208484529091528120548082036108cb575050506001600160a01b031660009081526006602052604090205490565b61092361181f565b61092d6000611879565b565b6109376118c9565b600554600160a81b900460ff16156109965760405162461bcd60e51b815260206004820152600e60248201527f4465706f7369742070617573656400000000000000000000000000000000000060448201526064015b60405180910390fd5b600554600160a01b900460ff166109ef5760405162461bcd60e51b815260206004820152601b60248201527f5374616b696e67206973206e6f74206c61756e63686564207965740000000000604482015260640161098d565b6001600160a01b03851615801590610a1457506002546001600160a01b038681169116145b80610a2c57506003546001600160a01b038681169116145b80610a4457506004546001600160a01b038681169116145b610a835760405162461bcd60e51b815260206004820152601060248201526f155b9adb9bdddb8818dbdb9d1c9858dd60821b604482015260640161098d565b6001600160a01b038516600090815260096020526040902054835160ff9091169015610b0d57610ab68383888888611922565b610b025760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420646174612070726f76696465640000000000000000000000604482015260640161098d565b610b0d868686611a23565b336000908152600760205260408120805490915b8751811015610e3557336001600160a01b0316896001600160a01b0316636352211e8a8481518110610b5557610b55612355565b60200260200101516040518263ffffffff1660e01b8152600401610b7b91815260200190565b602060405180830381865afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc919061236b565b6001600160a01b031614610c025760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b604482015260640161098d565b6001600160a01b0389166342842e0e33308b8581518110610c2557610c25612355565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610c7f57600080fd5b505af1158015610c93573d6000803e3d6000fd5b50505050610c9e3390565b6001600160a01b038a1660009081526008602052604081208a519091908b9085908110610ccd57610ccd612355565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610d2a89898381518110610d1d57610d1d612355565b60200260200101516108d2565b610d3490836122e0565b91506000846002811115610d4a57610d4a6122f3565b03610d855782600301888281518110610d6557610d65612355565b602090810291909101810151825460018101845560009384529190922001555b6001846002811115610d9957610d996122f3565b03610dd45782600401888281518110610db457610db4612355565b602090810291909101810151825460018101845560009384529190922001555b6002846002811115610de857610de86122f3565b03610e235782600501888281518110610e0357610e03612355565b602090810291909101810151825460018101845560009384529190922001555b80610e2d81612388565b915050610b21565b50610e3f33611b27565b8082558651604080516001600160a01b038b168152602081019290925233917f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62910160405180910390a2505050610e9560018055565b5050505050565b610ea46118c9565b6001600160a01b03821615801590610ec957506002546001600160a01b038381169116145b80610ee157506003546001600160a01b038381169116145b80610ef957506004546001600160a01b038381169116145b610f385760405162461bcd60e51b815260206004820152601060248201526f155b9adb9bdddb8818dbdb9d1c9858dd60821b604482015260640161098d565b6001600160a01b03821660009081526009602090815260408083205433845260079092528220805460ff909216929091905b84518110156113de57306001600160a01b0316866001600160a01b0316636352211e878481518110610f9e57610f9e612355565b60200260200101516040518263ffffffff1660e01b8152600401610fc491815260200190565b602060405180830381865afa158015610fe1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611005919061236b565b6001600160a01b03161461104b5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b604482015260640161098d565b6001600160a01b03861660009081526008602052604081208651829088908590811061107957611079612355565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001546000146110e75760006110d787878481518110610d1d57610d1d612355565b90506110e38184612309565b9250505b60008460028111156110fb576110fb6122f3565b036111b6576111758360030180548060200260200160405190810160405280929190818152602001828054801561115157602002820191906000526020600020905b81548152602001906001019080831161113d575b505050505086838151811061116857611168612355565b6020026020010151611b80565b805161118b916003860191602090910190611f25565b508260030180548061119f5761119f6123a1565b600190038181906000526020600020016000905590555b60018460028111156111ca576111ca6122f3565b036112765761123583600401805480602002602001604051908101604052809291908181526020018280548015611151576020028201919060005260206000209081548152602001906001019080831161113d57505050505086838151811061116857611168612355565b805161124b916004860191602090910190611f25565b508260040180548061125f5761125f6123a1565b600190038181906000526020600020016000905590555b600284600281111561128a5761128a6122f3565b03611336576112f583600501805480602002602001604051908101604052809291908181526020018280548015611151576020028201919060005260206000209081548152602001906001019080831161113d57505050505086838151811061116857611168612355565b805161130b916005860191602090910190611f25565b508260050180548061131f5761131f6123a1565b600190038181906000526020600020016000905590555b6001600160a01b0386166342842e0e303388858151811061135957611359612355565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b5050505080806113d690612388565b915050610f6a565b5060038201541580156113f357506004820154155b156113fc575060005b61140533611b27565b8082558351604080516001600160a01b0388168152602081019290925233917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb910160405180910390a250505061145b60018055565b5050565b61146761181f565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61149161181f565b600554600160a01b900460ff16156114f55760405162461bcd60e51b815260206004820152602160248201527f5374616b696e6720686173206265656e206c61756e6368656420616c726561646044820152607960f81b606482015260840161098d565b6005805460ff60a01b1916600160a01b179055565b61151261181f565b6001600160a01b03909116600090815260066020526040902055565b61153661181f565b6032815111156115885760405162461bcd60e51b815260206004820152601060248201527f3530206973206d61782070657220747800000000000000000000000000000000604482015260640161098d565b6115926001610720565b60005b81518110156117a1576001600160a01b0383166000908152600860205260408120835182908590859081106115cc576115cc612355565b6020908102919091018101518252810191909152604001600020546001600160a01b0316905080158015906116995750306001600160a01b0316846001600160a01b0316636352211e85858151811061162757611627612355565b60200260200101516040518263ffffffff1660e01b815260040161164d91815260200190565b602060405180830381865afa15801561166a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168e919061236b565b6001600160a01b0316145b1561178e57836001600160a01b03166323b872dd30838686815181106116c1576116c1612355565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561171b57600080fd5b505af115801561172f573d6000803e3d6000fd5b5050505082828151811061174557611745612355565b6020026020010151846001600160a01b0316826001600160a01b03167ffefe036cac4ee3a4aca074a81cbcc4376e1484693289078dbec149c890101d5b60405160405180910390a45b508061179981612388565b915050611595565b505050565b6117ae61181f565b6001600160a01b0381166118135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098d565b61181c81611879565b50565b6000546001600160a01b0316331461092d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161098d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001540361191b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161098d565b6002600155565b60008084848460405160200161193a939291906123dc565b60405160208183030381529060405280519060200120905060006119ab826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060006119ef828a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cae92505050565b90506001600160a01b03811615801590611a1657506005546001600160a01b038281169116145b9998505050505050505050565b8051825114611a745760405162461bcd60e51b815260206004820152601560248201527f57726f6e67206172726179732070726f76696465640000000000000000000000604482015260640161098d565b60005b8251811015611b2157818181518110611a9257611a92612355565b6020026020010151600014611b0f57818181518110611ab357611ab3612355565b6020026020010151600a6000866001600160a01b03166001600160a01b031681526020019081526020016000206000858481518110611af457611af4612355565b60200260200101518152602001908152602001600020819055505b80611b1981612388565b915050611a77565b50505050565b611b3081610746565b6001600160a01b03821660009081526007602052604081206001018054909190611b5b9084906122e0565b90915550506001600160a01b0316600090815260076020526040902042600290910155565b606060008060018551611b939190612309565b855190915060005b81811015611be75785878281518110611bb657611bb6612355565b602002602001015103611bd557611bce8160016122e0565b9350611be7565b80611bdf81612388565b915050611b9b565b5082600003611c385760405162461bcd60e51b815260206004820152601b60248201527f6d73672e73656e646572206973206e6f7420746865206f776e65720000000000604482015260640161098d565b611c43600184612309565b9250818314611ca457858281518110611c5e57611c5e612355565b6020026020010151868481518110611c7857611c78612355565b60200260200101818152505084868381518110611c9757611c97612355565b6020026020010181815250505b5093949350505050565b6000806000611cbd8585611cd2565b91509150611cca81611d17565b509392505050565b6000808251604103611d085760208301516040840151606085015160001a611cfc87828585611e61565b94509450505050611d10565b506000905060025b9250929050565b6000816004811115611d2b57611d2b6122f3565b03611d335750565b6001816004811115611d4757611d476122f3565b03611d945760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161098d565b6002816004811115611da857611da86122f3565b03611df55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161098d565b6003816004811115611e0957611e096122f3565b0361181c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161098d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611e985750600090506003611f1c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611eec573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611f1557600060019250925050611f1c565b9150600090505b94509492505050565b828054828255906000526020600020908101928215611f60579160200282015b82811115611f60578251825591602001919060010190611f45565b50611f6c929150611f70565b5090565b5b80821115611f6c5760008155600101611f71565b6001600160a01b038116811461181c57600080fd5b600060208284031215611fac57600080fd5b81356108cb81611f85565b60008060408385031215611fca57600080fd5b8235611fd581611f85565b946020939093013593505050565b60008083601f840112611ff557600080fd5b50813567ffffffffffffffff81111561200d57600080fd5b602083019150836020828501011115611d1057600080fd5b60008060008060006080868803121561203d57600080fd5b853561204881611f85565b9450602086013561205881611f85565b935060408601359250606086013567ffffffffffffffff81111561207b57600080fd5b61208788828901611fe3565b969995985093965092949392505050565b600081518084526020808501945080840160005b838110156120c8578151875295820195908201906001016120ac565b509495945050505050565b6060815260006120e66060830186612098565b82810360208401526120f88186612098565b9050828103604084015261210c8185612098565b9695505050505050565b60006020828403121561212857600080fd5b813580151581146108cb57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f83011261215f57600080fd5b8135602067ffffffffffffffff8083111561217c5761217c612138565b8260051b604051601f19603f830116810181811084821117156121a1576121a1612138565b6040529384528581018301938381019250878511156121bf57600080fd5b83870191505b848210156121de578135835291830191908301906121c5565b979650505050505050565b60008060008060006080868803121561220157600080fd5b853561220c81611f85565b9450602086013567ffffffffffffffff8082111561222957600080fd5b61223589838a0161214e565b9550604088013591508082111561224b57600080fd5b61225789838a0161214e565b9450606088013591508082111561226d57600080fd5b5061208788828901611fe3565b6000806040838503121561228d57600080fd5b823561229881611f85565b9150602083013567ffffffffffffffff8111156122b457600080fd5b6122c08582860161214e565b9150509250929050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610502576105026122ca565b634e487b7160e01b600052602160045260246000fd5b81810381811115610502576105026122ca565b8082028115828204841417610502576105026122ca565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561237d57600080fd5b81516108cb81611f85565b60006001820161239a5761239a6122ca565b5060010190565b634e487b7160e01b600052603160045260246000fd5b805160009060208084018383156120c8578151875295820195908201906001016120ac565b6bffffffffffffffffffffffff198460601b168152600061240961240360148401866123b7565b846123b7565b9594505050505056fea2646970667358221220268770a866da1524c2339e0af01a2a9e1523b33ec638de23e5e78a7eab871e8264736f6c6343000811003300000000000000000000000064f1489229061f3b515fae43c6f91a49fdce5424000000000000000000000000b82b9b7344f9d18de0d462e91e0efe4b74a63708
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063613b54f0116101045780638fa2a9f0116100a2578063c68e516111610071578063c68e516114610484578063dfeaa74c14610497578063e1af5698146104aa578063f2fde38b146104be57600080fd5b80638fa2a9f014610443578063a30a247414610456578063ab04eb3c1461045e578063b50495021461047157600080fd5b8063715018a6116100de578063715018a6146104045780637af617751461040c5780638293744b1461041f5780638da5cb5b1461043257600080fd5b8063613b54f0146103d457806361499ab9146103e757806361a52a36146103fa57600080fd5b806323101e2711610171578063415855d61161014b578063415855d6146103725780634bee21d4146103855780634d307e3f146103ae5780635b7633d0146103c157600080fd5b806323101e271461032c5780632fe8df2c1461034c5780633e304c281461035f57600080fd5b8063150b7a02116101ad578063150b7a02146102335780631ae73557146102845780631f29d2dc146102bc5780632161a2b61461030a57600080fd5b806302befd24146101d457806304129667146101fd57806305513f021461021e575b600080fd5b6005546101e890600160a81b900460ff1681565b60405190151581526020015b60405180910390f35b61021061020b366004611f9a565b6104d1565b6040519081526020016101f4565b61023161022c366004611fb7565b610508565b005b61026b610241366004612025565b7f150b7a023d4804d13e8c85fb27262cb750cf6ba9f9dd3bb30d90f482ceeb4b1f95945050505050565b6040516001600160e01b031990911681526020016101f4565b6101e8610292366004611fb7565b6001600160a01b03919091166000908152600a602090815260408083209383529290522054151590565b6102f26102ca366004611fb7565b6001600160a01b03918216600090815260086020908152604080832093835292905220541690565b6040516001600160a01b0390911681526020016101f4565b61031d610318366004611f9a565b61056b565b6040516101f4939291906120d3565b61021061033a366004611f9a565b60066020526000908152604090205481565b61023161035a366004611fb7565b610699565b61023161036d366004611fb7565b6106db565b610231610380366004612116565b610720565b610210610393366004611f9a565b6001600160a01b031660009081526007602052604090205490565b6102106103bc366004611f9a565b610746565b6005546102f2906001600160a01b031681565b6002546102f2906001600160a01b031681565b6102106103f5366004611fb7565b6108d2565b6102106201518081565b61023161091b565b61023161041a3660046121e9565b61092f565b61023161042d36600461227a565b610e9c565b6000546001600160a01b03166102f2565b610231610451366004611f9a565b61145f565b610231611489565b6004546102f2906001600160a01b031681565b6003546102f2906001600160a01b031681565b610231610492366004611fb7565b61150a565b6102316104a536600461227a565b61152e565b6005546101e890600160a01b900460ff1681565b6102316104cc366004611f9a565b6117a6565b60006104dc82610746565b6001600160a01b03831660009081526007602052604090206001015461050291906122e0565b92915050565b61051061181f565b600480546001600160a01b0319166001600160a01b038416908117909155600090815260096020526040902080546002919060ff19166001835b02179055506001600160a01b03909116600090815260066020526040902055565b6001600160a01b038116600090815260076020908152604091829020600381018054845181850281018501909552808552606094859485946004810193600590910192918591908301828280156105e157602002820191906000526020600020905b8154815260200190600101908083116105cd575b505050505092508180548060200260200160405190810160405280929190818152602001828054801561063357602002820191906000526020600020905b81548152602001906001019080831161061f575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561068557602002820191906000526020600020905b815481526020019060010190808311610671575b505050505090509250925092509193909250565b6106a161181f565b600280546001600160a01b0319166001600160a01b0384169081179091556000908152600960205260408120805460ff191660018361054a565b6106e361181f565b600380546001600160a01b0319166001600160a01b038416908117909155600090815260096020526040902080546001919060ff1916828061054a565b61072861181f565b60058054911515600160a81b0260ff60a81b19909216919091179055565b6001600160a01b0381166000908152600760209081526040808320815160c08101835281548152600182015481850152600282015481840152600382018054845181870281018701909552808552869592946060860193909291908301828280156107d057602002820191906000526020600020905b8154815260200190600101908083116107bc575b505050505081526020016004820180548060200260200160405190810160405280929190818152602001828054801561082857602002820191906000526020600020905b815481526020019060010190808311610814575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561088057602002820191906000526020600020905b81548152602001906001019080831161086c575b505050505081525050905080604001516000036108a05750600092915050565b805160408201516201518091906108b79042612309565b6108c1919061231c565b6108cb9190612333565b9392505050565b6001600160a01b0382166000908152600a602090815260408083208484529091528120548082036108cb575050506001600160a01b031660009081526006602052604090205490565b61092361181f565b61092d6000611879565b565b6109376118c9565b600554600160a81b900460ff16156109965760405162461bcd60e51b815260206004820152600e60248201527f4465706f7369742070617573656400000000000000000000000000000000000060448201526064015b60405180910390fd5b600554600160a01b900460ff166109ef5760405162461bcd60e51b815260206004820152601b60248201527f5374616b696e67206973206e6f74206c61756e63686564207965740000000000604482015260640161098d565b6001600160a01b03851615801590610a1457506002546001600160a01b038681169116145b80610a2c57506003546001600160a01b038681169116145b80610a4457506004546001600160a01b038681169116145b610a835760405162461bcd60e51b815260206004820152601060248201526f155b9adb9bdddb8818dbdb9d1c9858dd60821b604482015260640161098d565b6001600160a01b038516600090815260096020526040902054835160ff9091169015610b0d57610ab68383888888611922565b610b025760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420646174612070726f76696465640000000000000000000000604482015260640161098d565b610b0d868686611a23565b336000908152600760205260408120805490915b8751811015610e3557336001600160a01b0316896001600160a01b0316636352211e8a8481518110610b5557610b55612355565b60200260200101516040518263ffffffff1660e01b8152600401610b7b91815260200190565b602060405180830381865afa158015610b98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbc919061236b565b6001600160a01b031614610c025760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b604482015260640161098d565b6001600160a01b0389166342842e0e33308b8581518110610c2557610c25612355565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610c7f57600080fd5b505af1158015610c93573d6000803e3d6000fd5b50505050610c9e3390565b6001600160a01b038a1660009081526008602052604081208a519091908b9085908110610ccd57610ccd612355565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610d2a89898381518110610d1d57610d1d612355565b60200260200101516108d2565b610d3490836122e0565b91506000846002811115610d4a57610d4a6122f3565b03610d855782600301888281518110610d6557610d65612355565b602090810291909101810151825460018101845560009384529190922001555b6001846002811115610d9957610d996122f3565b03610dd45782600401888281518110610db457610db4612355565b602090810291909101810151825460018101845560009384529190922001555b6002846002811115610de857610de86122f3565b03610e235782600501888281518110610e0357610e03612355565b602090810291909101810151825460018101845560009384529190922001555b80610e2d81612388565b915050610b21565b50610e3f33611b27565b8082558651604080516001600160a01b038b168152602081019290925233917f5548c837ab068cf56a2c2479df0882a4922fd203edb7517321831d95078c5f62910160405180910390a2505050610e9560018055565b5050505050565b610ea46118c9565b6001600160a01b03821615801590610ec957506002546001600160a01b038381169116145b80610ee157506003546001600160a01b038381169116145b80610ef957506004546001600160a01b038381169116145b610f385760405162461bcd60e51b815260206004820152601060248201526f155b9adb9bdddb8818dbdb9d1c9858dd60821b604482015260640161098d565b6001600160a01b03821660009081526009602090815260408083205433845260079092528220805460ff909216929091905b84518110156113de57306001600160a01b0316866001600160a01b0316636352211e878481518110610f9e57610f9e612355565b60200260200101516040518263ffffffff1660e01b8152600401610fc491815260200190565b602060405180830381865afa158015610fe1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611005919061236b565b6001600160a01b03161461104b5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103a34329037bbb732b960991b604482015260640161098d565b6001600160a01b03861660009081526008602052604081208651829088908590811061107957611079612355565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600001546000146110e75760006110d787878481518110610d1d57610d1d612355565b90506110e38184612309565b9250505b60008460028111156110fb576110fb6122f3565b036111b6576111758360030180548060200260200160405190810160405280929190818152602001828054801561115157602002820191906000526020600020905b81548152602001906001019080831161113d575b505050505086838151811061116857611168612355565b6020026020010151611b80565b805161118b916003860191602090910190611f25565b508260030180548061119f5761119f6123a1565b600190038181906000526020600020016000905590555b60018460028111156111ca576111ca6122f3565b036112765761123583600401805480602002602001604051908101604052809291908181526020018280548015611151576020028201919060005260206000209081548152602001906001019080831161113d57505050505086838151811061116857611168612355565b805161124b916004860191602090910190611f25565b508260040180548061125f5761125f6123a1565b600190038181906000526020600020016000905590555b600284600281111561128a5761128a6122f3565b03611336576112f583600501805480602002602001604051908101604052809291908181526020018280548015611151576020028201919060005260206000209081548152602001906001019080831161113d57505050505086838151811061116857611168612355565b805161130b916005860191602090910190611f25565b508260050180548061131f5761131f6123a1565b600190038181906000526020600020016000905590555b6001600160a01b0386166342842e0e303388858151811061135957611359612355565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b1580156113b357600080fd5b505af11580156113c7573d6000803e3d6000fd5b5050505080806113d690612388565b915050610f6a565b5060038201541580156113f357506004820154155b156113fc575060005b61140533611b27565b8082558351604080516001600160a01b0388168152602081019290925233917f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb910160405180910390a250505061145b60018055565b5050565b61146761181f565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b61149161181f565b600554600160a01b900460ff16156114f55760405162461bcd60e51b815260206004820152602160248201527f5374616b696e6720686173206265656e206c61756e6368656420616c726561646044820152607960f81b606482015260840161098d565b6005805460ff60a01b1916600160a01b179055565b61151261181f565b6001600160a01b03909116600090815260066020526040902055565b61153661181f565b6032815111156115885760405162461bcd60e51b815260206004820152601060248201527f3530206973206d61782070657220747800000000000000000000000000000000604482015260640161098d565b6115926001610720565b60005b81518110156117a1576001600160a01b0383166000908152600860205260408120835182908590859081106115cc576115cc612355565b6020908102919091018101518252810191909152604001600020546001600160a01b0316905080158015906116995750306001600160a01b0316846001600160a01b0316636352211e85858151811061162757611627612355565b60200260200101516040518263ffffffff1660e01b815260040161164d91815260200190565b602060405180830381865afa15801561166a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168e919061236b565b6001600160a01b0316145b1561178e57836001600160a01b03166323b872dd30838686815181106116c1576116c1612355565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561171b57600080fd5b505af115801561172f573d6000803e3d6000fd5b5050505082828151811061174557611745612355565b6020026020010151846001600160a01b0316826001600160a01b03167ffefe036cac4ee3a4aca074a81cbcc4376e1484693289078dbec149c890101d5b60405160405180910390a45b508061179981612388565b915050611595565b505050565b6117ae61181f565b6001600160a01b0381166118135760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161098d565b61181c81611879565b50565b6000546001600160a01b0316331461092d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161098d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001540361191b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161098d565b6002600155565b60008084848460405160200161193a939291906123dc565b60405160208183030381529060405280519060200120905060006119ab826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060006119ef828a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611cae92505050565b90506001600160a01b03811615801590611a1657506005546001600160a01b038281169116145b9998505050505050505050565b8051825114611a745760405162461bcd60e51b815260206004820152601560248201527f57726f6e67206172726179732070726f76696465640000000000000000000000604482015260640161098d565b60005b8251811015611b2157818181518110611a9257611a92612355565b6020026020010151600014611b0f57818181518110611ab357611ab3612355565b6020026020010151600a6000866001600160a01b03166001600160a01b031681526020019081526020016000206000858481518110611af457611af4612355565b60200260200101518152602001908152602001600020819055505b80611b1981612388565b915050611a77565b50505050565b611b3081610746565b6001600160a01b03821660009081526007602052604081206001018054909190611b5b9084906122e0565b90915550506001600160a01b0316600090815260076020526040902042600290910155565b606060008060018551611b939190612309565b855190915060005b81811015611be75785878281518110611bb657611bb6612355565b602002602001015103611bd557611bce8160016122e0565b9350611be7565b80611bdf81612388565b915050611b9b565b5082600003611c385760405162461bcd60e51b815260206004820152601b60248201527f6d73672e73656e646572206973206e6f7420746865206f776e65720000000000604482015260640161098d565b611c43600184612309565b9250818314611ca457858281518110611c5e57611c5e612355565b6020026020010151868481518110611c7857611c78612355565b60200260200101818152505084868381518110611c9757611c97612355565b6020026020010181815250505b5093949350505050565b6000806000611cbd8585611cd2565b91509150611cca81611d17565b509392505050565b6000808251604103611d085760208301516040840151606085015160001a611cfc87828585611e61565b94509450505050611d10565b506000905060025b9250929050565b6000816004811115611d2b57611d2b6122f3565b03611d335750565b6001816004811115611d4757611d476122f3565b03611d945760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161098d565b6002816004811115611da857611da86122f3565b03611df55760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161098d565b6003816004811115611e0957611e096122f3565b0361181c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161098d565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611e985750600090506003611f1c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611eec573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611f1557600060019250925050611f1c565b9150600090505b94509492505050565b828054828255906000526020600020908101928215611f60579160200282015b82811115611f60578251825591602001919060010190611f45565b50611f6c929150611f70565b5090565b5b80821115611f6c5760008155600101611f71565b6001600160a01b038116811461181c57600080fd5b600060208284031215611fac57600080fd5b81356108cb81611f85565b60008060408385031215611fca57600080fd5b8235611fd581611f85565b946020939093013593505050565b60008083601f840112611ff557600080fd5b50813567ffffffffffffffff81111561200d57600080fd5b602083019150836020828501011115611d1057600080fd5b60008060008060006080868803121561203d57600080fd5b853561204881611f85565b9450602086013561205881611f85565b935060408601359250606086013567ffffffffffffffff81111561207b57600080fd5b61208788828901611fe3565b969995985093965092949392505050565b600081518084526020808501945080840160005b838110156120c8578151875295820195908201906001016120ac565b509495945050505050565b6060815260006120e66060830186612098565b82810360208401526120f88186612098565b9050828103604084015261210c8185612098565b9695505050505050565b60006020828403121561212857600080fd5b813580151581146108cb57600080fd5b634e487b7160e01b600052604160045260246000fd5b600082601f83011261215f57600080fd5b8135602067ffffffffffffffff8083111561217c5761217c612138565b8260051b604051601f19603f830116810181811084821117156121a1576121a1612138565b6040529384528581018301938381019250878511156121bf57600080fd5b83870191505b848210156121de578135835291830191908301906121c5565b979650505050505050565b60008060008060006080868803121561220157600080fd5b853561220c81611f85565b9450602086013567ffffffffffffffff8082111561222957600080fd5b61223589838a0161214e565b9550604088013591508082111561224b57600080fd5b61225789838a0161214e565b9450606088013591508082111561226d57600080fd5b5061208788828901611fe3565b6000806040838503121561228d57600080fd5b823561229881611f85565b9150602083013567ffffffffffffffff8111156122b457600080fd5b6122c08582860161214e565b9150509250929050565b634e487b7160e01b600052601160045260246000fd5b80820180821115610502576105026122ca565b634e487b7160e01b600052602160045260246000fd5b81810381811115610502576105026122ca565b8082028115828204841417610502576105026122ca565b60008261235057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561237d57600080fd5b81516108cb81611f85565b60006001820161239a5761239a6122ca565b5060010190565b634e487b7160e01b600052603160045260246000fd5b805160009060208084018383156120c8578151875295820195908201906001016120ac565b6bffffffffffffffffffffffff198460601b168152600061240961240360148401866123b7565b846123b7565b9594505050505056fea2646970667358221220268770a866da1524c2339e0af01a2a9e1523b33ec638de23e5e78a7eab871e8264736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000064f1489229061f3b515fae43c6f91a49fdce5424000000000000000000000000b82b9b7344f9d18de0d462e91e0efe4b74a63708
-----Decoded View---------------
Arg [0] : _twm (address): 0x64f1489229061f3B515fAe43C6f91A49FdCE5424
Arg [1] : _signer (address): 0xB82B9b7344f9d18dE0D462E91e0EFE4b74a63708
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000064f1489229061f3b515fae43c6f91a49fdce5424
Arg [1] : 000000000000000000000000b82b9b7344f9d18de0d462e91e0efe4b74a63708
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 29 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.