Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Factory | 768569 | 47 days ago | IN | 0 S | 0.00003064 |
Latest 6 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
3285118 | 25 days ago | Contract Creation | 0 S | |||
3187110 | 26 days ago | Contract Creation | 0 S | |||
3186998 | 26 days ago | Contract Creation | 0 S | |||
3186644 | 26 days ago | Contract Creation | 0 S | |||
1370064 | 43 days ago | Contract Creation | 0 S | |||
919010 | 46 days ago | Contract Creation | 0 S |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
GNFTFactory
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; interface IGBT { function currentPrice() external view returns (uint256); function getProtocol() external view returns (address); function initSupply() external view returns (uint256); function artist() external view returns (address); function getFees() external view returns (address); } contract ClampedRandomizer { uint256 private _scopeIndex = 0; //Clamping cache for random TokenID generation in the anti-sniping algo uint256 private immutable _scopeCap; //Size of initial randomized number pool & max generated value (zero indexed) mapping(uint256 => uint256) _swappedIDs; //TokenID cache for random TokenID generation in the anti-sniping algo constructor(uint256 scopeCap) { _scopeCap = scopeCap; } function _genClampedNonce() internal virtual returns(uint256) { uint256 scope = _scopeCap-_scopeIndex; uint256 swap; uint256 result; uint256 i = randomNumber() % scope; //Setup the value to swap in for the selected number if (_swappedIDs[scope-1] == 0){ swap = scope-1; } else { swap = _swappedIDs[scope-1]; } //Select a random number, swap it out with an unselected one then shorten the selection range by 1 if (_swappedIDs[i] == 0){ result = i; _swappedIDs[i] = swap; } else { result = _swappedIDs[i]; _swappedIDs[i] = swap; } _scopeIndex++; return result; } function randomNumber() internal view returns(uint256){ return uint256(keccak256(abi.encodePacked(block.difficulty, block.timestamp))); } } contract GNFT is ERC721Enumerable, DefaultOperatorFilterer, ReentrancyGuard, ClampedRandomizer { using Counters for Counters.Counter; using SafeERC20 for IERC20; Counters.Counter private _tokenIdCounter; // Fee uint256 public immutable bFee; // redemption fee uint256 public constant DIVISOR = 1000; // Token string public baseTokenURI; // Protocol address public immutable GBT; address public immutable fees; string public _contractURI; uint256 public immutable maxSupply; mapping (uint256 => int256) public gumballIndex; uint256[] public gumballs; event Swap(address indexed user, uint256 amount); event ExactSwap(address indexed user, uint256[] id); event Redeem(address indexed user, uint256[] id); event SetBaseURI(string uri); event SetContractURI(string uri); constructor( string memory name, string memory symbol, string[] memory _URIs, address _GBT, uint256 _bFee ) ERC721(name, symbol) ClampedRandomizer(IGBT(_GBT).initSupply() / 1e18) { require(_bFee <= 100, "Redemption fee too high"); baseTokenURI = _URIs[0]; _contractURI = _URIs[1]; GBT = _GBT; bFee = _bFee; fees = IGBT(GBT).getFees(); maxSupply = IGBT(GBT).initSupply() / 1e18; } //////////////////// ////// Public ////// //////////////////// function gumballsLength() external view returns (uint256) { return gumballs.length; } function owner() external view returns (address) { return IGBT(GBT).artist(); } /** Returns bal of {GBT} */ function tokenBal() external view returns (uint256) { return IERC20(GBT).balanceOf(address(this)); } /** Returns bal of {Gumball} */ function nftBal() external view returns (uint256) { return balanceOf(address(this)); } function contractURI() external view returns (string memory) { return _contractURI; } function currentPrice() external view returns (uint256) { return IGBT(GBT).currentPrice(); } ////////////////////// ////// External ////// ////////////////////// /** @dev Allows user to swap {GBT} for an exact {Gumball} that has already been minted * @param id is an array of {Gumball}s the user is swapping for */ function swapForExact(uint256[] calldata id) external nonReentrant { require(IERC20(GBT).balanceOf(msg.sender) >= enWei(id.length), "Insuffient funds"); require(id.length != 0, "Parameter length cannot be zero"); uint256 before = IERC20(GBT).balanceOf(address(this)); for(uint256 i = 0; i < id.length; i ++) { require(gumballIndex[id[i]] != -1, "NFT removed from mapping, sentinel number (-1)"); _pop(uint256(gumballIndex[id[i]])); gumballIndex[id[i]] = -1; IERC721(address(this)).transferFrom(address(this), msg.sender, id[i]); } IERC20(GBT).safeTransferFrom(msg.sender, address(this), enWei(id.length)); require(IERC20(GBT).balanceOf(address(this)) >= before + enWei(id.length), "Contract balance underflow"); emit ExactSwap(msg.sender, id); } /** @dev Allows the user to swap a quantity of {token} > 1 * @param _amount is the number of tokens to mint */ function swap(uint256 _amount) external nonReentrant { require(enETH(_amount) * 1e18 == _amount, "Whole GBTs only"); require(IERC20(GBT).balanceOf(msg.sender) >= enWei(1), "Insuffient funds"); require(_amount > 0, "Amount cannot be zero"); uint256 before = IERC20(GBT).balanceOf(address(this)); IERC20(GBT).safeTransferFrom(msg.sender, address(this), _amount); for(uint256 i = 0; i < enETH(_amount); i++) { mint(msg.sender); } require(IERC20(GBT).balanceOf(address(this)) >= before + _amount, "Contract balance underflow"); emit Swap(msg.sender, _amount); } /** @dev Allows user to swap their gumball(s) to the contract for a payout of {GBT} * @param _id is an array of ids of the gumball token(s) swapped in */ function redeem(uint256[] calldata _id) external nonReentrant { require(IERC721(address(this)).balanceOf(msg.sender) >= _id.length, "Insuffient Balance"); require(_id.length != 0, "Parameter length cannot be zero"); uint256 before = IERC721(address(this)).balanceOf(address(this)); uint256 burnAmount = enWei(_id.length) * bFee / DIVISOR; for (uint256 i = 0; i < _id.length; i++) { gumballs.push(_id[i]); gumballIndex[_id[i]] = int256(gumballs.length - 1); IERC721(address(this)).transferFrom(msg.sender, address(this), _id[i]); } IERC20(GBT).safeTransfer(fees, burnAmount); IERC20(GBT).safeTransfer(msg.sender, enWei(_id.length) - burnAmount); require(IERC721(address(this)).balanceOf(address(this)) >= before + _id.length, "Bad Swap"); emit Redeem(msg.sender, _id); } ////////////////////// ////// Internal ////// ////////////////////// function enWei(uint256 _num) internal pure returns(uint256) { return _num * 10**18; } function enETH(uint256 _num) internal pure returns(uint256) { return _num / 10**18; } /** @dev Internal function to remove an unwanted index from an array */ function _pop(uint256 _index) internal { uint256 tempID; uint256 swapID; if (gumballs.length > 1 && _index != gumballs.length - 1) { tempID = gumballs[_index]; swapID = gumballs[gumballs.length - 1]; gumballs[_index] = swapID; gumballs[gumballs.length - 1] = tempID; gumballIndex[swapID] = int256(_index); gumballs.pop(); } else { gumballs.pop(); } } /** @dev {_tokenIdTracker} counter tracks the id of next NFT * @param to mints to address */ function mint(address to) internal { require(_tokenIdCounter.current() < maxSupply, "Max Supply Minted"); _mint(to, _genClampedNonce()); _tokenIdCounter.increment(); } ///////////////////// ///// Overrides ///// ///////////////////// // The following functions are overrides required by Solidity. function _baseURI() internal view virtual override returns (string memory) { return baseTokenURI; } function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override(ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } //////////////////// //// Restricted //// //////////////////// /** @dev Allows the protocol to set {baseURI} * @param uri is the updated URI */ function setBaseURI(string calldata uri) external OnlyArtist { baseTokenURI = uri; emit SetBaseURI(uri); } /** @dev Allows the protocol to set {contractURI} * @param uri is the updated URI */ function setContractURI(string calldata uri) external OnlyArtist { _contractURI = uri; emit SetContractURI(uri); } modifier OnlyArtist() { require(msg.sender == IGBT(GBT).artist(), "!AUTH"); _; } } contract GNFTFactory { address public factory; address public lastGNFT; event FactorySet(address indexed _factory); constructor() { factory = msg.sender; } function setFactory(address _factory) external OnlyFactory { factory = _factory; emit FactorySet(_factory); } function createGNFT( string memory _name, string memory _symbol, string[] memory _URIs, address _GBT, uint256 _bFee ) external OnlyFactory returns (address) { GNFT newGNFT = new GNFT(_name, _symbol, _URIs, _GBT, _bFee); lastGNFT = address(newGNFT); return lastGNFT; } modifier OnlyFactory() { require(msg.sender == factory, "!AUTH"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _ownerOf(tokenId); require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner or approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } /** * @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. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _ownerOf(tokenId) != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId, 1); // Check that tokenId was not minted by `_beforeTokenTransfer` hook require(!_exists(tokenId), "ERC721: token already minted"); unchecked { // Will not overflow unless all 2**256 token ids are minted to the same owner. // Given that tokens are minted one by one, it is impossible in practice that // this ever happens. Might change if we allow batch minting. // The ERC fails to describe this case. _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId, 1); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * This is an internal function that does not check if the sender is authorized to operate on the token. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId, 1); // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook owner = ERC721.ownerOf(tokenId); // Clear approvals delete _tokenApprovals[tokenId]; unchecked { // Cannot overflow, as that would require more tokens to be burned/transferred // out than the owner initially received through minting and transferring in. _balances[owner] -= 1; } delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId, 1); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId, 1); // Check that tokenId was not transferred by `_beforeTokenTransfer` hook require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; unchecked { // `_balances[from]` cannot overflow for the same reason as described in `_burn`: // `from`'s balance is the number of token held, which is at least one before the current // transfer. // `_balances[to]` could overflow in the conditions described in `_mint`. That would require // all 2**256 token ids to be minted, which in practice is impossible. _balances[from] -= 1; _balances[to] += 1; } _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId, 1); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`. * - When `from` is zero, the tokens will be minted for `to`. * - When `to` is zero, ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256, /* firstTokenId */ uint256 batchSize ) internal virtual { if (batchSize > 1) { if (from != address(0)) { _balances[from] -= batchSize; } if (to != address(0)) { _balances[to] += batchSize; } } } /** * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`. * - When `from` is zero, the tokens were minted for `to`. * - When `to` is zero, ``from``'s tokens were burned. * - `from` and `to` are never both zero. * - `batchSize` is non-zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev See {ERC721-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address from, address to, uint256 firstTokenId, uint256 batchSize ) internal virtual override { super._beforeTokenTransfer(from, to, firstTokenId, batchSize); if (batchSize > 1) { // Will only trigger during construction. Batch transferring (minting) is not available afterwards. revert("ERC721Enumerable: consecutive transfers not supported"); } uint256 tokenId = firstTokenId; if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_factory","type":"address"}],"name":"FactorySet","type":"event"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string[]","name":"_URIs","type":"string[]"},{"internalType":"address","name":"_GBT","type":"address"},{"internalType":"uint256","name":"_bFee","type":"uint256"}],"name":"createGNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastGNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_factory","type":"address"}],"name":"setFactory","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080806040523461002857600080546001600160a01b03191633179055614238908161002e8239f35b600080fdfe604060808152600490813610156200001657600080fd5b600091823560e01c9081635bb4780814620002e1578163c45a015514620002b7578163e43b95881462000081575063f78047b6146200005457600080fd5b346200007d57816003193601126200007d5760015490516001600160a01b039091168152602090f35b5080fd5b905034620002b35760a0366003190112620002b35767ffffffffffffffff9281358481116200007d57620000b990369084016200038f565b936024908135818111620002af57620000d690369086016200038f565b9060443596818811620002ab5736602389011215620002ab578786013582811162000299578060051b936020998a6200011181880162000352565b8094815201878197830101913683116200029557888101915b8383106200026757505050506064359260018060a01b039889851680950362000263576200015d8a8a54163314620003ec565b8a5197613d9f91828a01978a89109089111762000252575050916200019b620001a992899897969594620004648a3960a0875260a087019062000421565b908582038d87015262000421565b908382038a850152518082528a8201918b8260051b820101959289915b8d8484106200021b5750505050505060608201526080608435910152039082f09081156200021057501690816bffffffffffffffffffffffff60a01b600154161760015551908152f35b8351903d90823e3d90fd5b8091939599506200023d60019395979899601f198682030187528b5162000421565b990193019301909288979695949293620001c6565b634e487b7160e01b8b526041905289fd5b8880fd5b823588811162000291578e916200028583928d36918701016200038f565b8152019201916200012a565b8b80fd5b8980fd5b634e487b7160e01b8652604187528486fd5b8480fd5b8380fd5b8280fd5b5050346200007d57816003193601126200007d57905490516001600160a01b039091168152602090f35b8390346200007d5760203660031901126200007d57356001600160a01b0381811691829003620002b35781906200031e84549182163314620003ec565b6001600160a01b0319161782557f1edf3afd4ac789736e00d216cd88be164ddcef26a6eedcc30cdb0cb62f3741b18280a280f35b6040519190601f01601f1916820167ffffffffffffffff8111838210176200037957604052565b634e487b7160e01b600052604160045260246000fd5b81601f82011215620003e75780359067ffffffffffffffff82116200037957620003c3601f8301601f191660200162000352565b9282845260208383010111620003e757816000926020809301838601378301015290565b600080fd5b15620003f457565b60405162461bcd60e51b815260206004820152600560248201526404282aaa8960db1b6044820152606490fd5b919082519283825260005b8481106200044e575050826000602080949584010152601f8019910116010190565b6020818301810151848301820152016200042c56fe61012080604052346200049057600062003d9f803803809162000023828662000af0565b843982019160a081840312620004e35780516001600160401b03811162000aec57836200005291830162000b2a565b60208201519093906001600160401b03811162000ae857816200007791840162000b2a565b60408301519094906001600160401b038111620008355783019082601f8301121562000835578151926001600160401b03841162000ad4578360051b9260405194620000c7602086018762000af0565b855260208501602081958301019183831162000ad05760208101915b83831062000a9b5750505050506080620001006060860162000ba0565b9401516040516397d63f9360e01b8152909690916020836004816001600160a01b038a165afa92831562000a9057879362000a52575b508051906001600160401b03821162000a3e578754600181811c9116801562000a33575b602082101462000a1f579081601f849311620009cd575b50602090601f83116001146200095f57899262000953575b50508160011b916000199060031b1c19161786555b8051906001600160401b0382116200093f57600154600181811c9116801562000934575b602082101462000920579081601f849311620008c1575b50602090601f83116001146200084557889262000839575b50508160011b916000199060031b1c1916176001555b6daaeb6d7670e522a718067333cd4e3b62000783575b670de0b6b3a7640000906001600a5585600b5504608052606485116200073e578151156200060e57518051906001600160401b0382116200072a57600e54600181811c911680156200071f575b60208210146200070b579081601f849311620006ac575b50602090601f83116001146200063057869262000624575b50508160011b916000199060031b1c191617600e555b8051600110156200060e576040015180519093906001600160401b038111620005fa57600f54600181811c91168015620005ef575b6020821014620005db57601f811162000584575b506020601f8211600114620005075790806020949392869760049792620004fb575b50508160011b916000199060031b1c191617600f555b60c082905260a05260405163db8d55f160e01b815292839182906001600160a01b03165afa908115620004f0578291620004aa575b5060e05260c0516040516397d63f9360e01b815290602090829060049082906001600160a01b03165afa9182156200049e579162000461575b50670de0b6b3a764000061010091048152604051613189918262000bb6833960805182610e69015260a05182818161023e0152611439015260c05182818161028401528181610a9101528181610c7501528181610cdd01528181610d1f01528181610d7b0152818161121b0152818161148a015281816114fe015281816115ed01528181611a2101528181611a9401528181611b0801528181611b5d0152611ba6015260e0518281816102b70152610b1d0152518181816106270152610e390152f35b90506020813d60201162000495575b816200047f6020938362000af0565b81010312620004905751386200039e565b600080fd5b3d915062000470565b604051903d90823e3d90fd5b90506020813d602011620004e7575b81620004c86020938362000af0565b81010312620004e357620004dc9062000ba0565b3862000365565b5080fd5b3d9150620004b9565b6040513d84823e3d90fd5b0151905038806200031a565b600f855260008051602062003d7f83398151915295601f198316865b8181106200056b575096600192849260209796956004999a1062000551575b505050811b01600f5562000330565b015160001960f88460031b161c1916905538808062000542565b8383015189556001909801976020938401930162000523565b600f855260008051602062003d7f833981519152601f830160051c81019160208410620005d0575b601f0160051c01905b818110620005c45750620002f8565b858155600101620005b5565b9091508190620005ac565b634e487b7160e01b85526022600452602485fd5b90607f1690620002e4565b634e487b7160e01b84526041600452602484fd5b634e487b7160e01b600052603260045260246000fd5b01519050388062000299565b600e875286935060008051602062003d3f83398151915291905b601f198416851062000690576001945083601f1981161062000676575b505050811b01600e55620002af565b015160001960f88460031b161c1916905538808062000667565b818101518355602094850194600190930192909101906200064a565b600e875290915060008051602062003d3f833981519152601f840160051c81016020851062000703575b90849392915b601f830160051c82018110620006f457505062000281565b888155859450600101620006dc565b5080620006d6565b634e487b7160e01b86526022600452602486fd5b90607f16906200026a565b634e487b7160e01b85526041600452602485fd5b60405162461bcd60e51b815260206004820152601760248201527f526564656d7074696f6e2066656520746f6f20686967680000000000000000006044820152606490fd5b6daaeb6d7670e522a718067333cd4e3b156200083557604051633e9f1edf60e11b8152306004820152733cc6cdda760b79bafa08df41ecfa224f810dceb660248201528581604481836daaeb6d7670e522a718067333cd4e5af180156200082a57620007f1575b506200021d565b9094906001600160401b038111620008165760405293670de0b6b3a7640000620007ea565b634e487b7160e01b82526041600452602482fd5b6040513d88823e3d90fd5b8480fd5b015190503880620001f1565b6001895288935060008051602062003d5f83398151915291905b601f1984168510620008a5576001945083601f198116106200088b575b505050811b0160015562000207565b015160001960f88460031b161c191690553880806200087c565b818101518355602094850194600190930192909101906200085f565b6001895290915060008051602062003d5f833981519152601f840160051c81016020851062000918575b90849392915b601f830160051c8201811062000909575050620001d9565b8a8155859450600101620008f1565b5080620008eb565b634e487b7160e01b88526022600452602488fd5b90607f1690620001c2565b634e487b7160e01b87526041600452602487fd5b01519050388062000189565b9250888052602089209089935b601f1984168510620009b1576001945083601f1981161062000997575b505050811b0186556200019e565b015160001960f88460031b161c1916905538808062000989565b818101518355602094850194600190930192909101906200096c565b90915088805260208920601f840160051c81016020851062000a17575b90849392915b601f830160051c8201811062000a0857505062000171565b8b8155859450600101620009f0565b5080620009ea565b634e487b7160e01b89526022600452602489fd5b90607f16906200015a565b634e487b7160e01b88526041600452602488fd5b9092506020813d60201162000a87575b8162000a716020938362000af0565b8101031262000a835751913862000136565b8680fd5b3d915062000a62565b6040513d89823e3d90fd5b82516001600160401b03811162000acc5760209162000ac08784809487010162000b2a565b815201920191620000e3565b8a80fd5b8880fd5b634e487b7160e01b86526041600452602486fd5b8380fd5b8280fd5b601f909101601f19168101906001600160401b0382119082101762000b1457604052565b634e487b7160e01b600052604160045260246000fd5b919080601f84011215620004905782516001600160401b03811162000b14576020906040519262000b6583601f19601f850116018562000af0565b818452828287010111620004905760005b81811062000b8c57508260009394955001015290565b858101830151848201840152820162000b76565b51906001600160a01b0382168203620004905756fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146121715750806306fdde03146120c6578063081812fc146120a8578063095ea7b314611f2557806313f4e12914611f0957806318160ddd14611eeb5780631a0b0f6914611a635780631e5e3fe2146119f557806323b872dd146119b05780632f745c59146118fe5780633410fe6e146118e157806341f43434146118b85780634218803c1461189a57806342842e0e146118425780634f6ccce7146117bf57806355f804b3146115bf5780636352211e1461158f57806370a08231146115645780637f0a655d1461152d5780638b3827c3146114e85780638da5cb5b1461145c57806392ec16ed14611421578063938e3d7b146111ed57806394b918de14610c1b57806395d89b4114610b4c5780639af1d35a14610b075780639d1b464a14610a6b578063a22cb46514610990578063a9369cc714610964578063b88d4fde1461087b578063c0e72740146105db578063c87b56dd14610666578063d547cfb71461064a578063d5abeb011461060f578063e8a3d485146105db578063e985e9c5146105855763f9afb26a146101b657600080fd5b346103bc576101c43661226a565b6101cc612996565b6040516370a0823160e01b8082523360048301526020916024919083818481305afa80156103c8578591600091610554575b501061051b5761020f841515612644565b6040519080825230600483015283828481305afa9182156103c8576000926104ec575b5061023c85612886565b7f0000000000000000000000000000000000000000000000000000000000000000908181029181830414901517156104d7576103e8900460005b8681106103d457506102f2907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906102ea906102dc817f000000000000000000000000000000000000000000000000000000000000000085612ad8565b6102e589612886565b6128c6565b903390612ad8565b60405190815230600482015283818481305afa9081156103c8578590600092610391575b5061032191926126a0565b116103635760405133907f95a8789c26436cc55b5951f117195be05dfa3022c619a84c1449f83f9cf8706890806103598789836126f9565b0390a26001600a55005b9060086064926040519262461bcd60e51b8452600484015282015267042616420537761760c41b6044820152fd5b809250858092503d83116103c1575b6103aa81836123ea565b810103126103bc575184610321610316565b600080fd5b503d6103a0565b6040513d6000823e3d90fd5b6103df81888a612690565b356011908154600160401b8110156104c2579061040482600161041d94018555612336565b90919082549060031b91821b91600019901b1916179055565b80546000198101919082116104ae575061043882898b612690565b356000526010875260406000205561045181888a612690565b3590303b156103bc576040516323b872dd60e01b815233600482015230602482015260448101929092526000828060648101038183305af19182156103c85760019261049f575b5001610276565b6104a8906123ba565b38610498565b8690634e487b7160e01b6000526004526000fd5b87634e487b7160e01b60005260416004526000fd5b83634e487b7160e01b60005260116004526000fd5b9091508381813d8311610514575b61050481836123ea565b810103126103bc57519038610232565b503d6104fa565b60405162461bcd60e51b81526004810184905260128184015271496e7375666669656e742042616c616e636560701b6044820152606490fd5b809250858092503d831161057e575b61056d81836123ea565b810103126103bc57849051386101fe565b503d610563565b346103bc5760403660031901126103bc5761059e61223e565b6105a6612254565b9060018060a01b03809116600052600560205260406000209116600052602052602060ff604060002054166040519015158152f35b346103bc5760003660031901126103bc5761060b6105f7612462565b604051918291602083526020830190612219565b0390f35b346103bc5760003660031901126103bc5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346103bc5760003660031901126103bc5761060b6105f7612528565b346103bc576020806003193601126103bc5760043560008181526002602052604090205461069e906001600160a01b0316151561279d565b816106a7612528565b80519092901561086257600090807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008181811015610854575b5050836d04ee2d6d415b85acef810000000080831015610848575b5050662386f26fc100008082101561083b575b506305f5e1008082101561082e575b5061271080821015610821575b506064811015610813575b600a80911015610809575b6001808401928160216107666107508761240c565b9661075e60405198896123ea565b80885261240c565b8689019790601f1901368937860101905b6107d3575b50505050926107bd92916107b19460405195836107a288955180928880890191016121f6565b840191518093868401906121f6565b010380845201826123ea565b905b61060b604051928284938452830190612219565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a83530491821561080457919082610777565b61077c565b916001019161073b565b606460029104920191610730565b6004910492019186610725565b6008910492019186610718565b6010910492019186610709565b930192900483876106f6565b6040945004905086806106db565b505050604051610871816123ce565b60008152906107bf565b346103bc5760803660031901126103bc5761089461223e565b61089c612254565b906044356064359267ffffffffffffffff84116103bc57366023850112156103bc578360040135926108cd8461240c565b936108db60405195866123ea565b80855236602482880101116103bc57602081600092602461093299018389013786010152336001600160a01b03821603610956575b61092261091d8433612c10565b612a76565b61092d838383612cd8565b612fbc565b1561093957005b60405162461bcd60e51b81528061095260048201612f39565b0390fd5b61095f336128eb565b610910565b346103bc5760203660031901126103bc5760043560005260106020526020604060002054604051908152f35b346103bc5760403660031901126103bc576109a961223e565b602435908115158092036103bc576109c0816128eb565b6001600160a01b031690338214610a2657336000526005602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606490fd5b346103bc5760003660031901126103bc57604051634e8da32560e11b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c857600090610ad4575b602090604051908152f35b506020813d602011610aff575b81610aee602093836123ea565b810103126103bc5760209051610ac9565b3d9150610ae1565b346103bc5760003660031901126103bc576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346103bc5760003660031901126103bc57604051600060018260015492610b7284612428565b9283835260209485600182169182600014610bfb575050600114610b9e575b506107bf925003836123ea565b84915060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6906000915b858310610be35750506107bf935082010185610b91565b80548389018501528794508693909201918101610bcc565b60ff1916858201526107bf95151560051b8501019250879150610b919050565b346103bc5760203660031901126103bc57600435610c37612996565b670de0b6b3a7640000808204808202908015908204831417156110845782036111b6576040516370a0823160e01b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c8578290600090611180575b610cbb92501015612605565b8115611143576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9182156103c85760009261110f575b50610d4c8330337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612a2d565b33159060005b8185048110610e375750506040516370a0823160e01b81523060048201529190506020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156103c8578392600092610dfe575b50610dcb92610dc4916126a0565b11156126ad565b6040519081527f562c219552544ec4c9d7a8eb850f80ea152973e315372bf4999fe7c953ea004f60203392a26001600a55005b925090506020823d602011610e2f575b81610e1b602093836123ea565b810103126103bc5790518291610dcb610db6565b3d9150610e0e565b7f0000000000000000000000000000000000000000000000000000000000000000600d5410156110d657610e8d600b547f00000000000000000000000000000000000000000000000000000000000000006128c6565b92604051602081014481524260408301526040825281606081011067ffffffffffffffff6060840111176110c05760608201604052815190209480156110aa5780600019810111611084576000198101600052600c60205260406000205480156000146110a457506000198101905b8087066000526040600020968754801560001461109a57500695555b600b54916000198314611084576001809301600b5561103d57506000848152600260205260409020546001929190610f5c906001600160a01b031615155b15612eed565b600854856000526009602052604060002055610f77856128a3565b600094610f833361280f565b33600052600660205260406000208160005260205281604060002055816000526007602052604060002055610fd0610f5682600052600260205260018060a01b0360406000205416151590565b33600052600360205260406000208281540190558060005260026020526040600020336bffffffffffffffffffffffff60a01b8254161790553360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600d5401600d5501610d52565b62461bcd60e51b60608201526060606491602083820152602060848201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360a482015201fd5b634e487b7160e01b600052601160045260246000fd5b9150509555610f18565b90610efc565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601160248201527013585e0814dd5c1c1b1e48135a5b9d1959607a1b6044820152606490fd5b9091506020813d60201161113b575b8161112b602093836123ea565b810103126103bc57519083610d16565b3d915061111e565b60405162461bcd60e51b8152602060048201526015602482015274416d6f756e742063616e6e6f74206265207a65726f60581b6044820152606490fd5b50506020813d6020116111ae575b8161119b602093836123ea565b810103126103bc5781610cbb9151610caf565b3d915061118e565b60405162461bcd60e51b815260206004820152600f60248201526e57686f6c652047425473206f6e6c7960881b6044820152606490fd5b346103bc576111fb366122ec565b6040516321de0b0960e11b8152602092906001600160a01b0384826004817f000000000000000000000000000000000000000000000000000000000000000085165afa80156103c857611259926000916113f4575b50163314612741565b67ffffffffffffffff82116110c057611273600f54612428565b601f8111611390575b50600092601f83116001146112eb5750817f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea52936000916112e0575b508260011b906000198460031b1c191617600f555b6112db60405192839283612775565b0390a1005b9050810135846112b7565b601f19831693600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802916000905b868210611378575050837f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea52951061135e575b5050600182811b01600f556112cc565b820135600019600385901b60f8161c19169055838061134e565b8060018495829495880135815501940192019061131c565b600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802601f840160051c8101918585106113ea575b601f0160051c01905b8181106113de575061127c565b600081556001016113d1565b90915081906113c8565b6114149150863d881161141a575b61140c81836123ea565b810190612722565b86611250565b503d611402565b346103bc5760003660031901126103bc5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346103bc5760003660031901126103bc576040516321de0b0960e11b81526001600160a01b036020826004817f000000000000000000000000000000000000000000000000000000000000000085165afa9081156103c8576020926000926114c9575b5060405191168152f35b6114e1919250833d851161141a5761140c81836123ea565b90836114bf565b346103bc5760003660031901126103bc576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346103bc5760203660031901126103bc576004356011548110156103bc57611556602091612336565b90546040519160031b1c8152f35b346103bc5760203660031901126103bc57602061158761158261223e565b61280f565b604051908152f35b346103bc5760203660031901126103bc5760206115ad6004356127e9565b6040516001600160a01b039091168152f35b346103bc576115cd366122ec565b6040516321de0b0960e11b8152602092906001600160a01b0384826004817f000000000000000000000000000000000000000000000000000000000000000085165afa80156103c85761162a926000916113f45750163314612741565b67ffffffffffffffff82116110c057611644600e54612428565b601f811161175b575b50600092601f83116001146116b65750817f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa936000916116ab575b508260011b906000198460031b1c191617600e556112db60405192839283612775565b905081013584611688565b601f19831693600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd916000905b868210611743575050837f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa9510611729575b5050600182811b01600e556112cc565b820135600019600385901b60f8161c191690558380611719565b806001849582949588013581550194019201906116e7565b600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd601f840160051c8101918585106117b5575b601f0160051c01905b8181106117a9575061164d565b6000815560010161179c565b9091508190611793565b346103bc5760203660031901126103bc576004356008548110156117e857611556602091612383565b60405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608490fd5b346103bc57610932611853366122b7565b6001600160a01b038316331415929091908361188c575b60405193611877856123ce565b600085526109565761092261091d8433612c10565b611895336128eb565b61186a565b346103bc5760003660031901126103bc576020601154604051908152f35b346103bc5760003660031901126103bc5760206040516daaeb6d7670e522a718067333cd4e8152f35b346103bc5760003660031901126103bc5760206040516103e88152f35b346103bc5760403660031901126103bc5761191761223e565b602435906119248161280f565b8210156119575760018060a01b031660005260066020526040600020906000526020526020604060002054604051908152f35b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b346103bc576119e56119c1366122b7565b91336001600160a01b038216036119e7575b6119e061091d8433612c10565b612cd8565b005b6119f0336128eb565b6119d3565b346103bc5760003660031901126103bc576040516370a0823160e01b81523060048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c857600090610ad457602090604051908152f35b346103bc57611a713661226a565b611a79612996565b6040516370a0823160e01b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c857600090611eb7575b611ae19150611ada83612886565b1115612605565b611aec811515612644565b6040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9182156103c857600092611e83575b5060005b818110611c625750611b8a611b5982612886565b30337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612a2d565b6040516370a0823160e01b8152306004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156103c857600093611c2a575b5090611c1c7fba6b5103a706294ecf2442116930a8aac6fa28e62c4ce7b9bad6e2b019a9bb3793610dc461035994611c1685612886565b906126a0565b6040519182913395836126f9565b9250906020833d602011611c5a575b81611c46602093836123ea565b810103126103bc5791519190611c1c611bdf565b3d9150611c39565b611c6d818386612690565b35600052601060205260001960406000205414611e2757611c8f818386612690565b35600052601060205260406000205460118054600181119081611dfc575b5015611ded57611cbc82612336565b905482546000198101908111611dd857611cd590612336565b90549060031b1c92611cea8461040487612336565b80549081600019810111611dc4575090611d0b611d29939260001901612336565b91909260031b1c9082549060031b91821b91600019901b1916179055565b6000526010602052604060002055611d3f6129ec565b611d4a818386612690565b356000526010602052600019604060002055611d67818386612690565b3590303b156103bc576040516323b872dd60e01b815230600482015233602482015260448101929092526000828060648101038183305af19182156103c857600192611db5575b5001611b45565b611dbe906123ba565b85611dae565b634e487b7160e01b60005260045260246000fd5b83634e487b7160e01b60005260045260246000fd5b5050611df76129ec565b611d3f565b600019810191508111611e125782141587611cad565b50634e487b7160e01b60005260045260246000fd5b60405162461bcd60e51b815260206004820152602e60248201527f4e46542072656d6f7665642066726f6d206d617070696e672c2073656e74696e60448201526d656c206e756d62657220282d312960901b6064820152608490fd5b9091506020813d602011611eaf575b81611e9f602093836123ea565b810103126103bc57519083611b41565b3d9150611e92565b506020813d602011611ee3575b81611ed1602093836123ea565b810103126103bc57611ae19051611acc565b3d9150611ec4565b346103bc5760003660031901126103bc576020600854604051908152f35b346103bc5760003660031901126103bc5760206115873061280f565b346103bc5760403660031901126103bc57611f3e61223e565b60243590611f4b816128eb565b6001600160a01b038080611f5e856127e9565b1692169180831461205957803314908115612034575b5015611fc957600083815260046020526040902080546001600160a01b03191683179055611fa1836127e9565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4005b60405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608490fd5b9050600052600560205260406000203360005260205260ff6040600020541684611f74565b60405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b346103bc5760203660031901126103bc5760206115ad6004356125c7565b346103bc5760003660031901126103bc576040516000805490826120e983612428565b9182825260209360019085600182169182600014610bfb57505060011461211757506107bf925003836123ea565b6000808052859250907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8583106121595750506107bf935082010185610b91565b80548389018501528794508693909201918101612142565b346103bc5760203660031901126103bc576004359063ffffffff60e01b82168092036103bc5760209163780e9d6360e01b81149081156121b3575b5015158152f35b6380ac58cd60e01b8114915081156121e5575b81156121d4575b50836121ac565b6301ffc9a760e01b149050836121cd565b635b5e139f60e01b811491506121c6565b60005b8381106122095750506000910152565b81810151838201526020016121f9565b90602091612232815180928185528580860191016121f6565b601f01601f1916010190565b600435906001600160a01b03821682036103bc57565b602435906001600160a01b03821682036103bc57565b9060206003198301126103bc5760043567ffffffffffffffff928382116103bc57806023830112156103bc5781600401359384116103bc5760248460051b830101116103bc576024019190565b60609060031901126103bc576001600160a01b039060043582811681036103bc579160243590811681036103bc579060443590565b9060206003198301126103bc5760043567ffffffffffffffff928382116103bc57806023830112156103bc5781600401359384116103bc57602484830101116103bc576024019190565b60115481101561236d5760116000527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680190600090565b634e487b7160e01b600052603260045260246000fd5b60085481101561236d5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b67ffffffffffffffff81116110c057604052565b6020810190811067ffffffffffffffff8211176110c057604052565b90601f8019910116810190811067ffffffffffffffff8211176110c057604052565b67ffffffffffffffff81116110c057601f01601f191660200190565b90600182811c92168015612458575b602083101461244257565b634e487b7160e01b600052602260045260246000fd5b91607f1691612437565b60405190600082600f549161247683612428565b8083529260209060019081811690811561250457506001146124a3575b50506124a1925003836123ea565b565b915092600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802936000925b8284106124ec57506124a19450505081016020013880612493565b855488850183015294850194879450928101926124d1565b915050602092506124a194915060ff191682840152151560051b8201013880612493565b60405190600082600e549161253c83612428565b8083529260209060019081811690811561250457506001146125665750506124a1925003836123ea565b915092600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd936000925b8284106125af57506124a19450505081016020013880612493565b85548885018301529485019487945092810192612594565b6000818152600260205260409020546125ea906001600160a01b0316151561279d565b6000908152600460205260409020546001600160a01b031690565b1561260c57565b60405162461bcd60e51b815260206004820152601060248201526f496e7375666669656e742066756e647360801b6044820152606490fd5b1561264b57565b60405162461bcd60e51b815260206004820152601f60248201527f506172616d65746572206c656e6774682063616e6e6f74206265207a65726f006044820152606490fd5b919081101561236d5760051b0190565b9190820180921161108457565b156126b457565b60405162461bcd60e51b815260206004820152601a60248201527f436f6e74726163742062616c616e636520756e646572666c6f770000000000006044820152606490fd5b602080825281018390526001600160fb1b0383116103bc5760409260051b809284830137010190565b908160209103126103bc57516001600160a01b03811681036103bc5790565b1561274857565b60405162461bcd60e51b815260206004820152600560248201526404282aaa8960db1b6044820152606490fd5b90918060409360208452816020850152848401376000828201840152601f01601f1916010190565b156127a457565b60405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606490fd5b6000908152600260205260409020546001600160a01b031661280c81151561279d565b90565b6001600160a01b0316801561282f57600052600360205260406000205490565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608490fd5b90670de0b6b3a76400009182810292818404149015171561108457565b60085490600160401b8210156110c0576104048260016124a19401600855612383565b9190820391821161108457565b908160209103126103bc575180151581036103bc5790565b6daaeb6d7670e522a718067333cd4e90813b612905575050565b604051633185c44d60e21b81523060048201526001600160a01b039091166024820181905291602090829060449082905afa9081156103c857600091612967575b501561294f5750565b60249060405190633b79c77360e21b82526004820152fd5b612989915060203d60201161298f575b61298181836123ea565b8101906128d3565b38612946565b503d612977565b6002600a54146129a7576002600a55565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6011548015612a175760001990810190612a0582612336565b909182549160031b1b19169055601155565b634e487b7160e01b600052603160045260246000fd5b6040516323b872dd60e01b60208201526001600160a01b0392831660248201529290911660448301526064808301939093529181526124a191612a716084836123ea565b612b24565b15612a7d57565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608490fd5b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604480830193909352918152608081019167ffffffffffffffff8311828410176110c0576124a1926040525b60408051908101916001600160a01b031667ffffffffffffffff8311828410176110c057612b94926040526000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1612b8e612f8c565b916130ba565b80519081612ba157505050565b8280612bb19383010191016128d3565b15612bb95750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b906001600160a01b038080612c24846127e9565b16931691838314938415612c57575b508315612c41575b50505090565b612c4d919293506125c7565b1614388080612c3b565b909350600052600560205260406000208260005260205260ff604060002054169238612c33565b15612c8557565b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b612cfc91612ce5846127e9565b6001600160a01b0393848416939185168414612c7e565b838216938415612e9c57839182612df95750612d4692600854876000526009602052604060002055612d2d876128a3565b828603612dc6575b50612d3f866127e9565b1614612c7e565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206bffffffffffffffffffffffff60a01b9081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b612dcf9061280f565b60406000878152600660205281812083825260205288828220558881526007602052205538612d35565b858303612e0b575b50612d4692612d2d565b612e1691925061280f565b60001981019190821161108457612d469284926000908882526020906007825260409182842054828103612e65575b508a84528383812055868452600681528284209184525281205592612e01565b8785526006825283852083865282528385205488865260068352848620828752835280858720558552600782528385205538612e45565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15612ef457565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b3d15612fb7573d90612f9d8261240c565b91612fab60405193846123ea565b82523d6000602084013e565b606090565b9290803b156130b15761300c9160209160018060a01b039460405180958194829389630a85bd0160e11b9b8c86523360048701521660248501526044840152608060648401526084830190612219565b03916000968791165af190829082613061575b50506130535761302d612f8c565b8051908161304e5760405162461bcd60e51b81528061095260048201612f39565b602001fd5b6001600160e01b0319161490565b909192506020813d6020116130a9575b8161307e602093836123ea565b810103126130a55751906001600160e01b0319821682036130a2575090388061301f565b80fd5b5080fd5b3d9150613071565b50505050600190565b9192901561311c57508151156130ce575090565b3b156130d75790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b82519091501561312f5750805190602001fd5b60405162461bcd60e51b81526020600482015290819061095290602483019061221956fea2646970667358221220ff4463cdb0884a2490550376a330bb2a7e8d090d9e0e7da830445686bc7a9c6764736f6c63430008180033bb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fdb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802a264697066735822122042551fb9a27d31c2471cf0118c86957a900baf5c531fd8ef1e269fee783c620464736f6c63430008180033
Deployed Bytecode
0x604060808152600490813610156200001657600080fd5b600091823560e01c9081635bb4780814620002e1578163c45a015514620002b7578163e43b95881462000081575063f78047b6146200005457600080fd5b346200007d57816003193601126200007d5760015490516001600160a01b039091168152602090f35b5080fd5b905034620002b35760a0366003190112620002b35767ffffffffffffffff9281358481116200007d57620000b990369084016200038f565b936024908135818111620002af57620000d690369086016200038f565b9060443596818811620002ab5736602389011215620002ab578786013582811162000299578060051b936020998a6200011181880162000352565b8094815201878197830101913683116200029557888101915b8383106200026757505050506064359260018060a01b039889851680950362000263576200015d8a8a54163314620003ec565b8a5197613d9f91828a01978a89109089111762000252575050916200019b620001a992899897969594620004648a3960a0875260a087019062000421565b908582038d87015262000421565b908382038a850152518082528a8201918b8260051b820101959289915b8d8484106200021b5750505050505060608201526080608435910152039082f09081156200021057501690816bffffffffffffffffffffffff60a01b600154161760015551908152f35b8351903d90823e3d90fd5b8091939599506200023d60019395979899601f198682030187528b5162000421565b990193019301909288979695949293620001c6565b634e487b7160e01b8b526041905289fd5b8880fd5b823588811162000291578e916200028583928d36918701016200038f565b8152019201916200012a565b8b80fd5b8980fd5b634e487b7160e01b8652604187528486fd5b8480fd5b8380fd5b8280fd5b5050346200007d57816003193601126200007d57905490516001600160a01b039091168152602090f35b8390346200007d5760203660031901126200007d57356001600160a01b0381811691829003620002b35781906200031e84549182163314620003ec565b6001600160a01b0319161782557f1edf3afd4ac789736e00d216cd88be164ddcef26a6eedcc30cdb0cb62f3741b18280a280f35b6040519190601f01601f1916820167ffffffffffffffff8111838210176200037957604052565b634e487b7160e01b600052604160045260246000fd5b81601f82011215620003e75780359067ffffffffffffffff82116200037957620003c3601f8301601f191660200162000352565b9282845260208383010111620003e757816000926020809301838601378301015290565b600080fd5b15620003f457565b60405162461bcd60e51b815260206004820152600560248201526404282aaa8960db1b6044820152606490fd5b919082519283825260005b8481106200044e575050826000602080949584010152601f8019910116010190565b6020818301810151848301820152016200042c56fe61012080604052346200049057600062003d9f803803809162000023828662000af0565b843982019160a081840312620004e35780516001600160401b03811162000aec57836200005291830162000b2a565b60208201519093906001600160401b03811162000ae857816200007791840162000b2a565b60408301519094906001600160401b038111620008355783019082601f8301121562000835578151926001600160401b03841162000ad4578360051b9260405194620000c7602086018762000af0565b855260208501602081958301019183831162000ad05760208101915b83831062000a9b5750505050506080620001006060860162000ba0565b9401516040516397d63f9360e01b8152909690916020836004816001600160a01b038a165afa92831562000a9057879362000a52575b508051906001600160401b03821162000a3e578754600181811c9116801562000a33575b602082101462000a1f579081601f849311620009cd575b50602090601f83116001146200095f57899262000953575b50508160011b916000199060031b1c19161786555b8051906001600160401b0382116200093f57600154600181811c9116801562000934575b602082101462000920579081601f849311620008c1575b50602090601f83116001146200084557889262000839575b50508160011b916000199060031b1c1916176001555b6daaeb6d7670e522a718067333cd4e3b62000783575b670de0b6b3a7640000906001600a5585600b5504608052606485116200073e578151156200060e57518051906001600160401b0382116200072a57600e54600181811c911680156200071f575b60208210146200070b579081601f849311620006ac575b50602090601f83116001146200063057869262000624575b50508160011b916000199060031b1c191617600e555b8051600110156200060e576040015180519093906001600160401b038111620005fa57600f54600181811c91168015620005ef575b6020821014620005db57601f811162000584575b506020601f8211600114620005075790806020949392869760049792620004fb575b50508160011b916000199060031b1c191617600f555b60c082905260a05260405163db8d55f160e01b815292839182906001600160a01b03165afa908115620004f0578291620004aa575b5060e05260c0516040516397d63f9360e01b815290602090829060049082906001600160a01b03165afa9182156200049e579162000461575b50670de0b6b3a764000061010091048152604051613189918262000bb6833960805182610e69015260a05182818161023e0152611439015260c05182818161028401528181610a9101528181610c7501528181610cdd01528181610d1f01528181610d7b0152818161121b0152818161148a015281816114fe015281816115ed01528181611a2101528181611a9401528181611b0801528181611b5d0152611ba6015260e0518281816102b70152610b1d0152518181816106270152610e390152f35b90506020813d60201162000495575b816200047f6020938362000af0565b81010312620004905751386200039e565b600080fd5b3d915062000470565b604051903d90823e3d90fd5b90506020813d602011620004e7575b81620004c86020938362000af0565b81010312620004e357620004dc9062000ba0565b3862000365565b5080fd5b3d9150620004b9565b6040513d84823e3d90fd5b0151905038806200031a565b600f855260008051602062003d7f83398151915295601f198316865b8181106200056b575096600192849260209796956004999a1062000551575b505050811b01600f5562000330565b015160001960f88460031b161c1916905538808062000542565b8383015189556001909801976020938401930162000523565b600f855260008051602062003d7f833981519152601f830160051c81019160208410620005d0575b601f0160051c01905b818110620005c45750620002f8565b858155600101620005b5565b9091508190620005ac565b634e487b7160e01b85526022600452602485fd5b90607f1690620002e4565b634e487b7160e01b84526041600452602484fd5b634e487b7160e01b600052603260045260246000fd5b01519050388062000299565b600e875286935060008051602062003d3f83398151915291905b601f198416851062000690576001945083601f1981161062000676575b505050811b01600e55620002af565b015160001960f88460031b161c1916905538808062000667565b818101518355602094850194600190930192909101906200064a565b600e875290915060008051602062003d3f833981519152601f840160051c81016020851062000703575b90849392915b601f830160051c82018110620006f457505062000281565b888155859450600101620006dc565b5080620006d6565b634e487b7160e01b86526022600452602486fd5b90607f16906200026a565b634e487b7160e01b85526041600452602485fd5b60405162461bcd60e51b815260206004820152601760248201527f526564656d7074696f6e2066656520746f6f20686967680000000000000000006044820152606490fd5b6daaeb6d7670e522a718067333cd4e3b156200083557604051633e9f1edf60e11b8152306004820152733cc6cdda760b79bafa08df41ecfa224f810dceb660248201528581604481836daaeb6d7670e522a718067333cd4e5af180156200082a57620007f1575b506200021d565b9094906001600160401b038111620008165760405293670de0b6b3a7640000620007ea565b634e487b7160e01b82526041600452602482fd5b6040513d88823e3d90fd5b8480fd5b015190503880620001f1565b6001895288935060008051602062003d5f83398151915291905b601f1984168510620008a5576001945083601f198116106200088b575b505050811b0160015562000207565b015160001960f88460031b161c191690553880806200087c565b818101518355602094850194600190930192909101906200085f565b6001895290915060008051602062003d5f833981519152601f840160051c81016020851062000918575b90849392915b601f830160051c8201811062000909575050620001d9565b8a8155859450600101620008f1565b5080620008eb565b634e487b7160e01b88526022600452602488fd5b90607f1690620001c2565b634e487b7160e01b87526041600452602487fd5b01519050388062000189565b9250888052602089209089935b601f1984168510620009b1576001945083601f1981161062000997575b505050811b0186556200019e565b015160001960f88460031b161c1916905538808062000989565b818101518355602094850194600190930192909101906200096c565b90915088805260208920601f840160051c81016020851062000a17575b90849392915b601f830160051c8201811062000a0857505062000171565b8b8155859450600101620009f0565b5080620009ea565b634e487b7160e01b89526022600452602489fd5b90607f16906200015a565b634e487b7160e01b88526041600452602488fd5b9092506020813d60201162000a87575b8162000a716020938362000af0565b8101031262000a835751913862000136565b8680fd5b3d915062000a62565b6040513d89823e3d90fd5b82516001600160401b03811162000acc5760209162000ac08784809487010162000b2a565b815201920191620000e3565b8a80fd5b8880fd5b634e487b7160e01b86526041600452602486fd5b8380fd5b8280fd5b601f909101601f19168101906001600160401b0382119082101762000b1457604052565b634e487b7160e01b600052604160045260246000fd5b919080601f84011215620004905782516001600160401b03811162000b14576020906040519262000b6583601f19601f850116018562000af0565b818452828287010111620004905760005b81811062000b8c57508260009394955001015290565b858101830151848201840152820162000b76565b51906001600160a01b0382168203620004905756fe608080604052600436101561001357600080fd5b60003560e01c90816301ffc9a7146121715750806306fdde03146120c6578063081812fc146120a8578063095ea7b314611f2557806313f4e12914611f0957806318160ddd14611eeb5780631a0b0f6914611a635780631e5e3fe2146119f557806323b872dd146119b05780632f745c59146118fe5780633410fe6e146118e157806341f43434146118b85780634218803c1461189a57806342842e0e146118425780634f6ccce7146117bf57806355f804b3146115bf5780636352211e1461158f57806370a08231146115645780637f0a655d1461152d5780638b3827c3146114e85780638da5cb5b1461145c57806392ec16ed14611421578063938e3d7b146111ed57806394b918de14610c1b57806395d89b4114610b4c5780639af1d35a14610b075780639d1b464a14610a6b578063a22cb46514610990578063a9369cc714610964578063b88d4fde1461087b578063c0e72740146105db578063c87b56dd14610666578063d547cfb71461064a578063d5abeb011461060f578063e8a3d485146105db578063e985e9c5146105855763f9afb26a146101b657600080fd5b346103bc576101c43661226a565b6101cc612996565b6040516370a0823160e01b8082523360048301526020916024919083818481305afa80156103c8578591600091610554575b501061051b5761020f841515612644565b6040519080825230600483015283828481305afa9182156103c8576000926104ec575b5061023c85612886565b7f0000000000000000000000000000000000000000000000000000000000000000908181029181830414901517156104d7576103e8900460005b8681106103d457506102f2907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906102ea906102dc817f000000000000000000000000000000000000000000000000000000000000000085612ad8565b6102e589612886565b6128c6565b903390612ad8565b60405190815230600482015283818481305afa9081156103c8578590600092610391575b5061032191926126a0565b116103635760405133907f95a8789c26436cc55b5951f117195be05dfa3022c619a84c1449f83f9cf8706890806103598789836126f9565b0390a26001600a55005b9060086064926040519262461bcd60e51b8452600484015282015267042616420537761760c41b6044820152fd5b809250858092503d83116103c1575b6103aa81836123ea565b810103126103bc575184610321610316565b600080fd5b503d6103a0565b6040513d6000823e3d90fd5b6103df81888a612690565b356011908154600160401b8110156104c2579061040482600161041d94018555612336565b90919082549060031b91821b91600019901b1916179055565b80546000198101919082116104ae575061043882898b612690565b356000526010875260406000205561045181888a612690565b3590303b156103bc576040516323b872dd60e01b815233600482015230602482015260448101929092526000828060648101038183305af19182156103c85760019261049f575b5001610276565b6104a8906123ba565b38610498565b8690634e487b7160e01b6000526004526000fd5b87634e487b7160e01b60005260416004526000fd5b83634e487b7160e01b60005260116004526000fd5b9091508381813d8311610514575b61050481836123ea565b810103126103bc57519038610232565b503d6104fa565b60405162461bcd60e51b81526004810184905260128184015271496e7375666669656e742042616c616e636560701b6044820152606490fd5b809250858092503d831161057e575b61056d81836123ea565b810103126103bc57849051386101fe565b503d610563565b346103bc5760403660031901126103bc5761059e61223e565b6105a6612254565b9060018060a01b03809116600052600560205260406000209116600052602052602060ff604060002054166040519015158152f35b346103bc5760003660031901126103bc5761060b6105f7612462565b604051918291602083526020830190612219565b0390f35b346103bc5760003660031901126103bc5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346103bc5760003660031901126103bc5761060b6105f7612528565b346103bc576020806003193601126103bc5760043560008181526002602052604090205461069e906001600160a01b0316151561279d565b816106a7612528565b80519092901561086257600090807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008181811015610854575b5050836d04ee2d6d415b85acef810000000080831015610848575b5050662386f26fc100008082101561083b575b506305f5e1008082101561082e575b5061271080821015610821575b506064811015610813575b600a80911015610809575b6001808401928160216107666107508761240c565b9661075e60405198896123ea565b80885261240c565b8689019790601f1901368937860101905b6107d3575b50505050926107bd92916107b19460405195836107a288955180928880890191016121f6565b840191518093868401906121f6565b010380845201826123ea565b905b61060b604051928284938452830190612219565b600019019083906f181899199a1a9b1b9c1cb0b131b232b360811b8282061a83530491821561080457919082610777565b61077c565b916001019161073b565b606460029104920191610730565b6004910492019186610725565b6008910492019186610718565b6010910492019186610709565b930192900483876106f6565b6040945004905086806106db565b505050604051610871816123ce565b60008152906107bf565b346103bc5760803660031901126103bc5761089461223e565b61089c612254565b906044356064359267ffffffffffffffff84116103bc57366023850112156103bc578360040135926108cd8461240c565b936108db60405195866123ea565b80855236602482880101116103bc57602081600092602461093299018389013786010152336001600160a01b03821603610956575b61092261091d8433612c10565b612a76565b61092d838383612cd8565b612fbc565b1561093957005b60405162461bcd60e51b81528061095260048201612f39565b0390fd5b61095f336128eb565b610910565b346103bc5760203660031901126103bc5760043560005260106020526020604060002054604051908152f35b346103bc5760403660031901126103bc576109a961223e565b602435908115158092036103bc576109c0816128eb565b6001600160a01b031690338214610a2657336000526005602052604060002082600052602052604060002060ff1981541660ff83161790556040519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b60405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606490fd5b346103bc5760003660031901126103bc57604051634e8da32560e11b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c857600090610ad4575b602090604051908152f35b506020813d602011610aff575b81610aee602093836123ea565b810103126103bc5760209051610ac9565b3d9150610ae1565b346103bc5760003660031901126103bc576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346103bc5760003660031901126103bc57604051600060018260015492610b7284612428565b9283835260209485600182169182600014610bfb575050600114610b9e575b506107bf925003836123ea565b84915060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6906000915b858310610be35750506107bf935082010185610b91565b80548389018501528794508693909201918101610bcc565b60ff1916858201526107bf95151560051b8501019250879150610b919050565b346103bc5760203660031901126103bc57600435610c37612996565b670de0b6b3a7640000808204808202908015908204831417156110845782036111b6576040516370a0823160e01b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c8578290600090611180575b610cbb92501015612605565b8115611143576040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9182156103c85760009261110f575b50610d4c8330337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612a2d565b33159060005b8185048110610e375750506040516370a0823160e01b81523060048201529190506020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9081156103c8578392600092610dfe575b50610dcb92610dc4916126a0565b11156126ad565b6040519081527f562c219552544ec4c9d7a8eb850f80ea152973e315372bf4999fe7c953ea004f60203392a26001600a55005b925090506020823d602011610e2f575b81610e1b602093836123ea565b810103126103bc5790518291610dcb610db6565b3d9150610e0e565b7f0000000000000000000000000000000000000000000000000000000000000000600d5410156110d657610e8d600b547f00000000000000000000000000000000000000000000000000000000000000006128c6565b92604051602081014481524260408301526040825281606081011067ffffffffffffffff6060840111176110c05760608201604052815190209480156110aa5780600019810111611084576000198101600052600c60205260406000205480156000146110a457506000198101905b8087066000526040600020968754801560001461109a57500695555b600b54916000198314611084576001809301600b5561103d57506000848152600260205260409020546001929190610f5c906001600160a01b031615155b15612eed565b600854856000526009602052604060002055610f77856128a3565b600094610f833361280f565b33600052600660205260406000208160005260205281604060002055816000526007602052604060002055610fd0610f5682600052600260205260018060a01b0360406000205416151590565b33600052600360205260406000208281540190558060005260026020526040600020336bffffffffffffffffffffffff60a01b8254161790553360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600d5401600d5501610d52565b62461bcd60e51b60608201526060606491602083820152602060848201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360a482015201fd5b634e487b7160e01b600052601160045260246000fd5b9150509555610f18565b90610efc565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60405162461bcd60e51b815260206004820152601160248201527013585e0814dd5c1c1b1e48135a5b9d1959607a1b6044820152606490fd5b9091506020813d60201161113b575b8161112b602093836123ea565b810103126103bc57519083610d16565b3d915061111e565b60405162461bcd60e51b8152602060048201526015602482015274416d6f756e742063616e6e6f74206265207a65726f60581b6044820152606490fd5b50506020813d6020116111ae575b8161119b602093836123ea565b810103126103bc5781610cbb9151610caf565b3d915061118e565b60405162461bcd60e51b815260206004820152600f60248201526e57686f6c652047425473206f6e6c7960881b6044820152606490fd5b346103bc576111fb366122ec565b6040516321de0b0960e11b8152602092906001600160a01b0384826004817f000000000000000000000000000000000000000000000000000000000000000085165afa80156103c857611259926000916113f4575b50163314612741565b67ffffffffffffffff82116110c057611273600f54612428565b601f8111611390575b50600092601f83116001146112eb5750817f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea52936000916112e0575b508260011b906000198460031b1c191617600f555b6112db60405192839283612775565b0390a1005b9050810135846112b7565b601f19831693600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802916000905b868210611378575050837f5ca9f750836b0b7efdace104f07b5c9f0df0650c0fd24f5163e99044ae36ea52951061135e575b5050600182811b01600f556112cc565b820135600019600385901b60f8161c19169055838061134e565b8060018495829495880135815501940192019061131c565b600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802601f840160051c8101918585106113ea575b601f0160051c01905b8181106113de575061127c565b600081556001016113d1565b90915081906113c8565b6114149150863d881161141a575b61140c81836123ea565b810190612722565b86611250565b503d611402565b346103bc5760003660031901126103bc5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346103bc5760003660031901126103bc576040516321de0b0960e11b81526001600160a01b036020826004817f000000000000000000000000000000000000000000000000000000000000000085165afa9081156103c8576020926000926114c9575b5060405191168152f35b6114e1919250833d851161141a5761140c81836123ea565b90836114bf565b346103bc5760003660031901126103bc576040517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b346103bc5760203660031901126103bc576004356011548110156103bc57611556602091612336565b90546040519160031b1c8152f35b346103bc5760203660031901126103bc57602061158761158261223e565b61280f565b604051908152f35b346103bc5760203660031901126103bc5760206115ad6004356127e9565b6040516001600160a01b039091168152f35b346103bc576115cd366122ec565b6040516321de0b0960e11b8152602092906001600160a01b0384826004817f000000000000000000000000000000000000000000000000000000000000000085165afa80156103c85761162a926000916113f45750163314612741565b67ffffffffffffffff82116110c057611644600e54612428565b601f811161175b575b50600092601f83116001146116b65750817f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa936000916116ab575b508260011b906000198460031b1c191617600e556112db60405192839283612775565b905081013584611688565b601f19831693600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd916000905b868210611743575050837f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa9510611729575b5050600182811b01600e556112cc565b820135600019600385901b60f8161c191690558380611719565b806001849582949588013581550194019201906116e7565b600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd601f840160051c8101918585106117b5575b601f0160051c01905b8181106117a9575061164d565b6000815560010161179c565b9091508190611793565b346103bc5760203660031901126103bc576004356008548110156117e857611556602091612383565b60405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608490fd5b346103bc57610932611853366122b7565b6001600160a01b038316331415929091908361188c575b60405193611877856123ce565b600085526109565761092261091d8433612c10565b611895336128eb565b61186a565b346103bc5760003660031901126103bc576020601154604051908152f35b346103bc5760003660031901126103bc5760206040516daaeb6d7670e522a718067333cd4e8152f35b346103bc5760003660031901126103bc5760206040516103e88152f35b346103bc5760403660031901126103bc5761191761223e565b602435906119248161280f565b8210156119575760018060a01b031660005260066020526040600020906000526020526020604060002054604051908152f35b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b346103bc576119e56119c1366122b7565b91336001600160a01b038216036119e7575b6119e061091d8433612c10565b612cd8565b005b6119f0336128eb565b6119d3565b346103bc5760003660031901126103bc576040516370a0823160e01b81523060048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c857600090610ad457602090604051908152f35b346103bc57611a713661226a565b611a79612996565b6040516370a0823160e01b81523360048201526020816024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa80156103c857600090611eb7575b611ae19150611ada83612886565b1115612605565b611aec811515612644565b6040516370a0823160e01b8152306004820152906020826024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9182156103c857600092611e83575b5060005b818110611c625750611b8a611b5982612886565b30337f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612a2d565b6040516370a0823160e01b8152306004820152916020836024817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa9283156103c857600093611c2a575b5090611c1c7fba6b5103a706294ecf2442116930a8aac6fa28e62c4ce7b9bad6e2b019a9bb3793610dc461035994611c1685612886565b906126a0565b6040519182913395836126f9565b9250906020833d602011611c5a575b81611c46602093836123ea565b810103126103bc5791519190611c1c611bdf565b3d9150611c39565b611c6d818386612690565b35600052601060205260001960406000205414611e2757611c8f818386612690565b35600052601060205260406000205460118054600181119081611dfc575b5015611ded57611cbc82612336565b905482546000198101908111611dd857611cd590612336565b90549060031b1c92611cea8461040487612336565b80549081600019810111611dc4575090611d0b611d29939260001901612336565b91909260031b1c9082549060031b91821b91600019901b1916179055565b6000526010602052604060002055611d3f6129ec565b611d4a818386612690565b356000526010602052600019604060002055611d67818386612690565b3590303b156103bc576040516323b872dd60e01b815230600482015233602482015260448101929092526000828060648101038183305af19182156103c857600192611db5575b5001611b45565b611dbe906123ba565b85611dae565b634e487b7160e01b60005260045260246000fd5b83634e487b7160e01b60005260045260246000fd5b5050611df76129ec565b611d3f565b600019810191508111611e125782141587611cad565b50634e487b7160e01b60005260045260246000fd5b60405162461bcd60e51b815260206004820152602e60248201527f4e46542072656d6f7665642066726f6d206d617070696e672c2073656e74696e60448201526d656c206e756d62657220282d312960901b6064820152608490fd5b9091506020813d602011611eaf575b81611e9f602093836123ea565b810103126103bc57519083611b41565b3d9150611e92565b506020813d602011611ee3575b81611ed1602093836123ea565b810103126103bc57611ae19051611acc565b3d9150611ec4565b346103bc5760003660031901126103bc576020600854604051908152f35b346103bc5760003660031901126103bc5760206115873061280f565b346103bc5760403660031901126103bc57611f3e61223e565b60243590611f4b816128eb565b6001600160a01b038080611f5e856127e9565b1692169180831461205957803314908115612034575b5015611fc957600083815260046020526040902080546001600160a01b03191683179055611fa1836127e9565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4005b60405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608490fd5b9050600052600560205260406000203360005260205260ff6040600020541684611f74565b60405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b346103bc5760203660031901126103bc5760206115ad6004356125c7565b346103bc5760003660031901126103bc576040516000805490826120e983612428565b9182825260209360019085600182169182600014610bfb57505060011461211757506107bf925003836123ea565b6000808052859250907f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b8583106121595750506107bf935082010185610b91565b80548389018501528794508693909201918101612142565b346103bc5760203660031901126103bc576004359063ffffffff60e01b82168092036103bc5760209163780e9d6360e01b81149081156121b3575b5015158152f35b6380ac58cd60e01b8114915081156121e5575b81156121d4575b50836121ac565b6301ffc9a760e01b149050836121cd565b635b5e139f60e01b811491506121c6565b60005b8381106122095750506000910152565b81810151838201526020016121f9565b90602091612232815180928185528580860191016121f6565b601f01601f1916010190565b600435906001600160a01b03821682036103bc57565b602435906001600160a01b03821682036103bc57565b9060206003198301126103bc5760043567ffffffffffffffff928382116103bc57806023830112156103bc5781600401359384116103bc5760248460051b830101116103bc576024019190565b60609060031901126103bc576001600160a01b039060043582811681036103bc579160243590811681036103bc579060443590565b9060206003198301126103bc5760043567ffffffffffffffff928382116103bc57806023830112156103bc5781600401359384116103bc57602484830101116103bc576024019190565b60115481101561236d5760116000527f31ecc21a745e3968a04e9570e4425bc18fa8019c68028196b546d1669c200c680190600090565b634e487b7160e01b600052603260045260246000fd5b60085481101561236d5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30190600090565b67ffffffffffffffff81116110c057604052565b6020810190811067ffffffffffffffff8211176110c057604052565b90601f8019910116810190811067ffffffffffffffff8211176110c057604052565b67ffffffffffffffff81116110c057601f01601f191660200190565b90600182811c92168015612458575b602083101461244257565b634e487b7160e01b600052602260045260246000fd5b91607f1691612437565b60405190600082600f549161247683612428565b8083529260209060019081811690811561250457506001146124a3575b50506124a1925003836123ea565b565b915092600f6000527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802936000925b8284106124ec57506124a19450505081016020013880612493565b855488850183015294850194879450928101926124d1565b915050602092506124a194915060ff191682840152151560051b8201013880612493565b60405190600082600e549161253c83612428565b8083529260209060019081811690811561250457506001146125665750506124a1925003836123ea565b915092600e6000527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd936000925b8284106125af57506124a19450505081016020013880612493565b85548885018301529485019487945092810192612594565b6000818152600260205260409020546125ea906001600160a01b0316151561279d565b6000908152600460205260409020546001600160a01b031690565b1561260c57565b60405162461bcd60e51b815260206004820152601060248201526f496e7375666669656e742066756e647360801b6044820152606490fd5b1561264b57565b60405162461bcd60e51b815260206004820152601f60248201527f506172616d65746572206c656e6774682063616e6e6f74206265207a65726f006044820152606490fd5b919081101561236d5760051b0190565b9190820180921161108457565b156126b457565b60405162461bcd60e51b815260206004820152601a60248201527f436f6e74726163742062616c616e636520756e646572666c6f770000000000006044820152606490fd5b602080825281018390526001600160fb1b0383116103bc5760409260051b809284830137010190565b908160209103126103bc57516001600160a01b03811681036103bc5790565b1561274857565b60405162461bcd60e51b815260206004820152600560248201526404282aaa8960db1b6044820152606490fd5b90918060409360208452816020850152848401376000828201840152601f01601f1916010190565b156127a457565b60405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152606490fd5b6000908152600260205260409020546001600160a01b031661280c81151561279d565b90565b6001600160a01b0316801561282f57600052600360205260406000205490565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608490fd5b90670de0b6b3a76400009182810292818404149015171561108457565b60085490600160401b8210156110c0576104048260016124a19401600855612383565b9190820391821161108457565b908160209103126103bc575180151581036103bc5790565b6daaeb6d7670e522a718067333cd4e90813b612905575050565b604051633185c44d60e21b81523060048201526001600160a01b039091166024820181905291602090829060449082905afa9081156103c857600091612967575b501561294f5750565b60249060405190633b79c77360e21b82526004820152fd5b612989915060203d60201161298f575b61298181836123ea565b8101906128d3565b38612946565b503d612977565b6002600a54146129a7576002600a55565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6011548015612a175760001990810190612a0582612336565b909182549160031b1b19169055601155565b634e487b7160e01b600052603160045260246000fd5b6040516323b872dd60e01b60208201526001600160a01b0392831660248201529290911660448301526064808301939093529181526124a191612a716084836123ea565b612b24565b15612a7d57565b60405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201526c1c881bdc88185c1c1c9bdd9959609a1b6064820152608490fd5b60405163a9059cbb60e01b60208201526001600160a01b039092166024830152604480830193909352918152608081019167ffffffffffffffff8311828410176110c0576124a1926040525b60408051908101916001600160a01b031667ffffffffffffffff8311828410176110c057612b94926040526000806020958685527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656487860152868151910182855af1612b8e612f8c565b916130ba565b80519081612ba157505050565b8280612bb19383010191016128d3565b15612bb95750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b906001600160a01b038080612c24846127e9565b16931691838314938415612c57575b508315612c41575b50505090565b612c4d919293506125c7565b1614388080612c3b565b909350600052600560205260406000208260005260205260ff604060002054169238612c33565b15612c8557565b60405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608490fd5b612cfc91612ce5846127e9565b6001600160a01b0393848416939185168414612c7e565b838216938415612e9c57839182612df95750612d4692600854876000526009602052604060002055612d2d876128a3565b828603612dc6575b50612d3f866127e9565b1614612c7e565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60008481526004602052604081206bffffffffffffffffffffffff60a01b9081815416905583825260036020526040822060001981540190558482526040822060018154019055858252600260205284604083209182541617905580a4565b612dcf9061280f565b60406000878152600660205281812083825260205288828220558881526007602052205538612d35565b858303612e0b575b50612d4692612d2d565b612e1691925061280f565b60001981019190821161108457612d469284926000908882526020906007825260409182842054828103612e65575b508a84528383812055868452600681528284209184525281205592612e01565b8785526006825283852083865282528385205488865260068352848620828752835280858720558552600782528385205538612e45565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15612ef457565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b3d15612fb7573d90612f9d8261240c565b91612fab60405193846123ea565b82523d6000602084013e565b606090565b9290803b156130b15761300c9160209160018060a01b039460405180958194829389630a85bd0160e11b9b8c86523360048701521660248501526044840152608060648401526084830190612219565b03916000968791165af190829082613061575b50506130535761302d612f8c565b8051908161304e5760405162461bcd60e51b81528061095260048201612f39565b602001fd5b6001600160e01b0319161490565b909192506020813d6020116130a9575b8161307e602093836123ea565b810103126130a55751906001600160e01b0319821682036130a2575090388061301f565b80fd5b5080fd5b3d9150613071565b50505050600190565b9192901561311c57508151156130ce575090565b3b156130d75790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b82519091501561312f5750805190602001fd5b60405162461bcd60e51b81526020600482015290819061095290602483019061221956fea2646970667358221220ff4463cdb0884a2490550376a330bb2a7e8d090d9e0e7da830445686bc7a9c6764736f6c63430008180033bb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fdb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802a264697066735822122042551fb9a27d31c2471cf0118c86957a900baf5c531fd8ef1e269fee783c620464736f6c63430008180033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.