Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 12 from a total of 12 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Burn From | 15372645 | 835 days ago | IN | 0 ETH | 0.00043505 | ||||
Airdrop | 15372633 | 835 days ago | IN | 0 ETH | 0.00062958 | ||||
Add Controller | 15372622 | 835 days ago | IN | 0 ETH | 0.00059276 | ||||
Transfer | 15353051 | 839 days ago | IN | 0 ETH | 0.00055096 | ||||
Transfer Ownersh... | 15346062 | 840 days ago | IN | 0 ETH | 0.00029134 | ||||
Transfer | 15268663 | 852 days ago | IN | 0 ETH | 0.00060204 | ||||
Airdrop | 15263638 | 853 days ago | IN | 0 ETH | 0.00083587 | ||||
Create Vault | 15263588 | 853 days ago | IN | 0 ETH | 0.00184117 | ||||
Add Controller | 15263585 | 853 days ago | IN | 0 ETH | 0.00066679 | ||||
Transfer Ownersh... | 15257887 | 853 days ago | IN | 0 ETH | 0.00072577 | ||||
Add Controller | 15257852 | 854 days ago | IN | 0 ETH | 0.00116904 | ||||
Create Vault | 15257607 | 854 days ago | IN | 0 ETH | 0.01237841 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BonesRewards
Compiler Version
v0.8.15+commit.e14f2714
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.9 <0.9.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol'; import 'erc721a/contracts/extensions/ERC721AQueryable.sol'; contract BonesRewards is ERC20, ERC20Burnable, Ownable { struct Vault { ERC721AQueryable nft; string name; uint allocation; uint specialAllocation; uint[] specialTokens; } mapping(address => bool) public controllers; mapping(address => Vault) public vault; mapping(address => mapping(uint => bool)) public claimedTokens; constructor( string memory _tokenName, string memory _tokenSymbol ) ERC20(_tokenName, _tokenSymbol) {} function mint(address _to, uint _amount) external { require(controllers[_msgSender()], 'Not authorized'); _mint(_to, _amount); } function burnFrom(address _account, uint _amount) public override { if (controllers[_msgSender()]) { _burn(_account, _amount); } else { super.burnFrom(_account, _amount); } } function addController(address _newController) external onlyOwner { controllers[_newController] = true; } function removeController(address _controller) external onlyOwner { controllers[_controller] = false; } function airdrop(address _address, uint _amount) external onlyOwner { uint amount = _amount * (10 ** 18); _mint(_address, amount); } function createVault(ERC721AQueryable _nft, string memory _name, uint _allocation, uint _specialAllocation, uint[] calldata _specialTokens) public onlyOwner { Vault memory newVault = Vault( _nft, _name, _allocation, _specialAllocation, _specialTokens ); vault[address(_nft)] = newVault; } function setClaimed(ERC721AQueryable _nft, uint[] calldata _tokenIds, bool _state) public onlyOwner { for (uint i = 0; i < _tokenIds.length; i++) { uint tokenId = _tokenIds[i]; claimedTokens[address(_nft)][tokenId] = _state; } } function initialClaim(ERC721AQueryable _nft) external { Vault memory vaultInfo = vault[address(_nft)]; uint[] memory ownerTokens = vaultInfo.nft.tokensOfOwner(_msgSender()); require(ownerTokens.length > 0, "You do now own any tokens"); uint amount; for (uint i = 0; i < ownerTokens.length; i++) { uint tokenId = ownerTokens[i]; for (uint j = 0; j < vaultInfo.specialTokens.length; j++) { if (tokenId == vaultInfo.specialTokens[j] && !claimedTokens[address(_nft)][tokenId]) { amount += vaultInfo.specialAllocation; claimedTokens[address(_nft)][tokenId] = true; } else if (!claimedTokens[address(_nft)][tokenId]) { amount += vaultInfo.allocation; claimedTokens[address(_nft)][tokenId] = true; } } } if (amount > 0) { _mint(_msgSender(), amount * (10 ** 18)); } } /*__ __ __ /\ \ /\ \__/\ \ __ \_\ \ __ \ \ ,_\ \ \____ ___ /\_\ /'_` \ /'__`\ \ \ \/\ \ '__`\ / __`\/\ \ /\ \L\ \/\ \L\.\_\ \ \_\ \ \L\ \/\ \L\ \ \ \ \ \___,_\ \__/.\_\\ \__\\ \_,__/\ \____/\ \_\ \/__,_ /\/__/\/_/ \/__/ \/___/ \/___/ \/_/ */ }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _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 {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary 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 virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ 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, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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 {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @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 for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, 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. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @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 { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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 _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * 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(); /** * 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(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` 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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "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":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_newController","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ERC721AQueryable","name":"_nft","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_allocation","type":"uint256"},{"internalType":"uint256","name":"_specialAllocation","type":"uint256"},{"internalType":"uint256[]","name":"_specialTokens","type":"uint256[]"}],"name":"createVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC721AQueryable","name":"_nft","type":"address"}],"name":"initialClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"removeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ERC721AQueryable","name":"_nft","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"bool","name":"_state","type":"bool"}],"name":"setClaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"vault","outputs":[{"internalType":"contract ERC721AQueryable","name":"nft","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"allocation","type":"uint256"},{"internalType":"uint256","name":"specialAllocation","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200385f3803806200385f8339818101604052810190620000379190620002f2565b818181600390816200004a9190620005c2565b5080600490816200005c9190620005c2565b5050506200007f620000736200008760201b60201c565b6200008f60201b60201c565b5050620006a9565b600033905090565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620001be8262000173565b810181811067ffffffffffffffff82111715620001e057620001df62000184565b5b80604052505050565b6000620001f562000155565b9050620002038282620001b3565b919050565b600067ffffffffffffffff82111562000226576200022562000184565b5b620002318262000173565b9050602081019050919050565b60005b838110156200025e57808201518184015260208101905062000241565b838111156200026e576000848401525b50505050565b60006200028b620002858462000208565b620001e9565b905082815260208101848484011115620002aa57620002a96200016e565b5b620002b78482856200023e565b509392505050565b600082601f830112620002d757620002d662000169565b5b8151620002e984826020860162000274565b91505092915050565b600080604083850312156200030c576200030b6200015f565b5b600083015167ffffffffffffffff8111156200032d576200032c62000164565b5b6200033b85828601620002bf565b925050602083015167ffffffffffffffff8111156200035f576200035e62000164565b5b6200036d85828601620002bf565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620003ca57607f821691505b602082108103620003e057620003df62000382565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200044a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200040b565b6200045686836200040b565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620004a36200049d62000497846200046e565b62000478565b6200046e565b9050919050565b6000819050919050565b620004bf8362000482565b620004d7620004ce82620004aa565b84845462000418565b825550505050565b600090565b620004ee620004df565b620004fb818484620004b4565b505050565b5b81811015620005235762000517600082620004e4565b60018101905062000501565b5050565b601f82111562000572576200053c81620003e6565b6200054784620003fb565b8101602085101562000557578190505b6200056f6200056685620003fb565b83018262000500565b50505b505050565b600082821c905092915050565b6000620005976000198460080262000577565b1980831691505092915050565b6000620005b2838362000584565b9150826002028217905092915050565b620005cd8262000377565b67ffffffffffffffff811115620005e957620005e862000184565b5b620005f58254620003b1565b6200060282828562000527565b600060209050601f8311600181146200063a576000841562000625578287015190505b620006318582620005a4565b865550620006a1565b601f1984166200064a86620003e6565b60005b8281101562000674578489015182556001820191506020850194506020810190506200064d565b8683101562000694578489015162000690601f89168262000584565b8355505b6001600288020188555050505b505050505050565b6131a680620006b96000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638ba4cc3c116100de578063cabafbd211610097578063dd62ed3e11610071578063dd62ed3e14610493578063f2fde38b146104c3578063f6a74ed7146104df578063f815c03d146104fb5761018e565b8063cabafbd214610417578063d199168d14610433578063da8c229e146104635761018e565b80638ba4cc3c146103435780638da5cb5b1461035f57806395d89b411461037d578063a457c2d71461039b578063a7fc7a07146103cb578063a9059cbb146103e75761018e565b80633ddc58281161014b5780634968768f116101255780634968768f146102d157806370a08231146102ed578063715018a61461031d57806379cc6790146103275761018e565b80633ddc58281461027d57806340c10f191461029957806342966c68146102b55761018e565b806306fdde0314610193578063095ea7b3146101b157806318160ddd146101e157806323b872dd146101ff578063313ce5671461022f578063395093511461024d575b600080fd5b61019b61052e565b6040516101a89190611dfa565b60405180910390f35b6101cb60048036038101906101c69190611ec4565b6105c0565b6040516101d89190611f1f565b60405180910390f35b6101e96105e3565b6040516101f69190611f49565b60405180910390f35b61021960048036038101906102149190611f64565b6105ed565b6040516102269190611f1f565b60405180910390f35b61023761061c565b6040516102449190611fd3565b60405180910390f35b61026760048036038101906102629190611ec4565b610625565b6040516102749190611f1f565b60405180910390f35b610297600480360381019061029291906121c1565b61065c565b005b6102b360048036038101906102ae9190611ec4565b6107c0565b005b6102cf60048036038101906102ca9190612277565b610861565b005b6102eb60048036038101906102e691906122a4565b610875565b005b610307600480360381019061030291906122d1565b610d72565b6040516103149190611f49565b60405180910390f35b610325610dba565b005b610341600480360381019061033c9190611ec4565b610dce565b005b61035d60048036038101906103589190611ec4565b610e45565b005b610367610e74565b604051610374919061230d565b60405180910390f35b610385610e9e565b6040516103929190611dfa565b60405180910390f35b6103b560048036038101906103b09190611ec4565b610f30565b6040516103c29190611f1f565b60405180910390f35b6103e560048036038101906103e091906122d1565b610fa7565b005b61040160048036038101906103fc9190611ec4565b61100a565b60405161040e9190611f1f565b60405180910390f35b610431600480360381019061042c9190612354565b61102d565b005b61044d60048036038101906104489190611ec4565b6110e4565b60405161045a9190611f1f565b60405180910390f35b61047d600480360381019061047891906122d1565b611113565b60405161048a9190611f1f565b60405180910390f35b6104ad60048036038101906104a891906123c8565b611133565b6040516104ba9190611f49565b60405180910390f35b6104dd60048036038101906104d891906122d1565b6111ba565b005b6104f960048036038101906104f491906122d1565b61123d565b005b610515600480360381019061051091906122d1565b6112a0565b6040516105259493929190612467565b60405180910390f35b60606003805461053d906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054610569906124e2565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b5050505050905090565b6000806105cb611378565b90506105d8818585611380565b600191505092915050565b6000600254905090565b6000806105f8611378565b9050610605858285611549565b6106108585856115d5565b60019150509392505050565b60006012905090565b600080610630611378565b90506106518185856106428589611133565b61064c9190612542565b611380565b600191505092915050565b610664611854565b60006040518060a001604052808873ffffffffffffffffffffffffffffffffffffffff168152602001878152602001868152602001858152602001848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050815250905080600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610782919061273a565b50604082015181600201556060820151816003015560808201518160040190805190602001906107b3929190611cf7565b5090505050505050505050565b600660006107cc611378565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610853576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084a90612858565b60405180910390fd5b61085d82826118d2565b5050565b61087261086c611378565b82611a31565b50565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054610927906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054610953906124e2565b80156109a05780601f10610975576101008083540402835291602001916109a0565b820191906000526020600020905b81548152906001019060200180831161098357829003601f168201915b50505050508152602001600282015481526020016003820154815260200160048201805480602002602001604051908101604052809291908181526020018280548015610a0c57602002820191906000526020600020905b8154815260200190600101908083116109f8575b50505050508152505090506000816000015173ffffffffffffffffffffffffffffffffffffffff16638462151c610a41611378565b6040518263ffffffff1660e01b8152600401610a5d919061230d565b600060405180830381865afa158015610a7a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610aa39190612950565b90506000815111610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae0906129e5565b60405180910390fd5b600080600090505b8251811015610d3d576000838281518110610b0f57610b0e612a05565b5b6020026020010151905060005b856080015151811015610d285785608001518181518110610b4057610b3f612a05565b5b602002602001015182148015610bb15750600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff16155b15610c3657856060015184610bc69190612542565b93506001600860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff021916908315150217905550610d15565b600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff16610d1457856040015184610ca89190612542565b93506001600860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b8080610d2090612a34565b915050610b1c565b50508080610d3590612a34565b915050610af1565b506000811115610d6c57610d6b610d52611378565b670de0b6b3a764000083610d669190612a7c565b6118d2565b5b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610dc2611854565b610dcc6000611c07565b565b60066000610dda611378565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610e3657610e318282611a31565b610e41565b610e408282611ccd565b5b5050565b610e4d611854565b6000670de0b6b3a764000082610e639190612a7c565b9050610e6f83826118d2565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054610ead906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed9906124e2565b8015610f265780601f10610efb57610100808354040283529160200191610f26565b820191906000526020600020905b815481529060010190602001808311610f0957829003601f168201915b5050505050905090565b600080610f3b611378565b90506000610f498286611133565b905083811015610f8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8590612b48565b60405180910390fd5b610f9b8286868403611380565b60019250505092915050565b610faf611854565b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080611015611378565b90506110228185856115d5565b600191505092915050565b611035611854565b60005b838390508110156110dd57600084848381811061105857611057612a05565b5b90506020020135905082600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff0219169083151502179055505080806110d590612a34565b915050611038565b5050505050565b60086020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60066020528060005260406000206000915054906101000a900460ff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6111c2611854565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611231576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122890612bda565b60405180910390fd5b61123a81611c07565b50565b611245611854565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60076020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010180546112e9906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054611315906124e2565b80156113625780601f1061133757610100808354040283529160200191611362565b820191906000526020600020905b81548152906001019060200180831161134557829003601f168201915b5050505050908060020154908060030154905084565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036113ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e690612c6c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361145e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145590612cfe565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161153c9190611f49565b60405180910390a3505050565b60006115558484611133565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146115cf57818110156115c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b890612d6a565b60405180910390fd5b6115ce8484848403611380565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163b90612dfc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116aa90612e8e565b60405180910390fd5b6116be838383611ced565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611744576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173b90612f20565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117d79190612542565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161183b9190611f49565b60405180910390a361184e848484611cf2565b50505050565b61185c611378565b73ffffffffffffffffffffffffffffffffffffffff1661187a610e74565b73ffffffffffffffffffffffffffffffffffffffff16146118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c790612f8c565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193890612ff8565b60405180910390fd5b61194d60008383611ced565b806002600082825461195f9190612542565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119b49190612542565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611a199190611f49565b60405180910390a3611a2d60008383611cf2565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611aa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a979061308a565b60405180910390fd5b611aac82600083611ced565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b299061311c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254611b89919061313c565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611bee9190611f49565b60405180910390a3611c0283600084611cf2565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611cdf82611cd9611378565b83611549565b611ce98282611a31565b5050565b505050565b505050565b828054828255906000526020600020908101928215611d33579160200282015b82811115611d32578251825591602001919060010190611d17565b5b509050611d409190611d44565b5090565b5b80821115611d5d576000816000905550600101611d45565b5090565b600081519050919050565b600082825260208201905092915050565b60005b83811015611d9b578082015181840152602081019050611d80565b83811115611daa576000848401525b50505050565b6000601f19601f8301169050919050565b6000611dcc82611d61565b611dd68185611d6c565b9350611de6818560208601611d7d565b611def81611db0565b840191505092915050565b60006020820190508181036000830152611e148184611dc1565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e5b82611e30565b9050919050565b611e6b81611e50565b8114611e7657600080fd5b50565b600081359050611e8881611e62565b92915050565b6000819050919050565b611ea181611e8e565b8114611eac57600080fd5b50565b600081359050611ebe81611e98565b92915050565b60008060408385031215611edb57611eda611e26565b5b6000611ee985828601611e79565b9250506020611efa85828601611eaf565b9150509250929050565b60008115159050919050565b611f1981611f04565b82525050565b6000602082019050611f346000830184611f10565b92915050565b611f4381611e8e565b82525050565b6000602082019050611f5e6000830184611f3a565b92915050565b600080600060608486031215611f7d57611f7c611e26565b5b6000611f8b86828701611e79565b9350506020611f9c86828701611e79565b9250506040611fad86828701611eaf565b9150509250925092565b600060ff82169050919050565b611fcd81611fb7565b82525050565b6000602082019050611fe86000830184611fc4565b92915050565b6000611ff982611e50565b9050919050565b61200981611fee565b811461201457600080fd5b50565b60008135905061202681612000565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61206e82611db0565b810181811067ffffffffffffffff8211171561208d5761208c612036565b5b80604052505050565b60006120a0611e1c565b90506120ac8282612065565b919050565b600067ffffffffffffffff8211156120cc576120cb612036565b5b6120d582611db0565b9050602081019050919050565b82818337600083830152505050565b60006121046120ff846120b1565b612096565b9050828152602081018484840111156121205761211f612031565b5b61212b8482856120e2565b509392505050565b600082601f8301126121485761214761202c565b5b81356121588482602086016120f1565b91505092915050565b600080fd5b600080fd5b60008083601f8401126121815761218061202c565b5b8235905067ffffffffffffffff81111561219e5761219d612161565b5b6020830191508360208202830111156121ba576121b9612166565b5b9250929050565b60008060008060008060a087890312156121de576121dd611e26565b5b60006121ec89828a01612017565b965050602087013567ffffffffffffffff81111561220d5761220c611e2b565b5b61221989828a01612133565b955050604061222a89828a01611eaf565b945050606061223b89828a01611eaf565b935050608087013567ffffffffffffffff81111561225c5761225b611e2b565b5b61226889828a0161216b565b92509250509295509295509295565b60006020828403121561228d5761228c611e26565b5b600061229b84828501611eaf565b91505092915050565b6000602082840312156122ba576122b9611e26565b5b60006122c884828501612017565b91505092915050565b6000602082840312156122e7576122e6611e26565b5b60006122f584828501611e79565b91505092915050565b61230781611e50565b82525050565b600060208201905061232260008301846122fe565b92915050565b61233181611f04565b811461233c57600080fd5b50565b60008135905061234e81612328565b92915050565b6000806000806060858703121561236e5761236d611e26565b5b600061237c87828801612017565b945050602085013567ffffffffffffffff81111561239d5761239c611e2b565b5b6123a98782880161216b565b935093505060406123bc8782880161233f565b91505092959194509250565b600080604083850312156123df576123de611e26565b5b60006123ed85828601611e79565b92505060206123fe85828601611e79565b9150509250929050565b6000819050919050565b600061242d61242861242384611e30565b612408565b611e30565b9050919050565b600061243f82612412565b9050919050565b600061245182612434565b9050919050565b61246181612446565b82525050565b600060808201905061247c6000830187612458565b818103602083015261248e8186611dc1565b905061249d6040830185611f3a565b6124aa6060830184611f3a565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806124fa57607f821691505b60208210810361250d5761250c6124b3565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061254d82611e8e565b915061255883611e8e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561258d5761258c612513565b5b828201905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026125fa7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826125bd565b61260486836125bd565b95508019841693508086168417925050509392505050565b600061263761263261262d84611e8e565b612408565b611e8e565b9050919050565b6000819050919050565b6126518361261c565b61266561265d8261263e565b8484546125ca565b825550505050565b600090565b61267a61266d565b612685818484612648565b505050565b5b818110156126a95761269e600082612672565b60018101905061268b565b5050565b601f8211156126ee576126bf81612598565b6126c8846125ad565b810160208510156126d7578190505b6126eb6126e3856125ad565b83018261268a565b50505b505050565b600082821c905092915050565b6000612711600019846008026126f3565b1980831691505092915050565b600061272a8383612700565b9150826002028217905092915050565b61274382611d61565b67ffffffffffffffff81111561275c5761275b612036565b5b61276682546124e2565b6127718282856126ad565b600060209050601f8311600181146127a45760008415612792578287015190505b61279c858261271e565b865550612804565b601f1984166127b286612598565b60005b828110156127da578489015182556001820191506020850194506020810190506127b5565b868310156127f757848901516127f3601f891682612700565b8355505b6001600288020188555050505b505050505050565b7f4e6f7420617574686f72697a6564000000000000000000000000000000000000600082015250565b6000612842600e83611d6c565b915061284d8261280c565b602082019050919050565b6000602082019050818103600083015261287181612835565b9050919050565b600067ffffffffffffffff82111561289357612892612036565b5b602082029050602081019050919050565b6000815190506128b381611e98565b92915050565b60006128cc6128c784612878565b612096565b905080838252602082019050602084028301858111156128ef576128ee612166565b5b835b81811015612918578061290488826128a4565b8452602084019350506020810190506128f1565b5050509392505050565b600082601f8301126129375761293661202c565b5b81516129478482602086016128b9565b91505092915050565b60006020828403121561296657612965611e26565b5b600082015167ffffffffffffffff81111561298457612983611e2b565b5b61299084828501612922565b91505092915050565b7f596f7520646f206e6f77206f776e20616e7920746f6b656e7300000000000000600082015250565b60006129cf601983611d6c565b91506129da82612999565b602082019050919050565b600060208201905081810360008301526129fe816129c2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612a3f82611e8e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a7157612a70612513565b5b600182019050919050565b6000612a8782611e8e565b9150612a9283611e8e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612acb57612aca612513565b5b828202905092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000612b32602583611d6c565b9150612b3d82612ad6565b604082019050919050565b60006020820190508181036000830152612b6181612b25565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612bc4602683611d6c565b9150612bcf82612b68565b604082019050919050565b60006020820190508181036000830152612bf381612bb7565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612c56602483611d6c565b9150612c6182612bfa565b604082019050919050565b60006020820190508181036000830152612c8581612c49565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612ce8602283611d6c565b9150612cf382612c8c565b604082019050919050565b60006020820190508181036000830152612d1781612cdb565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612d54601d83611d6c565b9150612d5f82612d1e565b602082019050919050565b60006020820190508181036000830152612d8381612d47565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612de6602583611d6c565b9150612df182612d8a565b604082019050919050565b60006020820190508181036000830152612e1581612dd9565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612e78602383611d6c565b9150612e8382612e1c565b604082019050919050565b60006020820190508181036000830152612ea781612e6b565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000612f0a602683611d6c565b9150612f1582612eae565b604082019050919050565b60006020820190508181036000830152612f3981612efd565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612f76602083611d6c565b9150612f8182612f40565b602082019050919050565b60006020820190508181036000830152612fa581612f69565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000612fe2601f83611d6c565b9150612fed82612fac565b602082019050919050565b6000602082019050818103600083015261301181612fd5565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613074602183611d6c565b915061307f82613018565b604082019050919050565b600060208201905081810360008301526130a381613067565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000613106602283611d6c565b9150613111826130aa565b604082019050919050565b60006020820190508181036000830152613135816130f9565b9050919050565b600061314782611e8e565b915061315283611e8e565b92508282101561316557613164612513565b5b82820390509291505056fea2646970667358221220649abad104588be72302e0773934b774a29d944b08225f2e7da0ae8d1e90c27c64736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005426f6e65730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005426f6e6573000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80638ba4cc3c116100de578063cabafbd211610097578063dd62ed3e11610071578063dd62ed3e14610493578063f2fde38b146104c3578063f6a74ed7146104df578063f815c03d146104fb5761018e565b8063cabafbd214610417578063d199168d14610433578063da8c229e146104635761018e565b80638ba4cc3c146103435780638da5cb5b1461035f57806395d89b411461037d578063a457c2d71461039b578063a7fc7a07146103cb578063a9059cbb146103e75761018e565b80633ddc58281161014b5780634968768f116101255780634968768f146102d157806370a08231146102ed578063715018a61461031d57806379cc6790146103275761018e565b80633ddc58281461027d57806340c10f191461029957806342966c68146102b55761018e565b806306fdde0314610193578063095ea7b3146101b157806318160ddd146101e157806323b872dd146101ff578063313ce5671461022f578063395093511461024d575b600080fd5b61019b61052e565b6040516101a89190611dfa565b60405180910390f35b6101cb60048036038101906101c69190611ec4565b6105c0565b6040516101d89190611f1f565b60405180910390f35b6101e96105e3565b6040516101f69190611f49565b60405180910390f35b61021960048036038101906102149190611f64565b6105ed565b6040516102269190611f1f565b60405180910390f35b61023761061c565b6040516102449190611fd3565b60405180910390f35b61026760048036038101906102629190611ec4565b610625565b6040516102749190611f1f565b60405180910390f35b610297600480360381019061029291906121c1565b61065c565b005b6102b360048036038101906102ae9190611ec4565b6107c0565b005b6102cf60048036038101906102ca9190612277565b610861565b005b6102eb60048036038101906102e691906122a4565b610875565b005b610307600480360381019061030291906122d1565b610d72565b6040516103149190611f49565b60405180910390f35b610325610dba565b005b610341600480360381019061033c9190611ec4565b610dce565b005b61035d60048036038101906103589190611ec4565b610e45565b005b610367610e74565b604051610374919061230d565b60405180910390f35b610385610e9e565b6040516103929190611dfa565b60405180910390f35b6103b560048036038101906103b09190611ec4565b610f30565b6040516103c29190611f1f565b60405180910390f35b6103e560048036038101906103e091906122d1565b610fa7565b005b61040160048036038101906103fc9190611ec4565b61100a565b60405161040e9190611f1f565b60405180910390f35b610431600480360381019061042c9190612354565b61102d565b005b61044d60048036038101906104489190611ec4565b6110e4565b60405161045a9190611f1f565b60405180910390f35b61047d600480360381019061047891906122d1565b611113565b60405161048a9190611f1f565b60405180910390f35b6104ad60048036038101906104a891906123c8565b611133565b6040516104ba9190611f49565b60405180910390f35b6104dd60048036038101906104d891906122d1565b6111ba565b005b6104f960048036038101906104f491906122d1565b61123d565b005b610515600480360381019061051091906122d1565b6112a0565b6040516105259493929190612467565b60405180910390f35b60606003805461053d906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054610569906124e2565b80156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b5050505050905090565b6000806105cb611378565b90506105d8818585611380565b600191505092915050565b6000600254905090565b6000806105f8611378565b9050610605858285611549565b6106108585856115d5565b60019150509392505050565b60006012905090565b600080610630611378565b90506106518185856106428589611133565b61064c9190612542565b611380565b600191505092915050565b610664611854565b60006040518060a001604052808873ffffffffffffffffffffffffffffffffffffffff168152602001878152602001868152602001858152602001848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050815250905080600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001019081610782919061273a565b50604082015181600201556060820151816003015560808201518160040190805190602001906107b3929190611cf7565b5090505050505050505050565b600660006107cc611378565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610853576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084a90612858565b60405180910390fd5b61085d82826118d2565b5050565b61087261086c611378565b82611a31565b50565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054610927906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054610953906124e2565b80156109a05780601f10610975576101008083540402835291602001916109a0565b820191906000526020600020905b81548152906001019060200180831161098357829003601f168201915b50505050508152602001600282015481526020016003820154815260200160048201805480602002602001604051908101604052809291908181526020018280548015610a0c57602002820191906000526020600020905b8154815260200190600101908083116109f8575b50505050508152505090506000816000015173ffffffffffffffffffffffffffffffffffffffff16638462151c610a41611378565b6040518263ffffffff1660e01b8152600401610a5d919061230d565b600060405180830381865afa158015610a7a573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250810190610aa39190612950565b90506000815111610ae9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae0906129e5565b60405180910390fd5b600080600090505b8251811015610d3d576000838281518110610b0f57610b0e612a05565b5b6020026020010151905060005b856080015151811015610d285785608001518181518110610b4057610b3f612a05565b5b602002602001015182148015610bb15750600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff16155b15610c3657856060015184610bc69190612542565b93506001600860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff021916908315150217905550610d15565b600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060009054906101000a900460ff16610d1457856040015184610ca89190612542565b93506001600860008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600084815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b8080610d2090612a34565b915050610b1c565b50508080610d3590612a34565b915050610af1565b506000811115610d6c57610d6b610d52611378565b670de0b6b3a764000083610d669190612a7c565b6118d2565b5b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610dc2611854565b610dcc6000611c07565b565b60066000610dda611378565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610e3657610e318282611a31565b610e41565b610e408282611ccd565b5b5050565b610e4d611854565b6000670de0b6b3a764000082610e639190612a7c565b9050610e6f83826118d2565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060048054610ead906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054610ed9906124e2565b8015610f265780601f10610efb57610100808354040283529160200191610f26565b820191906000526020600020905b815481529060010190602001808311610f0957829003601f168201915b5050505050905090565b600080610f3b611378565b90506000610f498286611133565b905083811015610f8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8590612b48565b60405180910390fd5b610f9b8286868403611380565b60019250505092915050565b610faf611854565b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600080611015611378565b90506110228185856115d5565b600191505092915050565b611035611854565b60005b838390508110156110dd57600084848381811061105857611057612a05565b5b90506020020135905082600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600083815260200190815260200160002060006101000a81548160ff0219169083151502179055505080806110d590612a34565b915050611038565b5050505050565b60086020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60066020528060005260406000206000915054906101000a900460ff1681565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6111c2611854565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611231576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122890612bda565b60405180910390fd5b61123a81611c07565b50565b611245611854565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60076020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010180546112e9906124e2565b80601f0160208091040260200160405190810160405280929190818152602001828054611315906124e2565b80156113625780601f1061133757610100808354040283529160200191611362565b820191906000526020600020905b81548152906001019060200180831161134557829003601f168201915b5050505050908060020154908060030154905084565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036113ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113e690612c6c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361145e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145590612cfe565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161153c9190611f49565b60405180910390a3505050565b60006115558484611133565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146115cf57818110156115c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b890612d6a565b60405180910390fd5b6115ce8484848403611380565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611644576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161163b90612dfc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036116b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116aa90612e8e565b60405180910390fd5b6116be838383611ced565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611744576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173b90612f20565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546117d79190612542565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161183b9190611f49565b60405180910390a361184e848484611cf2565b50505050565b61185c611378565b73ffffffffffffffffffffffffffffffffffffffff1661187a610e74565b73ffffffffffffffffffffffffffffffffffffffff16146118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118c790612f8c565b60405180910390fd5b565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611941576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193890612ff8565b60405180910390fd5b61194d60008383611ced565b806002600082825461195f9190612542565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119b49190612542565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611a199190611f49565b60405180910390a3611a2d60008383611cf2565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611aa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a979061308a565b60405180910390fd5b611aac82600083611ced565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b299061311c565b60405180910390fd5b8181036000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508160026000828254611b89919061313c565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611bee9190611f49565b60405180910390a3611c0283600084611cf2565b505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611cdf82611cd9611378565b83611549565b611ce98282611a31565b5050565b505050565b505050565b828054828255906000526020600020908101928215611d33579160200282015b82811115611d32578251825591602001919060010190611d17565b5b509050611d409190611d44565b5090565b5b80821115611d5d576000816000905550600101611d45565b5090565b600081519050919050565b600082825260208201905092915050565b60005b83811015611d9b578082015181840152602081019050611d80565b83811115611daa576000848401525b50505050565b6000601f19601f8301169050919050565b6000611dcc82611d61565b611dd68185611d6c565b9350611de6818560208601611d7d565b611def81611db0565b840191505092915050565b60006020820190508181036000830152611e148184611dc1565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611e5b82611e30565b9050919050565b611e6b81611e50565b8114611e7657600080fd5b50565b600081359050611e8881611e62565b92915050565b6000819050919050565b611ea181611e8e565b8114611eac57600080fd5b50565b600081359050611ebe81611e98565b92915050565b60008060408385031215611edb57611eda611e26565b5b6000611ee985828601611e79565b9250506020611efa85828601611eaf565b9150509250929050565b60008115159050919050565b611f1981611f04565b82525050565b6000602082019050611f346000830184611f10565b92915050565b611f4381611e8e565b82525050565b6000602082019050611f5e6000830184611f3a565b92915050565b600080600060608486031215611f7d57611f7c611e26565b5b6000611f8b86828701611e79565b9350506020611f9c86828701611e79565b9250506040611fad86828701611eaf565b9150509250925092565b600060ff82169050919050565b611fcd81611fb7565b82525050565b6000602082019050611fe86000830184611fc4565b92915050565b6000611ff982611e50565b9050919050565b61200981611fee565b811461201457600080fd5b50565b60008135905061202681612000565b92915050565b600080fd5b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61206e82611db0565b810181811067ffffffffffffffff8211171561208d5761208c612036565b5b80604052505050565b60006120a0611e1c565b90506120ac8282612065565b919050565b600067ffffffffffffffff8211156120cc576120cb612036565b5b6120d582611db0565b9050602081019050919050565b82818337600083830152505050565b60006121046120ff846120b1565b612096565b9050828152602081018484840111156121205761211f612031565b5b61212b8482856120e2565b509392505050565b600082601f8301126121485761214761202c565b5b81356121588482602086016120f1565b91505092915050565b600080fd5b600080fd5b60008083601f8401126121815761218061202c565b5b8235905067ffffffffffffffff81111561219e5761219d612161565b5b6020830191508360208202830111156121ba576121b9612166565b5b9250929050565b60008060008060008060a087890312156121de576121dd611e26565b5b60006121ec89828a01612017565b965050602087013567ffffffffffffffff81111561220d5761220c611e2b565b5b61221989828a01612133565b955050604061222a89828a01611eaf565b945050606061223b89828a01611eaf565b935050608087013567ffffffffffffffff81111561225c5761225b611e2b565b5b61226889828a0161216b565b92509250509295509295509295565b60006020828403121561228d5761228c611e26565b5b600061229b84828501611eaf565b91505092915050565b6000602082840312156122ba576122b9611e26565b5b60006122c884828501612017565b91505092915050565b6000602082840312156122e7576122e6611e26565b5b60006122f584828501611e79565b91505092915050565b61230781611e50565b82525050565b600060208201905061232260008301846122fe565b92915050565b61233181611f04565b811461233c57600080fd5b50565b60008135905061234e81612328565b92915050565b6000806000806060858703121561236e5761236d611e26565b5b600061237c87828801612017565b945050602085013567ffffffffffffffff81111561239d5761239c611e2b565b5b6123a98782880161216b565b935093505060406123bc8782880161233f565b91505092959194509250565b600080604083850312156123df576123de611e26565b5b60006123ed85828601611e79565b92505060206123fe85828601611e79565b9150509250929050565b6000819050919050565b600061242d61242861242384611e30565b612408565b611e30565b9050919050565b600061243f82612412565b9050919050565b600061245182612434565b9050919050565b61246181612446565b82525050565b600060808201905061247c6000830187612458565b818103602083015261248e8186611dc1565b905061249d6040830185611f3a565b6124aa6060830184611f3a565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806124fa57607f821691505b60208210810361250d5761250c6124b3565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061254d82611e8e565b915061255883611e8e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561258d5761258c612513565b5b828201905092915050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026125fa7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826125bd565b61260486836125bd565b95508019841693508086168417925050509392505050565b600061263761263261262d84611e8e565b612408565b611e8e565b9050919050565b6000819050919050565b6126518361261c565b61266561265d8261263e565b8484546125ca565b825550505050565b600090565b61267a61266d565b612685818484612648565b505050565b5b818110156126a95761269e600082612672565b60018101905061268b565b5050565b601f8211156126ee576126bf81612598565b6126c8846125ad565b810160208510156126d7578190505b6126eb6126e3856125ad565b83018261268a565b50505b505050565b600082821c905092915050565b6000612711600019846008026126f3565b1980831691505092915050565b600061272a8383612700565b9150826002028217905092915050565b61274382611d61565b67ffffffffffffffff81111561275c5761275b612036565b5b61276682546124e2565b6127718282856126ad565b600060209050601f8311600181146127a45760008415612792578287015190505b61279c858261271e565b865550612804565b601f1984166127b286612598565b60005b828110156127da578489015182556001820191506020850194506020810190506127b5565b868310156127f757848901516127f3601f891682612700565b8355505b6001600288020188555050505b505050505050565b7f4e6f7420617574686f72697a6564000000000000000000000000000000000000600082015250565b6000612842600e83611d6c565b915061284d8261280c565b602082019050919050565b6000602082019050818103600083015261287181612835565b9050919050565b600067ffffffffffffffff82111561289357612892612036565b5b602082029050602081019050919050565b6000815190506128b381611e98565b92915050565b60006128cc6128c784612878565b612096565b905080838252602082019050602084028301858111156128ef576128ee612166565b5b835b81811015612918578061290488826128a4565b8452602084019350506020810190506128f1565b5050509392505050565b600082601f8301126129375761293661202c565b5b81516129478482602086016128b9565b91505092915050565b60006020828403121561296657612965611e26565b5b600082015167ffffffffffffffff81111561298457612983611e2b565b5b61299084828501612922565b91505092915050565b7f596f7520646f206e6f77206f776e20616e7920746f6b656e7300000000000000600082015250565b60006129cf601983611d6c565b91506129da82612999565b602082019050919050565b600060208201905081810360008301526129fe816129c2565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000612a3f82611e8e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a7157612a70612513565b5b600182019050919050565b6000612a8782611e8e565b9150612a9283611e8e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612acb57612aca612513565b5b828202905092915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000612b32602583611d6c565b9150612b3d82612ad6565b604082019050919050565b60006020820190508181036000830152612b6181612b25565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612bc4602683611d6c565b9150612bcf82612b68565b604082019050919050565b60006020820190508181036000830152612bf381612bb7565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612c56602483611d6c565b9150612c6182612bfa565b604082019050919050565b60006020820190508181036000830152612c8581612c49565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612ce8602283611d6c565b9150612cf382612c8c565b604082019050919050565b60006020820190508181036000830152612d1781612cdb565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b6000612d54601d83611d6c565b9150612d5f82612d1e565b602082019050919050565b60006020820190508181036000830152612d8381612d47565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612de6602583611d6c565b9150612df182612d8a565b604082019050919050565b60006020820190508181036000830152612e1581612dd9565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612e78602383611d6c565b9150612e8382612e1c565b604082019050919050565b60006020820190508181036000830152612ea781612e6b565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b6000612f0a602683611d6c565b9150612f1582612eae565b604082019050919050565b60006020820190508181036000830152612f3981612efd565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612f76602083611d6c565b9150612f8182612f40565b602082019050919050565b60006020820190508181036000830152612fa581612f69565b9050919050565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b6000612fe2601f83611d6c565b9150612fed82612fac565b602082019050919050565b6000602082019050818103600083015261301181612fd5565b9050919050565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6000613074602183611d6c565b915061307f82613018565b604082019050919050565b600060208201905081810360008301526130a381613067565b9050919050565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b6000613106602283611d6c565b9150613111826130aa565b604082019050919050565b60006020820190508181036000830152613135816130f9565b9050919050565b600061314782611e8e565b915061315283611e8e565b92508282101561316557613164612513565b5b82820390509291505056fea2646970667358221220649abad104588be72302e0773934b774a29d944b08225f2e7da0ae8d1e90c27c64736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005426f6e65730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005426f6e6573000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _tokenName (string): Bones
Arg [1] : _tokenSymbol (string): Bones
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [3] : 426f6e6573000000000000000000000000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 426f6e6573000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 29 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.