Contract
0x6D17Ac1903C124d6A21558c12c822d065b505392
1
Contract Overview
Balance:
0 CRO
CRO Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x97afc054edf26e0624239c8e4f94d9aca682896a2b330667526d1245c0755e42 | 0x60a06040 | 5800832 | 69 days 8 hrs ago | 0x5381f057aa1cb418886e96decb064d0e5c3200a5 | IN | Create: ZombabieStake | 0 CRO | 13.899645 |
[ Download CSV Export ]
Contract Source Code Verified (Exact Match)
Contract Name:
ZombabieStake
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract ZombabieStake is ReentrancyGuard, Ownable { using SafeERC20 for IERC20; uint256 public totalStaked = 0; // Interfaces for ERC721 IERC721 public immutable nftCollection; // Constructor function to set the rewards token and the NFT collection addresses constructor(IERC721 _nftCollection) { nftCollection = _nftCollection; } struct StakedToken { address staker; uint256 tokenId; } // Staker info struct Staker { // Amount of tokens staked by the staker uint256 amountStaked; // Staked token ids StakedToken[] stakedTokens; // Last time of the rewards were calculated for this user uint256 timeOfLastUpdate; // Calculated, but unclaimed rewards for the User. The rewards are // calculated each time the user writes to the Smart Contract uint256 unclaimedRewards; } // Rewards per hour per token deposited in wei. uint256 private rewardsPerHour = 13 * (10**15); // Mapping of User Address to Staker info mapping(address => Staker) public stakers; // Mapping of Token Id to staker. Made for the SC to remember // who to send back the ERC721 Token to. mapping(uint256 => address) public stakerAddress; function setRewardsPerHour(uint256 _newCost) public onlyOwner { rewardsPerHour = _newCost; } // If address already has ERC721 Token/s staked, calculate the rewards. // Increment the amountStaked and map msg.sender to the Token Id of the staked // Token to later send back on withdrawal. Finally give timeOfLastUpdate the // value of now. function stake(uint256 _tokenId) external nonReentrant { // If wallet has tokens staked, calculate the rewards before adding the new token if (stakers[msg.sender].amountStaked > 0) { uint256 rewards = calculateRewards(msg.sender); stakers[msg.sender].unclaimedRewards += rewards; } // Wallet must own the token they are trying to stake require( nftCollection.ownerOf(_tokenId) == msg.sender, "You don't own this token!" ); // Transfer the token from the wallet to the Smart contract nftCollection.transferFrom(msg.sender, address(this), _tokenId); // Create StakedToken StakedToken memory stakedToken = StakedToken(msg.sender, _tokenId); // Add the token to the stakedTokens array stakers[msg.sender].stakedTokens.push(stakedToken); // Increment the amount staked for this wallet stakers[msg.sender].amountStaked++; totalStaked++; // Update the mapping of the tokenId to the staker's address stakerAddress[_tokenId] = msg.sender; // Update the timeOfLastUpdate for the staker stakers[msg.sender].timeOfLastUpdate = block.timestamp; } // If address already has ERC721 Token/s staked, calculate the rewards. // Increment the amountStaked and map msg.sender to the Token Ids of the staked // Token to later send back on withdrawal. Finally give timeOfLastUpdate the // value of now. function batchStake(uint256[] memory _tokenIds) external nonReentrant { // If wallet has tokens staked, calculate the rewards before adding the new tokens if (stakers[msg.sender].amountStaked > 0) { uint256 rewards = calculateRewards(msg.sender); stakers[msg.sender].unclaimedRewards += rewards; } // Wallet must own the tokens they are trying to stake for (uint256 i = 0; i < _tokenIds.length; i++) { require( nftCollection.ownerOf(_tokenIds[i]) == msg.sender, "You don't own these tokens!" ); } require( nftCollection.isApprovedForAll(msg.sender, address(this)) == true, "You didn't approve" ); for (uint256 i = 0; i < _tokenIds.length; i++) { // Transfer the token from the wallet to the Smart contract nftCollection.transferFrom(msg.sender, address(this), _tokenIds[i]); // Create StakedToken StakedToken memory stakedToken = StakedToken( msg.sender, _tokenIds[i] ); // Add the token to the stakedTokens array stakers[msg.sender].stakedTokens.push(stakedToken); // Increment the amount staked for this wallet stakers[msg.sender].amountStaked++; totalStaked++; // Update the mapping of the tokenId to the staker's address stakerAddress[_tokenIds[i]] = msg.sender; } // Update the timeOfLastUpdate for the staker stakers[msg.sender].timeOfLastUpdate = block.timestamp; } // Check if user has any ERC721 Tokens Staked and if they tried to withdraw, // calculate the rewards and store them in the unclaimedRewards // decrement the amountStaked of the user and transfer the ERC721 token back to them function withdraw(uint256 _tokenId) external nonReentrant { // Make sure the user has at least one token staked before withdrawing require( stakers[msg.sender].amountStaked > 0, "You have no tokens staked" ); // Wallet must own the token they are trying to withdraw require( stakerAddress[_tokenId] == msg.sender, "You don't own this token!" ); // Update the rewards for this user, as the amount of rewards decreases with less tokens. uint256 rewards = calculateRewards(msg.sender); stakers[msg.sender].unclaimedRewards += rewards; // Find the index of this token id in the stakedTokens array uint256 index = 0; for (uint256 i = 0; i < stakers[msg.sender].stakedTokens.length; i++) { if ( stakers[msg.sender].stakedTokens[i].tokenId == _tokenId && stakers[msg.sender].stakedTokens[i].staker != address(0) ) { index = i; break; } } // Set this token's .staker to be address 0 to mark it as no longer staked stakers[msg.sender].stakedTokens[index].staker = address(0); // Decrement the amount staked for this wallet stakers[msg.sender].amountStaked--; totalStaked--; // Update the mapping of the tokenId to the be address(0) to indicate that the token is no longer staked stakerAddress[_tokenId] = address(0); // Transfer the token back to the withdrawer nftCollection.transferFrom(address(this), msg.sender, _tokenId); // Update the timeOfLastUpdate for the withdrawer stakers[msg.sender].timeOfLastUpdate = block.timestamp; } // Check if user has any ERC721 Tokens Staked and if they tried to withdraw, // calculate the rewards and store them in the unclaimedRewards // decrement the amountStaked of the user and transfer the ERC721 token back to them function batchWithdraw(uint256[] memory _tokenIds) external nonReentrant { // Make sure the user has at least one token staked before withdrawing require( stakers[msg.sender].amountStaked > 0, "You have no tokens staked" ); // Wallet must own the token they are trying to withdraw for (uint256 i = 0; i < _tokenIds.length; i++) { require( stakerAddress[_tokenIds[i]] == msg.sender, "You don't own these tokens!" ); } // Update the rewards for this user, as the amount of rewards decreases with less tokens. uint256 rewards = calculateRewards(msg.sender); stakers[msg.sender].unclaimedRewards += rewards; for (uint256 i = 0; i < _tokenIds.length; i++) { // Find the index of this token id in the stakedTokens array uint256 index = 0; for ( uint256 j = 0; j < stakers[msg.sender].stakedTokens.length; j++ ) { if ( stakers[msg.sender].stakedTokens[j].tokenId == _tokenIds[i] && stakers[msg.sender].stakedTokens[j].staker != address(0) ) { index = j; break; } } // Set this token's .staker to be address 0 to mark it as no longer staked stakers[msg.sender].stakedTokens[index].staker = address(0); // Decrement the amount staked for this wallet stakers[msg.sender].amountStaked--; totalStaked--; // Update the mapping of the tokenId to the be address(0) to indicate that the token is no longer staked stakerAddress[_tokenIds[i]] = address(0); // Transfer the token back to the withdrawer nftCollection.transferFrom(address(this), msg.sender, _tokenIds[i]); } // Update the timeOfLastUpdate for the withdrawer stakers[msg.sender].timeOfLastUpdate = block.timestamp; } // Calculate rewards for the msg.sender, check if there are any rewards // claim, set unclaimedRewards to 0 and transfer the ERC20 Reward token // to the user. function claimRewards() external { uint256 rewards = calculateRewards(msg.sender) + stakers[msg.sender].unclaimedRewards; require(rewards > 0, "You have no rewards to claim"); stakers[msg.sender].timeOfLastUpdate = block.timestamp; stakers[msg.sender].unclaimedRewards = 0; payable(msg.sender).transfer(rewards); } function withdrawAllFunds() external onlyOwner { payable(msg.sender).transfer(address(this).balance); } // Receive Funds from external receive() external payable { // React to receiving ether } ////////// // View // ////////// function availableRewards(address _staker) public view returns (uint256) { uint256 rewards = calculateRewards(_staker) + stakers[_staker].unclaimedRewards; return rewards; } function getTotalStaked() public view returns (uint256) { return totalStaked; } function getMonthlyRate(address _staker) public view returns (uint256) { return (30 days * stakers[_staker].amountStaked * rewardsPerHour) / 3600; } function getStakedTokens(address _user) public view returns (StakedToken[] memory) { // Check if we know this user if (stakers[_user].amountStaked > 0) { // Return all the tokens in the stakedToken Array for this user that are not -1 StakedToken[] memory _stakedTokens = new StakedToken[]( stakers[_user].amountStaked ); uint256 _index = 0; for (uint256 j = 0; j < stakers[_user].stakedTokens.length; j++) { if (stakers[_user].stakedTokens[j].staker != (address(0))) { _stakedTokens[_index] = stakers[_user].stakedTokens[j]; _index++; } } return _stakedTokens; } // Otherwise, return empty array else { return new StakedToken[](0); } } ///////////// // Internal// ///////////// // Calculate rewards for param _staker by calculating the time passed // since last update in hours and mulitplying it to ERC721 Tokens Staked // and rewardsPerHour. function calculateRewards(address _staker) internal view returns (uint256 _rewards) { return ((( ((block.timestamp - stakers[_staker].timeOfLastUpdate) * stakers[_staker].amountStaked) ) * rewardsPerHour) / 3600); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: 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.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[{"internalType":"contract IERC721","name":"_nftCollection","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"availableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"batchStake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"batchWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"getMonthlyRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getStakedTokens","outputs":[{"components":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct ZombabieStake.StakedToken[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nftCollection","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setRewardsPerHour","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakers","outputs":[{"internalType":"uint256","name":"amountStaked","type":"uint256"},{"internalType":"uint256","name":"timeOfLastUpdate","type":"uint256"},{"internalType":"uint256","name":"unclaimedRewards","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":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040526000600255662e2f6e5e1480006003553480156200002157600080fd5b506040516200329b3803806200329b8339818101604052810190620000479190620001f6565b60016000819055506200006f62000063620000aa60201b60201c565b620000b260201b60201c565b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250505062000228565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001aa826200017d565b9050919050565b6000620001be826200019d565b9050919050565b620001d081620001b1565b8114620001dc57600080fd5b50565b600081519050620001f081620001c5565b92915050565b6000602082840312156200020f576200020e62000178565b5b60006200021f84828501620001df565b91505092915050565b608051613026620002756000396000818161091801528181610f28015281816114b3015281816117680152818161185801528181611c9301528181611db50152611e9f01526130266000f3fe60806040526004361061010d5760003560e01c80638da5cb5b11610095578063ab3fc9ab11610064578063ab3fc9ab1461033e578063b5a5e5091461037b578063c2127793146103a4578063f2fde38b146103cd578063f854a27f146103f657610114565b80638da5cb5b1461026e5780639168ae721461029957806394067045146102d8578063a694fc3a1461031557610114565b806363c28db1116100dc57806363c28db11461019b5780636588103b146101d8578063715018a61461020357806372e553991461021a578063817b1cd21461024357610114565b80630917e776146101195780632e1a7d4d14610144578063372500ab1461016d57806349649fbf1461018457610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610433565b60405161013b91906124cb565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612526565b61043d565b005b34801561017957600080fd5b506101826109f9565b005b34801561019057600080fd5b50610199610b6f565b005b3480156101a757600080fd5b506101c260048036038101906101bd91906125b1565b610bc0565b6040516101cf91906126da565b60405180910390f35b3480156101e457600080fd5b506101ed610f26565b6040516101fa919061275b565b60405180910390f35b34801561020f57600080fd5b50610218610f4a565b005b34801561022657600080fd5b50610241600480360381019061023c91906128cf565b610f5e565b005b34801561024f57600080fd5b506102586115c2565b60405161026591906124cb565b60405180910390f35b34801561027a57600080fd5b506102836115c8565b6040516102909190612927565b60405180910390f35b3480156102a557600080fd5b506102c060048036038101906102bb91906125b1565b6115f2565b6040516102cf93929190612942565b60405180910390f35b3480156102e457600080fd5b506102ff60048036038101906102fa9190612526565b61161c565b60405161030c9190612927565b60405180910390f35b34801561032157600080fd5b5061033c60048036038101906103379190612526565b61164f565b005b34801561034a57600080fd5b50610365600480360381019061036091906125b1565b611ae8565b60405161037291906124cb565b60405180910390f35b34801561038757600080fd5b506103a2600480360381019061039d9190612526565b611b5c565b005b3480156103b057600080fd5b506103cb60048036038101906103c691906128cf565b611b6e565b005b3480156103d957600080fd5b506103f460048036038101906103ef91906125b1565b612191565b005b34801561040257600080fd5b5061041d600480360381019061041891906125b1565b612214565b60405161042a91906124cb565b60405180910390f35b6000600254905090565b600260005403610482576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610479906129d6565b60405180910390fd5b60026000819055506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541161050f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161050690612a42565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166005600083815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105a790612aae565b60405180910390fd5b60006105bb33612278565b905080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600082825461060f9190612afd565b925050819055506000805b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805490508110156107ad5783600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010182815481106106bc576106bb612b31565b5b90600052602060002090600202016001015414801561078d5750600073ffffffffffffffffffffffffffffffffffffffff16600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101828154811061074257610741612b31565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561079a578091506107ad565b80806107a590612b60565b91505061061a565b506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101828154811061080457610803612b31565b5b906000526020600020906002020160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008154809291906108a690612ba8565b9190505550600260008154809291906108be90612ba8565b919050555060006005600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3033866040518463ffffffff1660e01b815260040161097393929190612bd1565b600060405180830381600087803b15801561098d57600080fd5b505af11580156109a1573d6000803e3d6000fd5b5050505042600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201819055505050600160008190555050565b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154610a4733612278565b610a519190612afd565b905060008111610a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8d90612c54565b60405180910390fd5b42600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201819055506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b6b573d6000803e3d6000fd5b5050565b610b77612336565b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610bbd573d6000803e3d6000fd5b50565b60606000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541115610ec9576000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015467ffffffffffffffff811115610c6b57610c6a61278c565b5b604051908082528060200260200182016040528015610ca457816020015b610c91612482565b815260200190600190039081610c895790505b5090506000805b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180549050811015610ebe57600073ffffffffffffffffffffffffffffffffffffffff16600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018281548110610d6457610d63612b31565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610eab57600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018181548110610e0557610e04612b31565b5b90600052602060002090600202016040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481525050838381518110610e9157610e90612b31565b5b60200260200101819052508180610ea790612b60565b9250505b8080610eb690612b60565b915050610cab565b508192505050610f21565b600067ffffffffffffffff811115610ee457610ee361278c565b5b604051908082528060200260200182016040528015610f1d57816020015b610f0a612482565b815260200190600190039081610f025790505b5090505b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b610f52612336565b610f5c60006123b4565b565b600260005403610fa3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9a906129d6565b60405180910390fd5b60026000819055506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015411611030576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102790612a42565b60405180910390fd5b60005b815181101561110a573373ffffffffffffffffffffffffffffffffffffffff166005600084848151811061106a57611069612b31565b5b6020026020010151815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ee90612cc0565b60405180910390fd5b808061110290612b60565b915050611033565b50600061111633612278565b905080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600082825461116a9190612afd565b9250508190555060005b825181101561156e576000805b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054905081101561132e578483815181106111e1576111e0612b31565b5b6020026020010151600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101828154811061123d5761123c612b31565b5b90600052602060002090600202016001015414801561130e5750600073ffffffffffffffffffffffffffffffffffffffff16600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010182815481106112c3576112c2612b31565b5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b1561131b5780915061132e565b808061132690612b60565b915050611181565b506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101828154811061138557611384612b31565b5b906000526020600020906002020160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600081548092919061142790612ba8565b91905055506002600081548092919061143f90612ba8565b919050555060006005600086858151811061145d5761145c612b31565b5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd303387868151811061150257611501612b31565b5b60200260200101516040518463ffffffff1660e01b815260040161152893929190612bd1565b600060405180830381600087803b15801561154257600080fd5b505af1158015611556573d6000803e3d6000fd5b5050505050808061156690612b60565b915050611174565b5042600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555050600160008190555050565b60025481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60046020528060005260406000206000915090508060000154908060020154908060030154905083565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260005403611694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168b906129d6565b60405180910390fd5b60026000819055506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154111561174f5760006116f233612278565b905080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008282546117469190612afd565b92505081905550505b3373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016117bf91906124cb565b602060405180830381865afa1580156117dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118009190612cf5565b73ffffffffffffffffffffffffffffffffffffffff1614611856576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184d90612aae565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b81526004016118b393929190612bd1565b600060405180830381600087803b1580156118cd57600080fd5b505af11580156118e1573d6000803e3d6000fd5b50505050600060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001838152509050600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000815480929190611a2690612b60565b919050555060026000815480929190611a3e90612b60565b9190505550336005600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555042600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555050600160008190555050565b6000610e10600354600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015462278d00611b419190612d22565b611b4b9190612d22565b611b559190612d93565b9050919050565b611b64612336565b8060038190555050565b600260005403611bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611baa906129d6565b60405180910390fd5b60026000819055506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541115611c6e576000611c1133612278565b905080600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000828254611c659190612afd565b92505081905550505b60005b8151811015611dae573373ffffffffffffffffffffffffffffffffffffffff167f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16636352211e848481518110611ce057611cdf612b31565b5b60200260200101516040518263ffffffff1660e01b8152600401611d0491906124cb565b602060405180830381865afa158015611d21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d459190612cf5565b73ffffffffffffffffffffffffffffffffffffffff1614611d9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9290612cc0565b60405180910390fd5b8080611da690612b60565b915050611c71565b50600115157f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e985e9c533306040518363ffffffff1660e01b8152600401611e0e929190612dc4565b602060405180830381865afa158015611e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e4f9190612e25565b151514611e91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8890612e9e565b60405180910390fd5b60005b815181101561213e577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330858581518110611eee57611eed612b31565b5b60200260200101516040518463ffffffff1660e01b8152600401611f1493929190612bd1565b600060405180830381600087803b158015611f2e57600080fd5b505af1158015611f42573d6000803e3d6000fd5b50505050600060405180604001604052803373ffffffffffffffffffffffffffffffffffffffff168152602001848481518110611f8257611f81612b31565b5b60200260200101518152509050600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010181908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008154809291906120a190612b60565b9190505550600260008154809291906120b990612b60565b919050555033600560008585815181106120d6576120d5612b31565b5b6020026020010151815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050808061213690612b60565b915050611e94565b5042600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020181905550600160008190555050565b612199612336565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603612208576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ff90612f30565b60405180910390fd5b612211816123b4565b50565b600080600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015461226384612278565b61226d9190612afd565b905080915050919050565b6000610e10600354600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154426123119190612f50565b61231b9190612d22565b6123259190612d22565b61232f9190612d93565b9050919050565b61233e61247a565b73ffffffffffffffffffffffffffffffffffffffff1661235c6115c8565b73ffffffffffffffffffffffffffffffffffffffff16146123b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123a990612fd0565b60405180910390fd5b565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b6000819050919050565b6124c5816124b2565b82525050565b60006020820190506124e060008301846124bc565b92915050565b6000604051905090565b600080fd5b600080fd5b612503816124b2565b811461250e57600080fd5b50565b600081359050612520816124fa565b92915050565b60006020828403121561253c5761253b6124f0565b5b600061254a84828501612511565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061257e82612553565b9050919050565b61258e81612573565b811461259957600080fd5b50565b6000813590506125ab81612585565b92915050565b6000602082840312156125c7576125c66124f0565b5b60006125d58482850161259c565b91505092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61261381612573565b82525050565b612622816124b2565b82525050565b60408201600082015161263e600085018261260a565b5060208201516126516020850182612619565b50505050565b60006126638383612628565b60408301905092915050565b6000602082019050919050565b6000612687826125de565b61269181856125e9565b935061269c836125fa565b8060005b838110156126cd5781516126b48882612657565b97506126bf8361266f565b9250506001810190506126a0565b5085935050505092915050565b600060208201905081810360008301526126f4818461267c565b905092915050565b6000819050919050565b600061272161271c61271784612553565b6126fc565b612553565b9050919050565b600061273382612706565b9050919050565b600061274582612728565b9050919050565b6127558161273a565b82525050565b6000602082019050612770600083018461274c565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6127c48261277b565b810181811067ffffffffffffffff821117156127e3576127e261278c565b5b80604052505050565b60006127f66124e6565b905061280282826127bb565b919050565b600067ffffffffffffffff8211156128225761282161278c565b5b602082029050602081019050919050565b600080fd5b600061284b61284684612807565b6127ec565b9050808382526020820190506020840283018581111561286e5761286d612833565b5b835b8181101561289757806128838882612511565b845260208401935050602081019050612870565b5050509392505050565b600082601f8301126128b6576128b5612776565b5b81356128c6848260208601612838565b91505092915050565b6000602082840312156128e5576128e46124f0565b5b600082013567ffffffffffffffff811115612903576129026124f5565b5b61290f848285016128a1565b91505092915050565b61292181612573565b82525050565b600060208201905061293c6000830184612918565b92915050565b600060608201905061295760008301866124bc565b61296460208301856124bc565b61297160408301846124bc565b949350505050565b600082825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006129c0601f83612979565b91506129cb8261298a565b602082019050919050565b600060208201905081810360008301526129ef816129b3565b9050919050565b7f596f752068617665206e6f20746f6b656e73207374616b656400000000000000600082015250565b6000612a2c601983612979565b9150612a37826129f6565b602082019050919050565b60006020820190508181036000830152612a5b81612a1f565b9050919050565b7f596f7520646f6e2774206f776e207468697320746f6b656e2100000000000000600082015250565b6000612a98601983612979565b9150612aa382612a62565b602082019050919050565b60006020820190508181036000830152612ac781612a8b565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b08826124b2565b9150612b13836124b2565b9250828201905080821115612b2b57612b2a612ace565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612b6b826124b2565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b9d57612b9c612ace565b5b600182019050919050565b6000612bb3826124b2565b915060008203612bc657612bc5612ace565b5b600182039050919050565b6000606082019050612be66000830186612918565b612bf36020830185612918565b612c0060408301846124bc565b949350505050565b7f596f752068617665206e6f207265776172647320746f20636c61696d00000000600082015250565b6000612c3e601c83612979565b9150612c4982612c08565b602082019050919050565b60006020820190508181036000830152612c6d81612c31565b9050919050565b7f596f7520646f6e2774206f776e20746865736520746f6b656e73210000000000600082015250565b6000612caa601b83612979565b9150612cb582612c74565b602082019050919050565b60006020820190508181036000830152612cd981612c9d565b9050919050565b600081519050612cef81612585565b92915050565b600060208284031215612d0b57612d0a6124f0565b5b6000612d1984828501612ce0565b91505092915050565b6000612d2d826124b2565b9150612d38836124b2565b9250828202612d46816124b2565b91508282048414831517612d5d57612d5c612ace565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612d9e826124b2565b9150612da9836124b2565b925082612db957612db8612d64565b5b828204905092915050565b6000604082019050612dd96000830185612918565b612de66020830184612918565b9392505050565b60008115159050919050565b612e0281612ded565b8114612e0d57600080fd5b50565b600081519050612e1f81612df9565b92915050565b600060208284031215612e3b57612e3a6124f0565b5b6000612e4984828501612e10565b91505092915050565b7f596f75206469646e277420617070726f76650000000000000000000000000000600082015250565b6000612e88601283612979565b9150612e9382612e52565b602082019050919050565b60006020820190508181036000830152612eb781612e7b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612f1a602683612979565b9150612f2582612ebe565b604082019050919050565b60006020820190508181036000830152612f4981612f0d565b9050919050565b6000612f5b826124b2565b9150612f66836124b2565b9250828203905081811115612f7e57612f7d612ace565b5b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612fba602083612979565b9150612fc582612f84565b602082019050919050565b60006020820190508181036000830152612fe981612fad565b905091905056fea2646970667358221220c55c3c24d32a4c140d9f2d88683a2a3064595787df0c886241d709d75247023964736f6c634300081100330000000000000000000000008ee54067dbb58d872424050234df6162aa27c06d
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008ee54067dbb58d872424050234df6162aa27c06d
-----Decoded View---------------
Arg [0] : _nftCollection (address): 0x8ee54067dbb58d872424050234df6162aa27c06d
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008ee54067dbb58d872424050234df6162aa27c06d
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.