More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 6,195 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim And Unstak... | 21955720 | 45 days ago | IN | 0 ETH | 0.00027702 | ||||
Claim | 21955708 | 45 days ago | IN | 0 ETH | 0.00011035 | ||||
Claim And Unstak... | 21909939 | 51 days ago | IN | 0 ETH | 0.00020827 | ||||
Claim And Unstak... | 21638478 | 89 days ago | IN | 0 ETH | 0.00418602 | ||||
Claim And Unstak... | 21638448 | 89 days ago | IN | 0 ETH | 0.00359941 | ||||
Claim And Unstak... | 21576559 | 98 days ago | IN | 0 ETH | 0.00112479 | ||||
Claim And Unstak... | 21527668 | 105 days ago | IN | 0 ETH | 0.00093934 | ||||
Claim And Unstak... | 21505234 | 108 days ago | IN | 0 ETH | 0.00132544 | ||||
Claim | 21462913 | 114 days ago | IN | 0 ETH | 0.00050876 | ||||
Claim | 21419488 | 120 days ago | IN | 0 ETH | 0.00073559 | ||||
Claim And Unstak... | 21369346 | 127 days ago | IN | 0 ETH | 0.01278935 | ||||
Claim And Unstak... | 21347447 | 130 days ago | IN | 0 ETH | 0.0023443 | ||||
Claim | 21347439 | 130 days ago | IN | 0 ETH | 0.00128831 | ||||
Claim | 21343572 | 130 days ago | IN | 0 ETH | 0.00119525 | ||||
Claim And Unstak... | 21339576 | 131 days ago | IN | 0 ETH | 0.00375688 | ||||
Claim And Unstak... | 21311748 | 135 days ago | IN | 0 ETH | 0.00205046 | ||||
Claim And Unstak... | 21239635 | 145 days ago | IN | 0 ETH | 0.00437609 | ||||
Claim And Unstak... | 21208229 | 149 days ago | IN | 0 ETH | 0.00187301 | ||||
Claim And Unstak... | 20994478 | 179 days ago | IN | 0 ETH | 0.00421032 | ||||
Claim | 20955609 | 185 days ago | IN | 0 ETH | 0.00097559 | ||||
Claim And Unstak... | 20889301 | 194 days ago | IN | 0 ETH | 0.00133044 | ||||
Claim And Unstak... | 20828654 | 202 days ago | IN | 0 ETH | 0.00516779 | ||||
Claim | 20802254 | 206 days ago | IN | 0 ETH | 0.00051393 | ||||
Claim And Unstak... | 20783043 | 209 days ago | IN | 0 ETH | 0.00202558 | ||||
Claim And Unstak... | 20761129 | 212 days ago | IN | 0 ETH | 0.00051258 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 16872664 | 757 days ago | 0.00570602 ETH |
Loading...
Loading
Contract Name:
AcrocalpyseStaking
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 2000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; interface IAcrocalpyse is IERC721 { function walletOfOwner(address _owner) external view returns (uint256[] memory); } contract AcrocalpyseStaking is Ownable, Pausable, IERC721Receiver { using SafeMath for uint256; uint256 public constant MAX_SUPPLY = 10420; // allow rewards uint256 public allowRewardsEarningsUntil; // signer address for verification address public signerAddress; // paper token address IERC20 public paperTokenAddress; // Acrocalypse (ACROC) address IAcrocalpyse public nftTokenAddress; // Token Staking struct StakedToken { address owner; uint256 tokenId; uint256 stakePool; uint256 rewardsPerDay; uint256 pool1RewardsPerDay; uint256 creationTime; uint256 lockedUntilTime; uint256 lastClaimTime; } // Mapping to store all the tokens staked mapping(uint256 => StakedToken) public stakedTokens; uint256 public totalStaked; uint256 public totalPool1Staked; uint256 public totalPool2Staked; uint256 public totalPool3Staked; constructor(IERC20 _paperTokenAddress, IAcrocalpyse _nftTokenAddress) { signerAddress = _msgSender(); allowRewardsEarningsUntil = block.timestamp + 731 * 86400; // solhint-disable-line not-rely-on-time if (address(_paperTokenAddress) != address(0)) { paperTokenAddress = IERC20(_paperTokenAddress); } if (address(_nftTokenAddress) != address(0)) { nftTokenAddress = IAcrocalpyse(_nftTokenAddress); } } //external fallback() external payable {} receive() external payable {} // solhint-disable-line no-empty-blocks modifier callerIsUser() { // solhint-disable-next-line avoid-tx-origin require(tx.origin == _msgSender(), "Cannot be called by a contract"); _; } function stake( bytes memory signature, uint256 stakePool, uint256[] memory tokenIds, uint256[] memory rewardsPerDay, uint256[] memory pool1RewardsPerDay ) external payable whenNotPaused callerIsUser { require(block.timestamp < allowRewardsEarningsUntil, "Staking period expired"); // solhint-disable-line not-rely-on-time bytes32 hash = ECDSA.toEthSignedMessageHash( keccak256(abi.encodePacked(_msgSender(), stakePool, tokenIds, rewardsPerDay, pool1RewardsPerDay)) ); // verifying the signature require(ECDSA.recover(hash, signature) == signerAddress, "Invalid Access"); // token validation for (uint256 i = 0; i < tokenIds.length; i++) { // validating the token ids if already staked or not require(stakedTokens[tokenIds[i]].owner == address(0), "Token ID already staked"); // validating the token ownership require(nftTokenAddress.ownerOf(tokenIds[i]) == _msgSender(), "Token owner mismatch"); uint256 lockedDays = 7; // pool 1 uint256 lockedDaysTimePeriod = 604800; if (stakePool == 1) { totalPool1Staked++; } else if (stakePool == 2) { // pool 2 lockedDays = 45; lockedDaysTimePeriod = 3888000; totalPool2Staked++; } else if (stakePool == 3) { // pool 3 lockedDays = 90; lockedDaysTimePeriod = 7776000; totalPool3Staked++; } uint256 lockedUntil = block.timestamp + lockedDaysTimePeriod; // solhint-disable-line not-rely-on-time if (lockedUntil > allowRewardsEarningsUntil) { lockedUntil = allowRewardsEarningsUntil; } stakedTokens[tokenIds[i]] = StakedToken({ owner: _msgSender(), tokenId: tokenIds[i], stakePool: stakePool, rewardsPerDay: rewardsPerDay[i], pool1RewardsPerDay: pool1RewardsPerDay[i], creationTime: block.timestamp, // solhint-disable-line not-rely-on-time lastClaimTime: 0, lockedUntilTime: lockedUntil }); } totalStaked += tokenIds.length; // Transfer the tokens to the contract for (uint256 i = 0; i < tokenIds.length; i++) { nftTokenAddress.safeTransferFrom(_msgSender(), address(this), tokenIds[i]); } } function claim(uint256[] memory tokenIds) external payable whenNotPaused callerIsUser { require(_claim(tokenIds, _msgSender(), false), "Error Claiming"); } function claimAndUnstake(uint256[] memory tokenIds) external payable whenNotPaused callerIsUser { bool claimStatus = _claim(tokenIds, _msgSender(), true); require(claimStatus, "Error Claiming"); bool unstakeStatus = _unstake(tokenIds, _msgSender(), false); require(unstakeStatus, "Error Unstaking"); } function _claim( uint256[] memory tokenIds, address senderAddress, bool isUnstaking ) internal returns (bool) { require(tokenIds.length > 0, "Token Ids not set"); uint256 totalRewards = 0; for (uint256 i = 0; i < tokenIds.length; i++) { StakedToken memory sToken = stakedTokens[tokenIds[i]]; // slither-disable-next-line incorrect-equality require(sToken.owner == senderAddress, "Invalid Token Access"); totalRewards += calculateTokenUnclaimedRewards(tokenIds[i]); if (!isUnstaking) { // slither-disable-next-line incorrect-equality if (sToken.stakePool == 1) { // extending the lock time by 7 days uint256 lockedUntil = block.timestamp + 604800; // solhint-disable-line not-rely-on-time if (lockedUntil > allowRewardsEarningsUntil) { lockedUntil = allowRewardsEarningsUntil; } sToken.lockedUntilTime = lockedUntil; } sToken.lastClaimTime = block.timestamp; // solhint-disable-line not-rely-on-time stakedTokens[tokenIds[i]] = sToken; } } // Transfer the $PAPER Tokens bool success = paperTokenAddress.transfer(senderAddress, totalRewards.div(86400)); require(success, "Unable to transfer tokens"); return true; } function _unstake( uint256[] memory tokenIds, address senderAddress, bool isAdmin ) internal returns (bool) { require(tokenIds.length > 0, "Token Ids not set"); for (uint256 i = 0; i < tokenIds.length; i++) { StakedToken memory sToken = stakedTokens[tokenIds[i]]; require(sToken.owner != address(0), "Token not staked"); // only the Owner of the token or Admin can do unstaking if (!isAdmin) { // slither-disable-next-line incorrect-equality require(sToken.owner == senderAddress, "Invalid Token Access"); require(sToken.lockedUntilTime <= block.timestamp, "Unable to unstake a locked token"); // solhint-disable-line not-rely-on-time } if (sToken.stakePool == 1) { totalPool1Staked--; } else if (sToken.stakePool == 2) { totalPool2Staked--; } else if (sToken.stakePool == 3) { totalPool3Staked--; } totalStaked--; delete stakedTokens[tokenIds[i]]; nftTokenAddress.safeTransferFrom(address(this), sToken.owner, tokenIds[i]); } return true; } function calculateTokenUnclaimedRewards(uint256 tokenId) public view returns (uint256) { StakedToken memory sToken = stakedTokens[tokenId]; require(sToken.owner != address(0), "Unstaked Token"); // solhint-disable-next-line not-rely-on-time uint256 currentTimestamp = block.timestamp; uint256 rewardsUntilTimestamp = currentTimestamp > allowRewardsEarningsUntil ? allowRewardsEarningsUntil : currentTimestamp; uint256 claimStartTimestamp = sToken.lastClaimTime > 0 ? sToken.lastClaimTime : sToken.creationTime; // lastClaimTime is always updated with block.timestamp after claim if (claimStartTimestamp > rewardsUntilTimestamp) { claimStartTimestamp = rewardsUntilTimestamp; } uint256 timeDifference = 0; uint256 totalRewards = 0; if (sToken.stakePool == 2 || sToken.stakePool == 3) { if (rewardsUntilTimestamp <= sToken.lockedUntilTime) { timeDifference = rewardsUntilTimestamp - claimStartTimestamp; totalRewards = timeDifference.mul(sToken.rewardsPerDay); } else { if (claimStartTimestamp <= sToken.lockedUntilTime) { timeDifference = sToken.lockedUntilTime - claimStartTimestamp; totalRewards = timeDifference.mul(sToken.rewardsPerDay); timeDifference = rewardsUntilTimestamp - sToken.lockedUntilTime; totalRewards += timeDifference.mul(sToken.pool1RewardsPerDay); } else { timeDifference = rewardsUntilTimestamp - claimStartTimestamp; totalRewards = timeDifference.mul(sToken.pool1RewardsPerDay); } } } else if (sToken.stakePool == 1) { timeDifference = rewardsUntilTimestamp - claimStartTimestamp; totalRewards = timeDifference.mul(sToken.rewardsPerDay); } return totalRewards; } function stakedOwnerTokens(address owner) external view returns (StakedToken[] memory _ownerStakedTokens) { require(owner != address(0), "zero address"); uint256 ownerStakedCount = 0; uint256[] memory stakedTokenIds = nftTokenAddress.walletOfOwner(address(this)); for (uint256 i = 0; i < stakedTokenIds.length; ++i) { if (owner == stakedTokens[stakedTokenIds[i]].owner) { ++ownerStakedCount; } } StakedToken[] memory ownerStakedTokens = new StakedToken[](ownerStakedCount); uint256 ownedTokenIndex = 0; if (ownerStakedCount > 0) { for (uint256 i = 0; i < stakedTokenIds.length; ++i) { if (owner == stakedTokens[stakedTokenIds[i]].owner) { ownerStakedTokens[ownedTokenIndex] = stakedTokens[stakedTokenIds[i]]; ownedTokenIndex++; } } } return ownerStakedTokens; } function checkTokensStakedStatus(uint256[] memory tokenIds) external view returns (bool[] memory stakedStatus) { require(tokenIds.length > 0 && tokenIds.length <= MAX_SUPPLY, "Token Ids not set"); bool[] memory tokenIdsStakedStatus = new bool[](tokenIds.length); for (uint256 i = 0; i < tokenIds.length; i++) { if (stakedTokens[tokenIds[i]].owner != address(0)) { tokenIdsStakedStatus[i] = true; } } return tokenIdsStakedStatus; } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function setSignerAddress(address newSignerAddress) external onlyOwner { if (address(newSignerAddress) != address(0)) { signerAddress = newSignerAddress; } } function setNFTAddress(IAcrocalpyse newAddress) external onlyOwner { if (address(newAddress) != address(0)) { nftTokenAddress = IAcrocalpyse(newAddress); } } function setPaperTokenAddress(IERC20 newAddress) external onlyOwner { if (address(newAddress) != address(0)) { paperTokenAddress = IERC20(newAddress); } } function getTotalStakedCounters() external view returns ( uint256 _totalStaked, uint256 _totalPool1Staked, uint256 _totalPool2Staked, uint256 _totalPool3Staked ) { return (totalStaked, totalPool1Staked, totalPool2Staked, totalPool3Staked); } function setTotalStakedCounters( uint256 _totalStaked, uint256 _totalPool1Staked, uint256 _totalPool2Staked, uint256 _totalPool3Staked ) external onlyOwner { totalStaked = _totalStaked; totalPool1Staked = _totalPool1Staked; totalPool2Staked = _totalPool2Staked; totalPool3Staked = _totalPool3Staked; } function setAllowRewardsEarningUntil(uint256 newAllowRewardsEarningsUntil) external onlyOwner { allowRewardsEarningsUntil = newAllowRewardsEarningsUntil; } function unstakeAdmin(uint256[] memory tokenIds) external onlyOwner { require(_unstake(tokenIds, address(0), true), "Error Unstaking"); } function viewContractTokenBalance(IERC20 tokenAddress) public view returns (uint256) { return IERC20(tokenAddress).balanceOf(address(this)); } function withdrawTokens(IERC20 tokenAddress, uint256 percentageWithdrawl) external onlyOwner { uint256 balance = viewContractTokenBalance(tokenAddress); require(balance > 0, "No funds available"); require(percentageWithdrawl > 0 && percentageWithdrawl <= 100, "Withdrawl percent invalid"); bool success = IERC20(tokenAddress).transfer(owner(), balance.mul(percentageWithdrawl).div(100)); require(success, "Withdrawl failed"); } function withdraw(uint256 percentWithdrawl) external onlyOwner { require(address(this).balance > 0, "No funds available"); require(percentWithdrawl > 0 && percentWithdrawl <= 100, "Invalid Withdrawl percent"); Address.sendValue(payable(owner()), (address(this).balance * percentWithdrawl) / 100); } function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata ) external view override returns (bytes4) { require(operator == address(this), "Invalid operator"); require(stakedTokens[tokenId].owner == from, "Invalid Token Owner"); return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 } 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"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' 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) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ 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. 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 if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } 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 (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // 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 (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev 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 (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// 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 v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @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] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 2000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IERC20","name":"_paperTokenAddress","type":"address"},{"internalType":"contract IAcrocalpyse","name":"_nftTokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowRewardsEarningsUntil","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateTokenUnclaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"checkTokensStakedStatus","outputs":[{"internalType":"bool[]","name":"stakedStatus","type":"bool[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimAndUnstake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getTotalStakedCounters","outputs":[{"internalType":"uint256","name":"_totalStaked","type":"uint256"},{"internalType":"uint256","name":"_totalPool1Staked","type":"uint256"},{"internalType":"uint256","name":"_totalPool2Staked","type":"uint256"},{"internalType":"uint256","name":"_totalPool3Staked","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftTokenAddress","outputs":[{"internalType":"contract IAcrocalpyse","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paperTokenAddress","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newAllowRewardsEarningsUntil","type":"uint256"}],"name":"setAllowRewardsEarningUntil","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IAcrocalpyse","name":"newAddress","type":"address"}],"name":"setNFTAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"newAddress","type":"address"}],"name":"setPaperTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSignerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalStaked","type":"uint256"},{"internalType":"uint256","name":"_totalPool1Staked","type":"uint256"},{"internalType":"uint256","name":"_totalPool2Staked","type":"uint256"},{"internalType":"uint256","name":"_totalPool3Staked","type":"uint256"}],"name":"setTotalStakedCounters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"stakePool","type":"uint256"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"rewardsPerDay","type":"uint256[]"},{"internalType":"uint256[]","name":"pool1RewardsPerDay","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"stakedOwnerTokens","outputs":[{"components":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakePool","type":"uint256"},{"internalType":"uint256","name":"rewardsPerDay","type":"uint256"},{"internalType":"uint256","name":"pool1RewardsPerDay","type":"uint256"},{"internalType":"uint256","name":"creationTime","type":"uint256"},{"internalType":"uint256","name":"lockedUntilTime","type":"uint256"},{"internalType":"uint256","name":"lastClaimTime","type":"uint256"}],"internalType":"struct AcrocalpyseStaking.StakedToken[]","name":"_ownerStakedTokens","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakedTokens","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakePool","type":"uint256"},{"internalType":"uint256","name":"rewardsPerDay","type":"uint256"},{"internalType":"uint256","name":"pool1RewardsPerDay","type":"uint256"},{"internalType":"uint256","name":"creationTime","type":"uint256"},{"internalType":"uint256","name":"lockedUntilTime","type":"uint256"},{"internalType":"uint256","name":"lastClaimTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPool1Staked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPool2Staked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPool3Staked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenAddress","type":"address"}],"name":"viewContractTokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"percentWithdrawl","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"percentageWithdrawl","type":"uint256"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620036da380380620036da833981016040819052620000349162000121565b6200003f33620000d1565b6000805460ff60a01b19169055600280546001600160a01b031916331790556200006e426303c3b88062000160565b6001556001600160a01b038216156200009d57600380546001600160a01b0319166001600160a01b0384161790555b6001600160a01b03811615620000c957600480546001600160a01b0319166001600160a01b0383161790555b5050620001a0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156200013557600080fd5b8251620001428162000187565b6020840151909250620001558162000187565b809150509250929050565b600082198211156200018257634e487b7160e01b600052601160045260246000fd5b500190565b6001600160a01b03811681146200019d57600080fd5b50565b61352a80620001b06000396000f3fe6080604052600436106101e75760003560e01c8063817b1cd21161010e578063c22c294c116100a7578063e24547e811610079578063e7c93c3311610061578063e7c93c3314610644578063f2fde38b14610671578063f76c14591461069157005b8063e24547e81461061b578063e3e5d53d1461063157005b8063c22c294c14610598578063c4602440146105b8578063de1ee940146105ce578063ded48aa7146105ee57005b80639b103e67116100e05780639b103e67146104975780639e8269b6146104b7578063aadfb4da146104d7578063c0788555146104ea57005b8063817b1cd21461042e5780638239c297146104445780638456cb59146104645780638da5cb5b1461047957005b80635b7633d01161018057806369d037381161015257806369d03738146103d05780636ba4c138146103f05780636d8f00e314610403578063715018a61461041957005b80635b7633d01461032d5780635c975abb1461034d578063617eef6e14610377578063690e51251461039757005b80632e1a7d4d116101b95780632e1a7d4d146102be57806332cb6b0c146102de578063332751f2146103025780633f4ba83a1461031857005b8063046dc166146101f0578063059cd0cd1461021057806306b091f91461024d578063150b7a021461026d57005b366101ee57005b005b3480156101fc57600080fd5b506101ee61020b366004612ecd565b6106b1565b34801561021c57600080fd5b50600454610230906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b506101ee6102683660046131a2565b61074b565b34801561027957600080fd5b5061028d610288366004612f07565b610982565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610244565b3480156102ca57600080fd5b506101ee6102d93660046131ce565b610a70565b3480156102ea57600080fd5b506102f46128b481565b604051908152602001610244565b34801561030e57600080fd5b506102f460015481565b34801561032457600080fd5b506101ee610ba7565b34801561033957600080fd5b50600254610230906001600160a01b031681565b34801561035957600080fd5b50600054600160a01b900460ff166040519015158152602001610244565b34801561038357600080fd5b506102f4610392366004612ecd565b610c0b565b3480156103a357600080fd5b50600654600754600854600954604080519485526020850193909352918301526060820152608001610244565b3480156103dc57600080fd5b506101ee6103eb366004612ecd565b610ca4565b6101ee6103fe366004612fa6565b610d3a565b34801561040f57600080fd5b506102f460095481565b34801561042557600080fd5b506101ee610e3b565b34801561043a57600080fd5b506102f460065481565b34801561045057600080fd5b506102f461045f3660046131ce565b610e9f565b34801561047057600080fd5b506101ee6110bf565b34801561048557600080fd5b506000546001600160a01b0316610230565b3480156104a357600080fd5b50600354610230906001600160a01b031681565b3480156104c357600080fd5b506101ee6104d2366004613200565b611121565b6101ee6104e5366004612fa6565b61118f565b3480156104f657600080fd5b506105536105053660046131ce565b6005602081905260009182526040909120805460018201546002830154600384015460048501549585015460068601546007909601546001600160a01b039095169693959294919392909188565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e082015261010001610244565b3480156105a457600080fd5b506101ee6105b3366004612ecd565b6112f7565b3480156105c457600080fd5b506102f460075481565b3480156105da57600080fd5b506101ee6105e9366004612fa6565b61138d565b3480156105fa57600080fd5b5061060e610609366004612ecd565b611440565b60405161024491906132fa565b34801561062757600080fd5b506102f460085481565b6101ee61063f36600461309d565b611778565b34801561065057600080fd5b5061066461065f366004612fa6565b611dc2565b60405161024491906132b4565b34801561067d57600080fd5b506101ee61068c366004612ecd565b611f00565b34801561069d57600080fd5b506101ee6106ac3660046131ce565b611fdf565b6000546001600160a01b031633146107105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b03811615610748576002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b50565b6000546001600160a01b031633146107a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b60006107b083610c0b565b9050600081116108025760405162461bcd60e51b815260206004820152601260248201527f4e6f2066756e647320617661696c61626c6500000000000000000000000000006044820152606401610707565b600082118015610813575060648211155b61085f5760405162461bcd60e51b815260206004820152601960248201527f57697468647261776c2070657263656e7420696e76616c6964000000000000006044820152606401610707565b6000836001600160a01b031663a9059cbb6108826000546001600160a01b031690565b6108976064610891878961203e565b90612051565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156108f557600080fd5b505af1158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d919061307b565b90508061097c5760405162461bcd60e51b815260206004820152601060248201527f57697468647261776c206661696c6564000000000000000000000000000000006044820152606401610707565b50505050565b60006001600160a01b03861630146109dc5760405162461bcd60e51b815260206004820152601060248201527f496e76616c6964206f70657261746f72000000000000000000000000000000006044820152606401610707565b6000848152600560205260409020546001600160a01b03868116911614610a455760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420546f6b656e204f776e6572000000000000000000000000006044820152606401610707565b507f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6000546001600160a01b03163314610aca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b60004711610b1a5760405162461bcd60e51b815260206004820152601260248201527f4e6f2066756e647320617661696c61626c6500000000000000000000000000006044820152606401610707565b600081118015610b2b575060648111155b610b775760405162461bcd60e51b815260206004820152601960248201527f496e76616c69642057697468647261776c2070657263656e74000000000000006044820152606401610707565b610748610b8c6000546001600160a01b031690565b6064610b98844761341f565b610ba291906133fd565b61205d565b6000546001600160a01b03163314610c015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b610c09612176565b565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610c6657600080fd5b505afa158015610c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9e91906131e7565b92915050565b6000546001600160a01b03163314610cfe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6001600160a01b0381161561074857600480546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600054600160a01b900460ff1615610d945760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b323314610de35760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e747261637400006044820152606401610707565b610def81336000612237565b6107485760405162461bcd60e51b815260206004820152600e60248201527f4572726f7220436c61696d696e670000000000000000000000000000000000006044820152606401610707565b6000546001600160a01b03163314610e955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b610c0960006125ba565b600081815260056020818152604080842081516101008101835281546001600160a01b031680825260018301549482019490945260028201549281019290925260038101546060830152600481015460808301529283015460a0820152600683015460c082015260079092015460e0830152610f5d5760405162461bcd60e51b815260206004820152600e60248201527f556e7374616b656420546f6b656e0000000000000000000000000000000000006044820152606401610707565b60015442906000908211610f715781610f75565b6001545b90506000808460e0015111610f8e578360a00151610f94565b8360e001515b905081811115610fa15750805b600080856040015160021480610fbb575085604001516003145b15611081578560c001518411610ff557610fd5838561343e565b9150610fee86606001518361203e90919063ffffffff16565b90506110b4565b8560c00151831161105e57828660c00151611010919061343e565b915061102986606001518361203e90919063ffffffff16565b90508560c001518461103b919061343e565b915061105486608001518361203e90919063ffffffff16565b610fee90826133e5565b611068838561343e565b9150610fee86608001518361203e90919063ffffffff16565b8560400151600114156110b457611098838561343e565b91506110b186606001518361203e90919063ffffffff16565b90505b979650505050505050565b6000546001600160a01b031633146111195760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b610c09612617565b6000546001600160a01b0316331461117b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b600693909355600791909155600855600955565b600054600160a01b900460ff16156111e95760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b3233146112385760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e747261637400006044820152606401610707565b600061124682336001612237565b9050806112955760405162461bcd60e51b815260206004820152600e60248201527f4572726f7220436c61696d696e670000000000000000000000000000000000006044820152606401610707565b60006112a3833360006126c7565b9050806112f25760405162461bcd60e51b815260206004820152600f60248201527f4572726f7220556e7374616b696e6700000000000000000000000000000000006044820152606401610707565b505050565b6000546001600160a01b031633146113515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6001600160a01b0381161561074857600380546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b6000546001600160a01b031633146113e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6113f481600060016126c7565b6107485760405162461bcd60e51b815260206004820152600f60248201527f4572726f7220556e7374616b696e6700000000000000000000000000000000006044820152606401610707565b60606001600160a01b0382166114985760405162461bcd60e51b815260206004820152600c60248201527f7a65726f206164647265737300000000000000000000000000000000000000006044820152606401610707565b600480546040517f438b6300000000000000000000000000000000000000000000000000000000008152309281019290925260009182916001600160a01b03169063438b63009060240160006040518083038186803b1580156114fa57600080fd5b505afa15801561150e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115369190810190612fe3565b905060005b81518110156115a4576005600083838151811061155a5761155a6134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b0386811691161415611594576115918361346c565b92505b61159d8161346c565b905061153b565b5060008267ffffffffffffffff8111156115c0576115c06134c9565b60405190808252806020026020018201604052801561164257816020015b61162f60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816115de5790505b5090506000831561176f5760005b835181101561176d576005600085838151811061166f5761166f6134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b038881169116141561175d57600560008583815181106116b3576116b36134b3565b602090810291909101810151825281810192909252604090810160002081516101008101835281546001600160a01b031681526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a0830152600681015460c08301526007015460e08201528351849084908110611743576117436134b3565b602002602001018190525081806117599061346c565b9250505b6117668161346c565b9050611650565b505b50949350505050565b600054600160a01b900460ff16156117d25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b3233146118215760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e747261637400006044820152606401610707565b60015442106118725760405162461bcd60e51b815260206004820152601660248201527f5374616b696e6720706572696f642065787069726564000000000000000000006044820152606401610707565b60006118f03386868686604051602001611890959493929190613265565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6002549091506001600160a01b03166119098288612a97565b6001600160a01b03161461195f5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c6964204163636573730000000000000000000000000000000000006044820152606401610707565b60005b8451811015611cd15760006001600160a01b03166005600087848151811061198c5761198c6134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146119fd5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420616c7265616479207374616b65640000000000000000006044820152606401610707565b600454855133916001600160a01b031690636352211e90889085908110611a2657611a266134b3565b60200260200101516040518263ffffffff1660e01b8152600401611a4c91815260200190565b60206040518083038186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9c9190612eea565b6001600160a01b031614611af25760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206f776e6572206d69736d617463680000000000000000000000006044820152606401610707565b600762093a806001881415611b1b5760078054906000611b118361346c565b9190505550611b67565b8760021415611b3e57505060088054602d91623b538091906000611b118361346c565b8760031415611b6757505060098054605a916276a70091906000611b618361346c565b91905055505b6000611b7382426133e5565b9050600154811115611b8457506001545b604051806101000160405280611b973390565b6001600160a01b03168152602001898681518110611bb757611bb76134b3565b602002602001015181526020018a8152602001888681518110611bdc57611bdc6134b3565b60200260200101518152602001878681518110611bfb57611bfb6134b3565b602002602001015181526020014281526020018281526020016000815250600560008a8781518110611c2f57611c2f6134b3565b60209081029190910181015182528181019290925260409081016000208351815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039091161781559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e09091015160079091015550829150611cc990508161346c565b915050611962565b50835160066000828254611ce591906133e5565b90915550600090505b8451811015611db9576004546001600160a01b03166342842e0e3330888581518110611d1c57611d1c6134b3565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015611d8e57600080fd5b505af1158015611da2573d6000803e3d6000fd5b505050508080611db19061346c565b915050611cee565b50505050505050565b606060008251118015611dd857506128b4825111155b611e245760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f74207365740000000000000000000000000000006044820152606401610707565b6000825167ffffffffffffffff811115611e4057611e406134c9565b604051908082528060200260200182016040528015611e69578160200160208202803683370190505b50905060005b8351811015611ef95760006001600160a01b031660056000868481518110611e9957611e996134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b031614611ee7576001828281518110611ed657611ed66134b3565b911515602092830291909101909101525b80611ef18161346c565b915050611e6f565b5092915050565b6000546001600160a01b03163314611f5a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6001600160a01b038116611fd65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610707565b610748816125ba565b6000546001600160a01b031633146120395760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b600155565b600061204a828461341f565b9392505050565b600061204a82846133fd565b804710156120ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610707565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146120fa576040519150601f19603f3d011682016040523d82523d6000602084013e6120ff565b606091505b50509050806112f25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610707565b600054600160a01b900460ff166121cf5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610707565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000808451116122895760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f74207365740000000000000000000000000000006044820152606401610707565b6000805b85518110156124a6576000600560008884815181106122ae576122ae6134b3565b602090810291909101810151825281810192909252604090810160002081516101008101835281546001600160a01b039081168083526001840154958301959095526002830154938201939093526003820154606082015260048201546080820152600582015460a0820152600682015460c082015260079091015460e082015292508716146123805760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420546f6b656e204163636573730000000000000000000000006044820152606401610707565b6123a2878381518110612395576123956134b3565b6020026020010151610e9f565b6123ac90846133e5565b925084612493578060400151600114156123e65760006123cf4262093a806133e5565b90506001548111156123e057506001545b60c08201525b428160e00181815250508060056000898581518110612407576124076134b3565b60209081029190910181015182528181019290925260409081016000208351815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039091161781559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0909101516007909101555b508061249e8161346c565b91505061228d565b506003546000906001600160a01b031663a9059cbb866124c98562015180612051565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561252757600080fd5b505af115801561253b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255f919061307b565b9050806125ae5760405162461bcd60e51b815260206004820152601960248201527f556e61626c6520746f207472616e7366657220746f6b656e73000000000000006044820152606401610707565b50600195945050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156126715760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861221a3390565b6000808451116127195760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f74207365740000000000000000000000000000006044820152606401610707565b60005b8451811015612a8c5760006005600087848151811061273d5761273d6134b3565b602090810291909101810151825281810192909252604090810160002081516101008101835281546001600160a01b03168082526001830154948201949094526002820154928101929092526003810154606083015260048101546080830152600581015460a0830152600681015460c08301526007015460e082015291506128085760405162461bcd60e51b815260206004820152601060248201527f546f6b656e206e6f74207374616b6564000000000000000000000000000000006044820152606401610707565b836128c657846001600160a01b031681600001516001600160a01b0316146128725760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420546f6b656e204163636573730000000000000000000000006044820152606401610707565b428160c0015111156128c65760405162461bcd60e51b815260206004820181905260248201527f556e61626c6520746f20756e7374616b652061206c6f636b656420746f6b656e6044820152606401610707565b8060400151600114156128ed57600780549060006128e383613455565b919050555061292d565b80604001516002141561290a57600880549060006128e383613455565b80604001516003141561292d576009805490600061292783613455565b91905055505b6006805490600061293d83613455565b919050555060056000878481518110612958576129586134b3565b60209081029190910181015182528101919091526040016000908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905560028101829055600381018290556004808201839055600582018390556006820183905560079091019190915554815187516001600160a01b03909216916342842e0e9130918a90879081106129ee576129ee6134b3565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015612a6057600080fd5b505af1158015612a74573d6000803e3d6000fd5b50505050508080612a849061346c565b91505061271c565b506001949350505050565b6000806000612aa68585612abb565b91509150612ab381612b2b565b509392505050565b600080825160411415612af25760208301516040840151606085015160001a612ae687828585612d1c565b94509450505050612b24565b825160401415612b1c5760208301516040840151612b11868383612e09565b935093505050612b24565b506000905060025b9250929050565b6000816004811115612b3f57612b3f61349d565b1415612b485750565b6001816004811115612b5c57612b5c61349d565b1415612baa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610707565b6002816004811115612bbe57612bbe61349d565b1415612c0c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610707565b6003816004811115612c2057612c2061349d565b1415612c945760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610707565b6004816004811115612ca857612ca861349d565b14156107485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610707565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d535750600090506003612e00565b8460ff16601b14158015612d6b57508460ff16601c14155b15612d7c5750600090506004612e00565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612dd0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612df957600060019250925050612e00565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681612e3f60ff86901c601b6133e5565b9050612e4d87828885612d1c565b935093505050935093915050565b600082601f830112612e6c57600080fd5b81356020612e81612e7c836133c1565b613390565b80838252828201915082860187848660051b8901011115612ea157600080fd5b60005b85811015612ec057813584529284019290840190600101612ea4565b5090979650505050505050565b600060208284031215612edf57600080fd5b813561204a816134df565b600060208284031215612efc57600080fd5b815161204a816134df565b600080600080600060808688031215612f1f57600080fd5b8535612f2a816134df565b94506020860135612f3a816134df565b935060408601359250606086013567ffffffffffffffff80821115612f5e57600080fd5b818801915088601f830112612f7257600080fd5b813581811115612f8157600080fd5b896020828501011115612f9357600080fd5b9699959850939650602001949392505050565b600060208284031215612fb857600080fd5b813567ffffffffffffffff811115612fcf57600080fd5b612fdb84828501612e5b565b949350505050565b60006020808385031215612ff657600080fd5b825167ffffffffffffffff81111561300d57600080fd5b8301601f8101851361301e57600080fd5b805161302c612e7c826133c1565b80828252848201915084840188868560051b870101111561304c57600080fd5b600094505b8385101561306f578051835260019490940193918501918501613051565b50979650505050505050565b60006020828403121561308d57600080fd5b8151801515811461204a57600080fd5b600080600080600060a086880312156130b557600080fd5b853567ffffffffffffffff808211156130cd57600080fd5b818801915088601f8301126130e157600080fd5b81356020828211156130f5576130f56134c9565b61310781601f19601f85011601613390565b8281528b8284870101111561311b57600080fd5b828286018383013760009281018201839052985089013596509150604088013581811115613147578283fd5b6131538a828b01612e5b565b955050606088013581811115613167578283fd5b6131738a828b01612e5b565b945050608088013581811115613187578283fd5b6131938a828b01612e5b565b93505050509295509295909350565b600080604083850312156131b557600080fd5b82356131c0816134df565b946020939093013593505050565b6000602082840312156131e057600080fd5b5035919050565b6000602082840312156131f957600080fd5b5051919050565b6000806000806080858703121561321657600080fd5b5050823594602084013594506040840135936060013592509050565b60008151602080840160005b8381101561325a5781518752958201959082019060010161323e565b509495945050505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008660601b16815284601482015260006110b46132ae6132a86034850188613232565b86613232565b84613232565b6020808252825182820181905260009190848201906040850190845b818110156132ee5783511515835292840192918401916001016132d0565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561338357815180516001600160a01b0316855286810151878601528581015186860152606080820151908601526080808201519086015260a0808201519086015260c0808201519086015260e090810151908501526101009093019290850190600101613317565b5091979650505050505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156133b9576133b96134c9565b604052919050565b600067ffffffffffffffff8211156133db576133db6134c9565b5060051b60200190565b600082198211156133f8576133f8613487565b500190565b60008261341a57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561343957613439613487565b500290565b60008282101561345057613450613487565b500390565b60008161346457613464613487565b506000190190565b600060001982141561348057613480613487565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461074857600080fdfea2646970667358221220b608f9e238c9f93fe4a7c38b99cb2105989b9acbeb72b67d490758d3aeff895a64736f6c6343000807003300000000000000000000000021018cbc9ad730542130be180b577b74db2a9397000000000000000000000000d73acd7f5099fdd910215dbff029185f21ffbcf0
Deployed Bytecode
0x6080604052600436106101e75760003560e01c8063817b1cd21161010e578063c22c294c116100a7578063e24547e811610079578063e7c93c3311610061578063e7c93c3314610644578063f2fde38b14610671578063f76c14591461069157005b8063e24547e81461061b578063e3e5d53d1461063157005b8063c22c294c14610598578063c4602440146105b8578063de1ee940146105ce578063ded48aa7146105ee57005b80639b103e67116100e05780639b103e67146104975780639e8269b6146104b7578063aadfb4da146104d7578063c0788555146104ea57005b8063817b1cd21461042e5780638239c297146104445780638456cb59146104645780638da5cb5b1461047957005b80635b7633d01161018057806369d037381161015257806369d03738146103d05780636ba4c138146103f05780636d8f00e314610403578063715018a61461041957005b80635b7633d01461032d5780635c975abb1461034d578063617eef6e14610377578063690e51251461039757005b80632e1a7d4d116101b95780632e1a7d4d146102be57806332cb6b0c146102de578063332751f2146103025780633f4ba83a1461031857005b8063046dc166146101f0578063059cd0cd1461021057806306b091f91461024d578063150b7a021461026d57005b366101ee57005b005b3480156101fc57600080fd5b506101ee61020b366004612ecd565b6106b1565b34801561021c57600080fd5b50600454610230906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561025957600080fd5b506101ee6102683660046131a2565b61074b565b34801561027957600080fd5b5061028d610288366004612f07565b610982565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610244565b3480156102ca57600080fd5b506101ee6102d93660046131ce565b610a70565b3480156102ea57600080fd5b506102f46128b481565b604051908152602001610244565b34801561030e57600080fd5b506102f460015481565b34801561032457600080fd5b506101ee610ba7565b34801561033957600080fd5b50600254610230906001600160a01b031681565b34801561035957600080fd5b50600054600160a01b900460ff166040519015158152602001610244565b34801561038357600080fd5b506102f4610392366004612ecd565b610c0b565b3480156103a357600080fd5b50600654600754600854600954604080519485526020850193909352918301526060820152608001610244565b3480156103dc57600080fd5b506101ee6103eb366004612ecd565b610ca4565b6101ee6103fe366004612fa6565b610d3a565b34801561040f57600080fd5b506102f460095481565b34801561042557600080fd5b506101ee610e3b565b34801561043a57600080fd5b506102f460065481565b34801561045057600080fd5b506102f461045f3660046131ce565b610e9f565b34801561047057600080fd5b506101ee6110bf565b34801561048557600080fd5b506000546001600160a01b0316610230565b3480156104a357600080fd5b50600354610230906001600160a01b031681565b3480156104c357600080fd5b506101ee6104d2366004613200565b611121565b6101ee6104e5366004612fa6565b61118f565b3480156104f657600080fd5b506105536105053660046131ce565b6005602081905260009182526040909120805460018201546002830154600384015460048501549585015460068601546007909601546001600160a01b039095169693959294919392909188565b604080516001600160a01b0390991689526020890197909752958701949094526060860192909252608085015260a084015260c083015260e082015261010001610244565b3480156105a457600080fd5b506101ee6105b3366004612ecd565b6112f7565b3480156105c457600080fd5b506102f460075481565b3480156105da57600080fd5b506101ee6105e9366004612fa6565b61138d565b3480156105fa57600080fd5b5061060e610609366004612ecd565b611440565b60405161024491906132fa565b34801561062757600080fd5b506102f460085481565b6101ee61063f36600461309d565b611778565b34801561065057600080fd5b5061066461065f366004612fa6565b611dc2565b60405161024491906132b4565b34801561067d57600080fd5b506101ee61068c366004612ecd565b611f00565b34801561069d57600080fd5b506101ee6106ac3660046131ce565b611fdf565b6000546001600160a01b031633146107105760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b03811615610748576002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b50565b6000546001600160a01b031633146107a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b60006107b083610c0b565b9050600081116108025760405162461bcd60e51b815260206004820152601260248201527f4e6f2066756e647320617661696c61626c6500000000000000000000000000006044820152606401610707565b600082118015610813575060648211155b61085f5760405162461bcd60e51b815260206004820152601960248201527f57697468647261776c2070657263656e7420696e76616c6964000000000000006044820152606401610707565b6000836001600160a01b031663a9059cbb6108826000546001600160a01b031690565b6108976064610891878961203e565b90612051565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156108f557600080fd5b505af1158015610909573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092d919061307b565b90508061097c5760405162461bcd60e51b815260206004820152601060248201527f57697468647261776c206661696c6564000000000000000000000000000000006044820152606401610707565b50505050565b60006001600160a01b03861630146109dc5760405162461bcd60e51b815260206004820152601060248201527f496e76616c6964206f70657261746f72000000000000000000000000000000006044820152606401610707565b6000848152600560205260409020546001600160a01b03868116911614610a455760405162461bcd60e51b815260206004820152601360248201527f496e76616c696420546f6b656e204f776e6572000000000000000000000000006044820152606401610707565b507f150b7a020000000000000000000000000000000000000000000000000000000095945050505050565b6000546001600160a01b03163314610aca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b60004711610b1a5760405162461bcd60e51b815260206004820152601260248201527f4e6f2066756e647320617661696c61626c6500000000000000000000000000006044820152606401610707565b600081118015610b2b575060648111155b610b775760405162461bcd60e51b815260206004820152601960248201527f496e76616c69642057697468647261776c2070657263656e74000000000000006044820152606401610707565b610748610b8c6000546001600160a01b031690565b6064610b98844761341f565b610ba291906133fd565b61205d565b6000546001600160a01b03163314610c015760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b610c09612176565b565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b158015610c6657600080fd5b505afa158015610c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9e91906131e7565b92915050565b6000546001600160a01b03163314610cfe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6001600160a01b0381161561074857600480546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b600054600160a01b900460ff1615610d945760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b323314610de35760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e747261637400006044820152606401610707565b610def81336000612237565b6107485760405162461bcd60e51b815260206004820152600e60248201527f4572726f7220436c61696d696e670000000000000000000000000000000000006044820152606401610707565b6000546001600160a01b03163314610e955760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b610c0960006125ba565b600081815260056020818152604080842081516101008101835281546001600160a01b031680825260018301549482019490945260028201549281019290925260038101546060830152600481015460808301529283015460a0820152600683015460c082015260079092015460e0830152610f5d5760405162461bcd60e51b815260206004820152600e60248201527f556e7374616b656420546f6b656e0000000000000000000000000000000000006044820152606401610707565b60015442906000908211610f715781610f75565b6001545b90506000808460e0015111610f8e578360a00151610f94565b8360e001515b905081811115610fa15750805b600080856040015160021480610fbb575085604001516003145b15611081578560c001518411610ff557610fd5838561343e565b9150610fee86606001518361203e90919063ffffffff16565b90506110b4565b8560c00151831161105e57828660c00151611010919061343e565b915061102986606001518361203e90919063ffffffff16565b90508560c001518461103b919061343e565b915061105486608001518361203e90919063ffffffff16565b610fee90826133e5565b611068838561343e565b9150610fee86608001518361203e90919063ffffffff16565b8560400151600114156110b457611098838561343e565b91506110b186606001518361203e90919063ffffffff16565b90505b979650505050505050565b6000546001600160a01b031633146111195760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b610c09612617565b6000546001600160a01b0316331461117b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b600693909355600791909155600855600955565b600054600160a01b900460ff16156111e95760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b3233146112385760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e747261637400006044820152606401610707565b600061124682336001612237565b9050806112955760405162461bcd60e51b815260206004820152600e60248201527f4572726f7220436c61696d696e670000000000000000000000000000000000006044820152606401610707565b60006112a3833360006126c7565b9050806112f25760405162461bcd60e51b815260206004820152600f60248201527f4572726f7220556e7374616b696e6700000000000000000000000000000000006044820152606401610707565b505050565b6000546001600160a01b031633146113515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6001600160a01b0381161561074857600380546001600160a01b03831673ffffffffffffffffffffffffffffffffffffffff1990911617905550565b6000546001600160a01b031633146113e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6113f481600060016126c7565b6107485760405162461bcd60e51b815260206004820152600f60248201527f4572726f7220556e7374616b696e6700000000000000000000000000000000006044820152606401610707565b60606001600160a01b0382166114985760405162461bcd60e51b815260206004820152600c60248201527f7a65726f206164647265737300000000000000000000000000000000000000006044820152606401610707565b600480546040517f438b6300000000000000000000000000000000000000000000000000000000008152309281019290925260009182916001600160a01b03169063438b63009060240160006040518083038186803b1580156114fa57600080fd5b505afa15801561150e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526115369190810190612fe3565b905060005b81518110156115a4576005600083838151811061155a5761155a6134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b0386811691161415611594576115918361346c565b92505b61159d8161346c565b905061153b565b5060008267ffffffffffffffff8111156115c0576115c06134c9565b60405190808252806020026020018201604052801561164257816020015b61162f60405180610100016040528060006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8152602001906001900390816115de5790505b5090506000831561176f5760005b835181101561176d576005600085838151811061166f5761166f6134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b038881169116141561175d57600560008583815181106116b3576116b36134b3565b602090810291909101810151825281810192909252604090810160002081516101008101835281546001600160a01b031681526001820154938101939093526002810154918301919091526003810154606083015260048101546080830152600581015460a0830152600681015460c08301526007015460e08201528351849084908110611743576117436134b3565b602002602001018190525081806117599061346c565b9250505b6117668161346c565b9050611650565b505b50949350505050565b600054600160a01b900460ff16156117d25760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b3233146118215760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c6564206279206120636f6e747261637400006044820152606401610707565b60015442106118725760405162461bcd60e51b815260206004820152601660248201527f5374616b696e6720706572696f642065787069726564000000000000000000006044820152606401610707565b60006118f03386868686604051602001611890959493929190613265565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b6002549091506001600160a01b03166119098288612a97565b6001600160a01b03161461195f5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c6964204163636573730000000000000000000000000000000000006044820152606401610707565b60005b8451811015611cd15760006001600160a01b03166005600087848151811061198c5761198c6134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b0316146119fd5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20494420616c7265616479207374616b65640000000000000000006044820152606401610707565b600454855133916001600160a01b031690636352211e90889085908110611a2657611a266134b3565b60200260200101516040518263ffffffff1660e01b8152600401611a4c91815260200190565b60206040518083038186803b158015611a6457600080fd5b505afa158015611a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9c9190612eea565b6001600160a01b031614611af25760405162461bcd60e51b815260206004820152601460248201527f546f6b656e206f776e6572206d69736d617463680000000000000000000000006044820152606401610707565b600762093a806001881415611b1b5760078054906000611b118361346c565b9190505550611b67565b8760021415611b3e57505060088054602d91623b538091906000611b118361346c565b8760031415611b6757505060098054605a916276a70091906000611b618361346c565b91905055505b6000611b7382426133e5565b9050600154811115611b8457506001545b604051806101000160405280611b973390565b6001600160a01b03168152602001898681518110611bb757611bb76134b3565b602002602001015181526020018a8152602001888681518110611bdc57611bdc6134b3565b60200260200101518152602001878681518110611bfb57611bfb6134b3565b602002602001015181526020014281526020018281526020016000815250600560008a8781518110611c2f57611c2f6134b3565b60209081029190910181015182528181019290925260409081016000208351815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039091161781559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e09091015160079091015550829150611cc990508161346c565b915050611962565b50835160066000828254611ce591906133e5565b90915550600090505b8451811015611db9576004546001600160a01b03166342842e0e3330888581518110611d1c57611d1c6134b3565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015611d8e57600080fd5b505af1158015611da2573d6000803e3d6000fd5b505050508080611db19061346c565b915050611cee565b50505050505050565b606060008251118015611dd857506128b4825111155b611e245760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f74207365740000000000000000000000000000006044820152606401610707565b6000825167ffffffffffffffff811115611e4057611e406134c9565b604051908082528060200260200182016040528015611e69578160200160208202803683370190505b50905060005b8351811015611ef95760006001600160a01b031660056000868481518110611e9957611e996134b3565b6020908102919091018101518252810191909152604001600020546001600160a01b031614611ee7576001828281518110611ed657611ed66134b3565b911515602092830291909101909101525b80611ef18161346c565b915050611e6f565b5092915050565b6000546001600160a01b03163314611f5a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b6001600160a01b038116611fd65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610707565b610748816125ba565b6000546001600160a01b031633146120395760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610707565b600155565b600061204a828461341f565b9392505050565b600061204a82846133fd565b804710156120ad5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610707565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146120fa576040519150601f19603f3d011682016040523d82523d6000602084013e6120ff565b606091505b50509050806112f25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610707565b600054600160a01b900460ff166121cf5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610707565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000808451116122895760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f74207365740000000000000000000000000000006044820152606401610707565b6000805b85518110156124a6576000600560008884815181106122ae576122ae6134b3565b602090810291909101810151825281810192909252604090810160002081516101008101835281546001600160a01b039081168083526001840154958301959095526002830154938201939093526003820154606082015260048201546080820152600582015460a0820152600682015460c082015260079091015460e082015292508716146123805760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420546f6b656e204163636573730000000000000000000000006044820152606401610707565b6123a2878381518110612395576123956134b3565b6020026020010151610e9f565b6123ac90846133e5565b925084612493578060400151600114156123e65760006123cf4262093a806133e5565b90506001548111156123e057506001545b60c08201525b428160e00181815250508060056000898581518110612407576124076134b3565b60209081029190910181015182528181019290925260409081016000208351815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039091161781559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0820151600682015560e0909101516007909101555b508061249e8161346c565b91505061228d565b506003546000906001600160a01b031663a9059cbb866124c98562015180612051565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561252757600080fd5b505af115801561253b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255f919061307b565b9050806125ae5760405162461bcd60e51b815260206004820152601960248201527f556e61626c6520746f207472616e7366657220746f6b656e73000000000000006044820152606401610707565b50600195945050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156126715760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610707565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861221a3390565b6000808451116127195760405162461bcd60e51b815260206004820152601160248201527f546f6b656e20496473206e6f74207365740000000000000000000000000000006044820152606401610707565b60005b8451811015612a8c5760006005600087848151811061273d5761273d6134b3565b602090810291909101810151825281810192909252604090810160002081516101008101835281546001600160a01b03168082526001830154948201949094526002820154928101929092526003810154606083015260048101546080830152600581015460a0830152600681015460c08301526007015460e082015291506128085760405162461bcd60e51b815260206004820152601060248201527f546f6b656e206e6f74207374616b6564000000000000000000000000000000006044820152606401610707565b836128c657846001600160a01b031681600001516001600160a01b0316146128725760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420546f6b656e204163636573730000000000000000000000006044820152606401610707565b428160c0015111156128c65760405162461bcd60e51b815260206004820181905260248201527f556e61626c6520746f20756e7374616b652061206c6f636b656420746f6b656e6044820152606401610707565b8060400151600114156128ed57600780549060006128e383613455565b919050555061292d565b80604001516002141561290a57600880549060006128e383613455565b80604001516003141561292d576009805490600061292783613455565b91905055505b6006805490600061293d83613455565b919050555060056000878481518110612958576129586134b3565b60209081029190910181015182528101919091526040016000908120805473ffffffffffffffffffffffffffffffffffffffff191681556001810182905560028101829055600381018290556004808201839055600582018390556006820183905560079091019190915554815187516001600160a01b03909216916342842e0e9130918a90879081106129ee576129ee6134b3565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015612a6057600080fd5b505af1158015612a74573d6000803e3d6000fd5b50505050508080612a849061346c565b91505061271c565b506001949350505050565b6000806000612aa68585612abb565b91509150612ab381612b2b565b509392505050565b600080825160411415612af25760208301516040840151606085015160001a612ae687828585612d1c565b94509450505050612b24565b825160401415612b1c5760208301516040840151612b11868383612e09565b935093505050612b24565b506000905060025b9250929050565b6000816004811115612b3f57612b3f61349d565b1415612b485750565b6001816004811115612b5c57612b5c61349d565b1415612baa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610707565b6002816004811115612bbe57612bbe61349d565b1415612c0c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610707565b6003816004811115612c2057612c2061349d565b1415612c945760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610707565b6004816004811115612ca857612ca861349d565b14156107485760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610707565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612d535750600090506003612e00565b8460ff16601b14158015612d6b57508460ff16601c14155b15612d7c5750600090506004612e00565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612dd0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612df957600060019250925050612e00565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681612e3f60ff86901c601b6133e5565b9050612e4d87828885612d1c565b935093505050935093915050565b600082601f830112612e6c57600080fd5b81356020612e81612e7c836133c1565b613390565b80838252828201915082860187848660051b8901011115612ea157600080fd5b60005b85811015612ec057813584529284019290840190600101612ea4565b5090979650505050505050565b600060208284031215612edf57600080fd5b813561204a816134df565b600060208284031215612efc57600080fd5b815161204a816134df565b600080600080600060808688031215612f1f57600080fd5b8535612f2a816134df565b94506020860135612f3a816134df565b935060408601359250606086013567ffffffffffffffff80821115612f5e57600080fd5b818801915088601f830112612f7257600080fd5b813581811115612f8157600080fd5b896020828501011115612f9357600080fd5b9699959850939650602001949392505050565b600060208284031215612fb857600080fd5b813567ffffffffffffffff811115612fcf57600080fd5b612fdb84828501612e5b565b949350505050565b60006020808385031215612ff657600080fd5b825167ffffffffffffffff81111561300d57600080fd5b8301601f8101851361301e57600080fd5b805161302c612e7c826133c1565b80828252848201915084840188868560051b870101111561304c57600080fd5b600094505b8385101561306f578051835260019490940193918501918501613051565b50979650505050505050565b60006020828403121561308d57600080fd5b8151801515811461204a57600080fd5b600080600080600060a086880312156130b557600080fd5b853567ffffffffffffffff808211156130cd57600080fd5b818801915088601f8301126130e157600080fd5b81356020828211156130f5576130f56134c9565b61310781601f19601f85011601613390565b8281528b8284870101111561311b57600080fd5b828286018383013760009281018201839052985089013596509150604088013581811115613147578283fd5b6131538a828b01612e5b565b955050606088013581811115613167578283fd5b6131738a828b01612e5b565b945050608088013581811115613187578283fd5b6131938a828b01612e5b565b93505050509295509295909350565b600080604083850312156131b557600080fd5b82356131c0816134df565b946020939093013593505050565b6000602082840312156131e057600080fd5b5035919050565b6000602082840312156131f957600080fd5b5051919050565b6000806000806080858703121561321657600080fd5b5050823594602084013594506040840135936060013592509050565b60008151602080840160005b8381101561325a5781518752958201959082019060010161323e565b509495945050505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008660601b16815284601482015260006110b46132ae6132a86034850188613232565b86613232565b84613232565b6020808252825182820181905260009190848201906040850190845b818110156132ee5783511515835292840192918401916001016132d0565b50909695505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561338357815180516001600160a01b0316855286810151878601528581015186860152606080820151908601526080808201519086015260a0808201519086015260c0808201519086015260e090810151908501526101009093019290850190600101613317565b5091979650505050505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156133b9576133b96134c9565b604052919050565b600067ffffffffffffffff8211156133db576133db6134c9565b5060051b60200190565b600082198211156133f8576133f8613487565b500190565b60008261341a57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561343957613439613487565b500290565b60008282101561345057613450613487565b500390565b60008161346457613464613487565b506000190190565b600060001982141561348057613480613487565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461074857600080fdfea2646970667358221220b608f9e238c9f93fe4a7c38b99cb2105989b9acbeb72b67d490758d3aeff895a64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000021018cbc9ad730542130be180b577b74db2a9397000000000000000000000000d73acd7f5099fdd910215dbff029185f21ffbcf0
-----Decoded View---------------
Arg [0] : _paperTokenAddress (address): 0x21018CBC9ad730542130bE180b577b74DB2a9397
Arg [1] : _nftTokenAddress (address): 0xD73ACd7F5099fdd910215Dbff029185F21ffBCf0
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000021018cbc9ad730542130be180b577b74db2a9397
Arg [1] : 000000000000000000000000d73acd7f5099fdd910215dbff029185f21ffbcf0
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1,583.6 | 0.0147 | $23.29 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.