More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 867 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18085996 | 368 days ago | IN | 0 ETH | 0.00140371 | ||||
Withdraw | 18085970 | 368 days ago | IN | 0 ETH | 0.00149301 | ||||
Unstake | 17874570 | 398 days ago | IN | 0 ETH | 0.005914 | ||||
Unstake | 17817017 | 406 days ago | IN | 0 ETH | 0.0020231 | ||||
Unstake | 17814145 | 406 days ago | IN | 0 ETH | 0.00821621 | ||||
Unstake | 17766202 | 413 days ago | IN | 0 ETH | 0.00380072 | ||||
Unstake | 17747084 | 416 days ago | IN | 0 ETH | 0.00201121 | ||||
Unstake | 17747076 | 416 days ago | IN | 0 ETH | 0.002199 | ||||
Unstake | 17746950 | 416 days ago | IN | 0 ETH | 0.0025763 | ||||
Unstake | 17746940 | 416 days ago | IN | 0 ETH | 0.00251728 | ||||
Unstake | 17725991 | 419 days ago | IN | 0 ETH | 0.00238479 | ||||
Unstake | 17723961 | 419 days ago | IN | 0 ETH | 0.00438014 | ||||
Unstake | 17721789 | 419 days ago | IN | 0 ETH | 0.00620364 | ||||
Unstake | 17705808 | 422 days ago | IN | 0 ETH | 0.00198237 | ||||
Unstake | 17563965 | 442 days ago | IN | 0 ETH | 0.00167748 | ||||
Unstake | 17466184 | 455 days ago | IN | 0 ETH | 0.00262125 | ||||
Unstake | 17442148 | 459 days ago | IN | 0 ETH | 0.00325732 | ||||
Unstake | 17389330 | 466 days ago | IN | 0 ETH | 0.0046208 | ||||
Unstake | 17094746 | 508 days ago | IN | 0 ETH | 0.01389238 | ||||
Unstake | 17044542 | 515 days ago | IN | 0 ETH | 0.00317962 | ||||
Unstake | 17021191 | 518 days ago | IN | 0 ETH | 0.00304784 | ||||
Unstake | 17016614 | 519 days ago | IN | 0 ETH | 0.00218113 | ||||
Unstake | 16953052 | 528 days ago | IN | 0 ETH | 0.00687102 | ||||
Unstake | 16942621 | 529 days ago | IN | 0 ETH | 0.00397552 | ||||
Unstake | 16932914 | 531 days ago | IN | 0 ETH | 0.00397005 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
CookShop
Compiler Version
v0.8.7+commit.e28d00a7
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.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./WhiteRabbitSteak.sol"; /** * This contract allows users with steak NFTs to stake and earn $WRAB on a bonding curve * where the longer they steak, the more rewards they get. */ contract CookShop is Ownable, ERC721Holder { // The Steak NFT contract which can be staked WhiteRabbitSteak public steakContract; // The $WRAB token contract which is used for rewards IERC20 public wrabTokenContract; // Mapping owner address to staked token count mapping(address => uint256) private _stakedCount; // Mapping from owner to list of staked token IDs mapping(address => mapping(uint256 => uint256)) private _stakedTokens; // Mapping from token ID to index of the staked tokens list mapping(uint256 => uint256) private _stakedTokensIndex; // Mapping token ID to when it was last staked, used to determine $WRAB rewards mapping(uint256 => uint256) public tokenIdToLastStakedTimestamp; // Timestamp for when staking rewards expire uint256 public stakingEndTimestamp; // Timestamp for when staking rewards start uint256 public stakingStartTimestamp; // Mapping from owner to token IDs which are staked mapping(address => mapping(uint256 => bool)) private _userAddressToStakedSteaksTokenIdMap; // Total allocation of $WRAB tokens that can be issued as rewards uint256 private _wrabTokenForRewardsAllocation; // Minimum reward per Steak NFT uint256 private _baseWrabMaxRewardPerSteak; // Merkle root to verify rarity multipliers for each Steak NFT bytes32 private _merkleRoot; constructor(address steakContract_, address wrabTokenContract_) { steakContract = WhiteRabbitSteak(steakContract_); wrabTokenContract = IERC20(wrabTokenContract_); } /** * @dev The number of Steak NFTs that have been staked by the given address * @param staker address representing the staker */ function numStakedSteaks(address staker) public view returns (uint256) { return _stakedCount[staker]; } /** * @dev Used to access each token that has been staked by the given address. * For example, we can get the `numStakedSteaks` for the given address, and then * iterate through each index (e.g. 0, 1, 2) to get the IDs of each staked token. * @param staker address representing the staker * @param index index of the token (e.g. first staked token will have index of 0) */ function tokenOfStakerByIndex(address staker, uint256 index) public view returns (uint256) { return _stakedTokens[staker][index]; } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param staker address representing the staker of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToStakedEnumeration(address staker, uint256 tokenId) private { uint256 length = _stakedCount[staker]; _stakedTokens[staker][length] = tokenId; _stakedTokensIndex[tokenId] = length; _userAddressToStakedSteaksTokenIdMap[staker][tokenId] = true; _stakedCount[staker] += 1; tokenIdToLastStakedTimestamp[tokenId] = block.timestamp; } /** * @dev Private function to remove a token from this contract's staked-tracking data structures. * This has O(1) time complexity, but alters the order of the _stakedTokens array. * See https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721Enumerable.sol#L134 * @param staker address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromStakedEnumeration(address staker, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _stakedCount[staker] - 1; uint256 tokenIndex = _stakedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _stakedTokens[staker][lastTokenIndex]; _stakedTokens[staker][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _stakedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _stakedTokensIndex[tokenId]; delete _stakedTokens[staker][lastTokenIndex]; _userAddressToStakedSteaksTokenIdMap[staker][tokenId] = false; _stakedCount[staker] -= 1; tokenIdToLastStakedTimestamp[tokenId] = 0; } /** * @dev Sets the merkle root used to verify rarity multipliers * @param merkleRoot_ the merkle root hash */ function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { _merkleRoot = merkleRoot_; } /** * @dev Sets the parameters used to determine $WRAB rewards for staking * @param wrabTokenForRewardsAllocation_ allocation of $WRAB tokens that can be issued as rewards * @param stakingStartTime_ when staking starts * @param stakingEndTime_ when staking ends */ function setSteakingRewardsParams( uint256 wrabTokenForRewardsAllocation_, uint256 stakingStartTime_, uint256 stakingEndTime_ ) external onlyOwner { require( stakingEndTime_ > stakingStartTime_, "staking end time must be before start time" ); // NB: we multiply by 10^18 to handle fractional values, since // Solidity doesn't support division with floating point numbers. // This means we need to handle the division by 10^18 on the client. _wrabTokenForRewardsAllocation = wrabTokenForRewardsAllocation_ * 10**18; _baseWrabMaxRewardPerSteak = _wrabTokenForRewardsAllocation / steakContract.totalSupply(); stakingStartTimestamp = stakingStartTime_; stakingEndTimestamp = stakingEndTime_; } /** * @dev Calculates the bonding curve. * Note that the rarity multiplier is formatted like `100` for `1x`, * `120` for 1.2x, etc. which is why we have to divide by 100 below. * @param rarityMultiplier the multiplier determined by rarity * Math: calculating the a in y=ax where y is the reward per second, x is time, a is the curve variable * the area under the curve then is the total reward */ function steakingRewardsBondingCurve(uint256 rarityMultiplier) public view returns (uint256) { uint256 maxTokenAvailable = (_baseWrabMaxRewardPerSteak * rarityMultiplier) / 100; uint256 _totalSteakingPeriodInSeconds = stakingEndTimestamp - stakingStartTimestamp; uint256 maxRewardPerSecond = (2 * maxTokenAvailable) / _totalSteakingPeriodInSeconds; return maxRewardPerSecond / _totalSteakingPeriodInSeconds; } /** * @dev Calculates the rewards for a given rarity after a given time staked. * This function can be used on to estimate future or hypothetical rewards. * This function is a pure math function that disregards valid start/end time * @param rarityMultiplier the multiplier determined by rarity * @param timeSteaked the amount of time staked in seconds */ function steakingRewardsForRarity( uint256 rarityMultiplier, uint256 timeSteaked ) public view returns (uint256) { uint256 currentRewardPerSecond = timeSteaked * steakingRewardsBondingCurve(rarityMultiplier); return (timeSteaked * currentRewardPerSecond) / 2; } /** * @dev Calculates the rewards for a tokenId with given rarity based on how long its been staked. * This function is used to calculate how much rewards user can claim * @param tokenId the tokenId * @param rarityMultiplier the rarity multiplier according to the steak */ function steakingRewardsForTokenId( uint256 tokenId, uint256 rarityMultiplier ) public view returns (uint256) { uint256 stakeStartTimeForToken = tokenIdToLastStakedTimestamp[tokenId]; require(stakeStartTimeForToken != 0, "steak has not been staked"); uint256 validStakedDuration = _min( block.timestamp, stakingEndTimestamp ) - stakeStartTimeForToken; return steakingRewardsForRarity(rarityMultiplier, validStakedDuration); } function _min(uint256 a, uint256 b) private pure returns (uint256) { return a <= b ? a : b; } /** * @dev Calculates the rewards for a tokenId with given rarity based on how long its been staked. * This function is used to calculate how much rewards user can claim * @param tokenId the tokenId * @param rarityMultiplier the rarity multiplier according to the steak */ function _merkleLeafForTokenIdAndRarityMultiplier( uint256 tokenId, uint256 rarityMultiplier ) private pure returns (bytes32) { return keccak256(abi.encodePacked(tokenId, rarityMultiplier)); } /** * @dev Stake steaks users have in their wallet * @param tokenIds array of the Steak tokenIds users have in their wallet * notes: staking allows users with steaks to earn $WRAB rewards over time * users can stake multiple steaks at once in their wallet * users can unstake steaks at any time */ function stake(uint256[] calldata tokenIds) public { require( block.timestamp >= stakingStartTimestamp, "staking not available" ); require(block.timestamp < stakingEndTimestamp, "staking ended"); for (uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require( steakContract.ownerOf(tokenId) == msg.sender, "can't stake steak you don't own" ); _addTokenToStakedEnumeration(msg.sender, tokenId); steakContract.safeTransferFrom( msg.sender, address(this), tokenId, "" ); } } /** * @dev Unstakes the given token IDs and claim $WRAB rewards. * Merkle proofs are used to validate rarityMultipliers and prevent users * from claiming more rewards than they are supposed to from the contract * directly by inputting a false rarity multiplier. */ function _unstake( uint256[] calldata tokenIds, uint256[] calldata rarityMultipliers, bytes32[][] calldata merkleProofs, bool revertIfNotEnoughWRAB ) public { require( _stakedCount[msg.sender] >= tokenIds.length, "invalid tokenIds length" ); uint256 rewards = 0; for (uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require( _userAddressToStakedSteaksTokenIdMap[msg.sender][tokenId], "no steak to unstake" ); uint256 rarityMultiplier = rarityMultipliers[i]; bytes32[] memory merkleProof = merkleProofs[i]; require( MerkleProof.verify( merkleProof, _merkleRoot, _merkleLeafForTokenIdAndRarityMultiplier( tokenId, rarityMultiplier ) ), "invalid rarity multiplier" ); steakContract.transferFrom(address(this), msg.sender, tokenId); rewards += steakingRewardsForTokenId(tokenId, rarityMultiplier); _removeTokenFromStakedEnumeration(msg.sender, tokenId); } if (revertIfNotEnoughWRAB) { require( wrabTokenContract.balanceOf(address(this)) >= rewards, "not enough tokens in contract, contact team" ); wrabTokenContract.transfer(msg.sender, rewards); } // else unstake even if there isn't enough wrab in the contract } /** * @dev Unstakes the given token IDs and claim $WRAB rewards. * Merkle proofs are used to validate rarityMultipliers and prevent users * from claiming more rewards than they are supposed to from the contract * directly by inputting a false rarity multiplier. * This function is used to unstake steaks and claim rewards */ function unstake( uint256[] calldata tokenIds, uint256[] calldata rarityMultipliers, bytes32[][] calldata merkleProofs ) public { _unstake(tokenIds, rarityMultipliers, merkleProofs, true); } /** * @dev Unstakes the given token IDs and claim $WRAB rewards. * Same as above functiuon but allows unstaking without rewards so steaks won't be stuck just in case we run out of WRAB * If there is enough WRAB, this will behave same as above function, user get steak back into their wallets with rewards * If there is not enough WRAB, user will still get steak back but no WRAB rewards, and won't be able to claim again. * DO NOT CALL UNLESS INSTRUCTED BY TEAM, YOU WILL LOSE YOUR ACCUMULATED REWARDS */ function unstakeEscapeHatch_DONOTCALLL( uint256[] calldata tokenIds, uint256[] calldata rarityMultipliers, bytes32[][] calldata merkleProofs ) public { _unstake(tokenIds, rarityMultipliers, merkleProofs, false); } /** * @dev Withraw excess tokens left in the contract */ function withdraw(address add, uint256 amount) external onlyOwner { wrabTokenContract.transfer(add, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "https://github.com/chiru-labs/ERC721A/blob/v3.3.0/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract WhiteRabbitSteak is ERC721A, Ownable { string private _baseTokenURI; mapping(uint256 => bool) private _processedBatchesForAirdrop; uint256 public immutable maxSupply; uint256 public constant BATCH_SIZE = 6; constructor(uint256 maxSupply_) ERC721A("WhiteRabbitSteak", "WRSTK") { maxSupply = maxSupply_; } /** * @dev Airdrops tokens to `receivers` in quantities of `quantities`, matching * address to quantity by index. We also support a `batchId` to help manage aidrops * in batches, and validate which batches have already been processed. * * Requirements: * * - The `receivers` and `quantities` arrays must match in length * - The current `batchId` should not have been processed already */ function airdrop( address[] calldata receivers, uint256[] calldata quantities, uint256 batchId ) external onlyOwner { require( receivers.length == quantities.length, "Mismatch of receivers/quantities" ); require( !_processedBatchesForAirdrop[batchId] && balanceOf(receivers[0]) == 0, "Batch already airdropped" ); for (uint256 i; i < receivers.length; i++) { _mintWrapper(receivers[i], quantities[i]); } _processedBatchesForAirdrop[batchId] = true; } // Used to mint directly to a single address (also useful for testing) function devMint(address to, uint256 quantity) external onlyOwner { _mintWrapper(to, quantity); } /** * @dev Mints `quantity` tokens in batches of `BATCH_SIZE` to the specified address * * Requirements: * * - The quantity does not exceed the max supply */ function _mintWrapper(address to, uint256 quantity) internal { require( totalSupply() + quantity <= maxSupply, "Quantity exceeds max supply" ); for (uint256 i; i < quantity / BATCH_SIZE; i++) { _mint(to, BATCH_SIZE); } // Mint leftover quantity if (quantity % BATCH_SIZE > 0) { _mint(to, quantity % BATCH_SIZE); } } /** * @dev Sets the base URI for the metadata. */ function setBaseURI(string memory _uri) public onlyOwner { _baseTokenURI = _uri; } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } string private _nameOverride; string private _symbolOverride; function name() public view override returns (string memory) { if (bytes(_nameOverride).length == 0) { return ERC721A.name(); } return _nameOverride; } function symbol() public view override returns (string memory) { if (bytes(_symbolOverride).length == 0) { return ERC721A.symbol(); } return _symbolOverride; } function setNameAndSymbol( string calldata _newName, string calldata _newSymbol ) external onlyOwner { _nameOverride = _newName; _symbolOverride = _newSymbol; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol) pragma solidity ^0.8.0; import "../IERC721Receiver.sol"; /** * @dev Implementation of the {IERC721Receiver} interface. * * Accepts all token transfers. * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}. */ contract ERC721Holder is IERC721Receiver { /** * @dev See {IERC721Receiver-onERC721Received}. * * Always returns `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address, address, uint256, bytes memory ) public virtual override returns (bytes4) { return this.onERC721Received.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 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 // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721A { using Address for address; using Strings for uint256; // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner) if(!isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract()) if(!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// 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.0 (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.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A is IERC721, IERC721Metadata { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// 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 v4.4.0 (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": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"steakContract_","type":"address"},{"internalType":"address","name":"wrabTokenContract_","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":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"rarityMultipliers","type":"uint256[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"},{"internalType":"bool","name":"revertIfNotEnoughWRAB","type":"bool"}],"name":"_unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"}],"name":"numStakedSteaks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","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":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"wrabTokenForRewardsAllocation_","type":"uint256"},{"internalType":"uint256","name":"stakingStartTime_","type":"uint256"},{"internalType":"uint256","name":"stakingEndTime_","type":"uint256"}],"name":"setSteakingRewardsParams","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingStartTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"steakContract","outputs":[{"internalType":"contract WhiteRabbitSteak","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rarityMultiplier","type":"uint256"}],"name":"steakingRewardsBondingCurve","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"rarityMultiplier","type":"uint256"},{"internalType":"uint256","name":"timeSteaked","type":"uint256"}],"name":"steakingRewardsForRarity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"rarityMultiplier","type":"uint256"}],"name":"steakingRewardsForTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToLastStakedTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfStakerByIndex","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":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"rarityMultipliers","type":"uint256[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"rarityMultipliers","type":"uint256[]"},{"internalType":"bytes32[][]","name":"merkleProofs","type":"bytes32[][]"}],"name":"unstakeEscapeHatch_DONOTCALLL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"add","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wrabTokenContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002d0538038062002d058339818101604052810190620000379190620001c4565b620000576200004b620000e160201b60201c565b620000e960201b60201c565b81600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506200025e565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050620001be8162000244565b92915050565b60008060408385031215620001de57620001dd6200023f565b5b6000620001ee85828601620001ad565b92505060206200020185828601620001ad565b9150509250929050565b600062000218826200021f565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600080fd5b6200024f816200020b565b81146200025b57600080fd5b50565b612a97806200026e6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c80638da5cb5b116100b8578063cfafd9661161007c578063cfafd96614610328578063d8dfe75514610344578063e88abb9114610374578063f232c765146103a4578063f2fde38b146103d4578063f3fef3a3146103f057610137565b80638da5cb5b14610282578063ab548c66146102a0578063b9f2d537146102be578063c4275074146102ee578063c6ccf5421461030a57610137565b80634d931337116100ff5780634d931337146101de5780635805c0311461020e578063715018a61461023e5780637402a85d146102485780637cb647591461026657610137565b80630fbf0a931461013c578063150b7a0214610158578063158c787f1461018857806337fc400f146101a65780633a2a0e3e146101c2575b600080fd5b61015660048036038101906101519190611b69565b61040c565b005b610172600480360381019061016d9190611aa6565b61068d565b60405161017f91906121b4565b60405180910390f35b6101906106a1565b60405161019d91906121cf565b60405180910390f35b6101c060048036038101906101bb9190611e27565b6106c7565b005b6101dc60048036038101906101d79190611bb6565b610865565b005b6101f860048036038101906101f39190611a4c565b61087d565b6040516102059190612365565b60405180910390f35b61022860048036038101906102239190611de7565b6108c6565b6040516102359190612365565b60405180910390f35b610246610900565b005b610250610988565b60405161025d9190612365565b60405180910390f35b610280600480360381019061027b9190611d60565b61098e565b005b61028a610a14565b60405161029791906120ef565b60405180910390f35b6102a8610a3d565b6040516102b591906121ea565b60405180910390f35b6102d860048036038101906102d39190611d8d565b610a63565b6040516102e59190612365565b60405180910390f35b61030860048036038101906103039190611c6a565b610ac8565b005b610312610f6a565b60405161031f9190612365565b60405180910390f35b610342600480360381019061033d9190611bb6565b610f70565b005b61035e60048036038101906103599190611b29565b610f88565b60405161036b9190612365565b60405180910390f35b61038e60048036038101906103899190611d8d565b610fe3565b60405161039b9190612365565b60405180910390f35b6103be60048036038101906103b99190611de7565b610ffb565b6040516103cb9190612365565b60405180910390f35b6103ee60048036038101906103e99190611a4c565b611087565b005b61040a60048036038101906104059190611b29565b61117f565b005b600854421015610451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044890612345565b60405180910390fd5b6007544210610495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048c90612205565b60405180910390fd5b60005b828290508110156106885760008383838181106104b8576104b7612731565b5b9050602002013590503373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016105339190612365565b60206040518083038186803b15801561054b57600080fd5b505afa15801561055f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105839190611a79565b73ffffffffffffffffffffffffffffffffffffffff16146105d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d090612265565b60405180910390fd5b6105e333826112af565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b88d4fde3330846040518463ffffffff1660e01b815260040161064293929190612141565b600060405180830381600087803b15801561065c57600080fd5b505af1158015610670573d6000803e3d6000fd5b5050505050808061068090612676565b915050610498565b505050565b600063150b7a0260e01b9050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106cf61143d565b73ffffffffffffffffffffffffffffffffffffffff166106ed610a14565b73ffffffffffffffffffffffffffffffffffffffff1614610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073a906122a5565b60405180910390fd5b818111610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c906122c5565b60405180910390fd5b670de0b6b3a76400008361079991906124e2565b600a81905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561080757600080fd5b505afa15801561081b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083f9190611dba565b600a5461084c91906124b1565b600b819055508160088190555080600781905550505050565b6108758686868686866000610ac8565b505050505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000806108d284610a63565b836108dd91906124e2565b9050600281846108ed91906124e2565b6108f791906124b1565b91505092915050565b61090861143d565b73ffffffffffffffffffffffffffffffffffffffff16610926610a14565b73ffffffffffffffffffffffffffffffffffffffff161461097c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610973906122a5565b60405180910390fd5b6109866000611445565b565b60085481565b61099661143d565b73ffffffffffffffffffffffffffffffffffffffff166109b4610a14565b73ffffffffffffffffffffffffffffffffffffffff1614610a0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a01906122a5565b60405180910390fd5b80600c8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080606483600b54610a7691906124e2565b610a8091906124b1565b90506000600854600754610a94919061253c565b9050600081836002610aa691906124e2565b610ab091906124b1565b90508181610abe91906124b1565b9350505050919050565b86869050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4490612305565b60405180910390fd5b6000805b88889050811015610dbb576000898983818110610b7157610b70612731565b5b905060200201359050600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082815260200190815260200160002060009054906101000a900460ff16610c17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0e906122e5565b60405180910390fd5b6000888884818110610c2c57610c2b612731565b5b9050602002013590506000878785818110610c4a57610c49612731565b5b9050602002810190610c5c9190612380565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509050610cb481600c54610caf8686611509565b61153c565b610cf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cea90612285565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3033866040518463ffffffff1660e01b8152600401610d529392919061210a565b600060405180830381600087803b158015610d6c57600080fd5b505af1158015610d80573d6000803e3d6000fd5b50505050610d8e8383610ffb565b85610d99919061245b565b9450610da53384611553565b5050508080610db390612676565b915050610b51565b508115610f605780600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e1e91906120ef565b60206040518083038186803b158015610e3657600080fd5b505afa158015610e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6e9190611dba565b1015610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690612225565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610f0c92919061218b565b602060405180830381600087803b158015610f2657600080fd5b505af1158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e9190611d33565b505b5050505050505050565b60075481565b610f808686868686866001610ac8565b505050505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60066020528060005260406000206000915090505481565b600080600660008581526020019081526020016000205490506000811415611058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104f90612325565b60405180910390fd5b600081611067426007546117d0565b611071919061253c565b905061107d84826108c6565b9250505092915050565b61108f61143d565b73ffffffffffffffffffffffffffffffffffffffff166110ad610a14565b73ffffffffffffffffffffffffffffffffffffffff1614611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa906122a5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116a90612245565b60405180910390fd5b61117c81611445565b50565b61118761143d565b73ffffffffffffffffffffffffffffffffffffffff166111a5610a14565b73ffffffffffffffffffffffffffffffffffffffff16146111fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f2906122a5565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161125892919061218b565b602060405180830381600087803b15801561127257600080fd5b505af1158015611286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112aa9190611d33565b505050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055508060056000848152602001908152602001600020819055506001600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611419919061245b565b92505081905550426006600084815260200190815260200160002081905550505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000828260405160200161151e9291906120c3565b60405160208183030381529060405280519060200120905092915050565b60008261154985846117ea565b1490509392505050565b60006001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a1919061253c565b9050600060056000848152602001908152602001600020549050818114611686576000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816005600083815260200190815260200160002081905550505b6005600084815260200190815260200160002060009055600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600090556000600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117aa919061253c565b925050819055506000600660008581526020019081526020016000208190555050505050565b6000818311156117e057816117e2565b825b905092915050565b60008082905060005b845181101561189257600085828151811061181157611810612731565b5b60200260200101519050808311611852578281604051602001611835929190612097565b60405160208183030381529060405280519060200120925061187e565b8083604051602001611865929190612097565b6040516020818303038152906040528051906020012092505b50808061188a90612676565b9150506117f3565b508091505092915050565b60006118b06118ab84612408565b6123e3565b9050828152602081018484840111156118cc576118cb6127ad565b5b6118d7848285612636565b509392505050565b6000813590506118ee81612a05565b92915050565b60008151905061190381612a05565b92915050565b60008083601f84011261191f5761191e612794565b5b8235905067ffffffffffffffff81111561193c5761193b61278f565b5b602083019150836020820283011115611958576119576127a3565b5b9250929050565b60008083601f84011261197557611974612794565b5b8235905067ffffffffffffffff8111156119925761199161278f565b5b6020830191508360208202830111156119ae576119ad6127a3565b5b9250929050565b6000813590506119c481612a1c565b92915050565b6000815190506119d981612a1c565b92915050565b6000813590506119ee81612a33565b92915050565b600082601f830112611a0957611a08612794565b5b8135611a1984826020860161189d565b91505092915050565b600081359050611a3181612a4a565b92915050565b600081519050611a4681612a4a565b92915050565b600060208284031215611a6257611a616127b7565b5b6000611a70848285016118df565b91505092915050565b600060208284031215611a8f57611a8e6127b7565b5b6000611a9d848285016118f4565b91505092915050565b60008060008060808587031215611ac057611abf6127b7565b5b6000611ace878288016118df565b9450506020611adf878288016118df565b9350506040611af087828801611a22565b925050606085013567ffffffffffffffff811115611b1157611b106127b2565b5b611b1d878288016119f4565b91505092959194509250565b60008060408385031215611b4057611b3f6127b7565b5b6000611b4e858286016118df565b9250506020611b5f85828601611a22565b9150509250929050565b60008060208385031215611b8057611b7f6127b7565b5b600083013567ffffffffffffffff811115611b9e57611b9d6127b2565b5b611baa8582860161195f565b92509250509250929050565b60008060008060008060608789031215611bd357611bd26127b7565b5b600087013567ffffffffffffffff811115611bf157611bf06127b2565b5b611bfd89828a0161195f565b9650965050602087013567ffffffffffffffff811115611c2057611c1f6127b2565b5b611c2c89828a0161195f565b9450945050604087013567ffffffffffffffff811115611c4f57611c4e6127b2565b5b611c5b89828a01611909565b92509250509295509295509295565b60008060008060008060006080888a031215611c8957611c886127b7565b5b600088013567ffffffffffffffff811115611ca757611ca66127b2565b5b611cb38a828b0161195f565b9750975050602088013567ffffffffffffffff811115611cd657611cd56127b2565b5b611ce28a828b0161195f565b9550955050604088013567ffffffffffffffff811115611d0557611d046127b2565b5b611d118a828b01611909565b93509350506060611d248a828b016119b5565b91505092959891949750929550565b600060208284031215611d4957611d486127b7565b5b6000611d57848285016119ca565b91505092915050565b600060208284031215611d7657611d756127b7565b5b6000611d84848285016119df565b91505092915050565b600060208284031215611da357611da26127b7565b5b6000611db184828501611a22565b91505092915050565b600060208284031215611dd057611dcf6127b7565b5b6000611dde84828501611a37565b91505092915050565b60008060408385031215611dfe57611dfd6127b7565b5b6000611e0c85828601611a22565b9250506020611e1d85828601611a22565b9150509250929050565b600080600060608486031215611e4057611e3f6127b7565b5b6000611e4e86828701611a22565b9350506020611e5f86828701611a22565b9250506040611e7086828701611a22565b9150509250925092565b611e8381612570565b82525050565b611e9a611e958261258e565b6126bf565b82525050565b611ea981612598565b82525050565b611eb8816125ee565b82525050565b611ec781612600565b82525050565b6000611eda600d8361244a565b9150611ee5826127cd565b602082019050919050565b6000611efd602b8361244a565b9150611f08826127f6565b604082019050919050565b6000611f2060268361244a565b9150611f2b82612845565b604082019050919050565b6000611f43601f8361244a565b9150611f4e82612894565b602082019050919050565b6000611f6660198361244a565b9150611f71826128bd565b602082019050919050565b6000611f8960208361244a565b9150611f94826128e6565b602082019050919050565b6000611fac602a8361244a565b9150611fb78261290f565b604082019050919050565b6000611fcf60138361244a565b9150611fda8261295e565b602082019050919050565b6000611ff2600083612439565b9150611ffd82612987565b600082019050919050565b600061201560178361244a565b91506120208261298a565b602082019050919050565b600061203860198361244a565b9150612043826129b3565b602082019050919050565b600061205b60158361244a565b9150612066826129dc565b602082019050919050565b61207a816125e4565b82525050565b61209161208c826125e4565b6126c9565b82525050565b60006120a38285611e89565b6020820191506120b38284611e89565b6020820191508190509392505050565b60006120cf8285612080565b6020820191506120df8284612080565b6020820191508190509392505050565b60006020820190506121046000830184611e7a565b92915050565b600060608201905061211f6000830186611e7a565b61212c6020830185611e7a565b6121396040830184612071565b949350505050565b60006080820190506121566000830186611e7a565b6121636020830185611e7a565b6121706040830184612071565b818103606083015261218181611fe5565b9050949350505050565b60006040820190506121a06000830185611e7a565b6121ad6020830184612071565b9392505050565b60006020820190506121c96000830184611ea0565b92915050565b60006020820190506121e46000830184611eaf565b92915050565b60006020820190506121ff6000830184611ebe565b92915050565b6000602082019050818103600083015261221e81611ecd565b9050919050565b6000602082019050818103600083015261223e81611ef0565b9050919050565b6000602082019050818103600083015261225e81611f13565b9050919050565b6000602082019050818103600083015261227e81611f36565b9050919050565b6000602082019050818103600083015261229e81611f59565b9050919050565b600060208201905081810360008301526122be81611f7c565b9050919050565b600060208201905081810360008301526122de81611f9f565b9050919050565b600060208201905081810360008301526122fe81611fc2565b9050919050565b6000602082019050818103600083015261231e81612008565b9050919050565b6000602082019050818103600083015261233e8161202b565b9050919050565b6000602082019050818103600083015261235e8161204e565b9050919050565b600060208201905061237a6000830184612071565b92915050565b6000808335600160200384360303811261239d5761239c61279e565b5b80840192508235915067ffffffffffffffff8211156123bf576123be612799565b5b6020830192506020820236038313156123db576123da6127a8565b5b509250929050565b60006123ed6123fe565b90506123f98282612645565b919050565b6000604051905090565b600067ffffffffffffffff82111561242357612422612760565b5b61242c826127bc565b9050602081019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612466826125e4565b9150612471836125e4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156124a6576124a56126d3565b5b828201905092915050565b60006124bc826125e4565b91506124c7836125e4565b9250826124d7576124d6612702565b5b828204905092915050565b60006124ed826125e4565b91506124f8836125e4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612531576125306126d3565b5b828202905092915050565b6000612547826125e4565b9150612552836125e4565b925082821015612565576125646126d3565b5b828203905092915050565b600061257b826125c4565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006125f982612612565b9050919050565b600061260b82612612565b9050919050565b600061261d82612624565b9050919050565b600061262f826125c4565b9050919050565b82818337600083830152505050565b61264e826127bc565b810181811067ffffffffffffffff8211171561266d5761266c612760565b5b80604052505050565b6000612681826125e4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156126b4576126b36126d3565b5b600182019050919050565b6000819050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f7374616b696e6720656e64656400000000000000000000000000000000000000600082015250565b7f6e6f7420656e6f75676820746f6b656e7320696e20636f6e74726163742c206360008201527f6f6e74616374207465616d000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f63616e2774207374616b6520737465616b20796f7520646f6e2774206f776e00600082015250565b7f696e76616c696420726172697479206d756c7469706c69657200000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f7374616b696e6720656e642074696d65206d757374206265206265666f72652060008201527f73746172742074696d6500000000000000000000000000000000000000000000602082015250565b7f6e6f20737465616b20746f20756e7374616b6500000000000000000000000000600082015250565b50565b7f696e76616c696420746f6b656e496473206c656e677468000000000000000000600082015250565b7f737465616b20686173206e6f74206265656e207374616b656400000000000000600082015250565b7f7374616b696e67206e6f7420617661696c61626c650000000000000000000000600082015250565b612a0e81612570565b8114612a1957600080fd5b50565b612a2581612582565b8114612a3057600080fd5b50565b612a3c8161258e565b8114612a4757600080fd5b50565b612a53816125e4565b8114612a5e57600080fd5b5056fea2646970667358221220468690de5d5f2091ea0c5065f1a984ea0da8f9fd714a84f5977491fee69e3b4f64736f6c634300080700330000000000000000000000002d965aa258dc7e1a3462073ada73f819d701018c00000000000000000000000045d74446748fb432f05e7a85bd974abb7af5c285
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c80638da5cb5b116100b8578063cfafd9661161007c578063cfafd96614610328578063d8dfe75514610344578063e88abb9114610374578063f232c765146103a4578063f2fde38b146103d4578063f3fef3a3146103f057610137565b80638da5cb5b14610282578063ab548c66146102a0578063b9f2d537146102be578063c4275074146102ee578063c6ccf5421461030a57610137565b80634d931337116100ff5780634d931337146101de5780635805c0311461020e578063715018a61461023e5780637402a85d146102485780637cb647591461026657610137565b80630fbf0a931461013c578063150b7a0214610158578063158c787f1461018857806337fc400f146101a65780633a2a0e3e146101c2575b600080fd5b61015660048036038101906101519190611b69565b61040c565b005b610172600480360381019061016d9190611aa6565b61068d565b60405161017f91906121b4565b60405180910390f35b6101906106a1565b60405161019d91906121cf565b60405180910390f35b6101c060048036038101906101bb9190611e27565b6106c7565b005b6101dc60048036038101906101d79190611bb6565b610865565b005b6101f860048036038101906101f39190611a4c565b61087d565b6040516102059190612365565b60405180910390f35b61022860048036038101906102239190611de7565b6108c6565b6040516102359190612365565b60405180910390f35b610246610900565b005b610250610988565b60405161025d9190612365565b60405180910390f35b610280600480360381019061027b9190611d60565b61098e565b005b61028a610a14565b60405161029791906120ef565b60405180910390f35b6102a8610a3d565b6040516102b591906121ea565b60405180910390f35b6102d860048036038101906102d39190611d8d565b610a63565b6040516102e59190612365565b60405180910390f35b61030860048036038101906103039190611c6a565b610ac8565b005b610312610f6a565b60405161031f9190612365565b60405180910390f35b610342600480360381019061033d9190611bb6565b610f70565b005b61035e60048036038101906103599190611b29565b610f88565b60405161036b9190612365565b60405180910390f35b61038e60048036038101906103899190611d8d565b610fe3565b60405161039b9190612365565b60405180910390f35b6103be60048036038101906103b99190611de7565b610ffb565b6040516103cb9190612365565b60405180910390f35b6103ee60048036038101906103e99190611a4c565b611087565b005b61040a60048036038101906104059190611b29565b61117f565b005b600854421015610451576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044890612345565b60405180910390fd5b6007544210610495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161048c90612205565b60405180910390fd5b60005b828290508110156106885760008383838181106104b8576104b7612731565b5b9050602002013590503373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e836040518263ffffffff1660e01b81526004016105339190612365565b60206040518083038186803b15801561054b57600080fd5b505afa15801561055f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105839190611a79565b73ffffffffffffffffffffffffffffffffffffffff16146105d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d090612265565b60405180910390fd5b6105e333826112af565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b88d4fde3330846040518463ffffffff1660e01b815260040161064293929190612141565b600060405180830381600087803b15801561065c57600080fd5b505af1158015610670573d6000803e3d6000fd5b5050505050808061068090612676565b915050610498565b505050565b600063150b7a0260e01b9050949350505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6106cf61143d565b73ffffffffffffffffffffffffffffffffffffffff166106ed610a14565b73ffffffffffffffffffffffffffffffffffffffff1614610743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073a906122a5565b60405180910390fd5b818111610785576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077c906122c5565b60405180910390fd5b670de0b6b3a76400008361079991906124e2565b600a81905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561080757600080fd5b505afa15801561081b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083f9190611dba565b600a5461084c91906124b1565b600b819055508160088190555080600781905550505050565b6108758686868686866000610ac8565b505050505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000806108d284610a63565b836108dd91906124e2565b9050600281846108ed91906124e2565b6108f791906124b1565b91505092915050565b61090861143d565b73ffffffffffffffffffffffffffffffffffffffff16610926610a14565b73ffffffffffffffffffffffffffffffffffffffff161461097c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610973906122a5565b60405180910390fd5b6109866000611445565b565b60085481565b61099661143d565b73ffffffffffffffffffffffffffffffffffffffff166109b4610a14565b73ffffffffffffffffffffffffffffffffffffffff1614610a0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a01906122a5565b60405180910390fd5b80600c8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080606483600b54610a7691906124e2565b610a8091906124b1565b90506000600854600754610a94919061253c565b9050600081836002610aa691906124e2565b610ab091906124b1565b90508181610abe91906124b1565b9350505050919050565b86869050600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610b4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4490612305565b60405180910390fd5b6000805b88889050811015610dbb576000898983818110610b7157610b70612731565b5b905060200201359050600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082815260200190815260200160002060009054906101000a900460ff16610c17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0e906122e5565b60405180910390fd5b6000888884818110610c2c57610c2b612731565b5b9050602002013590506000878785818110610c4a57610c49612731565b5b9050602002810190610c5c9190612380565b80806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509050610cb481600c54610caf8686611509565b61153c565b610cf3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cea90612285565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3033866040518463ffffffff1660e01b8152600401610d529392919061210a565b600060405180830381600087803b158015610d6c57600080fd5b505af1158015610d80573d6000803e3d6000fd5b50505050610d8e8383610ffb565b85610d99919061245b565b9450610da53384611553565b5050508080610db390612676565b915050610b51565b508115610f605780600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e1e91906120ef565b60206040518083038186803b158015610e3657600080fd5b505afa158015610e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6e9190611dba565b1015610eaf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea690612225565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401610f0c92919061218b565b602060405180830381600087803b158015610f2657600080fd5b505af1158015610f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f5e9190611d33565b505b5050505050505050565b60075481565b610f808686868686866001610ac8565b505050505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002054905092915050565b60066020528060005260406000206000915090505481565b600080600660008581526020019081526020016000205490506000811415611058576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104f90612325565b60405180910390fd5b600081611067426007546117d0565b611071919061253c565b905061107d84826108c6565b9250505092915050565b61108f61143d565b73ffffffffffffffffffffffffffffffffffffffff166110ad610a14565b73ffffffffffffffffffffffffffffffffffffffff1614611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa906122a5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611173576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116a90612245565b60405180910390fd5b61117c81611445565b50565b61118761143d565b73ffffffffffffffffffffffffffffffffffffffff166111a5610a14565b73ffffffffffffffffffffffffffffffffffffffff16146111fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f2906122a5565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161125892919061218b565b602060405180830381600087803b15801561127257600080fd5b505af1158015611286573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112aa9190611d33565b505050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020819055508060056000848152602001908152602001600020819055506001600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611419919061245b565b92505081905550426006600084815260200190815260200160002081905550505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000828260405160200161151e9291906120c3565b60405160208183030381529060405280519060200120905092915050565b60008261154985846117ea565b1490509392505050565b60006001600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115a1919061253c565b9050600060056000848152602001908152602001600020549050818114611686576000600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002054905080600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002081905550816005600083815260200190815260200160002081905550505b6005600084815260200190815260200160002060009055600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000838152602001908152602001600020600090556000600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600085815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117aa919061253c565b925050819055506000600660008581526020019081526020016000208190555050505050565b6000818311156117e057816117e2565b825b905092915050565b60008082905060005b845181101561189257600085828151811061181157611810612731565b5b60200260200101519050808311611852578281604051602001611835929190612097565b60405160208183030381529060405280519060200120925061187e565b8083604051602001611865929190612097565b6040516020818303038152906040528051906020012092505b50808061188a90612676565b9150506117f3565b508091505092915050565b60006118b06118ab84612408565b6123e3565b9050828152602081018484840111156118cc576118cb6127ad565b5b6118d7848285612636565b509392505050565b6000813590506118ee81612a05565b92915050565b60008151905061190381612a05565b92915050565b60008083601f84011261191f5761191e612794565b5b8235905067ffffffffffffffff81111561193c5761193b61278f565b5b602083019150836020820283011115611958576119576127a3565b5b9250929050565b60008083601f84011261197557611974612794565b5b8235905067ffffffffffffffff8111156119925761199161278f565b5b6020830191508360208202830111156119ae576119ad6127a3565b5b9250929050565b6000813590506119c481612a1c565b92915050565b6000815190506119d981612a1c565b92915050565b6000813590506119ee81612a33565b92915050565b600082601f830112611a0957611a08612794565b5b8135611a1984826020860161189d565b91505092915050565b600081359050611a3181612a4a565b92915050565b600081519050611a4681612a4a565b92915050565b600060208284031215611a6257611a616127b7565b5b6000611a70848285016118df565b91505092915050565b600060208284031215611a8f57611a8e6127b7565b5b6000611a9d848285016118f4565b91505092915050565b60008060008060808587031215611ac057611abf6127b7565b5b6000611ace878288016118df565b9450506020611adf878288016118df565b9350506040611af087828801611a22565b925050606085013567ffffffffffffffff811115611b1157611b106127b2565b5b611b1d878288016119f4565b91505092959194509250565b60008060408385031215611b4057611b3f6127b7565b5b6000611b4e858286016118df565b9250506020611b5f85828601611a22565b9150509250929050565b60008060208385031215611b8057611b7f6127b7565b5b600083013567ffffffffffffffff811115611b9e57611b9d6127b2565b5b611baa8582860161195f565b92509250509250929050565b60008060008060008060608789031215611bd357611bd26127b7565b5b600087013567ffffffffffffffff811115611bf157611bf06127b2565b5b611bfd89828a0161195f565b9650965050602087013567ffffffffffffffff811115611c2057611c1f6127b2565b5b611c2c89828a0161195f565b9450945050604087013567ffffffffffffffff811115611c4f57611c4e6127b2565b5b611c5b89828a01611909565b92509250509295509295509295565b60008060008060008060006080888a031215611c8957611c886127b7565b5b600088013567ffffffffffffffff811115611ca757611ca66127b2565b5b611cb38a828b0161195f565b9750975050602088013567ffffffffffffffff811115611cd657611cd56127b2565b5b611ce28a828b0161195f565b9550955050604088013567ffffffffffffffff811115611d0557611d046127b2565b5b611d118a828b01611909565b93509350506060611d248a828b016119b5565b91505092959891949750929550565b600060208284031215611d4957611d486127b7565b5b6000611d57848285016119ca565b91505092915050565b600060208284031215611d7657611d756127b7565b5b6000611d84848285016119df565b91505092915050565b600060208284031215611da357611da26127b7565b5b6000611db184828501611a22565b91505092915050565b600060208284031215611dd057611dcf6127b7565b5b6000611dde84828501611a37565b91505092915050565b60008060408385031215611dfe57611dfd6127b7565b5b6000611e0c85828601611a22565b9250506020611e1d85828601611a22565b9150509250929050565b600080600060608486031215611e4057611e3f6127b7565b5b6000611e4e86828701611a22565b9350506020611e5f86828701611a22565b9250506040611e7086828701611a22565b9150509250925092565b611e8381612570565b82525050565b611e9a611e958261258e565b6126bf565b82525050565b611ea981612598565b82525050565b611eb8816125ee565b82525050565b611ec781612600565b82525050565b6000611eda600d8361244a565b9150611ee5826127cd565b602082019050919050565b6000611efd602b8361244a565b9150611f08826127f6565b604082019050919050565b6000611f2060268361244a565b9150611f2b82612845565b604082019050919050565b6000611f43601f8361244a565b9150611f4e82612894565b602082019050919050565b6000611f6660198361244a565b9150611f71826128bd565b602082019050919050565b6000611f8960208361244a565b9150611f94826128e6565b602082019050919050565b6000611fac602a8361244a565b9150611fb78261290f565b604082019050919050565b6000611fcf60138361244a565b9150611fda8261295e565b602082019050919050565b6000611ff2600083612439565b9150611ffd82612987565b600082019050919050565b600061201560178361244a565b91506120208261298a565b602082019050919050565b600061203860198361244a565b9150612043826129b3565b602082019050919050565b600061205b60158361244a565b9150612066826129dc565b602082019050919050565b61207a816125e4565b82525050565b61209161208c826125e4565b6126c9565b82525050565b60006120a38285611e89565b6020820191506120b38284611e89565b6020820191508190509392505050565b60006120cf8285612080565b6020820191506120df8284612080565b6020820191508190509392505050565b60006020820190506121046000830184611e7a565b92915050565b600060608201905061211f6000830186611e7a565b61212c6020830185611e7a565b6121396040830184612071565b949350505050565b60006080820190506121566000830186611e7a565b6121636020830185611e7a565b6121706040830184612071565b818103606083015261218181611fe5565b9050949350505050565b60006040820190506121a06000830185611e7a565b6121ad6020830184612071565b9392505050565b60006020820190506121c96000830184611ea0565b92915050565b60006020820190506121e46000830184611eaf565b92915050565b60006020820190506121ff6000830184611ebe565b92915050565b6000602082019050818103600083015261221e81611ecd565b9050919050565b6000602082019050818103600083015261223e81611ef0565b9050919050565b6000602082019050818103600083015261225e81611f13565b9050919050565b6000602082019050818103600083015261227e81611f36565b9050919050565b6000602082019050818103600083015261229e81611f59565b9050919050565b600060208201905081810360008301526122be81611f7c565b9050919050565b600060208201905081810360008301526122de81611f9f565b9050919050565b600060208201905081810360008301526122fe81611fc2565b9050919050565b6000602082019050818103600083015261231e81612008565b9050919050565b6000602082019050818103600083015261233e8161202b565b9050919050565b6000602082019050818103600083015261235e8161204e565b9050919050565b600060208201905061237a6000830184612071565b92915050565b6000808335600160200384360303811261239d5761239c61279e565b5b80840192508235915067ffffffffffffffff8211156123bf576123be612799565b5b6020830192506020820236038313156123db576123da6127a8565b5b509250929050565b60006123ed6123fe565b90506123f98282612645565b919050565b6000604051905090565b600067ffffffffffffffff82111561242357612422612760565b5b61242c826127bc565b9050602081019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612466826125e4565b9150612471836125e4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156124a6576124a56126d3565b5b828201905092915050565b60006124bc826125e4565b91506124c7836125e4565b9250826124d7576124d6612702565b5b828204905092915050565b60006124ed826125e4565b91506124f8836125e4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612531576125306126d3565b5b828202905092915050565b6000612547826125e4565b9150612552836125e4565b925082821015612565576125646126d3565b5b828203905092915050565b600061257b826125c4565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006125f982612612565b9050919050565b600061260b82612612565b9050919050565b600061261d82612624565b9050919050565b600061262f826125c4565b9050919050565b82818337600083830152505050565b61264e826127bc565b810181811067ffffffffffffffff8211171561266d5761266c612760565b5b80604052505050565b6000612681826125e4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156126b4576126b36126d3565b5b600182019050919050565b6000819050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f7374616b696e6720656e64656400000000000000000000000000000000000000600082015250565b7f6e6f7420656e6f75676820746f6b656e7320696e20636f6e74726163742c206360008201527f6f6e74616374207465616d000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f63616e2774207374616b6520737465616b20796f7520646f6e2774206f776e00600082015250565b7f696e76616c696420726172697479206d756c7469706c69657200000000000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f7374616b696e6720656e642074696d65206d757374206265206265666f72652060008201527f73746172742074696d6500000000000000000000000000000000000000000000602082015250565b7f6e6f20737465616b20746f20756e7374616b6500000000000000000000000000600082015250565b50565b7f696e76616c696420746f6b656e496473206c656e677468000000000000000000600082015250565b7f737465616b20686173206e6f74206265656e207374616b656400000000000000600082015250565b7f7374616b696e67206e6f7420617661696c61626c650000000000000000000000600082015250565b612a0e81612570565b8114612a1957600080fd5b50565b612a2581612582565b8114612a3057600080fd5b50565b612a3c8161258e565b8114612a4757600080fd5b50565b612a53816125e4565b8114612a5e57600080fd5b5056fea2646970667358221220468690de5d5f2091ea0c5065f1a984ea0da8f9fd714a84f5977491fee69e3b4f64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002d965aa258dc7e1a3462073ada73f819d701018c00000000000000000000000045d74446748fb432f05e7a85bd974abb7af5c285
-----Decoded View---------------
Arg [0] : steakContract_ (address): 0x2d965aa258Dc7e1A3462073AdA73F819d701018c
Arg [1] : wrabTokenContract_ (address): 0x45D74446748fB432F05E7a85bD974aBB7af5C285
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000002d965aa258dc7e1a3462073ada73f819d701018c
Arg [1] : 00000000000000000000000045d74446748fb432f05e7a85bd974abb7af5c285
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.