Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60808060 | 16343841 | 687 days ago | IN | 0 ETH | 0.11160015 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
Bueno721Drop
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts-upgradeable/finance/PaymentSplitterUpgradeable.sol"; import "operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol"; struct PhaseSettings { /// @dev phase supply. This can be released to public by ending the phase. uint64 maxSupply; /// @dev tracks the total amount minted in the phase uint64 amountMinted; /// @dev wallet maximum for the phase uint64 maxPerWallet; /// @dev merkle root for the phase (if applicable, otherwise bytes32(0)) bytes32 merkleRoot; /// @dev whether the phase is active bool isActive; /// @dev price for the phase (or free if 0) uint256 price; } struct BaseSettings { /// @dev public sale supply. ending a phase will carry supply into this value uint64 maxSupply; /// @dev global wallet maximum across all phases (including public) uint64 maxPerWallet; /// @dev tracks the total amount minted in the public sale uint64 amountMinted; /// @dev price for the public sale (or free if 0) uint256 price; } struct SaleState { uint64 numPhases; mapping(uint256 => PhaseSettings) phases; } struct PaymentSplitterSettings { address[] payees; uint256[] shares; } struct RoyaltySettings { address royaltyAddress; uint96 royaltyAmount; } error SaleInactive(); error SoldOut(); error InvalidPrice(); error ExceedMaxPerWallet(); error InvalidProof(); error PhaseNotActive(); error NotAllowlisted(); error InvalidMintFunction(); error InvalidAirdrop(); error InvalidPhase(); error BurningNotAllowed(); /// @author Bueno.art /// @title ERC-721 Multi-Phase Drop Contract contract Bueno721Drop is ERC721AQueryableUpgradeable, OwnableUpgradeable, ERC2981Upgradeable, PaymentSplitterUpgradeable, OperatorFiltererUpgradeable { string public _baseTokenURI; SaleState public saleState; BaseSettings public baseSettings; uint256 public maxSupply; address[] public withdrawAddresses; mapping(address => mapping(uint256 => uint64)) private amountMintedForPhase; bool public isPublicActive; bool private allowBurning; event TokensMinted(address indexed to, uint256 quantity); event TokenBurned(address indexed owner, uint256 tokenId); event TokensAirdropped(uint256 numRecipients, uint256 numTokens); event PhasesActivated(uint256[] phaseIds, bool activatedPublic); event PhasesPaused(uint256[] phaseIds, bool pausedPublic); event PhaseEnded(uint256 phaseIds); event BurnStatusChanged(bool burnActive); event PhaseSettingsUpdated(uint256 phaseId, PhaseSettings settings); event BaseSettingsUpdated(BaseSettings settings); event BaseURIUpdated(string baseURI); event RoyaltyUpdated(address royaltyAddress, uint96 royaltyAmount); /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( string memory _name, string memory _symbol, string memory _baseUri, RoyaltySettings calldata _royaltySettings, PhaseSettings[] calldata _phases, BaseSettings calldata _baseSettings, PaymentSplitterSettings calldata _paymentSplitterSettings, uint256 _maxIntendedSupply, bool _allowBurning, address _deployer, address _operatorFilter ) public initializerERC721A initializer { __ERC721A_init(_name, _symbol); __Ownable_init(); __PaymentSplitter_init( _paymentSplitterSettings.payees, _paymentSplitterSettings.shares ); uint64 numPhases = uint64(_phases.length); uint256 supplyValidationCount = _baseSettings.maxSupply; for (uint256 i = 0; i < numPhases; ) { saleState.phases[i] = _phases[i]; supplyValidationCount += _phases[i].maxSupply; // numPhases has a maximum value of 2^64 - 1 unchecked { ++i; } } require( supplyValidationCount == _maxIntendedSupply, "Supply of all phases must equal maxIntendedSupply" ); _baseTokenURI = _baseUri; withdrawAddresses = _paymentSplitterSettings.payees; saleState.numPhases = numPhases; baseSettings = _baseSettings; allowBurning = _allowBurning; maxSupply = _maxIntendedSupply; _setDefaultRoyalty( _royaltySettings.royaltyAddress, _royaltySettings.royaltyAmount ); transferOwnership(_deployer); OperatorFiltererUpgradeable.__OperatorFilterer_init( _operatorFilter, _operatorFilter == address(0) ? false : true // only subscribe if a filter is provided ); } // ========= EXTERNAL MINTING METHODS ========= /** * @notice Mint tokens for an allowlisted phase * @dev Calling this function for a phase that doesn't have an allowlist will fail */ function mintPhaseAllowlist( uint256 phaseIndex, uint64 quantity, bytes32[] calldata proof ) external payable { uint64 updatedAmountMinted = _checkAllowlistPhaseMintConditions( msg.sender, quantity, proof, phaseIndex, msg.value ); _checkGlobalPerWalletMax(msg.sender, quantity); saleState.phases[phaseIndex].amountMinted += quantity; amountMintedForPhase[msg.sender][phaseIndex] = updatedAmountMinted; _mint(msg.sender, quantity); emit TokensMinted(msg.sender, quantity); } /** * @notice Mint tokens for a non-allowlist phase. * @dev Calling this function for a phase that has an allowlist will fail */ function mintPhase(uint256 phaseIndex, uint64 quantity) external payable { uint64 updatedAmountMinted = _checkPhaseMintConditions( msg.sender, quantity, phaseIndex, msg.value ); _checkGlobalPerWalletMax(msg.sender, quantity); saleState.phases[phaseIndex].amountMinted += quantity; amountMintedForPhase[msg.sender][phaseIndex] = updatedAmountMinted; _mint(msg.sender, quantity); emit TokensMinted(msg.sender, quantity); } /** * @notice Mint tokens in the public sale */ function mintPublic(uint64 quantity) external payable { uint64 updatedAmountMinted = _checkPublicMintConditions( quantity, msg.value ); _checkGlobalPerWalletMax(msg.sender, quantity); baseSettings.amountMinted = updatedAmountMinted; _mint(msg.sender, quantity); emit TokensMinted(msg.sender, quantity); } /** * @notice Mint tokens in all possible phases (including public sale) */ function mintBatch( uint64[] calldata quantities, bytes32[][] calldata proofs, uint256[] calldata phaseIndices, uint64 publicQuantity ) external payable { uint256 phaseLength = phaseIndices.length; if ( phaseLength > saleState.numPhases || phaseLength != quantities.length || phaseLength != proofs.length ) { revert InvalidPhase(); } uint256 balance = msg.value; uint256 quantityToMint; for (uint256 i = 0; i < phaseLength; ) { uint64 updatedAmount; uint256 phaseIndex = phaseIndices[i]; uint64 quantity = quantities[i]; bytes32[] calldata proof = proofs[i]; PhaseSettings storage phase = saleState.phases[phaseIndex]; uint256 priceForPhase = phase.price * quantity; // Since price is strictly checked in the _check* functions below, // we have an additional check here to ensure that the balance doesn't underflow if (balance < priceForPhase) { revert InvalidPrice(); } // if the phase has no allowlist, the merkleRoot will be zeroed out. if (phase.merkleRoot == bytes32(0)) { updatedAmount = _checkPhaseMintConditions( msg.sender, quantity, phaseIndex, priceForPhase ); } else { updatedAmount = _checkAllowlistPhaseMintConditions( msg.sender, quantity, proof, phaseIndex, priceForPhase ); } // quantity & phaseLength have a maximum value of 2^64 - 1 // balance underflow is checked above unchecked { saleState.phases[phaseIndex].amountMinted += quantity; amountMintedForPhase[msg.sender][phaseIndex] = updatedAmount; balance -= priceForPhase; quantityToMint += quantity; ++i; } } uint256 totalMintQuantity = quantityToMint; if (publicQuantity > 0) { _checkPublicMintConditions(publicQuantity, balance); // publicQuantity has a max value of 2^64 - 1 unchecked { baseSettings.amountMinted += publicQuantity; totalMintQuantity += publicQuantity; } } _checkGlobalPerWalletMax(msg.sender, totalMintQuantity); _mint(msg.sender, totalMintQuantity); emit TokensMinted(msg.sender, totalMintQuantity); } /** * @notice Burn a token, if the contract allows for it */ function burn(uint256 tokenId) external { if (!allowBurning) { revert BurningNotAllowed(); } _burn(tokenId, true); emit TokenBurned(msg.sender, tokenId); } // ========= OWNER METHODS ========= /** * @notice Perform a batch airdrop for a particular phase. * @dev Minted tokens are pulled from the phase that is specified in the airdropper. */ function airdropForPhase( uint256 phaseIndex, uint64[] calldata quantities, address[] calldata recipients ) external onlyOwner { uint256 numRecipients = recipients.length; uint256 totalAirdropped; if (numRecipients != quantities.length) revert InvalidAirdrop(); PhaseSettings storage phase = saleState.phases[phaseIndex]; for (uint256 i = 0; i < numRecipients; ) { uint64 updatedAmountMinted = phase.amountMinted + quantities[i]; if (updatedAmountMinted > phase.maxSupply) { revert SoldOut(); } // airdrops are not subject to the per-wallet mint limits, // but we track how much is minted for the phase phase.amountMinted = updatedAmountMinted; totalAirdropped += quantities[i]; _mint(recipients[i], quantities[i]); // numRecipients has a maximum value of 2^256 - 1 unchecked { ++i; } } emit TokensAirdropped(numRecipients, totalAirdropped); } /** * @notice Perform a batch airdrop for the public phase. * @dev Minted tokens are pulled from the public phase. */ function airdropPublic( uint64[] calldata quantities, address[] calldata recipients ) external onlyOwner { uint256 numRecipients = recipients.length; uint256 totalAirdropped; if (numRecipients != quantities.length) revert InvalidAirdrop(); for (uint256 i = 0; i < numRecipients; ) { uint64 updatedAmountMinted = baseSettings.amountMinted + quantities[i]; if (updatedAmountMinted > baseSettings.maxSupply) { revert SoldOut(); } // airdrops are not subject to the per-wallet mint limits, // but we track how much is minted for the phase baseSettings.amountMinted = updatedAmountMinted; totalAirdropped += quantities[i]; _mint(recipients[i], quantities[i]); // numRecipients has a maximum value of 2^256 - 1 unchecked { ++i; } } emit TokensAirdropped(numRecipients, totalAirdropped); } /** * @notice Specify which phases are active. * Public sale can be activated by setting `activatePublic` to true. */ function activatePhases( uint256[] calldata phaseIndices, bool activatePublic ) external onlyOwner { uint256 numPhases = phaseIndices.length; // activate all the phases provided in phaseIndices for (uint256 i = 0; i < numPhases; ) { uint256 phaseIndex = phaseIndices[i]; if (phaseIndex >= saleState.numPhases) { // phaseIndex is out of bounds revert InvalidPhase(); } saleState.phases[phaseIndices[i]].isActive = true; // numPhases has a maximum value of 2^256 - 1 unchecked { ++i; } } // calling this function with activatePublic=false only indicates the public sale // is not intended to be activated, but it does not pause it. if (activatePublic) { isPublicActive = true; } emit PhasesActivated(phaseIndices, activatePublic); } /** * @notice Specify which phases are inactive (paused). * Public sale can be paused by setting `pausePublic` to true. * Pausing is separate from ending, since ending permanently closes the phase. */ function pausePhases( uint256[] calldata phaseIndices, bool pausePublic ) external onlyOwner { uint256 numPhases = phaseIndices.length; for (uint256 i = 0; i < numPhases; ) { uint256 phaseIndex = phaseIndices[i]; if (phaseIndex >= saleState.numPhases) { // phaseIndex is out of bounds revert InvalidPhase(); } saleState.phases[phaseIndex].isActive = false; // numPhases has a maximum value of 2^256 - 1 unchecked { ++i; } } // calling this function with pausePublic=false only indicates the public sale // is not intended to be paused, but it does not pause it. if (pausePublic) { isPublicActive = false; } emit PhasesPaused(phaseIndices, pausePublic); } /** * @notice If enabled, the token can be burned, for approved operators. * @dev The burn method will revert unless this is enabled */ function toggleBurning() external onlyOwner { allowBurning = !allowBurning; emit BurnStatusChanged(allowBurning); } /** * @notice Permanently closes a phase by capping the supply & releasing it */ function endPhase(uint256 phaseIndex) public onlyOwner { PhaseSettings storage phase = saleState.phases[phaseIndex]; // if the phase never had supply, there is nothing to do if (phase.maxSupply == 0) { revert InvalidPhase(); } // transfer the remaining supply into the base settings (used for public sale accounting) baseSettings.maxSupply += phase.maxSupply - phase.amountMinted; // remove the supply from the phase phase.maxSupply = 0; emit PhaseEnded(phaseIndex); } function endPhases(uint64[] calldata phaseIndices) external onlyOwner { uint256 phaseIndicesLength = phaseIndices.length; // ensure that phaseIndices argument will only ever be as large as the number of phases if (phaseIndicesLength > saleState.numPhases) { revert InvalidPhase(); } for (uint256 i = 0; i < phaseIndicesLength; ) { endPhase(phaseIndices[i]); // phaseIndicesLength has a maximum value of 2^256 - 1 unchecked { ++i; } } } /** * @notice Updates the minting rules for a particular phase * @dev supply & amountMinted are not changeable */ function updatePhaseSettings( uint256 phaseIndex, PhaseSettings calldata phase ) external onlyOwner { uint64 existingAmountMinted = saleState.phases[phaseIndex].amountMinted; uint64 existingMaxSupply = saleState.phases[phaseIndex].maxSupply; bool existingStatus = saleState.phases[phaseIndex].isActive; saleState.phases[phaseIndex] = phase; // ensure that the amountMinted, maxSupply, and status values cannot be set saleState.phases[phaseIndex].amountMinted = existingAmountMinted; saleState.phases[phaseIndex].maxSupply = existingMaxSupply; saleState.phases[phaseIndex].isActive = existingStatus; emit PhaseSettingsUpdated(phaseIndex, phase); } /** * @notice Updates the the base minting settings * The global maxPerWallet setting applies to all phases * Pricing and other fields will apply to the public sale * * @dev maxSupply & amountMinted are not changeable */ function updateBaseSettings( BaseSettings calldata _baseSettings ) external onlyOwner { uint64 existingMaxSupply = baseSettings.maxSupply; uint64 existingAmountMinted = baseSettings.amountMinted; baseSettings = _baseSettings; // ensure that the maxSupply & amountMinted value cannot be set baseSettings.maxSupply = existingMaxSupply; baseSettings.amountMinted = existingAmountMinted; emit BaseSettingsUpdated(_baseSettings); } /** * @dev Payment can be pulled via PaymentSplitter.release * this method is provided for convenience to release all payee funds */ function withdraw() external onlyOwner { uint256 numAddresses = withdrawAddresses.length; for (uint256 i = 0; i < numAddresses; ) { address payable withdrawAddress = payable(withdrawAddresses[i]); if (releasable(withdrawAddress) > 0) { release(withdrawAddress); } // numAddresses has a maximum value of 2^256 - 1 unchecked { ++i; } } } function setBaseURI(string memory baseURI) external onlyOwner { _baseTokenURI = baseURI; emit BaseURIUpdated(baseURI); } function setRoyaltyInfo( address receiver, uint96 feeBasisPoints ) external onlyOwner { _setDefaultRoyalty(receiver, feeBasisPoints); emit RoyaltyUpdated(receiver, feeBasisPoints); } // ========= VIEW METHODS ========= function _startTokenId() internal view virtual override returns (uint256) { return 1; } function _checkAllowlistPhaseMintConditions( address wallet, uint64 quantity, bytes32[] calldata proof, uint256 phaseIndex, uint256 balance ) internal view returns (uint64) { PhaseSettings storage phase = saleState.phases[phaseIndex]; if (!phase.isActive) { revert PhaseNotActive(); } // there should be a valid merkle root for the phase if (phase.merkleRoot == bytes32(0)) { revert InvalidMintFunction(); } if (phase.amountMinted + quantity > phase.maxSupply) { revert SoldOut(); } if (balance != quantity * phase.price) { revert InvalidPrice(); } if ( !MerkleProof.verify( proof, phase.merkleRoot, keccak256(abi.encodePacked(wallet)) ) ) { revert InvalidProof(); } uint256 amountMinted = amountMintedForPhase[wallet][phaseIndex]; uint256 updatedAmountMinted = amountMinted + quantity; // phases can have a maxPerWallet if ( phase.maxPerWallet > 0 && updatedAmountMinted > phase.maxPerWallet ) { revert ExceedMaxPerWallet(); } return uint64(updatedAmountMinted); } function _checkPhaseMintConditions( address wallet, uint256 quantity, uint256 phaseIndex, uint256 balance ) internal view returns (uint64) { PhaseSettings storage phase = saleState.phases[phaseIndex]; if (!phase.isActive) { revert PhaseNotActive(); } // the phase should not have a merkleRoot if (phase.merkleRoot != bytes32(0)) { revert InvalidMintFunction(); } if (phase.amountMinted + quantity > phase.maxSupply) { revert SoldOut(); } if (balance != quantity * phase.price) { revert InvalidPrice(); } uint256 amountMinted = amountMintedForPhase[wallet][phaseIndex]; uint256 updatedAmountMinted = amountMinted + quantity; // phases can have a maxPerWallet if ( phase.maxPerWallet > 0 && updatedAmountMinted > phase.maxPerWallet ) { revert ExceedMaxPerWallet(); } return uint64(updatedAmountMinted); } function _checkPublicMintConditions( uint256 quantity, uint256 balance ) internal view returns (uint64) { if (!isPublicActive) { revert PhaseNotActive(); } uint256 updatedAmountMinted = baseSettings.amountMinted + quantity; if (updatedAmountMinted > baseSettings.maxSupply) { revert SoldOut(); } if (balance != quantity * baseSettings.price) { revert InvalidPrice(); } return uint64(updatedAmountMinted); } function _checkGlobalPerWalletMax( address wallet, uint256 quantity ) internal view { if ( baseSettings.maxPerWallet > 0 && _numberMinted(wallet) + quantity > baseSettings.maxPerWallet ) { revert ExceedMaxPerWallet(); } } function getDataForPhase( uint256 phaseIndex ) external view returns (PhaseSettings memory) { return saleState.phases[phaseIndex]; } function getMintBalance(address wallet) external view returns (uint256) { return _numberMinted(wallet); } function getAmountMintedForPhase( uint256 phaseIndex, address wallet ) external view returns (uint64) { return amountMintedForPhase[wallet][phaseIndex]; } function getAmountMintedForOwner( address wallet ) external view returns (uint256[] memory) { uint256[] memory amountMintedPerPhase = new uint256[]( saleState.numPhases + 1 ); for (uint64 i = 0; i < saleState.numPhases; ) { amountMintedPerPhase[i] = amountMintedForPhase[wallet][i]; // numPhases has a maximum value of 2^64 - 1 unchecked { ++i; } } amountMintedPerPhase[saleState.numPhases] = _numberMinted(wallet); return amountMintedPerPhase; } /** * @dev See {ERC721-_baseURI}. */ function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC721AUpgradeable, ERC721AUpgradeable, ERC2981Upgradeable) returns (bool) { return ERC721AUpgradeable.supportsInterface(interfaceId) || ERC2981Upgradeable.supportsInterface(interfaceId); } // ========= OPERATOR FILTERER OVERRIDES ========= function setApprovalForAll( address operator, bool approved ) public override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve( address operator, uint256 tokenId ) public payable override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721AUpgradeable, IERC721AUpgradeable) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20Upgradeable.sol"; import "../utils/AddressUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20Upgradeable indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20Upgradeable => uint256) private _erc20TotalReleased; mapping(IERC20Upgradeable => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ function __PaymentSplitter_init(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { __PaymentSplitter_init_unchained(payees, shares_); } function __PaymentSplitter_init_unchained(address[] memory payees, uint256[] memory shares_) internal onlyInitializing { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20Upgradeable token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20Upgradeable token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { uint256 totalReceived = address(this).balance + totalReleased(); return _pendingPayment(account, totalReceived, released(account)); } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20Upgradeable token, address account) public view returns (uint256) { uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); return _pendingPayment(account, totalReceived, released(token, account)); } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _totalReleased is the sum of all values in _released. // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow. _totalReleased += payment; unchecked { _released[account] += payment; } AddressUpgradeable.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20Upgradeable token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 payment = releasable(token, account); require(payment != 0, "PaymentSplitter: account is not due payment"); // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token]. // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment" // cannot overflow. _erc20TotalReleased[token] += payment; unchecked { _erc20Released[token][account] += payment; } SafeERC20Upgradeable.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[43] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981Upgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { function __ERC2981_init() internal onlyInitializing { } function __ERC2981_init_unchained() internal onlyInitializing { } struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981Upgradeable */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[48] private __gap; }
// 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 IERC20PermitUpgradeable { /** * @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 IERC20Upgradeable { /** * @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 "../IERC20Upgradeable.sol"; import "../extensions/draft-IERC20PermitUpgradeable.sol"; import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20Upgradeable 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( IERC20PermitUpgradeable 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(IERC20Upgradeable 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) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 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; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @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/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable diamond facet contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ import {ERC721A__InitializableStorage} from './ERC721A__InitializableStorage.sol'; abstract contract ERC721A__Initializable { using ERC721A__InitializableStorage for ERC721A__InitializableStorage.Layout; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializerERC721A() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require( ERC721A__InitializableStorage.layout()._initializing ? _isConstructor() : !ERC721A__InitializableStorage.layout()._initialized, 'ERC721A__Initializable: contract is already initialized' ); bool isTopLevelCall = !ERC721A__InitializableStorage.layout()._initializing; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = true; ERC721A__InitializableStorage.layout()._initialized = true; } _; if (isTopLevelCall) { ERC721A__InitializableStorage.layout()._initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializingERC721A() { require( ERC721A__InitializableStorage.layout()._initializing, 'ERC721A__Initializable: contract is not initializing' ); _; } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is a base storage for the initialization function for upgradeable diamond facet contracts **/ library ERC721A__InitializableStorage { struct Layout { /* * Indicates that the contract has been initialized. */ bool _initialized; /* * Indicates that the contract is in the process of being initialized. */ bool _initializing; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.initializable.facet'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ERC721AStorage { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } struct Layout { // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 _currentIndex; // The number of tokens burned. uint256 _burnCounter; // Token name string _name; // Token symbol string _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => ERC721AStorage.TokenApprovalRef) _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) _operatorApprovals; } bytes32 internal constant STORAGE_SLOT = keccak256('ERC721A.contracts.storage.ERC721A'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AUpgradeable.sol'; import {ERC721AStorage} from './ERC721AStorage.sol'; import './ERC721A__Initializable.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721ReceiverUpgradeable { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721AUpgradeable is ERC721A__Initializable, IERC721AUpgradeable { using ERC721AStorage for ERC721AStorage.Layout; // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // CONSTRUCTOR // ============================================================= function __ERC721A_init(string memory name_, string memory symbol_) internal onlyInitializingERC721A { __ERC721A_init_unchained(name_, symbol_); } function __ERC721A_init_unchained(string memory name_, string memory symbol_) internal onlyInitializingERC721A { ERC721AStorage.layout()._name = name_; ERC721AStorage.layout()._symbol = symbol_; ERC721AStorage.layout()._currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return ERC721AStorage.layout()._currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return ERC721AStorage.layout()._currentIndex - ERC721AStorage.layout()._burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return ERC721AStorage.layout()._currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return ERC721AStorage.layout()._burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return ERC721AStorage.layout()._packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(ERC721AStorage.layout()._packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = ERC721AStorage.layout()._packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); ERC721AStorage.layout()._packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return ERC721AStorage.layout()._name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return ERC721AStorage.layout()._symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(ERC721AStorage.layout()._packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (ERC721AStorage.layout()._packedOwnerships[index] == 0) { ERC721AStorage.layout()._packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = ERC721AStorage.layout()._packedOwnerships[tokenId]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= ERC721AStorage.layout()._currentIndex) revert OwnerQueryForNonexistentToken(); // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = ERC721AStorage.layout()._packedOwnerships[--tokenId]; } if (packed == 0) continue; return packed; } } // Otherwise, the data exists and is not burned. We can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. return packed; } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return ERC721AStorage.layout()._tokenApprovals[tokenId].value; } /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool approved) public virtual override { ERC721AStorage.layout()._operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return ERC721AStorage.layout()._operatorApprovals[owner][operator]; } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < ERC721AStorage.layout()._currentIndex && // If within bounds, ERC721AStorage.layout()._packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { ERC721AStorage.TokenApprovalRef storage tokenApproval = ERC721AStorage.layout()._tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --ERC721AStorage.layout()._packedAddressData[from]; // Updates: `balance -= 1`. ++ERC721AStorage.layout()._packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (bytes4 retval) { return retval == ERC721A__IERC721ReceiverUpgradeable(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); ERC721AStorage.layout()._currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = ERC721AStorage.layout()._currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. ERC721AStorage.layout()._packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. ERC721AStorage.layout()._packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); ERC721AStorage.layout()._currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = ERC721AStorage.layout()._currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (ERC721AStorage.layout()._currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @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: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck) if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } ERC721AStorage.layout()._tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. ERC721AStorage.layout()._packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. ERC721AStorage.layout()._packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (ERC721AStorage.layout()._packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != ERC721AStorage.layout()._currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. ERC721AStorage.layout()._packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { ERC721AStorage.layout()._burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = ERC721AStorage.layout()._packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); ERC721AStorage.layout()._packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721AQueryableUpgradeable.sol'; import '../ERC721AUpgradeable.sol'; import '../ERC721A__Initializable.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryableUpgradeable is ERC721A__Initializable, ERC721AUpgradeable, IERC721AQueryableUpgradeable { function __ERC721AQueryable_init() internal onlyInitializingERC721A { __ERC721AQueryable_init_unchained(); } function __ERC721AQueryable_init_unchained() internal onlyInitializingERC721A {} /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721AUpgradeable.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryableUpgradeable is IERC721AUpgradeable { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721AUpgradeable { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @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 payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "../IOperatorFilterRegistry.sol"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; abstract contract OperatorFiltererUpgradeable is Initializable { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe) internal onlyInitializing { // 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(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isRegistered(address(this))) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { // 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) { _; return; } if (!operatorFilterRegistry.isOperatorAllowed(address(this), msg.sender)) { revert OperatorNotAllowed(msg.sender); } } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } _; } }
{ "optimizer": { "enabled": true, "runs": 500, "details": { "yul": true } }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BurningNotAllowed","type":"error"},{"inputs":[],"name":"ExceedMaxPerWallet","type":"error"},{"inputs":[],"name":"InvalidAirdrop","type":"error"},{"inputs":[],"name":"InvalidMintFunction","type":"error"},{"inputs":[],"name":"InvalidPhase","type":"error"},{"inputs":[],"name":"InvalidPrice","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PhaseNotActive","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct BaseSettings","name":"settings","type":"tuple"}],"name":"BaseSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"burnActive","type":"bool"}],"name":"BurnStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"phaseIds","type":"uint256"}],"name":"PhaseEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"phaseId","type":"uint256"},{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct PhaseSettings","name":"settings","type":"tuple"}],"name":"PhaseSettingsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"phaseIds","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"activatedPublic","type":"bool"}],"name":"PhasesActivated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"phaseIds","type":"uint256[]"},{"indexed":false,"internalType":"bool","name":"pausedPublic","type":"bool"}],"name":"PhasesPaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"royaltyAddress","type":"address"},{"indexed":false,"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"name":"RoyaltyUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numRecipients","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"numTokens","type":"uint256"}],"name":"TokensAirdropped","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"TokensMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"_baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"phaseIndices","type":"uint256[]"},{"internalType":"bool","name":"activatePublic","type":"bool"}],"name":"activatePhases","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"},{"internalType":"uint64[]","name":"quantities","type":"uint64[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"airdropForPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"quantities","type":"uint64[]"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"airdropPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseSettings","outputs":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"}],"name":"endPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"phaseIndices","type":"uint64[]"}],"name":"endPhases","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721AUpgradeable.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getAmountMintedForOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"},{"internalType":"address","name":"wallet","type":"address"}],"name":"getAmountMintedForPhase","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"}],"name":"getDataForPhase","outputs":[{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PhaseSettings","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getMintBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"components":[{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint96","name":"royaltyAmount","type":"uint96"}],"internalType":"struct RoyaltySettings","name":"_royaltySettings","type":"tuple"},{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PhaseSettings[]","name":"_phases","type":"tuple[]"},{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BaseSettings","name":"_baseSettings","type":"tuple"},{"components":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"internalType":"struct PaymentSplitterSettings","name":"_paymentSplitterSettings","type":"tuple"},{"internalType":"uint256","name":"_maxIntendedSupply","type":"uint256"},{"internalType":"bool","name":"_allowBurning","type":"bool"},{"internalType":"address","name":"_deployer","type":"address"},{"internalType":"address","name":"_operatorFilter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"quantities","type":"uint64[]"},{"internalType":"bytes32[][]","name":"proofs","type":"bytes32[][]"},{"internalType":"uint256[]","name":"phaseIndices","type":"uint256[]"},{"internalType":"uint64","name":"publicQuantity","type":"uint64"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"},{"internalType":"uint64","name":"quantity","type":"uint64"}],"name":"mintPhase","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"},{"internalType":"uint64","name":"quantity","type":"uint64"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintPhaseAllowlist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64","name":"quantity","type":"uint64"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"phaseIndices","type":"uint256[]"},{"internalType":"bool","name":"pausePublic","type":"bool"}],"name":"pausePhases","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"saleState","outputs":[{"internalType":"uint64","name":"numPhases","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeBasisPoints","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20Upgradeable","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct BaseSettings","name":"_baseSettings","type":"tuple"}],"name":"updateBaseSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"phaseIndex","type":"uint256"},{"components":[{"internalType":"uint64","name":"maxSupply","type":"uint64"},{"internalType":"uint64","name":"amountMinted","type":"uint64"},{"internalType":"uint64","name":"maxPerWallet","type":"uint64"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"bool","name":"isActive","type":"bool"},{"internalType":"uint256","name":"price","type":"uint256"}],"internalType":"struct PhaseSettings","name":"phase","type":"tuple"}],"name":"updatePhaseSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"withdrawAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60808060405234620000c6576000549060ff8260081c1662000074575060ff8082161062000038575b604051615f939081620000cc8239f35b60ff90811916176000557f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498602060405160ff8152a13862000028565b62461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b6064820152608490fd5b600080fdfe60806040526004361015610023575b361561001957600080fd5b6100216131e1565b005b60003560e01c806301ffc9a7146104e757806302fa7c47146104de57806306fdde03146104d5578063081812fc146104cc578063095ea7b3146104c35780630d1d7ae5146104ba57806318160ddd146104b157806319165587146104a8578063199bdb171461049f5780631f06b55a1461049657806322dcb0a71461048d57806323b872dd146104845780632a55205a1461047b5780632c0e69b31461047257806333d3c80e146104695780633a98ef39146104605780633ccfd60b14610457578063406072a91461044e57806342842e0e1461044557806342966c681461043c57806344bb82791461043357806348b750441461042a578063528307c81461042157806355f804b3146104185780635bbb21771461040f578063603f4d52146104065780636352211e146103fd5780636f0a90d7146103f457806370a08231146103eb578063715018a6146103e25780638462151c146103d95780638b83209b146103d05780638da5cb5b146103c757806393a69f89146103be57806395d89b41146103b557806397474f13146103ac5780639852595c146103a357806399a2557a1461039a5780639ee8dba5146103915780639ff7075514610388578063a22cb4651461037f578063a3330d2514610376578063a3f8eace1461036d578063ab5161a114610364578063b06f73151461035b578063b88d4fde14610352578063ba09f3d714610349578063c0d7f14714610340578063c23dc68f14610337578063c45ac0501461032e578063c87b56dd14610325578063ce7c2ac21461031c578063cfc86f7b14610313578063d5abeb011461030a578063d79779b214610301578063db980f4f146102f8578063e33b7de3146102ef578063e985e9c5146102e6578063eba5267e146102dd578063f2fde38b146102d45763ff489fe10361000e576102cf6130df565b61000e565b506102cf61304d565b506102cf612f4c565b506102cf612ed3565b506102cf612eb4565b506102cf612dea565b506102cf612dab565b506102cf612d8b565b506102cf612cb8565b506102cf612b83565b506102cf612ab5565b506102cf612a9b565b506102cf612a36565b506102cf61297f565b506102cf6127ef565b506102cf61278c565b506102cf612659565b506102cf6125b4565b506102cf61258c565b506102cf612567565b506102cf612486565b506102cf6121f4565b506102cf612122565b506102cf612096565b506102cf612057565b506102cf611f39565b506102cf611e70565b506102cf611cdc565b506102cf611cb4565b506102cf611c4c565b506102cf611b93565b506102cf611b3d565b506102cf611b0d565b506102cf611a12565b506102cf6119a7565b506102cf61197f565b506102cf6118da565b506102cf6116e2565b506102cf6114d5565b506102cf611397565b506102cf61133b565b506102cf61105e565b506102cf61104b565b506102cf611000565b506102cf610f3f565b506102cf610f20565b506102cf610e11565b506102cf610d5c565b506102cf610cab565b506102cf610c98565b506102cf610c00565b506102cf610ba2565b506102cf610a7f565b506102cf610a37565b506102cf6109e3565b506102cf610949565b506102cf610850565b506102cf6107db565b506102cf6106d1565b506102cf6105e7565b506102cf610507565b6001600160e01b031981160361050257565b600080fd5b5034610502576020366003190112610502576020600435610527816104f0565b63ffffffff60e01b166301ffc9a760e01b81149081908215610591575b8215610580575b821561055e575b50506040519015158152f35b63152a902d60e11b1491508115610578575b503880610552565b905038610570565b635b5e139f60e01b8114925061054b565b6380ac58cd60e01b81149250610544565b6001600160a01b0381160361050257565b6101a435906105c1826105a2565b565b6101c435906105c1826105a2565b6bffffffffffffffffffffffff81160361050257565b5034610502576040366003190112610502577f8039bd6e4e7dba001c8840eb2e118d9d131246faa7d0d04335f7305127ec0b106040600435610628816105a2565b6bffffffffffffffffffffffff602435610641816105d1565b610649613125565b610653818461489f565b6001600160a01b03845193168352166020820152a1005b600091031261050257565b60005b8381106106885750506000910152565b8181015183820152602001610678565b906020916106b181518092818552858086019101610675565b601f01601f1916010190565b9060206106ce928181520190610698565b90565b5034610502576000806003193601126107d85760405190807f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c429081549061071782612bc2565b808652926001928084169081156107ab5750600114610751575b61074d8661074181880382611638565b604051918291826106bd565b0390f35b815292507f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb35b8284106107935750505081016020016107418261074d38610731565b80546020858701810191909152909301928101610777565b905086955061074d9693506020925061074194915060ff191682840152151560051b820101929338610731565b80fd5b5034610502576020366003190112610502576004356107f9816155c8565b1561083e576000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260206001600160a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b50604036600319011261050257600435610869816105a2565b6daaeb6d7670e522a718067333cd4e803b61088b575b6100216024358361545b565b604051633185c44d60e21b81523060048201526001600160a01b038316602482015290602090829060449082905afa90811561092b575b6000916108fd575b50156108d6573861087f565b604051633b79c77360e21b81526001600160a01b03919091166004820152602490fd5b0390fd5b61091e915060203d8111610924575b6109168183611638565b81019061372e565b386108ca565b503d61090c565b610933613283565b6108c2565b6001600160401b0381160361050257565b506020366003190112610502576001600160401b0360043561096a81610938565b166109ab6109783483614e30565b6109828333614e86565b67ffffffffffffffff60801b1967ffffffffffffffff60801b60fe549260801b1691161760fe55565b6109b581336159c2565b6040519081527f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427360203392a2005b503461050257600036600319011261050257600080516020615efe833981519152547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41546040519103600019018152602090f35b503461050257602036600319011261050257610021600435610a58816105a2565b61342b565b608090600319011261050257600490565b60809060c31901126105025760c490565b5034610502576080366003190112610502577f6f14260768729ce57b5eef3dc9dd01f100501b88d2a22b4ea9d91102c2bd3178610b9d610abe36610a5d565b610ac6613125565b610b9160fe54610af68335610ada81610938565b6001600160401b03166001600160401b031960fe54161760fe55565b610b306020840135610b0781610938565b67ffffffffffffffff60401b60fe549160401b169067ffffffffffffffff60401b19161760fe55565b610b41604084013561098281610938565b606083013560ff5560fe80547fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000166001600160401b0383161767ffffffffffffffff60801b909216919091179055565b60405191829182614b04565b0390a1005b5034610502576020366003190112610502576020610beb600435610bc5816105a2565b6001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b546001600160401b036040519160401c168152f35b503461050257600036600319011261050257610c1a613125565b7f1509137b40df48e8ef9596f9db16b632b15353d0e0688d9f23221953eb0328dd6020610103805461ff0060ff8260081c161560081b169061ff0019161780915560ff6040519160081c1615158152a1005b606090600319011261050257600435610c84816105a2565b90602435610c91816105a2565b9060443590565b50610021610ca536610c6c565b91614f34565b5034610502576040366003190112610502576004356000526098602052604060002060405190610cda826115ef565b54906001600160a01b03908183169283825260a01c60208201529115610d4c575b610d24610d1c6bffffffffffffffffffffffff6020850151166024356135a4565b612710900490565b91511661074d60405192839283602090939291936001600160a01b0360408201951681520152565b9050610d56613743565b90610cfb565b5034610502576040366003190112610502576001600160a01b03602435610d82816105a2565b16600052610102602052604060002060043560005260205260206001600160401b0360406000205416604051908152f35b9181601f84011215610502578235916001600160401b038311610502576020808501948460051b01011161050257565b602060031982011261050257600435906001600160401b03821161050257610e0d91600401610db3565b9091565b503461050257610e2036610de3565b610e28613125565b6001600160401b03918260fc54168211610f0e5760005b828110610e4857005b83610e548285856149ef565b35610e5e81610938565b16610e67613125565b8060005260fd6020526040806000208054878116908115610efd5792610ee6610ef493610ed5610ada610ec460019a99968e7fc2067c23a9ebd515eec7748db8a487f8e13247aebbd537dcd7da1a54f63607159a881c1690614a7c565b60fe546001600160401b03166149d4565b805467ffffffffffffffff19169055565b519081529081906020820190565b0390a101610e3f565b835163268dbf6760e21b8152600490fd5b60405163268dbf6760e21b8152600490fd5b503461050257600036600319011261050257602060c954604051908152f35b5034610502576000806003193601126107d857610f5a613125565b610101805490825b828110610f6d578380f35b6001908254811015610fce575b8285526001600160a01b03817f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca747689015416610fb381613246565b610fbf575b5001610f62565b610fc89061342b565b38610fb8565b610fd6611324565b610f7a565b604090600319011261050257600435610ff3816105a2565b906024356106ce816105a2565b50346105025760206110426001600160a01b0361101c36610fdb565b911660005260cf83526040600020906001600160a01b0316600052602052604060002090565b54604051908152f35b5061002161105836610c6c565b91614feb565b50346105025760203660031901126105025760043560ff6101035460081c16156113125761108b8161539e565b6001600160a01b0381166110cb836000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604060002090815490565b92906110ea6001600160a01b03841633908114908614171590565b1590565b611296575b7f1af5163f80e79b5e554f61e1d052084d3a3fe1166e42a265798c4e2ddce8ffa29361128c575b50611141826001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b80546fffffffffffffffffffffffffffffffff0190556000848152600080516020615f1e833981519152602052604090204260a01b8317600360e01b179055600160e11b81161561121b575b50826000604051927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a461120b6111e77f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460010190565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4155565b918252339180602081015b0390a2005b6001840161124081600052600080516020615f1e833981519152602052604060002090565b541561124d575b5061118d565b600080516020615efe8339815191525481146112475761128490600052600080516020615f1e833981519152602052604060002090565b553880611247565b6000905538611116565b6112fb6110e66112f4336112dc876001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b156110ef57604051632ce44b5f60e11b8152600490fd5b60405163fa32799b60e01b8152600490fd5b50634e487b7160e01b600052603260045260246000fd5b5034610502576020366003190112610502576004356101018054821015610502576020916001600160a01b03916000527f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca747689015416604051908152f35b5034610502576113a636610fdb565b907f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a6001600160a01b039280611453600095808316875260cb6020526113f160408820541515613370565b6113fb8387613290565b9384916114098315156133cb565b87169687895260ce60205260408920805490848201809211611478575b55611448826112dc836001600160a01b031660005260cf602052604060002090565b83815401905561360f565b604080516001600160a01b039092168252602082019290925290819081015b0390a280f35b61148061321a565b611426565b8015150361050257565b61018435906105c182611485565b604060031982011261050257600435906001600160401b038211610502576114c791600401610db3565b90916024356106ce81611485565b5034610502576114e43661149d565b916114ed613125565b60005b8281106115425750610b9d837f906568ccdea6378b9108aec731550e3e47f4541a63781939312428b90a4b4c6d9461152f575b60405193849384614a2d565b610103805460ff19166001179055611523565b61154d8184846149ef565b3561156f61156360fc546001600160401b031690565b6001600160401b031690565b1115610f0e57806115aa600261159c61158b60019588886149ef565b3560005260fd602052604060002090565b01805460ff19166001179055565b016114f0565b50634e487b7160e01b600052604160045260246000fd5b60c081019081106001600160401b038211176115e257604052565b6115ea6115b0565b604052565b604081019081106001600160401b038211176115e257604052565b6001600160401b0381116115e257604052565b602081019081106001600160401b038211176115e257604052565b90601f801991011681019081106001600160401b038211176115e257604052565b604051906105c1826115ef565b6020906001600160401b038111611683575b601f01601f19160190565b61168b6115b0565b611678565b92919261169c82611666565b916116aa6040519384611638565b829481845281830111610502578281602093846000960137010152565b9080601f83011215610502578160206106ce93359101611690565b503461050257602080600319360112610502576001600160401b03600435818111610502576117159036906004016116c7565b9161171e613125565b825191821161184e575b61173c8261173760fb54612bc2565b613e09565b80601f83116001146117a457509181610b9d927f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad94600091611799575b508160011b916000199060031b1c19161760fb55604051918291826106bd565b905082015138611779565b60fb60005290601f1983167f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc926000905b828210611836575050927f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad949260019282610b9d961061181d575b5050811b0160fb55610741565b84015160001960f88460031b161c191690553880611810565b80600185968294968a015181550195019301906117d5565b6118566115b0565b611728565b6020908160408183019282815285518094520193019160005b828110611882575050505090565b90919293826080826118ce600194895162ffffff606080926001600160a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565b01950193929101611874565b5034610502576118e936610de3565b906118f382613ad9565b916119016040519384611638565b808352601f1961191082613ad9565b0160005b81811061196857505060005b818103611935576040518061074d868261185b565b8061194c61194660019385876149ef565b35615b19565b6119568287614633565b526119618186614633565b5001611920565b602090611973615ad6565b82828801015201611914565b50346105025760003660031901126105025760206001600160401b0360fc5416604051908152f35b50346105025760203660031901126105025760206001600160a01b036119ce60043561539e565b16604051908152f35b6020908160408183019282815285518094520193019160005b8281106119fe575050505090565b8351855293810193928101926001016119f0565b5034610502576020806003193601126105025760043590611a32826105a2565b6001600160401b03908160fc5416611a5383611a4d836149bc565b16614f02565b90600080936001600160a01b038716945b86811684811015611ac15787916001918886526101028552611ab9611ab2611563611aa58560408b20906001600160401b0316600052602052604060002090565b546001600160401b031690565b9189614633565b520116611a64565b61074d8686611b008b611af48e6001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b5460401c169183614633565b52604051918291826119d7565b5034610502576020366003190112610502576020611b35600435611b30816105a2565b615333565b604051908152f35b5034610502576000806003193601126107d857611b58613125565b806001600160a01b0360335481198116603355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461050257602036600319011261050257600435611bb1816105a2565b60008091611bbe81615333565b611bc781614f02565b92611bd0615ad6565b506001926001600160a01b0390811690845b848403611bf7576040518061074d89826119d7565b81611c0182615b85565b876040820151611c435750511680611c3b575b50859083838a1614611c27575b01611be2565b80611c35838701968a614633565b52611c21565b975085611c14565b92915050611c21565b50346105025760203660031901126105025760206001600160a01b0360043560cd54811015611ca7575b60cd6000527f83978b4c69c48dd978ab43fe30f077615294f938fb7f936d9eb340e51ea7db2e015416604051908152f35b611caf611324565b611c76565b50346105025760003660031901126105025760206001600160a01b0360335416604051908152f35b5034610502576060366003190112610502576024356001600160401b0380821161050257611d0f60049236908401610db3565b9160443581811161050257611d279036908601610db3565b929093611d32613125565b600094818503611e5f579190611d53873560005260fd602052604060002090565b9286945b868610611d975760408051888152602081018a90527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba954649181908101610b9d565b9091929394968554611db2611dad8a87896149ef565b613ba5565b83611dc36040928285851c166149d4565b921684831611611e50575086546fffffffffffffffff0000000000000000191660409190911b67ffffffffffffffff60401b16178655600190611e1790611e11611563611dad8c898b6149ef565b90613231565b97611e45611e2e611e29838b886149ef565b61417d565b611e3f611563611dad858a8c6149ef565b906159c2565b019493929190611d57565b516352df9fe560e01b81528a90fd5b60405163e6dcad7760e01b81528790fd5b5034610502576000806003193601126107d85760405190807f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4390815490611eb682612bc2565b808652926001928084169081156107ab5750600114611edf5761074d8661074181880382611638565b815292507f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c5b828410611f215750505081016020016107418261074d38610731565b80546020858701810191909152909301928101611f05565b50606036600319011261050257600435602435611f5581610938565b6044356001600160401b039283821161050257612013611f8a82611f80612019953690600401610db3565b3492918833614b57565b85851692611f988433614e86565b611fe160009782895260fd602052611fba8860408b2092835460401c166149d4565b67ffffffffffffffff60401b82549160401b169067ffffffffffffffff60401b1916179055565b3387526101026020526040872090875260205260408620906001600160401b03166001600160401b0319825416179055565b336159c2565b6040516001600160401b03909116815233907f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a4273908060208101611472565b5034610502576020366003190112610502576001600160a01b0360043561207d816105a2565b1660005260cc6020526020604060002054604051908152f35b50346105025760603660031901126105025761074d6120c76004356120ba816105a2565b6044359060243590615bed565b604051918291826119d7565b604090606319011261050257606490565b908160409103126105025790565b9181601f84011215610502578235916001600160401b0383116105025760208085019460c0850201011161050257565b5034610502576101e03660031901126105025760046001600160401b0381358181116105025761215590369084016116c7565b6024358281116105025761216c90369085016116c7565b916044358181116105025761218490369086016116c7565b9161218e366120d3565b9160a435818111610502576121a690369088016120f2565b6121b292919236610a6e565b916101443590811161050257610021986121ce913691016120e4565b926121d761148f565b956121e06105b3565b976121e96105c3565b99610164359761382a565b506080366003190112610502576001600160401b0360048035828111610502576122219036908301610db3565b91906024358481116105025761223a9036908401610db3565b9190604435868111610502576122539036908601610db3565b9490916064359461226386610938565b61227861156360fc546001600160401b031690565b8711801561247c575b8015612472575b61246157969593929190349760009788965b8088106123345789898d16818b8e836122f7575b846122b98133614e86565b6122c381336159c2565b60405190815233907f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a4273908060208101611216565b8394509061230c6109829261232a9495614e30565b5060fe5460801c6001600160401b03165b016001600160401b031690565b01818080806122ae565b9091929394959698998b6123498b848a6149ef565b35612358611dad8d878d6149ef565b926123648d888a614a07565b94909261237b8160005260fd602052604060002090565b9561238e600388015496841680976135a4565b9485851061245157916124109161242b949387836001809c01541560001461243c576123f093506123c192508a33614d41565b935b611fba6123da8460005260fd602052604060002090565b9161231d83546001600160401b039060401c1690565b336000908152610102602052604090205b90600052602052604060002090565b906001600160401b03166001600160401b0319825416179055565b039b0199019695949392919061229a565b6123f09361244b938833614b57565b936123c3565b60405162bfc92160e01b81528d90fd5b60405163268dbf6760e21b81528390fd5b5080871415612288565b5087871415612281565b5034610502576040366003190112610502576004356124a4816105a2565b6024356124b081611485565b6daaeb6d7670e522a718067333cd4e803b6124d0575b5061002191615538565b604051633185c44d60e21b81523060048201526001600160a01b038416602482015290602090829060449082905afa90811561255a575b60009161253c575b501561251b57386124c6565b604051633b79c77360e21b81526001600160a01b0383166004820152602490fd5b612554915060203d8111610924576109168183611638565b3861250f565b612562613283565b612507565b503461050257600036600319011261050257602060ff61010354166040519015158152f35b5034610502576020366003190112610502576020611b356004356125af816105a2565b613246565b5034610502576020366003190112610502576004356125d1613125565b8060005260fd60205260406000208054916001600160401b0391828416938415610f0e57610ada846126307fc2067c23a9ebd515eec7748db8a487f8e13247aebbd537dcd7da1a54f636071597610b9d9761263a9560401c1690614a7c565b9060fe54166149d4565b805467ffffffffffffffff191690556040519081529081906020820190565b50346105025760e03660031901126105025760043560c036602319011261050257612682613125565b7fc0008a9740d8043d4c62e9129808dfe671c91ae530a5fe058ebb07b6b2fc95fe61278660009280845260fd60205261277a6001600160401b0361275281604088205460401c169160408820541661273e6126e5600260408b200160ff90541690565b936127026126fd8860005260fd602052604060002090565b613bcc565b6127168760005260fd602052604060002090565b9067ffffffffffffffff60401b82549160401b169067ffffffffffffffff60401b1916179055565b6124108560005260fd602052604060002090565b60026127688460005260fd602052604060002090565b019060ff801983541691151516179055565b60405191829182614a95565b0390a180f35b506080366003190112610502576004356127a5816105a2565b6024356127b1816105a2565b606435916001600160401b0383116105025736602384011215610502576127e5610021933690602481600401359101611690565b916044359161508a565b5034610502576040806003193601126105025760048035916001600160401b0392838111610502576128249036908401610db3565b9190936024358181116105025761283e9036908601610db3565b9390612848613125565b6000958286036129715792919086935b868510612897578551878152602081018990527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba95464908060408101610b9d565b909192939688856128bd6128b2611dad8c8960fe54966149ef565b828460801c166149d4565b911686821611612961576128f49067ffffffffffffffff60801b1967ffffffffffffffff60801b60fe549260801b1691161760fe55565b6128ff88858b6149ef565b61290890613ba5565b6001600160401b031661291a91613231565b966129268188856149ef565b61292f9061417d565b61293a82868c6149ef565b61294390613ba5565b6001600160401b0316612955916159c2565b60010193929190612858565b86516352df9fe560e01b81528390fd5b845163e6dcad7760e01b8152fd5b50346105025761298e3661149d565b91612997613125565b60005b8281106129e85750610b9d837f4f1e98f5c7093632a49c02ecd1c1283bf1689573db8338b3814dfd7d9cf013c8946129d85760405193849384614a2d565b610103805460ff19169055611523565b6129f38184846149ef565b60fc54903591906001600160401b0316821015610f0e57612a306002612a2560019460005260fd602052604060002090565b01805460ff19169055565b0161299a565b5034610502576020366003190112610502576080612a55600435615b19565b612a99604051809262ffffff606080926001600160a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565bf35b5034610502576020611b35612aaf36610fdb565b90613290565b503461050257602036600319011261050257600435612ad3816155c8565b15612b7157612ae0612bfc565b805160009015612b57575060405160a08101604052608081019260008452925b6000190192600a906030828206018553049283612b005761074d9350612b4592612b4b610741936080601f19948581019203018152604051958693602085019061538b565b9061538b565b03908101835282611638565b60405161074d93509150612b6a8261161d565b8152610741565b604051630a14c4b560e41b8152600490fd5b5034610502576020366003190112610502576001600160a01b03600435612ba9816105a2565b1660005260cb6020526020604060002054604051908152f35b90600182811c92168015612bf2575b6020831014612bdc57565b634e487b7160e01b600052602260045260246000fd5b91607f1691612bd1565b6040519060008260fb5491612c1083612bc2565b80835292600190818116908115612c965750600114612c37575b506105c192500383611638565b60fb600090815291507f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc5b848310612c7b57506105c1935050810160200138612c2a565b81935090816020925483858a01015201910190918592612c62565b9050602092506105c194915060ff191682840152151560051b82010138612c2a565b5034610502576000806003193601126107d857604051908060fb54612cdc81612bc2565b80855291600191808316908115612d615750600114612d06575b61074d8561074181870382611638565b925060fb83527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc5b828410612d495750505081016020016107418261074d612cf6565b80546020858701810191909152909301928101612d2e565b86955061074d9693506020925061074194915060ff191682840152151560051b8201019293612cf6565b503461050257600036600319011261050257602061010054604051908152f35b5034610502576020366003190112610502576001600160a01b03600435612dd1816105a2565b1660005260ce6020526020604060002054604051908152f35b506040806003193601126105025760043560243591612e0883610938565b612e7d6001600160401b0380851693612e4d612e2634838833614d41565b92612e318733614e86565b611fba600098848a5260fd602052878a20928354891c166149d4565b338652610102602052838620908652602052828520906001600160401b03166001600160401b0319825416179055565b612e8782336159c2565b519081527f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427360203392a280f35b503461050257600036600319011261050257602060ca54604051908152f35b503461050257604036600319011261050257602060ff612f40600435612ef8816105a2565b6112dc60243591612f08836105a2565b6001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b54166040519015158152f35b50346105025760203660031901126105025761074d60408060a08151612f71816115c7565b600091818380935282602082015282858201528260608201528260808201520152600435815260fd60205220906003815192612fac846115c7565b80546001600160401b03808216865281851c8116602087015260809190911c168385015260018101546060850152612ff4612feb600283015460ff1690565b15156080860152565b015460a0830152519182918291909160a08060c08301946001600160401b038082511685528060208301511660208601526040820151166040850152606081015160608501526080810151151560808501520151910152565b50346105025760203660031901126105025760043561306b816105a2565b613073613125565b6001600160a01b0381161561308b5761002190613199565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461050257600036600319011261050257608060fe5460ff54604051916001600160401b03908181168452818160401c166020850152841c1660408301526060820152f35b6001600160a01b0360335416330361313957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b613185613125565b6001600160a01b0381161561308b576105c1905b603354906001600160a01b0380911691826001600160a01b0319821617603355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604080513381523460208201527f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77091819081015b0390a1565b50634e487b7160e01b600052601160045260246000fd5b9190820180921161323e57565b6105c161321a565b6106ce904760ca548101809111613276575b6001600160a01b03821660005260cc602052604060002054916135b7565b61327e61321a565b613258565b506040513d6000823e3d90fd5b6040516370a0823160e01b8152306004820152909291906001600160a01b038416602082602481845afa918215613363575b600092613330575b50826112dc6106ce95966133089360005260ce602052604060002054850180951161330f576001600160a01b031660005260cf602052604060002090565b54916135b7565b61331761321a565b6001600160a01b031660005260cf602052604060002090565b90916020823d821161335b575b8161334a60209383611638565b810103126107d857505190826132ca565b3d915061333d565b61336b613283565b6132c2565b1561337757565b60405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608490fd5b156133d257565b60405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608490fd5b6001600160a01b038116600081815260cb60205261344e60408220541515613370565b61345782613246565b916134638315156133cb565b60ca54838101809111613597575b60ca5580825260cc602052604082208381540190558247106135525781808481935af161349c613769565b50156134e757604080516001600160a01b03909316835260208301919091527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056919081908101613215565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b61359f61321a565b613471565b8181029291811591840414171561323e57565b906001600160a01b036135d9921660005260cb602052604060002054906135a4565b60c9549081156135f957049081039081116135f15790565b6106ce61321a565b634e487b7160e01b600052601260045260246000fd5b6136b2916000806001600160a01b03604051946136678661365960209a8b83019863a9059cbb60e01b8a5260248401602090939291936001600160a01b0360408201951681520152565b03601f198101885287611638565b169260405194613676866115ef565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af16136ac613769565b91613799565b805190816136bf57505050565b82806136cf93830101910161372e565b156136d75750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b9081602091031261050257516106ce81611485565b60405190613750826115ef565b6097546001600160a01b038116835260a01c6020830152565b3d15613794573d9061377a82611666565b916137886040519384611638565b82523d6000602084013e565b606090565b919290156137fb57508151156137ad575090565b3b156137b65790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b82519091501561380e5750805190602001fd5b60405162461bcd60e51b81529081906108f990600483016106bd565b9a989694929099979593917fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f549a60ff8c60081c169b8c6000146139525750303b155b156138e7576138829b159c8d6138b45761395b565b61388857565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ff0019169055565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ffff191661010117905561395b565b60405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608490fd5b60ff161561386d565b99979593919a98969492909a6000549b60ff8d60081c1615809d819e613a96575b8115613a76575b5015613a0b576139a99b8d6139a0600160ff196000541617600055565b6139f2576142d6565b6139af57565b6139bf61ff001960005416600055565b604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498908060208101613215565b613a0661010061ff00196000541617600055565b6142d6565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608490fd5b303b15915081613a88575b5038613983565b6001915060ff161438613a81565b600160ff821610915061397c565b903590601e198136030182121561050257018035906001600160401b03821161050257602001918160051b3603831361050257565b6020906001600160401b038111613af2575b60051b0190565b613afa6115b0565b613aeb565b9291613b0a82613ad9565b91613b186040519384611638565b829481845260208094019160051b810192831161050257905b828210613b3e5750505050565b8380918335613b4c816105a2565b815201910190613b31565b9291613b6282613ad9565b91613b706040519384611638565b829481845260208094019160051b810192831161050257905b828210613b965750505050565b81358152908301908301613b89565b356106ce81610938565b9160c091811015613bbf57020190565b613bc7611324565b020190565b613bf8602435613bdb81610938565b825467ffffffffffffffff19166001600160401b03909116178255565b613c34604435613c0781610938565b82546fffffffffffffffff0000000000000000191660409190911b67ffffffffffffffff60401b16178255565b613c6b606435613c4381610938565b825467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178255565b6084356001820155613c9760a435613c8281611485565b600283019060ff801983541691151516179055565b600360c435910155565b9060a0600391613cd28135613cb581610938565b855467ffffffffffffffff19166001600160401b03909116178555565b613d106020820135613ce381610938565b85546fffffffffffffffff0000000000000000191660409190911b67ffffffffffffffff60401b16178555565b613d496040820135613d2181610938565b855467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178555565b60608101356001850155613d796080820135613d6481611485565b600286019060ff801983541691151516179055565b0135910155565b15613d8757565b60405162461bcd60e51b815260206004820152603160248201527f537570706c79206f6620616c6c20706861736573206d75737420657175616c2060448201527f6d6178496e74656e646564537570706c790000000000000000000000000000006064820152608490fd5b818110613dfd575050565b60008155600101613df2565b90601f8211613e16575050565b6105c19160fb6000527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc906020601f840160051c83019310613e60575b601f0160051c0190613df2565b9091508190613e53565b90601f8211613e77575050565b6105c1917f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c426000527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb3906020601f840160051c83019310613e6057601f0160051c0190613df2565b90601f8211613eec575050565b6105c1917f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c436000527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c906020601f840160051c83019310613e6057601f0160051c0190613df2565b9081516001600160401b038111614039575b613f758161173760fb54612bc2565b602080601f8311600114613fb15750819293600092613fa6575b50508160011b916000199060031b1c19161760fb55565b015190503880613f8f565b90601f19831694613fe460fb6000527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc90565b926000905b878210614021575050836001959610614008575b505050811b0160fb55565b015160001960f88460031b161c19169055388080613ffd565b80600185968294968601518155019501930190613fe9565b6140416115b0565b613f66565b9081516001600160401b038111614170575b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c439061408d816140888454612bc2565b613edf565b602080601f83116001146140c95750819293946000926140be575b50508160011b916000199060031b1c1916179055565b0151905038806140a8565b90601f1983169561411b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c436000527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c90565b926000905b8882106141585750508360019596971061413f575b505050811b019055565b015160001960f88460031b161c19169055388080614135565b80600185968294968601518155019501930190614120565b6141786115b0565b614058565b356106ce816105a2565b6001600160401b03821161424c575b68010000000000000000821161423f575b610101908154838355808410614209575b509060005260005b8281106141cc57505050565b60019060208335936141dd856105a2565b0192817f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca7476890155016141c0565b61423990847f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca7476899182019101613df2565b386141b8565b6142476115b0565b6141a7565b6142546115b0565b614196565b606090803561426781610938565b60fe5467ffffffffffffffff60401b60208401359161428583610938565b6001600160401b0367ffffffffffffffff60801b60408701356142a781610938565b60801b169416906001600160401b0360c01b16179160401b16171760fe55013560ff55565b356106ce816105d1565b906142ec919c9b9a999695949c9897939861519c565b6142f46144c2565b61432f6143296143048480613aa4565b6143216143176020889594950188613aa4565b9490923691613aff565b923691613b57565b906144e5565b6001600160401b0383169261434661156386613ba5565b906000905b8582106144195750506105c19a9b506143db946143b588956143996143936143d59761438d6143fb9f9e9c986143886143f69f6143ba9a14613d80565b613f54565b80613aa4565b90614187565b6001600160401b03166001600160401b031960fc54161760fc55565b614259565b6101039061ff00825491151560081b169061ff001916179055565b61010055565b6143f060206143e98361417d565b92016142cc565b9061489f565b61317d565b6001600160a01b03811661441157600090615d4d565b600190615d4d565b909161445a6001918f611563611dad87878461445561443c8484611e1199613baf565b6144508560005260fd602052604060002090565b613ca1565b613baf565b92019061434b565b1561446957565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b6144dc60ff60005460081c166144d781614462565b614462565b6105c133613199565b9190916144fd60ff60005460081c166144d781614462565b805183510361456057614512815115156145cb565b60005b815181101561455a578061455061453f6145326145559486614633565b516001600160a01b031690565b6145498388614633565b5190614782565b614617565b614515565b50509050565b60405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e64207368617260448201527f6573206c656e677468206d69736d6174636800000000000000000000000000006064820152608490fd5b156145d257565b60405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606490fd5b6001906000198114614627570190565b61462f61321a565b0190565b6020918151811015614648575b60051b010190565b614650611324565b614640565b1561465c57565b60405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606490fd5b156146a857565b60405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608490fd5b6001600160a01b0360cd5468010000000000000000811015614775575b600181018060cd55811015614768575b60cd6000527f83978b4c69c48dd978ab43fe30f077615294f938fb7f936d9eb340e51ea7db2e0191166001600160a01b0319825416179055565b614770611324565b61472e565b61477d6115b0565b61471e565b906001600160a01b03821615614845577f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac916147bf821515614655565b6147e66147df826001600160a01b031660005260cb602052604060002090565b54156146a1565b6147ef81614701565b8161480d826001600160a01b031660005260cb602052604060002090565b5561482261481d8360c954613231565b60c955565b604080516001600160a01b03909216825260208201929092529081908101613215565b60405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b6127106bffffffffffffffffffffffff831611614964576001600160a01b0381161561491f576148fb6105c1926148e66148d7611659565b6001600160a01b039094168452565b6bffffffffffffffffffffffff166020830152565b6001600160a01b038151169060206001600160a01b031991015160a01b1617609755565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b9060016001600160401b038093160191821161323e57565b9190916001600160401b038080941691160191821161323e57565b91908110156149ff5760051b0190565b613afa611324565b9091610e0d92811015614a20575b60051b810190613aa4565b614a28611324565b614a15565b91939293604083528060408401527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116105025760209160609160051b809183860137830101931515910152565b6001600160401b03918216908216039190821161323e57565b90815260e081019190602435614aaa81610938565b6001600160401b03809116602083015280604435614ac781610938565b166040830152606435614ad981610938565b166060820152608435608082015260a435614af381611485565b151560a082015260c060c435910152565b91909160608060808301948035614b1a81610938565b6001600160401b038091168552806020830135614b3681610938565b1660208601526040820135614b4a81610938565b1660408501520135910152565b93909193614b6f8260005260fd602052604060002090565b93614b816110e6600287015460ff1690565b614cd25760018501548015614cc0578554966001600160401b0398604097614bad888c8c8c1c166149d4565b8b808c16911611614caf578a6003614bca920154981697886135a4565b03614c9f57916110e691614c20614c259489516020810190614c1581614c078b856014916bffffffffffffffffffffffff199060601b1681520190565b03601f198101835282611638565b519020933691613b57565b614ce4565b614c8e5791614c56611563611aa5614c5b946124018a976001600160a01b0316600052610102602052604060002090565b613231565b9260801c168015159081614c84575b50614c7457501690565b51636c80554560e11b8152600490fd5b9050821138614c6a565b83516309bde33960e01b8152600490fd5b865162bfc92160e01b8152600490fd5b88516352df9fe560e01b8152600490fd5b604051634d0ee1f560e11b8152600490fd5b6040516321094a9b60e01b8152600490fd5b929091906000915b8451831015614d3957614cff8386614633565b5190600082821015614d275750600052602052614d2160406000205b92614617565b91614cec565b604091614d2193825260205220614d1b565b915092501490565b909291614d588160005260fd602052604060002090565b93614d6a6110e6600287015460ff1690565b614cd2576001850154614cc0578454936001600160401b0395614d9283888860401c16613231565b87871610614e1e576003614da8910154836135a4565b03614e0d57614c56611563611aa5614dd99461240189976001600160a01b0316600052610102602052604060002090565b9160801c168015159081614e03575b50614df1571690565b604051636c80554560e11b8152600490fd5b9050811138614de8565b60405162bfc92160e01b8152600490fd5b6040516352df9fe560e01b8152600490fd5b9060ff610103541615614cd25760fe54906001600160401b039283808460801c1693828501809511614e79575b168311614e1e5760ff54614e70916135a4565b03614e0d571690565b614e8161321a565b614e5d565b906001600160401b03908160fe5460401c16918215159384614ead575b50505050614df157565b614edb91929394506001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b5460401c16908101809111614ef5575b1138808080614ea3565b614efd61321a565b614eeb565b90614f0c82613ad9565b614f196040519182611638565b8281528092614f2a601f1991613ad9565b0190602036910137565b91906daaeb6d7670e522a718067333cd4e803b614f56575b506105c19261561d565b336001600160a01b03851614614f4c57604051633185c44d60e21b815230600482015233602482015290602090829060449082905afa908115614fde575b600091614fc0575b5015614fa85738614f4c565b604051633b79c77360e21b8152336004820152602490fd5b614fd8915060203d8111610924576109168183611638565b38614f9c565b614fe6613283565b614f94565b91906daaeb6d7670e522a718067333cd4e803b61500d575b506105c192615857565b336001600160a01b0385161461500357604051633185c44d60e21b815230600482015233602482015290602090829060449082905afa90811561507d575b60009161505f575b5015614fa85738615003565b615077915060203d8111610924576109168183611638565b38615053565b615085613283565b61504b565b9291906daaeb6d7670e522a718067333cd4e803b6150ad575b506105c193615891565b336001600160a01b038616146150a357604051633185c44d60e21b815230600482015233602482015290602090829060449082905afa90811561511d575b6000916150ff575b5015614fa857386150a3565b615117915060203d8111610924576109168183611638565b386150f3565b615125613283565b6150eb565b1561513157565b60405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608490fd5b91906151d760ff7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f5460081c166151d28161512a565b61512a565b82516001600160401b038111615326575b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c429061521d816152188454612bc2565b613e6a565b602080601f831160011461527657508190615254959660009261526b575b50508160011b916000199060031b1c1916179055614046565b6105c16001600080516020615efe83398151915255565b01519050388061523b565b90601f198316966152c87f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c426000527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb390565b926000905b89821061530e575050908392916001946152549899106152f5575b505050811b019055614046565b015160001960f88460031b161c191690553880806152e8565b806001859682949686015181550195019301906152cd565b61532e6115b0565b6151e8565b6001600160a01b03811615615379576153746001600160401b03916001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b541690565b6040516323d3ad8160e21b8152600490fd5b9061462f60209282815194859201610675565b600190808211156153bc575b604051636f96cda160e11b8152600490fd5b6153dd81600052600080516020615f1e833981519152602052604060002090565b5491600160e01b8316156153f157506153aa565b82156153fc57505090565b600080516020615efe833981519152548210156153aa5790815b61541f57505090565b9091506000190161544781600052600080516020615f1e833981519152602052604060002090565b5491821561545457505090565b9081615416565b6001600160a01b038061546d8461539e565b16908133036154de575b836000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040600020921691826001600160a01b03198254161790557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b60ff615520336112dc856001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b5416615477576040516367d9dca160e11b8152600490fd5b6001600160a01b039061559683615585836112dc336001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b9060ff801983541691151516179055565b604051921515835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3565b80600111159081615604575b816155dd575090565b9050600052600080516020615f1e833981519152602052600160e01b604060002054161590565b600080516020615efe83398151915254811091506155d4565b906156278361539e565b6001600160a01b038084169283828416036158465760008681527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020805490926156866001600160a01b03881633908114908414171590565b6157e9575b82169586156157d7576156f6936156c8926157cd575b506001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b80546000190190556001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b80546001019055600160e11b804260a01b85171761572b86600052600080516020615f1e833981519152602052604060002090565b5581161561575c575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b6001840161578181600052600080516020615f1e833981519152602052604060002090565b541561578e575b50615734565b600080516020615efe833981519152548114615788576157c590600052600080516020615f1e833981519152602052604060002090565b553880615788565b60009055386156a1565b604051633a954ecd60e21b8152600490fd5b61582f6110e66112f4336112dc8b6001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b1561568b57604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b90916105c19260405192602084018481106001600160401b03821117615884575b6040526000845261508a565b61588c6115b0565b615878565b92919061589f828286614f34565b803b6158ac575b50505050565b6158b593615919565b156158c357388080806158a6565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261050257516106ce816104f0565b90926106ce94936080936001600160a01b03809216845216602083015260408201528160608201520190610698565b9260209161594a9360006001600160a01b03604051809781968295630a85bd0160e11b9b8c855233600486016158ea565b0393165af160009181615992575b5061598457615965613769565b8051908161597f576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b6159b491925060203d81116159bb575b6159ac8183611638565b8101906158d5565b9038615958565b503d6159a2565b90600080516020615efe83398151915254918115615ac457615a04816001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b68010000000000000001830281540190556001600160a01b03600191169181811460e11b4260a01b178317615a5085600052600080516020615f1e833981519152602052604060002090565b558301926000827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92808684868180a4015b858103615ab5575050505015615aa457600080516020615efe83398151915255565b604051622e076360e81b8152600490fd5b8084918684868180a401615a82565b60405163b562e8dd60e01b8152600490fd5b60405190608082018281106001600160401b03821117615b0c575b60405260006060838281528260208201528260408201520152565b615b146115b0565b615af1565b615b21615ad6565b50615b2a615ad6565b600182108015615b6c575b615b675750615b4381615b85565b6040810151615b675750615b626106ce91615b5c615ad6565b5061539e565b615bad565b905090565b50600080516020615efe83398151915254821015615b35565b615b8d615ad6565b50600052600080516020615f1e8339815191526020526106ce6040600020545b90615bb6615ad6565b916001600160a01b03811683526001600160401b038160a01c166020840152600160e01b81161515604084015260e81c6060830152565b9082811015615d3b57600091600080516020615efe8339815191525491600192838210615d33575b808611615d2b575b50615c2782615333565b9185821015615d2357818603838110615d1b575b505b615c4683614f02565b958315615d12578493615c5884615b19565b918794604093615c6d6110e686830151151590565b615d00575b50955b615c86575b50505050505050815290565b8086141580615cf6575b15615cf1578686615ca18298615b85565b80860151615ceb57516001600160a01b0390811680615ce3575b5080871690881614615ccf575b0195615c75565b80615cdd838c019b8d614633565b52615cc8565b975038615cbb565b50615cc8565b615c7a565b5081881415615c90565b516001600160a01b0316955038615c72565b50505050505090565b925038615c3b565b849250615c3d565b945038615c1d565b839150615c15565b604051631960ccad60e11b8152600490fd5b90600091615d6160ff845460081c16614462565b6daaeb6d7670e522a718067333cd4e91823b615d7d5750505050565b60405163c3c5a54760e01b815230600482015260208160248188885af1908115615ef0575b8591615ed2575b506158a65715615e2c57813b15615e2857604051633e9f1edf60e11b81523060048201526001600160a01b0391909116602482015291908290604490829084905af18015615e1b575b615e02575b505b388080806158a6565b80615e0f615e159261160a565b8061066a565b38615df7565b615e23613283565b615df2565b8280fd5b6001600160a01b03811615615ea757813b15615e285760405163a0af290360e01b81523060048201526001600160a01b03909116602482015291908290818381604481015b03925af18015615e9a575b615e87575b50615df9565b80615e0f615e949261160a565b38615e81565b615ea2613283565b615e7c565b5090813b156107d857604051632210724360e11b815230600482015291829081838160248101615e71565b615eea915060203d8111610924576109168183611638565b38615da9565b615ef8613283565b615da256fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c442569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45a2646970667358221220c0ca2232083fda5291a1eb36de3dcf971006d1a765ba45e7d1c2cebeb08f855564736f6c63430008110033
Deployed Bytecode
0x60806040526004361015610023575b361561001957600080fd5b6100216131e1565b005b60003560e01c806301ffc9a7146104e757806302fa7c47146104de57806306fdde03146104d5578063081812fc146104cc578063095ea7b3146104c35780630d1d7ae5146104ba57806318160ddd146104b157806319165587146104a8578063199bdb171461049f5780631f06b55a1461049657806322dcb0a71461048d57806323b872dd146104845780632a55205a1461047b5780632c0e69b31461047257806333d3c80e146104695780633a98ef39146104605780633ccfd60b14610457578063406072a91461044e57806342842e0e1461044557806342966c681461043c57806344bb82791461043357806348b750441461042a578063528307c81461042157806355f804b3146104185780635bbb21771461040f578063603f4d52146104065780636352211e146103fd5780636f0a90d7146103f457806370a08231146103eb578063715018a6146103e25780638462151c146103d95780638b83209b146103d05780638da5cb5b146103c757806393a69f89146103be57806395d89b41146103b557806397474f13146103ac5780639852595c146103a357806399a2557a1461039a5780639ee8dba5146103915780639ff7075514610388578063a22cb4651461037f578063a3330d2514610376578063a3f8eace1461036d578063ab5161a114610364578063b06f73151461035b578063b88d4fde14610352578063ba09f3d714610349578063c0d7f14714610340578063c23dc68f14610337578063c45ac0501461032e578063c87b56dd14610325578063ce7c2ac21461031c578063cfc86f7b14610313578063d5abeb011461030a578063d79779b214610301578063db980f4f146102f8578063e33b7de3146102ef578063e985e9c5146102e6578063eba5267e146102dd578063f2fde38b146102d45763ff489fe10361000e576102cf6130df565b61000e565b506102cf61304d565b506102cf612f4c565b506102cf612ed3565b506102cf612eb4565b506102cf612dea565b506102cf612dab565b506102cf612d8b565b506102cf612cb8565b506102cf612b83565b506102cf612ab5565b506102cf612a9b565b506102cf612a36565b506102cf61297f565b506102cf6127ef565b506102cf61278c565b506102cf612659565b506102cf6125b4565b506102cf61258c565b506102cf612567565b506102cf612486565b506102cf6121f4565b506102cf612122565b506102cf612096565b506102cf612057565b506102cf611f39565b506102cf611e70565b506102cf611cdc565b506102cf611cb4565b506102cf611c4c565b506102cf611b93565b506102cf611b3d565b506102cf611b0d565b506102cf611a12565b506102cf6119a7565b506102cf61197f565b506102cf6118da565b506102cf6116e2565b506102cf6114d5565b506102cf611397565b506102cf61133b565b506102cf61105e565b506102cf61104b565b506102cf611000565b506102cf610f3f565b506102cf610f20565b506102cf610e11565b506102cf610d5c565b506102cf610cab565b506102cf610c98565b506102cf610c00565b506102cf610ba2565b506102cf610a7f565b506102cf610a37565b506102cf6109e3565b506102cf610949565b506102cf610850565b506102cf6107db565b506102cf6106d1565b506102cf6105e7565b506102cf610507565b6001600160e01b031981160361050257565b600080fd5b5034610502576020366003190112610502576020600435610527816104f0565b63ffffffff60e01b166301ffc9a760e01b81149081908215610591575b8215610580575b821561055e575b50506040519015158152f35b63152a902d60e11b1491508115610578575b503880610552565b905038610570565b635b5e139f60e01b8114925061054b565b6380ac58cd60e01b81149250610544565b6001600160a01b0381160361050257565b6101a435906105c1826105a2565b565b6101c435906105c1826105a2565b6bffffffffffffffffffffffff81160361050257565b5034610502576040366003190112610502577f8039bd6e4e7dba001c8840eb2e118d9d131246faa7d0d04335f7305127ec0b106040600435610628816105a2565b6bffffffffffffffffffffffff602435610641816105d1565b610649613125565b610653818461489f565b6001600160a01b03845193168352166020820152a1005b600091031261050257565b60005b8381106106885750506000910152565b8181015183820152602001610678565b906020916106b181518092818552858086019101610675565b601f01601f1916010190565b9060206106ce928181520190610698565b90565b5034610502576000806003193601126107d85760405190807f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c429081549061071782612bc2565b808652926001928084169081156107ab5750600114610751575b61074d8661074181880382611638565b604051918291826106bd565b0390f35b815292507f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb35b8284106107935750505081016020016107418261074d38610731565b80546020858701810191909152909301928101610777565b905086955061074d9693506020925061074194915060ff191682840152151560051b820101929338610731565b80fd5b5034610502576020366003190112610502576004356107f9816155c8565b1561083e576000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260206001600160a01b0360406000205416604051908152f35b6040516333d1c03960e21b8152600490fd5b50604036600319011261050257600435610869816105a2565b6daaeb6d7670e522a718067333cd4e803b61088b575b6100216024358361545b565b604051633185c44d60e21b81523060048201526001600160a01b038316602482015290602090829060449082905afa90811561092b575b6000916108fd575b50156108d6573861087f565b604051633b79c77360e21b81526001600160a01b03919091166004820152602490fd5b0390fd5b61091e915060203d8111610924575b6109168183611638565b81019061372e565b386108ca565b503d61090c565b610933613283565b6108c2565b6001600160401b0381160361050257565b506020366003190112610502576001600160401b0360043561096a81610938565b166109ab6109783483614e30565b6109828333614e86565b67ffffffffffffffff60801b1967ffffffffffffffff60801b60fe549260801b1691161760fe55565b6109b581336159c2565b6040519081527f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427360203392a2005b503461050257600036600319011261050257600080516020615efe833981519152547f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c41546040519103600019018152602090f35b503461050257602036600319011261050257610021600435610a58816105a2565b61342b565b608090600319011261050257600490565b60809060c31901126105025760c490565b5034610502576080366003190112610502577f6f14260768729ce57b5eef3dc9dd01f100501b88d2a22b4ea9d91102c2bd3178610b9d610abe36610a5d565b610ac6613125565b610b9160fe54610af68335610ada81610938565b6001600160401b03166001600160401b031960fe54161760fe55565b610b306020840135610b0781610938565b67ffffffffffffffff60401b60fe549160401b169067ffffffffffffffff60401b19161760fe55565b610b41604084013561098281610938565b606083013560ff5560fe80547fffffffffffffffff0000000000000000ffffffffffffffff0000000000000000166001600160401b0383161767ffffffffffffffff60801b909216919091179055565b60405191829182614b04565b0390a1005b5034610502576020366003190112610502576020610beb600435610bc5816105a2565b6001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b546001600160401b036040519160401c168152f35b503461050257600036600319011261050257610c1a613125565b7f1509137b40df48e8ef9596f9db16b632b15353d0e0688d9f23221953eb0328dd6020610103805461ff0060ff8260081c161560081b169061ff0019161780915560ff6040519160081c1615158152a1005b606090600319011261050257600435610c84816105a2565b90602435610c91816105a2565b9060443590565b50610021610ca536610c6c565b91614f34565b5034610502576040366003190112610502576004356000526098602052604060002060405190610cda826115ef565b54906001600160a01b03908183169283825260a01c60208201529115610d4c575b610d24610d1c6bffffffffffffffffffffffff6020850151166024356135a4565b612710900490565b91511661074d60405192839283602090939291936001600160a01b0360408201951681520152565b9050610d56613743565b90610cfb565b5034610502576040366003190112610502576001600160a01b03602435610d82816105a2565b16600052610102602052604060002060043560005260205260206001600160401b0360406000205416604051908152f35b9181601f84011215610502578235916001600160401b038311610502576020808501948460051b01011161050257565b602060031982011261050257600435906001600160401b03821161050257610e0d91600401610db3565b9091565b503461050257610e2036610de3565b610e28613125565b6001600160401b03918260fc54168211610f0e5760005b828110610e4857005b83610e548285856149ef565b35610e5e81610938565b16610e67613125565b8060005260fd6020526040806000208054878116908115610efd5792610ee6610ef493610ed5610ada610ec460019a99968e7fc2067c23a9ebd515eec7748db8a487f8e13247aebbd537dcd7da1a54f63607159a881c1690614a7c565b60fe546001600160401b03166149d4565b805467ffffffffffffffff19169055565b519081529081906020820190565b0390a101610e3f565b835163268dbf6760e21b8152600490fd5b60405163268dbf6760e21b8152600490fd5b503461050257600036600319011261050257602060c954604051908152f35b5034610502576000806003193601126107d857610f5a613125565b610101805490825b828110610f6d578380f35b6001908254811015610fce575b8285526001600160a01b03817f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca747689015416610fb381613246565b610fbf575b5001610f62565b610fc89061342b565b38610fb8565b610fd6611324565b610f7a565b604090600319011261050257600435610ff3816105a2565b906024356106ce816105a2565b50346105025760206110426001600160a01b0361101c36610fdb565b911660005260cf83526040600020906001600160a01b0316600052602052604060002090565b54604051908152f35b5061002161105836610c6c565b91614feb565b50346105025760203660031901126105025760043560ff6101035460081c16156113125761108b8161539e565b6001600160a01b0381166110cb836000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c46602052604060002090815490565b92906110ea6001600160a01b03841633908114908614171590565b1590565b611296575b7f1af5163f80e79b5e554f61e1d052084d3a3fe1166e42a265798c4e2ddce8ffa29361128c575b50611141826001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b80546fffffffffffffffffffffffffffffffff0190556000848152600080516020615f1e833981519152602052604090204260a01b8317600360e01b179055600160e11b81161561121b575b50826000604051927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a461120b6111e77f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c415460010190565b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4155565b918252339180602081015b0390a2005b6001840161124081600052600080516020615f1e833981519152602052604060002090565b541561124d575b5061118d565b600080516020615efe8339815191525481146112475761128490600052600080516020615f1e833981519152602052604060002090565b553880611247565b6000905538611116565b6112fb6110e66112f4336112dc876001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b156110ef57604051632ce44b5f60e11b8152600490fd5b60405163fa32799b60e01b8152600490fd5b50634e487b7160e01b600052603260045260246000fd5b5034610502576020366003190112610502576004356101018054821015610502576020916001600160a01b03916000527f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca747689015416604051908152f35b5034610502576113a636610fdb565b907f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a6001600160a01b039280611453600095808316875260cb6020526113f160408820541515613370565b6113fb8387613290565b9384916114098315156133cb565b87169687895260ce60205260408920805490848201809211611478575b55611448826112dc836001600160a01b031660005260cf602052604060002090565b83815401905561360f565b604080516001600160a01b039092168252602082019290925290819081015b0390a280f35b61148061321a565b611426565b8015150361050257565b61018435906105c182611485565b604060031982011261050257600435906001600160401b038211610502576114c791600401610db3565b90916024356106ce81611485565b5034610502576114e43661149d565b916114ed613125565b60005b8281106115425750610b9d837f906568ccdea6378b9108aec731550e3e47f4541a63781939312428b90a4b4c6d9461152f575b60405193849384614a2d565b610103805460ff19166001179055611523565b61154d8184846149ef565b3561156f61156360fc546001600160401b031690565b6001600160401b031690565b1115610f0e57806115aa600261159c61158b60019588886149ef565b3560005260fd602052604060002090565b01805460ff19166001179055565b016114f0565b50634e487b7160e01b600052604160045260246000fd5b60c081019081106001600160401b038211176115e257604052565b6115ea6115b0565b604052565b604081019081106001600160401b038211176115e257604052565b6001600160401b0381116115e257604052565b602081019081106001600160401b038211176115e257604052565b90601f801991011681019081106001600160401b038211176115e257604052565b604051906105c1826115ef565b6020906001600160401b038111611683575b601f01601f19160190565b61168b6115b0565b611678565b92919261169c82611666565b916116aa6040519384611638565b829481845281830111610502578281602093846000960137010152565b9080601f83011215610502578160206106ce93359101611690565b503461050257602080600319360112610502576001600160401b03600435818111610502576117159036906004016116c7565b9161171e613125565b825191821161184e575b61173c8261173760fb54612bc2565b613e09565b80601f83116001146117a457509181610b9d927f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad94600091611799575b508160011b916000199060031b1c19161760fb55604051918291826106bd565b905082015138611779565b60fb60005290601f1983167f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc926000905b828210611836575050927f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad949260019282610b9d961061181d575b5050811b0160fb55610741565b84015160001960f88460031b161c191690553880611810565b80600185968294968a015181550195019301906117d5565b6118566115b0565b611728565b6020908160408183019282815285518094520193019160005b828110611882575050505090565b90919293826080826118ce600194895162ffffff606080926001600160a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565b01950193929101611874565b5034610502576118e936610de3565b906118f382613ad9565b916119016040519384611638565b808352601f1961191082613ad9565b0160005b81811061196857505060005b818103611935576040518061074d868261185b565b8061194c61194660019385876149ef565b35615b19565b6119568287614633565b526119618186614633565b5001611920565b602090611973615ad6565b82828801015201611914565b50346105025760003660031901126105025760206001600160401b0360fc5416604051908152f35b50346105025760203660031901126105025760206001600160a01b036119ce60043561539e565b16604051908152f35b6020908160408183019282815285518094520193019160005b8281106119fe575050505090565b8351855293810193928101926001016119f0565b5034610502576020806003193601126105025760043590611a32826105a2565b6001600160401b03908160fc5416611a5383611a4d836149bc565b16614f02565b90600080936001600160a01b038716945b86811684811015611ac15787916001918886526101028552611ab9611ab2611563611aa58560408b20906001600160401b0316600052602052604060002090565b546001600160401b031690565b9189614633565b520116611a64565b61074d8686611b008b611af48e6001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b5460401c169183614633565b52604051918291826119d7565b5034610502576020366003190112610502576020611b35600435611b30816105a2565b615333565b604051908152f35b5034610502576000806003193601126107d857611b58613125565b806001600160a01b0360335481198116603355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461050257602036600319011261050257600435611bb1816105a2565b60008091611bbe81615333565b611bc781614f02565b92611bd0615ad6565b506001926001600160a01b0390811690845b848403611bf7576040518061074d89826119d7565b81611c0182615b85565b876040820151611c435750511680611c3b575b50859083838a1614611c27575b01611be2565b80611c35838701968a614633565b52611c21565b975085611c14565b92915050611c21565b50346105025760203660031901126105025760206001600160a01b0360043560cd54811015611ca7575b60cd6000527f83978b4c69c48dd978ab43fe30f077615294f938fb7f936d9eb340e51ea7db2e015416604051908152f35b611caf611324565b611c76565b50346105025760003660031901126105025760206001600160a01b0360335416604051908152f35b5034610502576060366003190112610502576024356001600160401b0380821161050257611d0f60049236908401610db3565b9160443581811161050257611d279036908601610db3565b929093611d32613125565b600094818503611e5f579190611d53873560005260fd602052604060002090565b9286945b868610611d975760408051888152602081018a90527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba954649181908101610b9d565b9091929394968554611db2611dad8a87896149ef565b613ba5565b83611dc36040928285851c166149d4565b921684831611611e50575086546fffffffffffffffff0000000000000000191660409190911b67ffffffffffffffff60401b16178655600190611e1790611e11611563611dad8c898b6149ef565b90613231565b97611e45611e2e611e29838b886149ef565b61417d565b611e3f611563611dad858a8c6149ef565b906159c2565b019493929190611d57565b516352df9fe560e01b81528a90fd5b60405163e6dcad7760e01b81528790fd5b5034610502576000806003193601126107d85760405190807f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4390815490611eb682612bc2565b808652926001928084169081156107ab5750600114611edf5761074d8661074181880382611638565b815292507f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c5b828410611f215750505081016020016107418261074d38610731565b80546020858701810191909152909301928101611f05565b50606036600319011261050257600435602435611f5581610938565b6044356001600160401b039283821161050257612013611f8a82611f80612019953690600401610db3565b3492918833614b57565b85851692611f988433614e86565b611fe160009782895260fd602052611fba8860408b2092835460401c166149d4565b67ffffffffffffffff60401b82549160401b169067ffffffffffffffff60401b1916179055565b3387526101026020526040872090875260205260408620906001600160401b03166001600160401b0319825416179055565b336159c2565b6040516001600160401b03909116815233907f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a4273908060208101611472565b5034610502576020366003190112610502576001600160a01b0360043561207d816105a2565b1660005260cc6020526020604060002054604051908152f35b50346105025760603660031901126105025761074d6120c76004356120ba816105a2565b6044359060243590615bed565b604051918291826119d7565b604090606319011261050257606490565b908160409103126105025790565b9181601f84011215610502578235916001600160401b0383116105025760208085019460c0850201011161050257565b5034610502576101e03660031901126105025760046001600160401b0381358181116105025761215590369084016116c7565b6024358281116105025761216c90369085016116c7565b916044358181116105025761218490369086016116c7565b9161218e366120d3565b9160a435818111610502576121a690369088016120f2565b6121b292919236610a6e565b916101443590811161050257610021986121ce913691016120e4565b926121d761148f565b956121e06105b3565b976121e96105c3565b99610164359761382a565b506080366003190112610502576001600160401b0360048035828111610502576122219036908301610db3565b91906024358481116105025761223a9036908401610db3565b9190604435868111610502576122539036908601610db3565b9490916064359461226386610938565b61227861156360fc546001600160401b031690565b8711801561247c575b8015612472575b61246157969593929190349760009788965b8088106123345789898d16818b8e836122f7575b846122b98133614e86565b6122c381336159c2565b60405190815233907f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a4273908060208101611216565b8394509061230c6109829261232a9495614e30565b5060fe5460801c6001600160401b03165b016001600160401b031690565b01818080806122ae565b9091929394959698998b6123498b848a6149ef565b35612358611dad8d878d6149ef565b926123648d888a614a07565b94909261237b8160005260fd602052604060002090565b9561238e600388015496841680976135a4565b9485851061245157916124109161242b949387836001809c01541560001461243c576123f093506123c192508a33614d41565b935b611fba6123da8460005260fd602052604060002090565b9161231d83546001600160401b039060401c1690565b336000908152610102602052604090205b90600052602052604060002090565b906001600160401b03166001600160401b0319825416179055565b039b0199019695949392919061229a565b6123f09361244b938833614b57565b936123c3565b60405162bfc92160e01b81528d90fd5b60405163268dbf6760e21b81528390fd5b5080871415612288565b5087871415612281565b5034610502576040366003190112610502576004356124a4816105a2565b6024356124b081611485565b6daaeb6d7670e522a718067333cd4e803b6124d0575b5061002191615538565b604051633185c44d60e21b81523060048201526001600160a01b038416602482015290602090829060449082905afa90811561255a575b60009161253c575b501561251b57386124c6565b604051633b79c77360e21b81526001600160a01b0383166004820152602490fd5b612554915060203d8111610924576109168183611638565b3861250f565b612562613283565b612507565b503461050257600036600319011261050257602060ff61010354166040519015158152f35b5034610502576020366003190112610502576020611b356004356125af816105a2565b613246565b5034610502576020366003190112610502576004356125d1613125565b8060005260fd60205260406000208054916001600160401b0391828416938415610f0e57610ada846126307fc2067c23a9ebd515eec7748db8a487f8e13247aebbd537dcd7da1a54f636071597610b9d9761263a9560401c1690614a7c565b9060fe54166149d4565b805467ffffffffffffffff191690556040519081529081906020820190565b50346105025760e03660031901126105025760043560c036602319011261050257612682613125565b7fc0008a9740d8043d4c62e9129808dfe671c91ae530a5fe058ebb07b6b2fc95fe61278660009280845260fd60205261277a6001600160401b0361275281604088205460401c169160408820541661273e6126e5600260408b200160ff90541690565b936127026126fd8860005260fd602052604060002090565b613bcc565b6127168760005260fd602052604060002090565b9067ffffffffffffffff60401b82549160401b169067ffffffffffffffff60401b1916179055565b6124108560005260fd602052604060002090565b60026127688460005260fd602052604060002090565b019060ff801983541691151516179055565b60405191829182614a95565b0390a180f35b506080366003190112610502576004356127a5816105a2565b6024356127b1816105a2565b606435916001600160401b0383116105025736602384011215610502576127e5610021933690602481600401359101611690565b916044359161508a565b5034610502576040806003193601126105025760048035916001600160401b0392838111610502576128249036908401610db3565b9190936024358181116105025761283e9036908601610db3565b9390612848613125565b6000958286036129715792919086935b868510612897578551878152602081018990527f71cc7095cc35ed4701c217a8efb440732eb0737da67f6548c008ac26fba95464908060408101610b9d565b909192939688856128bd6128b2611dad8c8960fe54966149ef565b828460801c166149d4565b911686821611612961576128f49067ffffffffffffffff60801b1967ffffffffffffffff60801b60fe549260801b1691161760fe55565b6128ff88858b6149ef565b61290890613ba5565b6001600160401b031661291a91613231565b966129268188856149ef565b61292f9061417d565b61293a82868c6149ef565b61294390613ba5565b6001600160401b0316612955916159c2565b60010193929190612858565b86516352df9fe560e01b81528390fd5b845163e6dcad7760e01b8152fd5b50346105025761298e3661149d565b91612997613125565b60005b8281106129e85750610b9d837f4f1e98f5c7093632a49c02ecd1c1283bf1689573db8338b3814dfd7d9cf013c8946129d85760405193849384614a2d565b610103805460ff19169055611523565b6129f38184846149ef565b60fc54903591906001600160401b0316821015610f0e57612a306002612a2560019460005260fd602052604060002090565b01805460ff19169055565b0161299a565b5034610502576020366003190112610502576080612a55600435615b19565b612a99604051809262ffffff606080926001600160a01b0381511685526001600160401b036020820151166020860152604081015115156040860152015116910152565bf35b5034610502576020611b35612aaf36610fdb565b90613290565b503461050257602036600319011261050257600435612ad3816155c8565b15612b7157612ae0612bfc565b805160009015612b57575060405160a08101604052608081019260008452925b6000190192600a906030828206018553049283612b005761074d9350612b4592612b4b610741936080601f19948581019203018152604051958693602085019061538b565b9061538b565b03908101835282611638565b60405161074d93509150612b6a8261161d565b8152610741565b604051630a14c4b560e41b8152600490fd5b5034610502576020366003190112610502576001600160a01b03600435612ba9816105a2565b1660005260cb6020526020604060002054604051908152f35b90600182811c92168015612bf2575b6020831014612bdc57565b634e487b7160e01b600052602260045260246000fd5b91607f1691612bd1565b6040519060008260fb5491612c1083612bc2565b80835292600190818116908115612c965750600114612c37575b506105c192500383611638565b60fb600090815291507f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc5b848310612c7b57506105c1935050810160200138612c2a565b81935090816020925483858a01015201910190918592612c62565b9050602092506105c194915060ff191682840152151560051b82010138612c2a565b5034610502576000806003193601126107d857604051908060fb54612cdc81612bc2565b80855291600191808316908115612d615750600114612d06575b61074d8561074181870382611638565b925060fb83527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc5b828410612d495750505081016020016107418261074d612cf6565b80546020858701810191909152909301928101612d2e565b86955061074d9693506020925061074194915060ff191682840152151560051b8201019293612cf6565b503461050257600036600319011261050257602061010054604051908152f35b5034610502576020366003190112610502576001600160a01b03600435612dd1816105a2565b1660005260ce6020526020604060002054604051908152f35b506040806003193601126105025760043560243591612e0883610938565b612e7d6001600160401b0380851693612e4d612e2634838833614d41565b92612e318733614e86565b611fba600098848a5260fd602052878a20928354891c166149d4565b338652610102602052838620908652602052828520906001600160401b03166001600160401b0319825416179055565b612e8782336159c2565b519081527f3f2c9d57c068687834f0de942a9babb9e5acab57d516d3480a3c16ee165a427360203392a280f35b503461050257600036600319011261050257602060ca54604051908152f35b503461050257604036600319011261050257602060ff612f40600435612ef8816105a2565b6112dc60243591612f08836105a2565b6001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b54166040519015158152f35b50346105025760203660031901126105025761074d60408060a08151612f71816115c7565b600091818380935282602082015282858201528260608201528260808201520152600435815260fd60205220906003815192612fac846115c7565b80546001600160401b03808216865281851c8116602087015260809190911c168385015260018101546060850152612ff4612feb600283015460ff1690565b15156080860152565b015460a0830152519182918291909160a08060c08301946001600160401b038082511685528060208301511660208601526040820151166040850152606081015160608501526080810151151560808501520151910152565b50346105025760203660031901126105025760043561306b816105a2565b613073613125565b6001600160a01b0381161561308b5761002190613199565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b503461050257600036600319011261050257608060fe5460ff54604051916001600160401b03908181168452818160401c166020850152841c1660408301526060820152f35b6001600160a01b0360335416330361313957565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b613185613125565b6001600160a01b0381161561308b576105c1905b603354906001600160a01b0380911691826001600160a01b0319821617603355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b604080513381523460208201527f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77091819081015b0390a1565b50634e487b7160e01b600052601160045260246000fd5b9190820180921161323e57565b6105c161321a565b6106ce904760ca548101809111613276575b6001600160a01b03821660005260cc602052604060002054916135b7565b61327e61321a565b613258565b506040513d6000823e3d90fd5b6040516370a0823160e01b8152306004820152909291906001600160a01b038416602082602481845afa918215613363575b600092613330575b50826112dc6106ce95966133089360005260ce602052604060002054850180951161330f576001600160a01b031660005260cf602052604060002090565b54916135b7565b61331761321a565b6001600160a01b031660005260cf602052604060002090565b90916020823d821161335b575b8161334a60209383611638565b810103126107d857505190826132ca565b3d915061333d565b61336b613283565b6132c2565b1561337757565b60405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b6064820152608490fd5b156133d257565b60405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b6064820152608490fd5b6001600160a01b038116600081815260cb60205261344e60408220541515613370565b61345782613246565b916134638315156133cb565b60ca54838101809111613597575b60ca5580825260cc602052604082208381540190558247106135525781808481935af161349c613769565b50156134e757604080516001600160a01b03909316835260208301919091527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056919081908101613215565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b61359f61321a565b613471565b8181029291811591840414171561323e57565b906001600160a01b036135d9921660005260cb602052604060002054906135a4565b60c9549081156135f957049081039081116135f15790565b6106ce61321a565b634e487b7160e01b600052601260045260246000fd5b6136b2916000806001600160a01b03604051946136678661365960209a8b83019863a9059cbb60e01b8a5260248401602090939291936001600160a01b0360408201951681520152565b03601f198101885287611638565b169260405194613676866115ef565b8786527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656488870152519082855af16136ac613769565b91613799565b805190816136bf57505050565b82806136cf93830101910161372e565b156136d75750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b9081602091031261050257516106ce81611485565b60405190613750826115ef565b6097546001600160a01b038116835260a01c6020830152565b3d15613794573d9061377a82611666565b916137886040519384611638565b82523d6000602084013e565b606090565b919290156137fb57508151156137ad575090565b3b156137b65790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b82519091501561380e5750805190602001fd5b60405162461bcd60e51b81529081906108f990600483016106bd565b9a989694929099979593917fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f549a60ff8c60081c169b8c6000146139525750303b155b156138e7576138829b159c8d6138b45761395b565b61388857565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ff0019169055565b7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f805461ffff191661010117905561395b565b60405162461bcd60e51b815260206004820152603760248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f20697320616c726561647920696e697469616c697a65640000000000000000006064820152608490fd5b60ff161561386d565b99979593919a98969492909a6000549b60ff8d60081c1615809d819e613a96575b8115613a76575b5015613a0b576139a99b8d6139a0600160ff196000541617600055565b6139f2576142d6565b6139af57565b6139bf61ff001960005416600055565b604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498908060208101613215565b613a0661010061ff00196000541617600055565b6142d6565b60405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608490fd5b303b15915081613a88575b5038613983565b6001915060ff161438613a81565b600160ff821610915061397c565b903590601e198136030182121561050257018035906001600160401b03821161050257602001918160051b3603831361050257565b6020906001600160401b038111613af2575b60051b0190565b613afa6115b0565b613aeb565b9291613b0a82613ad9565b91613b186040519384611638565b829481845260208094019160051b810192831161050257905b828210613b3e5750505050565b8380918335613b4c816105a2565b815201910190613b31565b9291613b6282613ad9565b91613b706040519384611638565b829481845260208094019160051b810192831161050257905b828210613b965750505050565b81358152908301908301613b89565b356106ce81610938565b9160c091811015613bbf57020190565b613bc7611324565b020190565b613bf8602435613bdb81610938565b825467ffffffffffffffff19166001600160401b03909116178255565b613c34604435613c0781610938565b82546fffffffffffffffff0000000000000000191660409190911b67ffffffffffffffff60401b16178255565b613c6b606435613c4381610938565b825467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178255565b6084356001820155613c9760a435613c8281611485565b600283019060ff801983541691151516179055565b600360c435910155565b9060a0600391613cd28135613cb581610938565b855467ffffffffffffffff19166001600160401b03909116178555565b613d106020820135613ce381610938565b85546fffffffffffffffff0000000000000000191660409190911b67ffffffffffffffff60401b16178555565b613d496040820135613d2181610938565b855467ffffffffffffffff60801b191660809190911b67ffffffffffffffff60801b16178555565b60608101356001850155613d796080820135613d6481611485565b600286019060ff801983541691151516179055565b0135910155565b15613d8757565b60405162461bcd60e51b815260206004820152603160248201527f537570706c79206f6620616c6c20706861736573206d75737420657175616c2060448201527f6d6178496e74656e646564537570706c790000000000000000000000000000006064820152608490fd5b818110613dfd575050565b60008155600101613df2565b90601f8211613e16575050565b6105c19160fb6000527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc906020601f840160051c83019310613e60575b601f0160051c0190613df2565b9091508190613e53565b90601f8211613e77575050565b6105c1917f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c426000527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb3906020601f840160051c83019310613e6057601f0160051c0190613df2565b90601f8211613eec575050565b6105c1917f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c436000527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c906020601f840160051c83019310613e6057601f0160051c0190613df2565b9081516001600160401b038111614039575b613f758161173760fb54612bc2565b602080601f8311600114613fb15750819293600092613fa6575b50508160011b916000199060031b1c19161760fb55565b015190503880613f8f565b90601f19831694613fe460fb6000527f3e7257b7272bb46d49cd6019b04ddee20da7c0cb13f7c1ec3391291b2ccebabc90565b926000905b878210614021575050836001959610614008575b505050811b0160fb55565b015160001960f88460031b161c19169055388080613ffd565b80600185968294968601518155019501930190613fe9565b6140416115b0565b613f66565b9081516001600160401b038111614170575b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c439061408d816140888454612bc2565b613edf565b602080601f83116001146140c95750819293946000926140be575b50508160011b916000199060031b1c1916179055565b0151905038806140a8565b90601f1983169561411b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c436000527f617167b76dcc8247761fd21f427ad8ec3be6b3be203aed34e3aac08b4d31817c90565b926000905b8882106141585750508360019596971061413f575b505050811b019055565b015160001960f88460031b161c19169055388080614135565b80600185968294968601518155019501930190614120565b6141786115b0565b614058565b356106ce816105a2565b6001600160401b03821161424c575b68010000000000000000821161423f575b610101908154838355808410614209575b509060005260005b8281106141cc57505050565b60019060208335936141dd856105a2565b0192817f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca7476890155016141c0565b61423990847f109ea3cebb188b9c1b9fc5bb3920be60dfdc8699098dff92f3d80daaca7476899182019101613df2565b386141b8565b6142476115b0565b6141a7565b6142546115b0565b614196565b606090803561426781610938565b60fe5467ffffffffffffffff60401b60208401359161428583610938565b6001600160401b0367ffffffffffffffff60801b60408701356142a781610938565b60801b169416906001600160401b0360c01b16179160401b16171760fe55013560ff55565b356106ce816105d1565b906142ec919c9b9a999695949c9897939861519c565b6142f46144c2565b61432f6143296143048480613aa4565b6143216143176020889594950188613aa4565b9490923691613aff565b923691613b57565b906144e5565b6001600160401b0383169261434661156386613ba5565b906000905b8582106144195750506105c19a9b506143db946143b588956143996143936143d59761438d6143fb9f9e9c986143886143f69f6143ba9a14613d80565b613f54565b80613aa4565b90614187565b6001600160401b03166001600160401b031960fc54161760fc55565b614259565b6101039061ff00825491151560081b169061ff001916179055565b61010055565b6143f060206143e98361417d565b92016142cc565b9061489f565b61317d565b6001600160a01b03811661441157600090615d4d565b600190615d4d565b909161445a6001918f611563611dad87878461445561443c8484611e1199613baf565b6144508560005260fd602052604060002090565b613ca1565b613baf565b92019061434b565b1561446957565b60405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201526a6e697469616c697a696e6760a81b6064820152608490fd5b6144dc60ff60005460081c166144d781614462565b614462565b6105c133613199565b9190916144fd60ff60005460081c166144d781614462565b805183510361456057614512815115156145cb565b60005b815181101561455a578061455061453f6145326145559486614633565b516001600160a01b031690565b6145498388614633565b5190614782565b614617565b614515565b50509050565b60405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e64207368617260448201527f6573206c656e677468206d69736d6174636800000000000000000000000000006064820152608490fd5b156145d257565b60405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606490fd5b6001906000198114614627570190565b61462f61321a565b0190565b6020918151811015614648575b60051b010190565b614650611324565b614640565b1561465c57565b60405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606490fd5b156146a857565b60405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608490fd5b6001600160a01b0360cd5468010000000000000000811015614775575b600181018060cd55811015614768575b60cd6000527f83978b4c69c48dd978ab43fe30f077615294f938fb7f936d9eb340e51ea7db2e0191166001600160a01b0319825416179055565b614770611324565b61472e565b61477d6115b0565b61471e565b906001600160a01b03821615614845577f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac916147bf821515614655565b6147e66147df826001600160a01b031660005260cb602052604060002090565b54156146a1565b6147ef81614701565b8161480d826001600160a01b031660005260cb602052604060002090565b5561482261481d8360c954613231565b60c955565b604080516001600160a01b03909216825260208201929092529081908101613215565b60405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b6127106bffffffffffffffffffffffff831611614964576001600160a01b0381161561491f576148fb6105c1926148e66148d7611659565b6001600160a01b039094168452565b6bffffffffffffffffffffffff166020830152565b6001600160a01b038151169060206001600160a01b031991015160a01b1617609755565b60405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608490fd5b9060016001600160401b038093160191821161323e57565b9190916001600160401b038080941691160191821161323e57565b91908110156149ff5760051b0190565b613afa611324565b9091610e0d92811015614a20575b60051b810190613aa4565b614a28611324565b614a15565b91939293604083528060408401527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116105025760209160609160051b809183860137830101931515910152565b6001600160401b03918216908216039190821161323e57565b90815260e081019190602435614aaa81610938565b6001600160401b03809116602083015280604435614ac781610938565b166040830152606435614ad981610938565b166060820152608435608082015260a435614af381611485565b151560a082015260c060c435910152565b91909160608060808301948035614b1a81610938565b6001600160401b038091168552806020830135614b3681610938565b1660208601526040820135614b4a81610938565b1660408501520135910152565b93909193614b6f8260005260fd602052604060002090565b93614b816110e6600287015460ff1690565b614cd25760018501548015614cc0578554966001600160401b0398604097614bad888c8c8c1c166149d4565b8b808c16911611614caf578a6003614bca920154981697886135a4565b03614c9f57916110e691614c20614c259489516020810190614c1581614c078b856014916bffffffffffffffffffffffff199060601b1681520190565b03601f198101835282611638565b519020933691613b57565b614ce4565b614c8e5791614c56611563611aa5614c5b946124018a976001600160a01b0316600052610102602052604060002090565b613231565b9260801c168015159081614c84575b50614c7457501690565b51636c80554560e11b8152600490fd5b9050821138614c6a565b83516309bde33960e01b8152600490fd5b865162bfc92160e01b8152600490fd5b88516352df9fe560e01b8152600490fd5b604051634d0ee1f560e11b8152600490fd5b6040516321094a9b60e01b8152600490fd5b929091906000915b8451831015614d3957614cff8386614633565b5190600082821015614d275750600052602052614d2160406000205b92614617565b91614cec565b604091614d2193825260205220614d1b565b915092501490565b909291614d588160005260fd602052604060002090565b93614d6a6110e6600287015460ff1690565b614cd2576001850154614cc0578454936001600160401b0395614d9283888860401c16613231565b87871610614e1e576003614da8910154836135a4565b03614e0d57614c56611563611aa5614dd99461240189976001600160a01b0316600052610102602052604060002090565b9160801c168015159081614e03575b50614df1571690565b604051636c80554560e11b8152600490fd5b9050811138614de8565b60405162bfc92160e01b8152600490fd5b6040516352df9fe560e01b8152600490fd5b9060ff610103541615614cd25760fe54906001600160401b039283808460801c1693828501809511614e79575b168311614e1e5760ff54614e70916135a4565b03614e0d571690565b614e8161321a565b614e5d565b906001600160401b03908160fe5460401c16918215159384614ead575b50505050614df157565b614edb91929394506001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b5460401c16908101809111614ef5575b1138808080614ea3565b614efd61321a565b614eeb565b90614f0c82613ad9565b614f196040519182611638565b8281528092614f2a601f1991613ad9565b0190602036910137565b91906daaeb6d7670e522a718067333cd4e803b614f56575b506105c19261561d565b336001600160a01b03851614614f4c57604051633185c44d60e21b815230600482015233602482015290602090829060449082905afa908115614fde575b600091614fc0575b5015614fa85738614f4c565b604051633b79c77360e21b8152336004820152602490fd5b614fd8915060203d8111610924576109168183611638565b38614f9c565b614fe6613283565b614f94565b91906daaeb6d7670e522a718067333cd4e803b61500d575b506105c192615857565b336001600160a01b0385161461500357604051633185c44d60e21b815230600482015233602482015290602090829060449082905afa90811561507d575b60009161505f575b5015614fa85738615003565b615077915060203d8111610924576109168183611638565b38615053565b615085613283565b61504b565b9291906daaeb6d7670e522a718067333cd4e803b6150ad575b506105c193615891565b336001600160a01b038616146150a357604051633185c44d60e21b815230600482015233602482015290602090829060449082905afa90811561511d575b6000916150ff575b5015614fa857386150a3565b615117915060203d8111610924576109168183611638565b386150f3565b615125613283565b6150eb565b1561513157565b60405162461bcd60e51b815260206004820152603460248201527f455243373231415f5f496e697469616c697a61626c653a20636f6e747261637460448201527f206973206e6f7420696e697469616c697a696e670000000000000000000000006064820152608490fd5b91906151d760ff7fee151c8401928dc223602bb187aff91b9a56c7cae5476ef1b3287b085a16c85f5460081c166151d28161512a565b61512a565b82516001600160401b038111615326575b7f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c429061521d816152188454612bc2565b613e6a565b602080601f831160011461527657508190615254959660009261526b575b50508160011b916000199060031b1c1916179055614046565b6105c16001600080516020615efe83398151915255565b01519050388061523b565b90601f198316966152c87f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c426000527f933ecf8acb7824b680a8d16f3ff3db8864228d986aa4c2ebab1eeb2703b4beb390565b926000905b89821061530e575050908392916001946152549899106152f5575b505050811b019055614046565b015160001960f88460031b161c191690553880806152e8565b806001859682949686015181550195019301906152cd565b61532e6115b0565b6151e8565b6001600160a01b03811615615379576153746001600160401b03916001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b541690565b6040516323d3ad8160e21b8152600490fd5b9061462f60209282815194859201610675565b600190808211156153bc575b604051636f96cda160e11b8152600490fd5b6153dd81600052600080516020615f1e833981519152602052604060002090565b5491600160e01b8316156153f157506153aa565b82156153fc57505090565b600080516020615efe833981519152548210156153aa5790815b61541f57505090565b9091506000190161544781600052600080516020615f1e833981519152602052604060002090565b5491821561545457505090565b9081615416565b6001600160a01b038061546d8461539e565b16908133036154de575b836000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c466020526040600020921691826001600160a01b03198254161790557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b60ff615520336112dc856001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b5416615477576040516367d9dca160e11b8152600490fd5b6001600160a01b039061559683615585836112dc336001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b9060ff801983541691151516179055565b604051921515835216907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3565b80600111159081615604575b816155dd575090565b9050600052600080516020615f1e833981519152602052600160e01b604060002054161590565b600080516020615efe83398151915254811091506155d4565b906156278361539e565b6001600160a01b038084169283828416036158465760008681527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c4660205260409020805490926156866001600160a01b03881633908114908414171590565b6157e9575b82169586156157d7576156f6936156c8926157cd575b506001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b80546000190190556001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b80546001019055600160e11b804260a01b85171761572b86600052600080516020615f1e833981519152602052604060002090565b5581161561575c575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b6001840161578181600052600080516020615f1e833981519152602052604060002090565b541561578e575b50615734565b600080516020615efe833981519152548114615788576157c590600052600080516020615f1e833981519152602052604060002090565b553880615788565b60009055386156a1565b604051633a954ecd60e21b8152600490fd5b61582f6110e66112f4336112dc8b6001600160a01b03166000527f2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c47602052604060002090565b1561568b57604051632ce44b5f60e11b8152600490fd5b60405162a1148160e81b8152600490fd5b90916105c19260405192602084018481106001600160401b03821117615884575b6040526000845261508a565b61588c6115b0565b615878565b92919061589f828286614f34565b803b6158ac575b50505050565b6158b593615919565b156158c357388080806158a6565b6040516368d2bf6b60e11b8152600490fd5b9081602091031261050257516106ce816104f0565b90926106ce94936080936001600160a01b03809216845216602083015260408201528160608201520190610698565b9260209161594a9360006001600160a01b03604051809781968295630a85bd0160e11b9b8c855233600486016158ea565b0393165af160009181615992575b5061598457615965613769565b8051908161597f576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b6159b491925060203d81116159bb575b6159ac8183611638565b8101906158d5565b9038615958565b503d6159a2565b90600080516020615efe83398151915254918115615ac457615a04816001600160a01b0316600052600080516020615f3e833981519152602052604060002090565b68010000000000000001830281540190556001600160a01b03600191169181811460e11b4260a01b178317615a5085600052600080516020615f1e833981519152602052604060002090565b558301926000827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92808684868180a4015b858103615ab5575050505015615aa457600080516020615efe83398151915255565b604051622e076360e81b8152600490fd5b8084918684868180a401615a82565b60405163b562e8dd60e01b8152600490fd5b60405190608082018281106001600160401b03821117615b0c575b60405260006060838281528260208201528260408201520152565b615b146115b0565b615af1565b615b21615ad6565b50615b2a615ad6565b600182108015615b6c575b615b675750615b4381615b85565b6040810151615b675750615b626106ce91615b5c615ad6565b5061539e565b615bad565b905090565b50600080516020615efe83398151915254821015615b35565b615b8d615ad6565b50600052600080516020615f1e8339815191526020526106ce6040600020545b90615bb6615ad6565b916001600160a01b03811683526001600160401b038160a01c166020840152600160e01b81161515604084015260e81c6060830152565b9082811015615d3b57600091600080516020615efe8339815191525491600192838210615d33575b808611615d2b575b50615c2782615333565b9185821015615d2357818603838110615d1b575b505b615c4683614f02565b958315615d12578493615c5884615b19565b918794604093615c6d6110e686830151151590565b615d00575b50955b615c86575b50505050505050815290565b8086141580615cf6575b15615cf1578686615ca18298615b85565b80860151615ceb57516001600160a01b0390811680615ce3575b5080871690881614615ccf575b0195615c75565b80615cdd838c019b8d614633565b52615cc8565b975038615cbb565b50615cc8565b615c7a565b5081881415615c90565b516001600160a01b0316955038615c72565b50505050505090565b925038615c3b565b849250615c3d565b945038615c1d565b839150615c15565b604051631960ccad60e11b8152600490fd5b90600091615d6160ff845460081c16614462565b6daaeb6d7670e522a718067333cd4e91823b615d7d5750505050565b60405163c3c5a54760e01b815230600482015260208160248188885af1908115615ef0575b8591615ed2575b506158a65715615e2c57813b15615e2857604051633e9f1edf60e11b81523060048201526001600160a01b0391909116602482015291908290604490829084905af18015615e1b575b615e02575b505b388080806158a6565b80615e0f615e159261160a565b8061066a565b38615df7565b615e23613283565b615df2565b8280fd5b6001600160a01b03811615615ea757813b15615e285760405163a0af290360e01b81523060048201526001600160a01b03909116602482015291908290818381604481015b03925af18015615e9a575b615e87575b50615df9565b80615e0f615e949261160a565b38615e81565b615ea2613283565b615e7c565b5090813b156107d857604051632210724360e11b815230600482015291829081838160248101615e71565b615eea915060203d8111610924576109168183611638565b38615da9565b615ef8613283565b615da256fe2569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c402569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c442569078dfb4b0305704d3008e7403993ae9601b85f7ae5e742de3de8f8011c45a2646970667358221220c0ca2232083fda5291a1eb36de3dcf971006d1a765ba45e7d1c2cebeb08f855564736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.