Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Name:
BimkonEyes
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 50000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "erc721a/contracts/extensions/ERC721AQueryable.sol";
error WhiteListSaleNotAvailable();
error ArraysAreDifferentLength();
error YouAlreadyMintedForTeam();
error PublicSaleNotAvailable();
error AirDropNotAvailable();
error YouAreNotWhiteList();
error FailedToSendAssets();
error InvalidSignature();
error BeyondMaxSupply();
error TokenNotExist();
error CantMintMore();
error LowSentEther();
/// @title NFT Contract with Access Management Control
contract BimkonEyes is ERC721AQueryable, AccessControl {
using ECDSA for bytes32;
uint256 public constant TEAM_MINT_AMOUNT = 200;
uint256 public constant MAX_SUPPLY = 10000;
uint256 public constant MAX_PUBLIC_MINT = 10;
uint256 public constant MAX_WHITELIST_MINT = 3;
uint256 public constant MAX_AIRDROP_MINT = 2;
bytes32 public constant CAT = keccak256("Cat");
bytes32 public constant PRICE_MANAGER_ROLE = keccak256("PRICE_MANAGER_ROLE");
bytes32 public constant SELL_PHASE_MANAGER_ROLE = keccak256("SELL_PHASE_MANAGER_ROLE");
bytes32 public constant WHITE_LIST_MANAGER_ROLE = keccak256("WHITE_LIST_MANAGER_ROLE");
uint256 public publicSalePrice = 0.000001 ether;
uint256 public whiteListSalePrice = 0.0000005 ether;
bool public isRevealed;
bool public teamMinted;
SalePhase public publicSale;
SalePhase public whiteListSale;
SalePhase public airDrop;
bytes32 private _merkleRootWhiteList;
bytes32 private _merkleRootAirDrop;
string public placeholderTokenUri;
string private _baseTokenUri;
string private _merkleProofs;
enum SalePhase {
Soon,
Available,
Finished
}
mapping(address => uint256) public totalPublicMint;
mapping(address => uint256) public totalWhitelistMint;
mapping(address => uint256) public totalAirdropMint;
event SentNFT(address indexed _token, address indexed _sender, uint256[] indexed _tokenIds);
event SetPublicSalePrice(uint256 indexed _price);
event SetWhiteListSalePrice(uint256 indexed _price);
event SetTokenUri(string indexed _baseTokenUri);
event SetPlaceHolderUri(string indexed _placeholderTokenUri);
event SetMerkleRootWhiteList(bytes32 indexed _merkleRoot);
event SetMerkleRootAirDrop(bytes32 indexed _merkleRoot);
event SetMerkleProofs(string indexed merkleProofs);
event SetWhiteListSaleState(SalePhase indexed _status);
event SetAirDropState(SalePhase indexed _status);
event SetPublicSaleState(SalePhase indexed _status);
event ToggleReveal(bool indexed _state);
event ClaimAirdrop(address indexed _claimer, uint256 indexed quantity);
event WhiteListMint(address indexed _claimer, uint256 indexed quantity);
event Mint(address indexed _claimer, uint256 indexed quantity);
event Withdraw(address indexed _to, uint256 indexed _value);
modifier isBeyondMaxSupply(uint256 _quantity) {
if ((totalSupply() + _quantity) >= MAX_SUPPLY) {
revert BeyondMaxSupply();
}
_;
}
constructor(
address priceManager,
address sellManager,
address whiteListManager
) ERC721A("BimkonEyes", "BYS") {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(PRICE_MANAGER_ROLE, priceManager);
_setupRole(SELL_PHASE_MANAGER_ROLE, sellManager);
_setupRole(WHITE_LIST_MANAGER_ROLE, whiteListManager);
}
///@notice it show supported interfaces
///@param _quantity NFT quantity to mint
///@dev can mint only when publicSale true
function mint(uint256 _quantity, bytes calldata _signature) external payable isBeyondMaxSupply(_quantity) {
if (publicSale != SalePhase.Available) {
revert PublicSaleNotAvailable();
}
if (!isValidSignature(_signature, msg.sender)) {
revert InvalidSignature();
}
if ((totalPublicMint[msg.sender] + _quantity) > MAX_PUBLIC_MINT) {
revert CantMintMore();
}
if (!(msg.value == (publicSalePrice * _quantity))) {
revert LowSentEther();
}
totalPublicMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
emit Mint(msg.sender, _quantity);
}
///@notice mint token to whitelisted addresses
///@param _merkleProof proof that user in whiteList
///@param _quantity quantity to mint
///@dev only whitelisted can do it
function whitelistMint(bytes32[] memory _merkleProof, uint256 _quantity)
external
payable
isBeyondMaxSupply(_quantity)
{
if (whiteListSale != SalePhase.Available) {
revert WhiteListSaleNotAvailable();
}
if ((totalWhitelistMint[msg.sender] + _quantity) > MAX_WHITELIST_MINT) {
revert CantMintMore();
}
if (!(msg.value == (whiteListSalePrice * _quantity))) {
revert LowSentEther();
}
if (!_isVerify(_merkleProof, _merkleRootWhiteList, msg.sender)) {
revert YouAreNotWhiteList();
}
totalWhitelistMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
emit WhiteListMint(msg.sender, _quantity);
}
///@notice team mint nft for themselfs
///@dev can only mint once
function teamMint() external onlyRole(DEFAULT_ADMIN_ROLE) {
if (teamMinted) {
revert YouAlreadyMintedForTeam();
}
teamMinted = true;
_safeMint(msg.sender, TEAM_MINT_AMOUNT);
}
///@notice this let multiSend 721 tokens
///@param _token token address
///@param _to to array
///@param _id token id array
function multiSendERC721(
IERC721A _token,
address[] calldata _to,
uint256[] calldata _id
) external {
if (_to.length != _id.length) {
revert ArraysAreDifferentLength();
}
uint256 currentIndex = 0;
uint256[] memory _transferredTokenIds = new uint256[](_id.length);
for (uint256 i = 0; i < _to.length; i++) {
if (_to[i] != address(0)) {
IERC721A(_token).safeTransferFrom(msg.sender, _to[i], _id[i]);
_transferredTokenIds[currentIndex] = _id[i];
currentIndex += 1;
}
}
emit SentNFT(address(_token), msg.sender, _transferredTokenIds);
}
///@notice it withdraw assets from contract
///@param _to withdraw to
///@param _value value to withdraw
///@dev only owner can do this
function withdraw(address _to, uint256 _value) external onlyRole(DEFAULT_ADMIN_ROLE) {
(bool success, ) = _to.call{value: _value}("");
if (!success) {
revert FailedToSendAssets();
}
emit Withdraw(_to, _value);
}
///@notice claim air drop
///@param _merkleProof proof that user in whiteList
///@param _quantity quantity to mint
///@dev only whitelisted can do it
function claimAirdrop(bytes32[] memory _merkleProof, uint256 _quantity) external isBeyondMaxSupply(_quantity) {
if (airDrop != SalePhase.Available) {
revert AirDropNotAvailable();
}
if ((totalAirdropMint[msg.sender] + _quantity) > MAX_AIRDROP_MINT) {
revert CantMintMore();
}
if (!_isVerify(_merkleProof, _merkleRootAirDrop, msg.sender)) {
revert YouAreNotWhiteList();
}
totalAirdropMint[msg.sender] += _quantity;
_safeMint(msg.sender, _quantity);
emit ClaimAirdrop(msg.sender, _quantity);
}
///@notice set publicSalePrice
///@param _price price for sale
///@dev only priceManager can call this
function setPublicSalePrice(uint256 _price) external onlyRole(PRICE_MANAGER_ROLE) {
publicSalePrice = _price;
emit SetPublicSalePrice(_price);
}
///@notice set whiteListSalePrice
///@param _price price for sale
///@dev only priceManager can call this
function setWhiteListSalePrice(uint256 _price) external onlyRole(PRICE_MANAGER_ROLE) {
whiteListSalePrice = _price;
emit SetWhiteListSalePrice(_price);
}
///@notice set base token URI
///@param baseTokenUri_ base token URI
///@dev only owner can do this
function setTokenUri(string memory baseTokenUri_) external onlyRole(DEFAULT_ADMIN_ROLE) {
_baseTokenUri = baseTokenUri_;
emit SetTokenUri(baseTokenUri_);
}
///@notice set placeholder token URI
///@param _placeholderTokenUri placeholder token URI
///@dev only owner can do this
function setPlaceHolderUri(string memory _placeholderTokenUri) external onlyRole(DEFAULT_ADMIN_ROLE) {
placeholderTokenUri = _placeholderTokenUri;
emit SetPlaceHolderUri(_placeholderTokenUri);
}
///@notice set merkle root for whitelist
///@param merkleRoot_ merkle root
///@dev only whiteList manager can do this
function setMerkleRootWhiteList(bytes32 merkleRoot_) external onlyRole(WHITE_LIST_MANAGER_ROLE) {
_merkleRootWhiteList = merkleRoot_;
emit SetMerkleRootWhiteList(merkleRoot_);
}
///@notice set merkle root for whitelist
///@param merkleRoot_ merkle root
///@dev only whiteList manager can do this
function setMerkleRootAirDrop(bytes32 merkleRoot_) external onlyRole(WHITE_LIST_MANAGER_ROLE) {
_merkleRootAirDrop = merkleRoot_;
emit SetMerkleRootAirDrop(merkleRoot_);
}
///@notice set merkle proofs for current whitelist
///@param merkleProofs_ IPFS URI for merkle proofs
///@dev only whiteList manager can do this
function setMerkleProofs(string calldata merkleProofs_) external onlyRole(WHITE_LIST_MANAGER_ROLE) {
_merkleProofs = merkleProofs_;
emit SetMerkleProofs(merkleProofs_);
}
///@notice toggle whiteListSale
///@dev only sellPhaseManager can do it
function toggleWhiteListSale(SalePhase _status) external onlyRole(SELL_PHASE_MANAGER_ROLE) {
whiteListSale = _status;
emit SetWhiteListSaleState(_status);
}
///@notice toggle AirDrop phase
///@dev only sellPhaseManager can do it
function toggleAirDrop(SalePhase _status) external onlyRole(SELL_PHASE_MANAGER_ROLE) {
airDrop = _status;
emit SetAirDropState(_status);
}
///@notice toggle PublicSale phase
///@dev only sellPhaseManager can do it
function togglePublicSale(SalePhase _status) external onlyRole(SELL_PHASE_MANAGER_ROLE) {
publicSale = _status;
emit SetPublicSaleState(_status);
}
///@notice toggle reveal
///@dev only sellPhaseManager can do it
function toggleReveal() external onlyRole(SELL_PHASE_MANAGER_ROLE) {
isRevealed = !isRevealed;
emit ToggleReveal(isRevealed);
}
///@notice check if user can claim airdrop
///@param _merkleProof proof that user in whiteList for airdrop
///@dev using merkleProof to verify user
///@return bool that indicated if user can claim Airdrop
function canClaimAirDrop(bytes32[] memory _merkleProof, address _account) external view returns (bool) {
return _isVerify(_merkleProof, _merkleRootAirDrop, _account);
}
///@notice check mint amount for airdrop left
///@return uint256 amount for airdrop left
function allowedToClaimDropAmount(address _account) external view returns (uint256) {
return MAX_AIRDROP_MINT - totalAirdropMint[_account];
}
///@notice check if user in whitelist
///@param _merkleProof proof that user in whiteLis for whitelistSale
///@dev using merkleProof to verify user
///@return bool that indicated if user can claim Airdrop
function isWhiteListed(bytes32[] memory _merkleProof, address _account) external view returns (bool) {
return _isVerify(_merkleProof, _merkleRootWhiteList, _account);
}
///@notice check mint amount for whiteList left
///@return uint256 amount for whiteList left
function allowedToWhiteListMintAmount(address _account) external view returns (uint256) {
return MAX_WHITELIST_MINT - totalWhitelistMint[_account];
}
///@notice check mint amount for publicSale left
///@return uint256 amount for publicSake left
function allowedToPublicMintAmount(address _account) external view returns (uint256) {
return MAX_PUBLIC_MINT - totalPublicMint[_account];
}
///@notice get merkle root for whitelist
function getMerkleRootWhiteList() external view returns (bytes32) {
return _merkleRootWhiteList;
}
///@notice get merkle root for airdrop
function getMerkleRootAirDrop() external view returns (bytes32) {
return _merkleRootAirDrop;
}
///@notice get merkle proofs IPFS URI
function getMerkleProofs() external view returns (string memory) {
return _merkleProofs;
}
///@notice it show supported interfaces
///@param interfaceId interface id
///@dev external contracts can check if some interface is supported
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC721A, AccessControl) returns (bool) {
return ERC721A.supportsInterface(interfaceId) || AccessControl.supportsInterface(interfaceId);
}
///@notice return token URI
///@param _tokenId tokenId
///@dev if not revealed - return placeholder token URI
///@return string token URI
function tokenURI(uint256 _tokenId) public view override(ERC721A, IERC721A) returns (string memory) {
if (!_exists(_tokenId)) {
revert TokenNotExist();
}
if (!isRevealed) {
return placeholderTokenUri;
}
return
bytes(_baseTokenUri).length > 0
? string(abi.encodePacked(_baseTokenUri, _toString(_tokenId), ".json"))
: "";
}
function isValidSignature(bytes calldata _signature, address _sender) public pure returns (bool) {
return CAT.toEthSignedMessageHash().recover(_signature) == _sender;
}
function _baseURI() internal view override returns (string memory) {
return _baseTokenUri;
}
function _startTokenId() internal view virtual override returns (uint256) {
return 1;
}
function _isVerify(
bytes32[] memory _merkleProof,
bytes32 _merkleRoot,
address _account
) private pure returns (bool) {
return MerkleProof.verify(_merkleProof, _merkleRoot, keccak256(abi.encodePacked(_account)));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(uint160(account), 20),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)
pragma solidity ^0.8.0;
import "../Strings.sol";
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
enum RecoverError {
NoError,
InvalidSignature,
InvalidSignatureLength,
InvalidSignatureS,
InvalidSignatureV
}
function _throwError(RecoverError error) private pure {
if (error == RecoverError.NoError) {
return; // no error: do nothing
} else if (error == RecoverError.InvalidSignature) {
revert("ECDSA: invalid signature");
} else if (error == RecoverError.InvalidSignatureLength) {
revert("ECDSA: invalid signature length");
} else if (error == RecoverError.InvalidSignatureS) {
revert("ECDSA: invalid signature 's' value");
} else if (error == RecoverError.InvalidSignatureV) {
revert("ECDSA: invalid signature 'v' value");
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature` or error string. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*
* Documentation for signature generation:
* - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
* - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
*
* _Available since v4.3._
*/
function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
// Check the signature length
// - case 65: r,s,v signature (standard)
// - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
if (signature.length == 65) {
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
return tryRecover(hash, v, r, s);
} else if (signature.length == 64) {
bytes32 r;
bytes32 vs;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
assembly {
r := mload(add(signature, 0x20))
vs := mload(add(signature, 0x40))
}
return tryRecover(hash, r, vs);
} else {
return (address(0), RecoverError.InvalidSignatureLength);
}
}
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, signature);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
*
* See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address, RecoverError) {
bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
uint8 v = uint8((uint256(vs) >> 255) + 27);
return tryRecover(hash, v, r, s);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
*
* _Available since v4.2._
*/
function recover(
bytes32 hash,
bytes32 r,
bytes32 vs
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, r, vs);
_throwError(error);
return recovered;
}
/**
* @dev Overload of {ECDSA-tryRecover} that receives the `v`,
* `r` and `s` signature fields separately.
*
* _Available since v4.3._
*/
function tryRecover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address, RecoverError) {
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return (address(0), RecoverError.InvalidSignatureS);
}
if (v != 27 && v != 28) {
return (address(0), RecoverError.InvalidSignatureV);
}
// If the signature is valid (and not malleable), return the signer address
address signer = ecrecover(hash, v, r, s);
if (signer == address(0)) {
return (address(0), RecoverError.InvalidSignature);
}
return (signer, RecoverError.NoError);
}
/**
* @dev Overload of {ECDSA-recover} that receives the `v`,
* `r` and `s` signature fields separately.
*/
function recover(
bytes32 hash,
uint8 v,
bytes32 r,
bytes32 s
) internal pure returns (address) {
(address recovered, RecoverError error) = tryRecover(hash, v, r, s);
_throwError(error);
return recovered;
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
/**
* @dev Returns an Ethereum Signed Message, created from `s`. This
* produces hash corresponding to the one signed with the
* https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
* JSON-RPC method as part of EIP-191.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
}
/**
* @dev Returns an Ethereum Signed Typed Data, created from a
* `domainSeparator` and a `structHash`. This produces hash corresponding
* to the one signed with the
* https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
* JSON-RPC method as part of EIP-712.
*
* See {recover}.
*/
function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol)
pragma solidity ^0.8.0;
/**
* @dev These functions deal with verification of Merkle Trees proofs.
*
* The proofs can be generated using the JavaScript library
* https://github.com/miguelmota/merkletreejs[merkletreejs].
* Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
*
* See `test/utils/cryptography/MerkleProof.test.js` for some examples.
*
* 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.
*/
library MerkleProof {
/**
* @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
* defined by `root`. For this, a `proof` must be provided, containing
* sibling hashes on the branch from the leaf to the root of the tree. Each
* pair of leaves and each pair of pre-images are assumed to be sorted.
*/
function verify(
bytes32[] memory proof,
bytes32 root,
bytes32 leaf
) internal pure returns (bool) {
return processProof(proof, leaf) == root;
}
/**
* @dev Returns the rebuilt hash obtained by traversing a 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++) {
bytes32 proofElement = proof[i];
if (computedHash <= proofElement) {
// Hash(current computed hash + current element of the proof)
computedHash = _efficientHash(computedHash, proofElement);
} else {
// Hash(current element of the proof + current computed hash)
computedHash = _efficientHash(proofElement, computedHash);
}
}
return computedHash;
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
assembly {
mstore(0x00, a)
mstore(0x20, b)
value := keccak256(0x00, 0x40)
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721A.sol';
/**
* @dev Interface of ERC721 token receiver.
*/
interface ERC721A__IERC721Receiver {
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC721A
*
* @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
* Non-Fungible Token Standard, including the Metadata extension.
* Optimized for lower gas during batch mints.
*
* Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
* starting from `_startTokenId()`.
*
* The `_sequentialUpTo()` function can be overriden to enable spot mints
* (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`.
*
* Assumptions:
*
* - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
* - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
*/
contract ERC721A is IERC721A {
// Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
struct TokenApprovalRef {
address value;
}
// =============================================================
// CONSTANTS
// =============================================================
// Mask of an entry in packed address data.
uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;
// The bit position of `numberMinted` in packed address data.
uint256 private constant _BITPOS_NUMBER_MINTED = 64;
// The bit position of `numberBurned` in packed address data.
uint256 private constant _BITPOS_NUMBER_BURNED = 128;
// The bit position of `aux` in packed address data.
uint256 private constant _BITPOS_AUX = 192;
// Mask of all 256 bits in packed address data except the 64 bits for `aux`.
uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;
// The bit position of `startTimestamp` in packed ownership.
uint256 private constant _BITPOS_START_TIMESTAMP = 160;
// The bit mask of the `burned` bit in packed ownership.
uint256 private constant _BITMASK_BURNED = 1 << 224;
// The bit position of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;
// The bit mask of the `nextInitialized` bit in packed ownership.
uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;
// The bit position of `extraData` in packed ownership.
uint256 private constant _BITPOS_EXTRA_DATA = 232;
// Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;
// The mask of the lower 160 bits for addresses.
uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;
// The maximum `quantity` that can be minted with {_mintERC2309}.
// This limit is to prevent overflows on the address data entries.
// For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
// is required to cause an overflow, which is unrealistic.
uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;
// The `Transfer` event signature is given by:
// `keccak256(bytes("Transfer(address,address,uint256)"))`.
bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;
// =============================================================
// STORAGE
// =============================================================
// The next token ID to be minted.
uint256 private _currentIndex;
// The number of tokens burned.
uint256 private _burnCounter;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to ownership details
// An empty struct value does not necessarily mean the token is unowned.
// See {_packedOwnershipOf} implementation for details.
//
// Bits Layout:
// - [0..159] `addr`
// - [160..223] `startTimestamp`
// - [224] `burned`
// - [225] `nextInitialized`
// - [232..255] `extraData`
mapping(uint256 => uint256) private _packedOwnerships;
// Mapping owner address to address data.
//
// Bits Layout:
// - [0..63] `balance`
// - [64..127] `numberMinted`
// - [128..191] `numberBurned`
// - [192..255] `aux`
mapping(address => uint256) private _packedAddressData;
// Mapping from token ID to approved address.
mapping(uint256 => TokenApprovalRef) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// The amount of tokens minted above `_sequentialUpTo()`.
// We call these spot mints (i.e. non-sequential mints).
uint256 private _spotMinted;
// =============================================================
// CONSTRUCTOR
// =============================================================
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_currentIndex = _startTokenId();
if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector);
}
// =============================================================
// TOKEN COUNTING OPERATIONS
// =============================================================
/**
* @dev Returns the starting token ID for sequential mints.
*
* Override this function to change the starting token ID for sequential mints.
*
* Note: The value returned must never change after any tokens have been minted.
*/
function _startTokenId() internal view virtual returns (uint256) {
return 0;
}
/**
* @dev Returns the maximum token ID (inclusive) for sequential mints.
*
* Override this function to return a value less than 2**256 - 1,
* but greater than `_startTokenId()`, to enable spot (non-sequential) mints.
*
* Note: The value returned must never change after any tokens have been minted.
*/
function _sequentialUpTo() internal view virtual returns (uint256) {
return type(uint256).max;
}
/**
* @dev Returns the next token ID to be minted.
*/
function _nextTokenId() internal view virtual returns (uint256) {
return _currentIndex;
}
/**
* @dev Returns the total number of tokens in existence.
* Burned tokens will reduce the count.
* To get the total number of tokens minted, please see {_totalMinted}.
*/
function totalSupply() public view virtual override returns (uint256 result) {
// Counter underflow is impossible as `_burnCounter` cannot be incremented
// more than `_currentIndex + _spotMinted - _startTokenId()` times.
unchecked {
// With spot minting, the intermediate `result` can be temporarily negative,
// and the computation must be unchecked.
result = _currentIndex - _burnCounter - _startTokenId();
if (_sequentialUpTo() != type(uint256).max) result += _spotMinted;
}
}
/**
* @dev Returns the total amount of tokens minted in the contract.
*/
function _totalMinted() internal view virtual returns (uint256 result) {
// Counter underflow is impossible as `_currentIndex` does not decrement,
// and it is initialized to `_startTokenId()`.
unchecked {
result = _currentIndex - _startTokenId();
if (_sequentialUpTo() != type(uint256).max) result += _spotMinted;
}
}
/**
* @dev Returns the total number of tokens burned.
*/
function _totalBurned() internal view virtual returns (uint256) {
return _burnCounter;
}
/**
* @dev Returns the total number of tokens that are spot-minted.
*/
function _totalSpotMinted() internal view virtual returns (uint256) {
return _spotMinted;
}
// =============================================================
// 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.selector);
return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens minted by `owner`.
*/
function _numberMinted(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the number of tokens burned by or on behalf of `owner`.
*/
function _numberBurned(address owner) internal view returns (uint256) {
return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
}
/**
* Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
*/
function _getAux(address owner) internal view returns (uint64) {
return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
}
/**
* Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
* If there are multiple variables, please pack them into a uint64.
*/
function _setAux(address owner, uint64 aux) internal virtual {
uint256 packed = _packedAddressData[owner];
uint256 auxCasted;
// Cast `aux` with assembly to avoid redundant masking.
assembly {
auxCasted := aux
}
packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
_packedAddressData[owner] = packed;
}
// =============================================================
// IERC165
// =============================================================
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
* to learn more about how these ids are created.
*
* This function call must use less than 30000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
// The interface IDs are constants representing the first 4 bytes
// of the XOR of all function selectors in the interface.
// See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
// (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
return
interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
}
// =============================================================
// IERC721Metadata
// =============================================================
/**
* @dev Returns the token collection name.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the token collection symbol.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
if (!_exists(tokenId)) _revert(URIQueryForNonexistentToken.selector);
string memory baseURI = _baseURI();
return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, it can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return '';
}
// =============================================================
// OWNERSHIPS OPERATIONS
// =============================================================
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return address(uint160(_packedOwnershipOf(tokenId)));
}
/**
* @dev Gas spent here starts off proportional to the maximum mint batch size.
* It gradually moves to O(1) as tokens get transferred around over time.
*/
function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnershipOf(tokenId));
}
/**
* @dev Returns the unpacked `TokenOwnership` struct at `index`.
*/
function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
return _unpackedOwnership(_packedOwnerships[index]);
}
/**
* @dev Returns whether the ownership slot at `index` is initialized.
* An uninitialized slot does not necessarily mean that the slot has no owner.
*/
function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) {
return _packedOwnerships[index] != 0;
}
/**
* @dev Initializes the ownership slot minted at `index` for efficiency purposes.
*/
function _initializeOwnershipAt(uint256 index) internal virtual {
if (_packedOwnerships[index] == 0) {
_packedOwnerships[index] = _packedOwnershipOf(index);
}
}
/**
* @dev Returns the packed ownership data of `tokenId`.
*/
function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
if (_startTokenId() <= tokenId) {
packed = _packedOwnerships[tokenId];
if (tokenId > _sequentialUpTo()) {
if (_packedOwnershipExists(packed)) return packed;
_revert(OwnerQueryForNonexistentToken.selector);
}
// If the data at the starting slot does not exist, start the scan.
if (packed == 0) {
if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector);
// 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 = _packedOwnerships[--tokenId];
}
if (packed == 0) continue;
if (packed & _BITMASK_BURNED == 0) return packed;
// Otherwise, the token is burned, and we must revert.
// This handles the case of batch burned tokens, where only the burned bit
// of the starting slot is set, and remaining slots are left uninitialized.
_revert(OwnerQueryForNonexistentToken.selector);
}
}
// Otherwise, the data exists and 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.
// If the token is not burned, return `packed`. Otherwise, revert.
if (packed & _BITMASK_BURNED == 0) return packed;
}
_revert(OwnerQueryForNonexistentToken.selector);
}
/**
* @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.selector);
return _tokenApprovals[tokenId].value;
}
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom}
* for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_operatorApprovals[_msgSenderERC721A()][operator] = approved;
emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
}
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted. See {_mint}.
*/
function _exists(uint256 tokenId) internal view virtual returns (bool result) {
if (_startTokenId() <= tokenId) {
if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(_packedOwnerships[tokenId]);
if (tokenId < _currentIndex) {
uint256 packed;
while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId;
result = packed & _BITMASK_BURNED == 0;
}
}
}
/**
* @dev Returns whether `packed` represents a token that exists.
*/
function _packedOwnershipExists(uint256 packed) private pure returns (bool result) {
assembly {
// The following is equivalent to `owner != address(0) && burned == false`.
// Symbolically tested.
result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_BURNED))
}
}
/**
* @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
*/
function _isSenderApprovedOrOwner(
address approvedAddress,
address owner,
address msgSender
) private pure returns (bool result) {
assembly {
// Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
owner := and(owner, _BITMASK_ADDRESS)
// Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
msgSender := and(msgSender, _BITMASK_ADDRESS)
// `msgSender == owner || msgSender == approvedAddress`.
result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
}
}
/**
* @dev Returns the storage slot and value for the approved address of `tokenId`.
*/
function _getApprovedSlotAndAddress(uint256 tokenId)
private
view
returns (uint256 approvedAddressSlot, address approvedAddress)
{
TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
// The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].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);
// Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean.
from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS));
if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector);
(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.selector);
_beforeTokenTransfers(from, to, tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// We can directly increment and decrement the balances.
--_packedAddressData[from]; // Updates: `balance -= 1`.
++_packedAddressData[to]; // Updates: `balance += 1`.
// Updates:
// - `address` to the next owner.
// - `startTimestamp` to the timestamp of transfering.
// - `burned` to `false`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;
assembly {
// 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.
from, // `from`.
toMasked, // `to`.
tokenId // `tokenId`.
)
}
if (toMasked == 0) _revert(TransferToZeroAddress.selector);
_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.selector);
}
}
/**
* @dev Hook that is called before a set of serially-ordered token IDs
* are about to be transferred. This includes minting.
* And also called before burning one token.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _beforeTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Hook that is called after a set of serially-ordered token IDs
* have been transferred. This includes minting.
* And also called after one token has been burned.
*
* `startTokenId` - the first token ID to be transferred.
* `quantity` - the amount to be transferred.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
* transferred to `to`.
* - When `from` is zero, `tokenId` has been minted for `to`.
* - When `to` is zero, `tokenId` has been burned by `from`.
* - `from` and `to` are never both zero.
*/
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal virtual {}
/**
* @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
*
* `from` - Previous owner of the given token ID.
* `to` - Target address that will receive the token.
* `tokenId` - Token ID to be transferred.
* `_data` - Optional data to send along with the call.
*
* Returns whether the call correctly returned the expected magic value.
*/
function _checkContractOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
bytes4 retval
) {
return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
_revert(TransferToNonERC721ReceiverImplementer.selector);
}
assembly {
revert(add(32, reason), mload(reason))
}
}
}
// =============================================================
// MINT OPERATIONS
// =============================================================
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {Transfer} event for each mint.
*/
function _mint(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (quantity == 0) _revert(MintZeroQuantity.selector);
_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:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;
if (toMasked == 0) _revert(MintToZeroAddress.selector);
uint256 end = startTokenId + quantity;
uint256 tokenId = startTokenId;
if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector);
do {
assembly {
// 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`.
tokenId // `tokenId`.
)
}
// The `!=` check ensures that large values of `quantity`
// that overflows uint256 will make the loop run out of gas.
} while (++tokenId != end);
_currentIndex = end;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Mints `quantity` tokens and transfers them to `to`.
*
* This function is intended for efficient minting only during contract creation.
*
* It emits only one {ConsecutiveTransfer} as defined in
* [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
* instead of a sequence of {Transfer} event(s).
*
* Calling this function outside of contract creation WILL make your contract
* non-compliant with the ERC721 standard.
* For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
* {ConsecutiveTransfer} event is only permissible during contract creation.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `quantity` must be greater than 0.
*
* Emits a {ConsecutiveTransfer} event.
*/
function _mintERC2309(address to, uint256 quantity) internal virtual {
uint256 startTokenId = _currentIndex;
if (to == address(0)) _revert(MintToZeroAddress.selector);
if (quantity == 0) _revert(MintZeroQuantity.selector);
if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector);
_beforeTokenTransfers(address(0), to, startTokenId, quantity);
// Overflows are unrealistic due to the above check for `quantity` to be below the limit.
unchecked {
// Updates:
// - `balance += quantity`.
// - `numberMinted += quantity`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `quantity == 1`.
_packedOwnerships[startTokenId] = _packOwnershipData(
to,
_nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
);
if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector);
emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);
_currentIndex = startTokenId + quantity;
}
_afterTokenTransfers(address(0), to, startTokenId, quantity);
}
/**
* @dev Safely mints `quantity` tokens and transfers them to `to`.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement
* {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
* - `quantity` must be greater than 0.
*
* See {_mint}.
*
* Emits a {Transfer} event for each mint.
*/
function _safeMint(
address to,
uint256 quantity,
bytes memory _data
) internal virtual {
_mint(to, quantity);
unchecked {
if (to.code.length != 0) {
uint256 end = _currentIndex;
uint256 index = end - quantity;
do {
if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
_revert(TransferToNonERC721ReceiverImplementer.selector);
}
} while (index < end);
// This prevents reentrancy to `_safeMint`.
// It does not prevent reentrancy to `_safeMintSpot`.
if (_currentIndex != end) revert();
}
}
}
/**
* @dev Equivalent to `_safeMint(to, quantity, '')`.
*/
function _safeMint(address to, uint256 quantity) internal virtual {
_safeMint(to, quantity, '');
}
/**
* @dev Mints a single token at `tokenId`.
*
* Note: A spot-minted `tokenId` that has been burned can be re-minted again.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` must be greater than `_sequentialUpTo()`.
* - `tokenId` must not exist.
*
* Emits a {Transfer} event for each mint.
*/
function _mintSpot(address to, uint256 tokenId) internal virtual {
if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector);
uint256 prevOwnershipPacked = _packedOwnerships[tokenId];
if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector);
_beforeTokenTransfers(address(0), to, tokenId, 1);
// Overflows are incredibly unrealistic.
// The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1.
// `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1.
unchecked {
// Updates:
// - `address` to the owner.
// - `startTimestamp` to the timestamp of minting.
// - `burned` to `false`.
// - `nextInitialized` to `true` (as `quantity == 1`).
_packedOwnerships[tokenId] = _packOwnershipData(
to,
_nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked)
);
// Updates:
// - `balance += 1`.
// - `numberMinted += 1`.
//
// We can directly add to the `balance` and `numberMinted`.
_packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1;
// Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;
if (toMasked == 0) _revert(MintToZeroAddress.selector);
assembly {
// 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`.
tokenId // `tokenId`.
)
}
++_spotMinted;
}
_afterTokenTransfers(address(0), to, tokenId, 1);
}
/**
* @dev Safely mints a single token at `tokenId`.
*
* Note: A spot-minted `tokenId` that has been burned can be re-minted again.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}.
* - `tokenId` must be greater than `_sequentialUpTo()`.
* - `tokenId` must not exist.
*
* See {_mintSpot}.
*
* Emits a {Transfer} event.
*/
function _safeMintSpot(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mintSpot(to, tokenId);
unchecked {
if (to.code.length != 0) {
uint256 currentSpotMinted = _spotMinted;
if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) {
_revert(TransferToNonERC721ReceiverImplementer.selector);
}
// This prevents reentrancy to `_safeMintSpot`.
// It does not prevent reentrancy to `_safeMint`.
if (_spotMinted != currentSpotMinted) revert();
}
}
}
/**
* @dev Equivalent to `_safeMintSpot(to, tokenId, '')`.
*/
function _safeMintSpot(address to, uint256 tokenId) internal virtual {
_safeMintSpot(to, tokenId, '');
}
// =============================================================
// 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 && _msgSenderERC721A() != owner)
if (!isApprovedForAll(owner, _msgSenderERC721A())) {
_revert(ApprovalCallerNotOwnerNorApproved.selector);
}
_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.selector);
}
_beforeTokenTransfers(from, address(0), tokenId, 1);
// Clear approvals from the previous owner.
assembly {
if approvedAddress {
// This is equivalent to `delete _tokenApprovals[tokenId]`.
sstore(approvedAddressSlot, 0)
}
}
// Underflow of the sender's balance is impossible because we check for
// ownership above and the recipient's balance can't realistically overflow.
// Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
unchecked {
// Updates:
// - `balance -= 1`.
// - `numberBurned += 1`.
//
// We can directly decrement the balance, and increment the number burned.
// This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
_packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;
// Updates:
// - `address` to the last owner.
// - `startTimestamp` to the timestamp of burning.
// - `burned` to `true`.
// - `nextInitialized` to `true`.
_packedOwnerships[tokenId] = _packOwnershipData(
from,
(_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
);
// If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
uint256 nextTokenId = tokenId + 1;
// If the next slot's address is zero and not burned (i.e. packed value is zero).
if (_packedOwnerships[nextTokenId] == 0) {
// If the next slot is within bounds.
if (nextTokenId != _currentIndex) {
// Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
_packedOwnerships[nextTokenId] = prevOwnershipPacked;
}
}
}
}
emit Transfer(from, address(0), tokenId);
_afterTokenTransfers(from, address(0), tokenId, 1);
// Overflow not possible, as `_burnCounter` cannot be exceed `_currentIndex + _spotMinted` times.
unchecked {
_burnCounter++;
}
}
// =============================================================
// EXTRA DATA OPERATIONS
// =============================================================
/**
* @dev Directly sets the extra data for the ownership data `index`.
*/
function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
uint256 packed = _packedOwnerships[index];
if (packed == 0) _revert(OwnershipNotInitializedForExtraData.selector);
uint256 extraDataCasted;
// Cast `extraData` with assembly to avoid redundant masking.
assembly {
extraDataCasted := extraData
}
packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
_packedOwnerships[index] = packed;
}
/**
* @dev Called during each token transfer to set the 24bit `extraData` field.
* Intended to be overridden by the cosumer contract.
*
* `previousExtraData` - the value of `extraData` before transfer.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, `tokenId` will be burned by `from`.
* - `from` and `to` are never both zero.
*/
function _extraData(
address from,
address to,
uint24 previousExtraData
) internal view virtual returns (uint24) {}
/**
* @dev Returns the next extra data for the packed ownership data.
* The returned result is shifted into position.
*/
function _nextExtraData(
address from,
address to,
uint256 prevOwnershipPacked
) private view returns (uint256) {
uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
}
// =============================================================
// OTHER OPERATIONS
// =============================================================
/**
* @dev Returns the message sender (defaults to `msg.sender`).
*
* If you are writing GSN compatible contracts, you need to override this function.
*/
function _msgSenderERC721A() internal view virtual returns (address) {
return msg.sender;
}
/**
* @dev Converts a uint256 to its ASCII string decimal representation.
*/
function _toString(uint256 value) internal pure virtual returns (string memory 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)
}
}
/**
* @dev For more efficient reverts.
*/
function _revert(bytes4 errorSelector) internal pure {
assembly {
mstore(0x00, errorSelector)
revert(0x00, 0x04)
}
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import './IERC721AQueryable.sol';
import '../ERC721A.sol';
/**
* @title ERC721AQueryable.
*
* @dev ERC721A subclass with convenience query functions.
*/
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
/**
* @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
*
* If the `tokenId` is out of bounds:
*
* - `addr = address(0)`
* - `startTimestamp = 0`
* - `burned = false`
* - `extraData = 0`
*
* If the `tokenId` is burned:
*
* - `addr = <Address of owner before token was burned>`
* - `startTimestamp = <Timestamp when token was burned>`
* - `burned = true`
* - `extraData = <Extra data when token was burned>`
*
* Otherwise:
*
* - `addr = <Address of owner>`
* - `startTimestamp = <Timestamp of start of ownership>`
* - `burned = false`
* - `extraData = <Extra data at start of ownership>`
*/
function explicitOwnershipOf(uint256 tokenId)
public
view
virtual
override
returns (TokenOwnership memory ownership)
{
unchecked {
if (tokenId >= _startTokenId()) {
if (tokenId > _sequentialUpTo()) return _ownershipAt(tokenId);
if (tokenId < _nextTokenId()) {
// If the `tokenId` is within bounds,
// scan backwards for the initialized ownership slot.
while (!_ownershipIsInitialized(tokenId)) --tokenId;
return _ownershipAt(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)
{
TokenOwnership[] memory ownerships;
uint256 i = tokenIds.length;
assembly {
// Grab the free memory pointer.
ownerships := mload(0x40)
// Store the length.
mstore(ownerships, i)
// Allocate one word for the length,
// `tokenIds.length` words for the pointers.
i := shl(5, i) // Multiply `i` by 32.
mstore(0x40, add(add(ownerships, 0x20), i))
}
while (i != 0) {
uint256 tokenId;
assembly {
i := sub(i, 0x20)
tokenId := calldataload(add(tokenIds.offset, i))
}
TokenOwnership memory ownership = explicitOwnershipOf(tokenId);
assembly {
// Store the pointer of `ownership` in the `ownerships` array.
mstore(add(add(ownerships, 0x20), i), ownership)
}
}
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) {
return _tokensOfOwnerIn(owner, start, stop);
}
/**
* @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) {
// If spot mints are enabled, full-range scan is disabled.
if (_sequentialUpTo() != type(uint256).max) _revert(NotCompatibleWithSpotMints.selector);
uint256 start = _startTokenId();
uint256 stop = _nextTokenId();
uint256[] memory tokenIds;
if (start != stop) tokenIds = _tokensOfOwnerIn(owner, start, stop);
return tokenIds;
}
/**
* @dev Helper function for returning an array of token IDs owned by `owner`.
*
* Note that this function is optimized for smaller bytecode size over runtime gas,
* since it is meant to be called off-chain.
*/
function _tokensOfOwnerIn(
address owner,
uint256 start,
uint256 stop
) private view returns (uint256[] memory tokenIds) {
unchecked {
if (start >= stop) _revert(InvalidQueryRange.selector);
// Set `start = max(start, _startTokenId())`.
if (start < _startTokenId()) start = _startTokenId();
uint256 nextTokenId = _nextTokenId();
// If spot mints are enabled, scan all the way until the specified `stop`.
uint256 stopLimit = _sequentialUpTo() != type(uint256).max ? stop : nextTokenId;
// Set `stop = min(stop, stopLimit)`.
if (stop >= stopLimit) stop = stopLimit;
// Number of tokens to scan.
uint256 tokenIdsMaxLength = balanceOf(owner);
// Set `tokenIdsMaxLength` to zero if the range contains no tokens.
if (start >= stop) tokenIdsMaxLength = 0;
// If there are one or more tokens to scan.
if (tokenIdsMaxLength != 0) {
// Set `tokenIdsMaxLength = min(balanceOf(owner), tokenIdsMaxLength)`.
if (stop - start <= tokenIdsMaxLength) tokenIdsMaxLength = stop - start;
uint256 m; // Start of available memory.
assembly {
// Grab the free memory pointer.
tokenIds := mload(0x40)
// Allocate one word for the length, and `tokenIdsMaxLength` words
// for the data. `shl(5, x)` is equivalent to `mul(32, x)`.
m := add(tokenIds, shl(5, add(tokenIdsMaxLength, 1)))
mstore(0x40, m)
}
// 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;
uint256 tokenIdsIdx;
// Use a do-while, which is slightly more efficient for this case,
// as the array will at least contain one element.
do {
if (_sequentialUpTo() != type(uint256).max) {
// Skip the remaining unused sequential slots.
if (start == nextTokenId) start = _sequentialUpTo() + 1;
// Reset `currOwnershipAddr`, as each spot-minted token is a batch of one.
if (start > _sequentialUpTo()) currOwnershipAddr = address(0);
}
ownership = _ownershipAt(start); // This implicitly allocates memory.
assembly {
switch mload(add(ownership, 0x40))
// if `ownership.burned == false`.
case 0 {
// if `ownership.addr != address(0)`.
// The `addr` already has it's upper 96 bits clearned,
// since it is written to memory with regular Solidity.
if mload(ownership) {
currOwnershipAddr := mload(ownership)
}
// if `currOwnershipAddr == owner`.
// The `shl(96, x)` is to make the comparison agnostic to any
// dirty upper 96 bits in `owner`.
if iszero(shl(96, xor(currOwnershipAddr, owner))) {
tokenIdsIdx := add(tokenIdsIdx, 1)
mstore(add(tokenIds, shl(5, tokenIdsIdx)), start)
}
}
// Otherwise, reset `currOwnershipAddr`.
// This handles the case of batch burned tokens
// (burned bit of first slot set, remaining slots left uninitialized).
default {
currOwnershipAddr := 0
}
start := add(start, 1)
// Free temporary memory implicitly allocated for ownership
// to avoid quadratic memory expansion costs.
mstore(0x40, m)
}
} while (!(start == stop || tokenIdsIdx == tokenIdsMaxLength));
// Store the length of the array.
assembly {
mstore(tokenIds, tokenIdsIdx)
}
}
}
}
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
import '../IERC721A.sol';
/**
* @dev Interface of ERC721AQueryable.
*/
interface IERC721AQueryable is IERC721A {
/**
* Invalid query range (`start` >= `stop`).
*/
error InvalidQueryRange();
/**
* @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
*
* If the `tokenId` is out of bounds:
*
* - `addr = address(0)`
* - `startTimestamp = 0`
* - `burned = false`
* - `extraData = 0`
*
* If the `tokenId` is burned:
*
* - `addr = <Address of owner before token was burned>`
* - `startTimestamp = <Timestamp when token was burned>`
* - `burned = true`
* - `extraData = <Extra data when token was burned>`
*
* Otherwise:
*
* - `addr = <Address of owner>`
* - `startTimestamp = <Timestamp of start of ownership>`
* - `burned = false`
* - `extraData = <Extra data at start of ownership>`
*/
function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);
/**
* @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
* See {ERC721AQueryable-explicitOwnershipOf}
*/
function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`,
* in the range [`start`, `stop`)
* (i.e. `start <= tokenId < stop`).
*
* This function allows for tokens to be queried if the collection
* grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
*
* Requirements:
*
* - `start < stop`
*/
function tokensOfOwnerIn(
address owner,
uint256 start,
uint256 stop
) external view returns (uint256[] memory);
/**
* @dev Returns an array of token IDs owned by `owner`.
*
* This function scans the ownership mapping and is O(`totalSupply`) in complexity.
* It is meant to be called off-chain.
*
* See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
* multiple smaller scans if the collection is large enough to cause
* an out-of-gas error (10K collections should be fine).
*/
function tokensOfOwner(address owner) external view returns (uint256[] memory);
}// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.3.0
// Creator: Chiru Labs
pragma solidity ^0.8.4;
/**
* @dev Interface of ERC721A.
*/
interface IERC721A {
/**
* The caller must own the token or be an approved operator.
*/
error ApprovalCallerNotOwnerNorApproved();
/**
* The token does not exist.
*/
error ApprovalQueryForNonexistentToken();
/**
* 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();
/**
* `_sequentialUpTo()` must be greater than `_startTokenId()`.
*/
error SequentialUpToTooSmall();
/**
* The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`.
*/
error SequentialMintExceedsLimit();
/**
* Spot minting requires a `tokenId` greater than `_sequentialUpTo()`.
*/
error SpotMintTokenIdTooSmall();
/**
* Cannot mint over a token that already exists.
*/
error TokenAlreadyExists();
/**
* The feature is not compatible with spot mints.
*/
error NotCompatibleWithSpotMints();
// =============================================================
// 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);
}{
"optimizer": {
"enabled": true,
"runs": 50000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract ABI
API[{"inputs":[{"internalType":"address","name":"priceManager","type":"address"},{"internalType":"address","name":"sellManager","type":"address"},{"internalType":"address","name":"whiteListManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AirDropNotAvailable","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ArraysAreDifferentLength","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BeyondMaxSupply","type":"error"},{"inputs":[],"name":"CantMintMore","type":"error"},{"inputs":[],"name":"FailedToSendAssets","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"LowSentEther","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"PublicSaleNotAvailable","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TokenNotExist","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"},{"inputs":[],"name":"WhiteListSaleNotAvailable","type":"error"},{"inputs":[],"name":"YouAlreadyMintedForTeam","type":"error"},{"inputs":[],"name":"YouAreNotWhiteList","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":[{"indexed":true,"internalType":"address","name":"_claimer","type":"address"},{"indexed":true,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"ClaimAirdrop","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":"address","name":"_claimer","type":"address"},{"indexed":true,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_token","type":"address"},{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"SentNFT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum BimkonEyes.SalePhase","name":"_status","type":"uint8"}],"name":"SetAirDropState","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"merkleProofs","type":"string"}],"name":"SetMerkleProofs","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"SetMerkleRootAirDrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"SetMerkleRootWhiteList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"_placeholderTokenUri","type":"string"}],"name":"SetPlaceHolderUri","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"SetPublicSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum BimkonEyes.SalePhase","name":"_status","type":"uint8"}],"name":"SetPublicSaleState","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"_baseTokenUri","type":"string"}],"name":"SetTokenUri","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"_price","type":"uint256"}],"name":"SetWhiteListSalePrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"enum BimkonEyes.SalePhase","name":"_status","type":"uint8"}],"name":"SetWhiteListSaleState","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"_state","type":"bool"}],"name":"ToggleReveal","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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_claimer","type":"address"},{"indexed":true,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"WhiteListMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_value","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CAT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_AIRDROP_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PUBLIC_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WHITELIST_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SELL_PHASE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_MINT_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITE_LIST_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"airDrop","outputs":[{"internalType":"enum BimkonEyes.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"allowedToClaimDropAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"allowedToPublicMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"allowedToWhiteListMintAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","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":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"_account","type":"address"}],"name":"canClaimAirDrop","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"claimAirdrop","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 IERC721A.TokenOwnership","name":"ownership","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 IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMerkleProofs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMerkleRootAirDrop","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMerkleRootWhiteList","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":"isRevealed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"address","name":"_sender","type":"address"}],"name":"isValidSignature","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"_account","type":"address"}],"name":"isWhiteListed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"contract IERC721A","name":"_token","type":"address"},{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_id","type":"uint256[]"}],"name":"multiSendERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"placeholderTokenUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSale","outputs":[{"internalType":"enum BimkonEyes.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"merkleProofs_","type":"string"}],"name":"setMerkleProofs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setMerkleRootAirDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setMerkleRootWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_placeholderTokenUri","type":"string"}],"name":"setPlaceHolderUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPublicSalePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseTokenUri_","type":"string"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setWhiteListSalePrice","outputs":[],"stateMutability":"nonpayable","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":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"teamMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum BimkonEyes.SalePhase","name":"_status","type":"uint8"}],"name":"toggleAirDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum BimkonEyes.SalePhase","name":"_status","type":"uint8"}],"name":"togglePublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleReveal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum BimkonEyes.SalePhase","name":"_status","type":"uint8"}],"name":"toggleWhiteListSale","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":"address","name":"","type":"address"}],"name":"totalAirdropMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalPublicMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"totalWhitelistMint","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":[],"name":"whiteListSale","outputs":[{"internalType":"enum BimkonEyes.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whiteListSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405264e8d4a51000600a5564746a528800600b553480156200002357600080fd5b5060405162004c6a38038062004c6a8339810160408190526200004691620002c3565b604080518082018252600a81526942696d6b6f6e4579657360b01b60208083019182528351808501909452600384526242595360e81b908401528151919291620000939160029162000200565b508051620000a990600390602084019062000200565b50600160005550620000bf90506000336200014c565b620000eb7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a846200014c565b620001177f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f5836200014c565b620001437fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c27826200014c565b50505062000349565b6200015882826200015c565b5050565b60008281526009602090815260408083206001600160a01b038516845290915290205460ff16620001585760008281526009602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001bc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280546200020e906200030d565b90600052602060002090601f0160209004810192826200023257600085556200027d565b82601f106200024d57805160ff19168380011785556200027d565b828001600101855582156200027d579182015b828111156200027d57825182559160200191906001019062000260565b506200028b9291506200028f565b5090565b5b808211156200028b576000815560010162000290565b80516001600160a01b0381168114620002be57600080fd5b919050565b600080600060608486031215620002d957600080fd5b620002e484620002a6565b9250620002f460208501620002a6565b91506200030460408501620002a6565b90509250925092565b600181811c908216806200032257607f821691505b6020821081036200034357634e487b7160e01b600052602260045260246000fd5b50919050565b61491180620003596000396000f3fe6080604052600436106104655760003560e01c80637f121b3311610243578063b8a9cd6b11610143578063db7fd408116100bb578063ea2cdf1f1161008a578063f08afa141161006f578063f08afa1414610d59578063f3fef3a314610d8d578063f7b8948b14610dad57600080fd5b8063ea2cdf1f14610d19578063eb022b1514610d3957600080fd5b8063db7fd40814610c7c578063e8b5498d14610c8f578063e8e8870b14610cae578063e985e9c514610cc357600080fd5b8063c23dc68f11610112578063ca5d0880116100f7578063ca5d088014610c1a578063cb6d848514610c3c578063d547741f14610c5c57600080fd5b8063c23dc68f14610bcd578063c87b56dd14610bfa57600080fd5b8063b8a9cd6b14610b6e578063ba7a86b814610b8e578063bd706ac714610ba3578063c08dfd3c14610bb857600080fd5b806399a2557a116101d6578063ab88daf3116101a5578063b0962c531161018a578063b0962c5314610b1b578063b846480f14610b3b578063b88d4fde14610b5b57600080fd5b8063ab88daf314610adb578063b070a76c14610afb57600080fd5b806399a2557a14610a705780639b6860c814610a90578063a217fddf14610aa6578063a22cb46514610abb57600080fd5b806387dedfe31161021257806387dedfe3146109b45780638a8b7deb146109d457806391d1485414610a0857806395d89b4114610a5b57600080fd5b80637f121b331461093157806380cd44a0146109465780638462151c1461096657806386a173ee1461099357600080fd5b806336568abe116103695780635b8ad429116102e157806365f13097116102b05780636ff0ede0116102955780636ff0ede0146108d157806370a08231146108f1578063791a25191461091157600080fd5b806365f13097146108885780636d1d0c991461089d57600080fd5b80635b8ad429146108065780635bbb21771461081b5780635ded6050146108485780636352211e1461086857600080fd5b806342842e0e116103385780634cf5f7a41161031d5780634cf5f7a4146107aa57806354214f69146107bf57806358241353146107d957600080fd5b806342842e0e1461077757806348c5af0d1461078a57600080fd5b806336568abe1461070c57806338bcf32b1461072c57806340fd839b1461074c57806341e643191461076157600080fd5b80631c46cbdc116103fc5780632f2ff15d116103cb57806332cb6b0c116103b057806332cb6b0c146106a95780633335252b146106bf57806333bc1c5c146106df57600080fd5b80632f2ff15d1461065557806331aab7591461067557600080fd5b80631c46cbdc146105df57806323b872dd146105ff578063248a9ca3146106125780632904e6d91461064257600080fd5b8063081812fc11610438578063081812fc1461051e578063095ea7b31461056357806318160ddd146105765780631c16521c146105b257600080fd5b806301ffc9a71461046a5780630345e3cb1461049f5780630675b7c6146104da57806306fdde03146104fc575b600080fd5b34801561047657600080fd5b5061048a610485366004613c13565b610dc2565b60405190151581526020015b60405180910390f35b3480156104ab57600080fd5b506104cc6104ba366004613c52565b60136020526000908152604090205481565b604051908152602001610496565b3480156104e657600080fd5b506104fa6104f5366004613d63565b610de2565b005b34801561050857600080fd5b50610511610e43565b6040516104969190613e22565b34801561052a57600080fd5b5061053e610539366004613e35565b610ed5565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610496565b6104fa610571366004613e4e565b610f36565b34801561058257600080fd5b506104cc600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b3480156105be57600080fd5b506104cc6105cd366004613c52565b60126020526000908152604090205481565b3480156105eb57600080fd5b506104fa6105fa366004613e7a565b610f46565b6104fa61060d366004613e9b565b610ff5565b34801561061e57600080fd5b506104cc61062d366004613e35565b60009081526009602052604090206001015490565b6104fa610650366004613f5c565b61122a565b34801561066157600080fd5b506104fa610670366004613fa1565b611436565b34801561068157600080fd5b506104cc7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a81565b3480156106b557600080fd5b506104cc61271081565b3480156106cb57600080fd5b506104fa6106da366004613f5c565b611460565b3480156106eb57600080fd5b50600c546106ff9062010000900460ff1681565b6040516104969190614000565b34801561071857600080fd5b506104fa610727366004613fa1565b611627565b34801561073857600080fd5b506104cc610747366004613c52565b6116db565b34801561075857600080fd5b506104cc60c881565b34801561076d57600080fd5b506104cc600b5481565b6104fa610785366004613e9b565b61170c565b34801561079657600080fd5b506104fa6107a5366004613e7a565b611727565b3480156107b657600080fd5b506105116117d4565b3480156107cb57600080fd5b50600c5461048a9060ff1681565b3480156107e557600080fd5b506104cc6107f4366004613c52565b60146020526000908152604090205481565b34801561081257600080fd5b506104fa611862565b34801561082757600080fd5b5061083b610836366004614086565b6118f0565b60405161049691906140c8565b34801561085457600080fd5b506104fa610863366004613e35565b61195a565b34801561087457600080fd5b5061053e610883366004613e35565b6119b8565b34801561089457600080fd5b506104cc600a81565b3480156108a957600080fd5b506104cc7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c2781565b3480156108dd57600080fd5b506104fa6108ec366004613e7a565b6119c3565b3480156108fd57600080fd5b506104cc61090c366004613c52565b611a71565b34801561091d57600080fd5b506104fa61092c366004613e35565b611aea565b34801561093d57600080fd5b506104cc600281565b34801561095257600080fd5b506104fa610961366004613e35565b611b48565b34801561097257600080fd5b50610986610981366004613c52565b611ba6565b604051610496919061415e565b34801561099f57600080fd5b50600c546106ff906301000000900460ff1681565b3480156109c057600080fd5b5061048a6109cf366004614196565b611bcd565b3480156109e057600080fd5b506104cc7fd25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b87381565b348015610a1457600080fd5b5061048a610a23366004613fa1565b600091825260096020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b348015610a6757600080fd5b50610511611be3565b348015610a7c57600080fd5b50610986610a8b3660046141dd565b611bf2565b348015610a9c57600080fd5b506104cc600a5481565b348015610ab257600080fd5b506104cc600081565b348015610ac757600080fd5b506104fa610ad6366004614212565b611bff565b348015610ae757600080fd5b506104cc610af6366004613c52565b611c96565b348015610b0757600080fd5b5061048a610b16366004614287565b611cc7565b348015610b2757600080fd5b506104fa610b36366004613d63565b611d6a565b348015610b4757600080fd5b506104cc610b56366004613c52565b611dcb565b6104fa610b693660046142de565b611dfc565b348015610b7a57600080fd5b506104fa610b89366004613e35565b611e63565b348015610b9a57600080fd5b506104fa611ec1565b348015610baf57600080fd5b50610511611f48565b348015610bc457600080fd5b506104cc600381565b348015610bd957600080fd5b50610bed610be8366004613e35565b611f57565b604051610496919061435e565b348015610c0657600080fd5b50610511610c15366004613e35565b611fd9565b348015610c2657600080fd5b50600c546106ff90640100000000900460ff1681565b348015610c4857600080fd5b5061048a610c57366004614196565b612112565b348015610c6857600080fd5b506104fa610c77366004613fa1565b612121565b6104fa610c8a3660046143b0565b612146565b348015610c9b57600080fd5b50600c5461048a90610100900460ff1681565b348015610cba57600080fd5b50600d546104cc565b348015610ccf57600080fd5b5061048a610cde3660046143fc565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610d2557600080fd5b506104fa610d3436600461442a565b612350565b348015610d4557600080fd5b506104fa610d54366004614460565b6123cc565b348015610d6557600080fd5b506104cc7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f581565b348015610d9957600080fd5b506104fa610da8366004613e4e565b61263e565b348015610db957600080fd5b50600e546104cc565b6000610dcd8261272c565b80610ddc5750610ddc8261280d565b92915050565b6000610ded816128a4565b8151610e00906010906020850190613aba565b5081604051610e0f91906144ff565b604051908190038120907fe57e250d9247be9fc425fb87862f34ca183bc5d48dcae1d0c58ffc7622b349be90600090a25050565b606060028054610e529061451b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7e9061451b565b8015610ecb5780601f10610ea057610100808354040283529160200191610ecb565b820191906000526020600020905b815481529060010190602001808311610eae57829003601f168201915b5050505050905090565b6000610ee0826128ae565b610f0d57610f0d7fcf4700e400000000000000000000000000000000000000000000000000000000612913565b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b610f428282600161291d565b5050565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f5610f70816128a4565b600c80548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000836002811115610fb157610fb1613fd1565b0217905550816002811115610fc857610fc8613fd1565b6040517fe0eae91ebff5418892939b1d0a83f1b2b96cdfa59c4cb9b67400a7d0cc8501f490600090a25050565b600061100082612a0b565b73ffffffffffffffffffffffffffffffffffffffff948516949091508116841461104d5761104d7fa114810000000000000000000000000000000000000000000000000000000000612913565b600082815260066020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff8816909114176110b75761108a8633610cde565b6110b7576110b77f59c896be00000000000000000000000000000000000000000000000000000000612913565b80156110c257600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c0200000000000000000000000000000000000000000000000000000000841690036111b1576001840160008181526004602052604081205490036111af5760005481146111af5760008181526004602052604090208490555b505b73ffffffffffffffffffffffffffffffffffffffff85168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003611221576112217fea553b3400000000000000000000000000000000000000000000000000000000612913565b50505050505050565b806127108161125e600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b611268919061459d565b1061129f576040517f502252bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600c546301000000900460ff1660028111156112bf576112bf613fd1565b146112f6576040517f88a75ca100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526013602052604090205460039061131490849061459d565b111561134c576040517ff382050300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600b5461135a91906145b5565b3414611392576040517f7df3a4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61139f83600d5433612b47565b6113d5576040517f3c72a94000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260136020526040812080548492906113f490849061459d565b9091555061140490503383612b9f565b604051829033907f371f0f9c5c7bb591d0f296e39127584eede508133f32e126261d929e7a6d5a2790600090a3505050565b600082815260096020526040902060010154611451816128a4565b61145b8383612bb9565b505050565b8061271081611494600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b61149e919061459d565b106114d5576040517f502252bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600c54640100000000900460ff1660028111156114f6576114f6613fd1565b1461152d576040517fce6231f600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526014602052604090205460029061154b90849061459d565b1115611583576040517ff382050300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61159083600e5433612b47565b6115c6576040517f3c72a94000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260146020526040812080548492906115e590849061459d565b909155506115f590503383612b9f565b604051829033907fcebbbce55cb558a80c89a83b5e23dca5186979853be88c28e9e01232c7fdc98b90600090a3505050565b73ffffffffffffffffffffffffffffffffffffffff811633146116d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610f428282612cad565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260146020526040812054610ddc9060026145f2565b61145b83838360405180602001604052806000815250611dfc565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f5611751816128a4565b600c80548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff166201000083600281111561179057611790613fd1565b02179055508160028111156117a7576117a7613fd1565b6040517fa09f7b1058a9835c609b90ec0dfc60e671c6d555cb5bebc8130fe833c6ecb97d90600090a25050565b600f80546117e19061451b565b80601f016020809104026020016040519081016040528092919081815260200182805461180d9061451b565b801561185a5780601f1061182f5761010080835404028352916020019161185a565b820191906000526020600020905b81548152906001019060200180831161183d57829003601f168201915b505050505081565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f561188c816128a4565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff9182161590811790925560405191161515907f25211413ffce62a27a28709c5fc52567e1380cbc1acdd68b59044c48752bea0a90600090a250565b60408051828152600583901b8082016020019092526060915b8015611952577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08082019186010135600061194382611f57565b84840160200152506119099050565b509392505050565b7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c27611984816128a4565b600d82905560405182907f510e05160985363ac4acb7c495836e5098e299c42b492eb222700c900f768ada90600090a25050565b6000610ddc82612a0b565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f56119ed816128a4565b600c80548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff166301000000836002811115611a2d57611a2d613fd1565b0217905550816002811115611a4457611a44613fd1565b6040517f3f8ec15ee9296f186f61e1166b0a54e27b26c24a46d7928b184aac9cf9e5d31b90600090a25050565b600073ffffffffffffffffffffffffffffffffffffffff8216611ab757611ab77f8f4eb60400000000000000000000000000000000000000000000000000000000612913565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a611b14816128a4565b600a82905560405182907fbb0ff8b419f825a4b145a00145425bd8f55d6ac00e3872c2b79f3b6460d80b7890600090a25050565b7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c27611b72816128a4565b600e82905560405182907fa4a51824897725dd3d8d70b93a57127d92bc875375fc7eeed08b3d00b23e546690600090a25050565b60005460609060019082828214611bc557611bc2858484612d68565b90505b949350505050565b6000611bdc83600d5484612b47565b9392505050565b606060038054610e529061451b565b6060611bc5848484612d68565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260136020526040812054610ddc9060036145f2565b60008173ffffffffffffffffffffffffffffffffffffffff16611d4b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d4592507fd25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b8739150612e889050565b90612edb565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b6000611d75816128a4565b8151611d8890600f906020850190613aba565b5081604051611d9791906144ff565b604051908190038120907f57d002fe76862b94302988f1cec4c18eface67ad7464b54eafe8ec7c6429b1ea90600090a25050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260126020526040812054610ddc90600a6145f2565b611e07848484610ff5565b73ffffffffffffffffffffffffffffffffffffffff83163b15611e5d57611e3084848484612ef7565b611e5d57611e5d7fd1a57ed600000000000000000000000000000000000000000000000000000000612913565b50505050565b7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a611e8d816128a4565b600b82905560405182907f8dc645e4c9b73ceafaafe53b4dbf1f80ee9f3d35ba1a0b7530636f6dca82ee2090600090a25050565b6000611ecc816128a4565b600c54610100900460ff1615611f0e576040517f2f2f1b9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055611f453360c8612b9f565b50565b606060118054610e529061451b565b60408051608081018252600080825260208201819052918101829052606081019190915260018210611fd457600054821015611fd4575b600082815260046020526040902054611fcb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90910190611f8e565b610ddc82613067565b919050565b6060611fe4826128ae565b61201a576040517f4494362200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c5460ff166120b657600f80546120319061451b565b80601f016020809104026020016040519081016040528092919081815260200182805461205d9061451b565b80156120aa5780601f1061207f576101008083540402835291602001916120aa565b820191906000526020600020905b81548152906001019060200180831161208d57829003601f168201915b50505050509050919050565b6000601080546120c59061451b565b9050116120e15760405180602001604052806000815250610ddc565b60106120ec8361310c565b6040516020016120fd929190614609565b60405160208183030381529060405292915050565b6000611bdc83600e5484612b47565b60008281526009602052604090206001015461213c816128a4565b61145b8383612cad565b826127108161217a600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b612184919061459d565b106121bb576040517f502252bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600c5462010000900460ff1660028111156121da576121da613fd1565b14612211576040517fca9d429900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61221c838333611cc7565b612252576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260126020526040902054600a9061227090869061459d565b11156122a8576040517ff382050300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600a546122b691906145b5565b34146122ee576040517f7df3a4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152601260205260408120805486929061230d90849061459d565b9091555061231d90503385612b9f565b604051849033907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a350505050565b7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c2761237a816128a4565b61238660118484613b3e565b508282604051612397929190614712565b604051908190038120907f7d3a31a926b1a1c99548198a1471e07606a4df544c218b03a9a33a1f1612e21e90600090a2505050565b828114612405576040517fc33c509e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808267ffffffffffffffff81111561242157612421613c6f565b60405190808252806020026020018201604052801561244a578160200160208202803683370190505b50905060005b858110156125dc57600087878381811061246c5761246c614722565b90506020020160208101906124819190613c52565b73ffffffffffffffffffffffffffffffffffffffff16146125ca578773ffffffffffffffffffffffffffffffffffffffff166342842e0e338989858181106124cb576124cb614722565b90506020020160208101906124e09190613c52565b8888868181106124f2576124f2614722565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561256e57600080fd5b505af1158015612582573d6000803e3d6000fd5b5050505084848281811061259857612598614722565b905060200201358284815181106125b1576125b1614722565b60209081029190910101526125c760018461459d565b92505b806125d481614751565b915050612450565b50806040516125eb9190614789565b60405190819003812090339073ffffffffffffffffffffffffffffffffffffffff8a16907f9d8c0b36781d045176b27ff445fb16c019ba72659ecb800239e371a48ca2d4c490600090a450505050505050565b6000612649816128a4565b60008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d80600081146126a3576040519150601f19603f3d011682016040523d82523d6000602084013e6126a8565b606091505b50509050806126e3576040517f05b2a7fd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051839073ffffffffffffffffffffffffffffffffffffffff8616907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806127bf57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b80610ddc5750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610ddc57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610ddc565b611f45813361316e565b600081600111611fd457600054821015611fd45760005b50600082815260046020526040812054908190036128ed576128e6836147bf565b92506128c5565b7c0100000000000000000000000000000000000000000000000000000000161592915050565b8060005260046000fd5b6000612928836119b8565b905081801561294d57503373ffffffffffffffffffffffffffffffffffffffff821614155b156129895761295c8133610cde565b612989576129897fcfb3b94200000000000000000000000000000000000000000000000000000000612913565b60008381526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b600081600111612b1e575060008181526004602052604090205480600003612af2576000548210612a5f57612a5f7fdf2d9b4200000000000000000000000000000000000000000000000000000000612913565b5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600460205260409020548015612a60577c01000000000000000000000000000000000000000000000000000000008116600003612ac457919050565b612aed7fdf2d9b4200000000000000000000000000000000000000000000000000000000612913565b612a60565b7c01000000000000000000000000000000000000000000000000000000008116600003612b1e57919050565b611fd47fdf2d9b4200000000000000000000000000000000000000000000000000000000612913565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606083901b166020820152600090611bc5908590859060340160405160208183030381529060405280519060200120613240565b610f42828260405180602001604052806000815250613256565b600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610f4257600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055612c4f3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610f4257600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060818310612d9a57612d9a7f32c1995a00000000000000000000000000000000000000000000000000000000612913565b6001831015612da857600192505b60005480808410612db7578093505b6000612dc287611a71565b9050848610612dcf575060005b8015612e7e578086860311612de357508484035b604080516001830160051b81019182905294506000612e0188611f57565b905060008160400151612e12575080515b60005b612e1e8a613067565b9250604083015160008114612e365760009250612e5b565b835115612e4257835192505b8b831860601b612e5b576001820191508a8260051b8a01525b5060018a01995083604052888a1480612e7357508481145b15612e155787525050505b5050509392505050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000612eea85856132e0565b915091506119528161334e565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290612f529033908990889088906004016147f4565b6020604051808303816000875af1925050508015612fab575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612fa89181019061483d565b60015b613019573d808015612fd9576040519150601f19603f3d011682016040523d82523d6000602084013e612fde565b606091505b508051600003613011576130117fd1a57ed600000000000000000000000000000000000000000000000000000000612913565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610ddc906040805160808101825273ffffffffffffffffffffffffffffffffffffffff8316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a90048061312657508190037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909101908152919050565b600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610f42576131c68173ffffffffffffffffffffffffffffffffffffffff1660146135a2565b6131d18360206135a2565b6040516020016131e292919061485a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526116c891600401613e22565b60008261324d85846137e5565b14949350505050565b6132608383613851565b73ffffffffffffffffffffffffffffffffffffffff83163b1561145b576000548281035b6132976000868380600101945086612ef7565b6132c4576132c47fd1a57ed600000000000000000000000000000000000000000000000000000000612913565b8181106132845781600054146132d957600080fd5b5050505050565b60008082516041036133165760208301516040840151606085015160001a61330a87828585613950565b94509450505050613347565b825160400361333f5760208301516040840151613334868383613a68565b935093505050613347565b506000905060025b9250929050565b600081600481111561336257613362613fd1565b0361336a5750565b600181600481111561337e5761337e613fd1565b036133e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016116c8565b60028160048111156133f9576133f9613fd1565b03613460576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016116c8565b600381600481111561347457613474613fd1565b03613501576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016116c8565b600481600481111561351557613515613fd1565b03611f45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016116c8565b606060006135b18360026145b5565b6135bc90600261459d565b67ffffffffffffffff8111156135d4576135d4613c6f565b6040519080825280601f01601f1916602001820160405280156135fe576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061363557613635614722565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061369857613698614722565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006136d48460026145b5565b6136df90600161459d565b90505b600181111561377c577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061372057613720614722565b1a60f81b82828151811061373657613736614722565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93613775816147bf565b90506136e2565b508315611bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016116c8565b600081815b845181101561195257600085828151811061380757613807614722565b6020026020010151905080831161382d576000838152602082905260409020925061383e565b600081815260208490526040902092505b508061384981614751565b9150506137ea565b6000805490829003613886576138867fb562e8dd00000000000000000000000000000000000000000000000000000000612913565b600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87164260a01b6001881460e11b1781179091558084526005909252822080546801000000000000000186020190559081900361390b5761390b7f2e07630000000000000000000000000000000000000000000000000000000000612913565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103613910575060005550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139875750600090506003613a5f565b8460ff16601b1415801561399f57508460ff16601c14155b156139b05750600090506004613a5f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a04573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116613a5857600060019250925050613a5f565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681613a9e60ff86901c601b61459d565b9050613aac87828885613950565b935093505050935093915050565b828054613ac69061451b565b90600052602060002090601f016020900481019282613ae85760008555613b2e565b82601f10613b0157805160ff1916838001178555613b2e565b82800160010185558215613b2e579182015b82811115613b2e578251825591602001919060010190613b13565b50613b3a929150613bd0565b5090565b828054613b4a9061451b565b90600052602060002090601f016020900481019282613b6c5760008555613b2e565b82601f10613ba3578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555613b2e565b82800160010185558215613b2e579182015b82811115613b2e578235825591602001919060010190613bb5565b5b80821115613b3a5760008155600101613bd1565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611f4557600080fd5b600060208284031215613c2557600080fd5b8135611bdc81613be5565b73ffffffffffffffffffffffffffffffffffffffff81168114611f4557600080fd5b600060208284031215613c6457600080fd5b8135611bdc81613c30565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613ce557613ce5613c6f565b604052919050565b600067ffffffffffffffff831115613d0757613d07613c6f565b613d3860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613c9e565b9050828152838383011115613d4c57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613d7557600080fd5b813567ffffffffffffffff811115613d8c57600080fd5b8201601f81018413613d9d57600080fd5b611bc584823560208401613ced565b60005b83811015613dc7578181015183820152602001613daf565b83811115611e5d5750506000910152565b60008151808452613df0816020860160208601613dac565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611bdc6020830184613dd8565b600060208284031215613e4757600080fd5b5035919050565b60008060408385031215613e6157600080fd5b8235613e6c81613c30565b946020939093013593505050565b600060208284031215613e8c57600080fd5b813560038110611bdc57600080fd5b600080600060608486031215613eb057600080fd5b8335613ebb81613c30565b92506020840135613ecb81613c30565b929592945050506040919091013590565b600082601f830112613eed57600080fd5b8135602067ffffffffffffffff821115613f0957613f09613c6f565b8160051b613f18828201613c9e565b9283528481018201928281019087851115613f3257600080fd5b83870192505b84831015613f5157823582529183019190830190613f38565b979650505050505050565b60008060408385031215613f6f57600080fd5b823567ffffffffffffffff811115613f8657600080fd5b613f9285828601613edc565b95602094909401359450505050565b60008060408385031215613fb457600080fd5b823591506020830135613fc681613c30565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061403b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008083601f84011261405357600080fd5b50813567ffffffffffffffff81111561406b57600080fd5b6020830191508360208260051b850101111561334757600080fd5b6000806020838503121561409957600080fd5b823567ffffffffffffffff8111156140b057600080fd5b6140bc85828601614041565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156141525761413f83855173ffffffffffffffffffffffffffffffffffffffff815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b92840192608092909201916001016140e4565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156141525783518352928401929184019160010161417a565b600080604083850312156141a957600080fd5b823567ffffffffffffffff8111156141c057600080fd5b6141cc85828601613edc565b9250506020830135613fc681613c30565b6000806000606084860312156141f257600080fd5b83356141fd81613c30565b95602085013595506040909401359392505050565b6000806040838503121561422557600080fd5b823561423081613c30565b915060208301358015158114613fc657600080fd5b60008083601f84011261425757600080fd5b50813567ffffffffffffffff81111561426f57600080fd5b60208301915083602082850101111561334757600080fd5b60008060006040848603121561429c57600080fd5b833567ffffffffffffffff8111156142b357600080fd5b6142bf86828701614245565b90945092505060208401356142d381613c30565b809150509250925092565b600080600080608085870312156142f457600080fd5b84356142ff81613c30565b9350602085013561430f81613c30565b925060408501359150606085013567ffffffffffffffff81111561433257600080fd5b8501601f8101871361434357600080fd5b61435287823560208401613ced565b91505092959194509250565b815173ffffffffffffffffffffffffffffffffffffffff16815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610ddc565b6000806000604084860312156143c557600080fd5b83359250602084013567ffffffffffffffff8111156143e357600080fd5b6143ef86828701614245565b9497909650939450505050565b6000806040838503121561440f57600080fd5b823561441a81613c30565b91506020830135613fc681613c30565b6000806020838503121561443d57600080fd5b823567ffffffffffffffff81111561445457600080fd5b6140bc85828601614245565b60008060008060006060868803121561447857600080fd5b853561448381613c30565b9450602086013567ffffffffffffffff808211156144a057600080fd5b6144ac89838a01614041565b909650945060408801359150808211156144c557600080fd5b506144d288828901614041565b969995985093965092949392505050565b600081516144f5818560208601613dac565b9290920192915050565b60008251614511818460208701613dac565b9190910192915050565b600181811c9082168061452f57607f821691505b602082108103614568577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156145b0576145b061456e565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156145ed576145ed61456e565b500290565b6000828210156146045761460461456e565b500390565b600080845481600182811c91508083168061462557607f831692505b6020808410820361465d577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b81801561467157600181146146a0576146cd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616895284890196506146cd565b60008b81526020902060005b868110156146c55781548b8201529085019083016146ac565b505084890196505b5050505050506147096146e082866144e3565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b95945050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036147825761478261456e565b5060010190565b815160009082906020808601845b838110156147b357815185529382019390820190600101614797565b50929695505050505050565b6000816147ce576147ce61456e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526148336080830184613dd8565b9695505050505050565b60006020828403121561484f57600080fd5b8151611bdc81613be5565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614892816017850160208801613dac565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516148cf816028840160208801613dac565b0160280194935050505056fea264697066735822122041029015c81a40a8ff6d2be1389c4404fdedc51d8251925cfe0c28b57a661a8e64736f6c634300080d003300000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c
Deployed Bytecode
0x6080604052600436106104655760003560e01c80637f121b3311610243578063b8a9cd6b11610143578063db7fd408116100bb578063ea2cdf1f1161008a578063f08afa141161006f578063f08afa1414610d59578063f3fef3a314610d8d578063f7b8948b14610dad57600080fd5b8063ea2cdf1f14610d19578063eb022b1514610d3957600080fd5b8063db7fd40814610c7c578063e8b5498d14610c8f578063e8e8870b14610cae578063e985e9c514610cc357600080fd5b8063c23dc68f11610112578063ca5d0880116100f7578063ca5d088014610c1a578063cb6d848514610c3c578063d547741f14610c5c57600080fd5b8063c23dc68f14610bcd578063c87b56dd14610bfa57600080fd5b8063b8a9cd6b14610b6e578063ba7a86b814610b8e578063bd706ac714610ba3578063c08dfd3c14610bb857600080fd5b806399a2557a116101d6578063ab88daf3116101a5578063b0962c531161018a578063b0962c5314610b1b578063b846480f14610b3b578063b88d4fde14610b5b57600080fd5b8063ab88daf314610adb578063b070a76c14610afb57600080fd5b806399a2557a14610a705780639b6860c814610a90578063a217fddf14610aa6578063a22cb46514610abb57600080fd5b806387dedfe31161021257806387dedfe3146109b45780638a8b7deb146109d457806391d1485414610a0857806395d89b4114610a5b57600080fd5b80637f121b331461093157806380cd44a0146109465780638462151c1461096657806386a173ee1461099357600080fd5b806336568abe116103695780635b8ad429116102e157806365f13097116102b05780636ff0ede0116102955780636ff0ede0146108d157806370a08231146108f1578063791a25191461091157600080fd5b806365f13097146108885780636d1d0c991461089d57600080fd5b80635b8ad429146108065780635bbb21771461081b5780635ded6050146108485780636352211e1461086857600080fd5b806342842e0e116103385780634cf5f7a41161031d5780634cf5f7a4146107aa57806354214f69146107bf57806358241353146107d957600080fd5b806342842e0e1461077757806348c5af0d1461078a57600080fd5b806336568abe1461070c57806338bcf32b1461072c57806340fd839b1461074c57806341e643191461076157600080fd5b80631c46cbdc116103fc5780632f2ff15d116103cb57806332cb6b0c116103b057806332cb6b0c146106a95780633335252b146106bf57806333bc1c5c146106df57600080fd5b80632f2ff15d1461065557806331aab7591461067557600080fd5b80631c46cbdc146105df57806323b872dd146105ff578063248a9ca3146106125780632904e6d91461064257600080fd5b8063081812fc11610438578063081812fc1461051e578063095ea7b31461056357806318160ddd146105765780631c16521c146105b257600080fd5b806301ffc9a71461046a5780630345e3cb1461049f5780630675b7c6146104da57806306fdde03146104fc575b600080fd5b34801561047657600080fd5b5061048a610485366004613c13565b610dc2565b60405190151581526020015b60405180910390f35b3480156104ab57600080fd5b506104cc6104ba366004613c52565b60136020526000908152604090205481565b604051908152602001610496565b3480156104e657600080fd5b506104fa6104f5366004613d63565b610de2565b005b34801561050857600080fd5b50610511610e43565b6040516104969190613e22565b34801561052a57600080fd5b5061053e610539366004613e35565b610ed5565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610496565b6104fa610571366004613e4e565b610f36565b34801561058257600080fd5b506104cc600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b3480156105be57600080fd5b506104cc6105cd366004613c52565b60126020526000908152604090205481565b3480156105eb57600080fd5b506104fa6105fa366004613e7a565b610f46565b6104fa61060d366004613e9b565b610ff5565b34801561061e57600080fd5b506104cc61062d366004613e35565b60009081526009602052604090206001015490565b6104fa610650366004613f5c565b61122a565b34801561066157600080fd5b506104fa610670366004613fa1565b611436565b34801561068157600080fd5b506104cc7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a81565b3480156106b557600080fd5b506104cc61271081565b3480156106cb57600080fd5b506104fa6106da366004613f5c565b611460565b3480156106eb57600080fd5b50600c546106ff9062010000900460ff1681565b6040516104969190614000565b34801561071857600080fd5b506104fa610727366004613fa1565b611627565b34801561073857600080fd5b506104cc610747366004613c52565b6116db565b34801561075857600080fd5b506104cc60c881565b34801561076d57600080fd5b506104cc600b5481565b6104fa610785366004613e9b565b61170c565b34801561079657600080fd5b506104fa6107a5366004613e7a565b611727565b3480156107b657600080fd5b506105116117d4565b3480156107cb57600080fd5b50600c5461048a9060ff1681565b3480156107e557600080fd5b506104cc6107f4366004613c52565b60146020526000908152604090205481565b34801561081257600080fd5b506104fa611862565b34801561082757600080fd5b5061083b610836366004614086565b6118f0565b60405161049691906140c8565b34801561085457600080fd5b506104fa610863366004613e35565b61195a565b34801561087457600080fd5b5061053e610883366004613e35565b6119b8565b34801561089457600080fd5b506104cc600a81565b3480156108a957600080fd5b506104cc7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c2781565b3480156108dd57600080fd5b506104fa6108ec366004613e7a565b6119c3565b3480156108fd57600080fd5b506104cc61090c366004613c52565b611a71565b34801561091d57600080fd5b506104fa61092c366004613e35565b611aea565b34801561093d57600080fd5b506104cc600281565b34801561095257600080fd5b506104fa610961366004613e35565b611b48565b34801561097257600080fd5b50610986610981366004613c52565b611ba6565b604051610496919061415e565b34801561099f57600080fd5b50600c546106ff906301000000900460ff1681565b3480156109c057600080fd5b5061048a6109cf366004614196565b611bcd565b3480156109e057600080fd5b506104cc7fd25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b87381565b348015610a1457600080fd5b5061048a610a23366004613fa1565b600091825260096020908152604080842073ffffffffffffffffffffffffffffffffffffffff93909316845291905290205460ff1690565b348015610a6757600080fd5b50610511611be3565b348015610a7c57600080fd5b50610986610a8b3660046141dd565b611bf2565b348015610a9c57600080fd5b506104cc600a5481565b348015610ab257600080fd5b506104cc600081565b348015610ac757600080fd5b506104fa610ad6366004614212565b611bff565b348015610ae757600080fd5b506104cc610af6366004613c52565b611c96565b348015610b0757600080fd5b5061048a610b16366004614287565b611cc7565b348015610b2757600080fd5b506104fa610b36366004613d63565b611d6a565b348015610b4757600080fd5b506104cc610b56366004613c52565b611dcb565b6104fa610b693660046142de565b611dfc565b348015610b7a57600080fd5b506104fa610b89366004613e35565b611e63565b348015610b9a57600080fd5b506104fa611ec1565b348015610baf57600080fd5b50610511611f48565b348015610bc457600080fd5b506104cc600381565b348015610bd957600080fd5b50610bed610be8366004613e35565b611f57565b604051610496919061435e565b348015610c0657600080fd5b50610511610c15366004613e35565b611fd9565b348015610c2657600080fd5b50600c546106ff90640100000000900460ff1681565b348015610c4857600080fd5b5061048a610c57366004614196565b612112565b348015610c6857600080fd5b506104fa610c77366004613fa1565b612121565b6104fa610c8a3660046143b0565b612146565b348015610c9b57600080fd5b50600c5461048a90610100900460ff1681565b348015610cba57600080fd5b50600d546104cc565b348015610ccf57600080fd5b5061048a610cde3660046143fc565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610d2557600080fd5b506104fa610d3436600461442a565b612350565b348015610d4557600080fd5b506104fa610d54366004614460565b6123cc565b348015610d6557600080fd5b506104cc7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f581565b348015610d9957600080fd5b506104fa610da8366004613e4e565b61263e565b348015610db957600080fd5b50600e546104cc565b6000610dcd8261272c565b80610ddc5750610ddc8261280d565b92915050565b6000610ded816128a4565b8151610e00906010906020850190613aba565b5081604051610e0f91906144ff565b604051908190038120907fe57e250d9247be9fc425fb87862f34ca183bc5d48dcae1d0c58ffc7622b349be90600090a25050565b606060028054610e529061451b565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7e9061451b565b8015610ecb5780601f10610ea057610100808354040283529160200191610ecb565b820191906000526020600020905b815481529060010190602001808311610eae57829003601f168201915b5050505050905090565b6000610ee0826128ae565b610f0d57610f0d7fcf4700e400000000000000000000000000000000000000000000000000000000612913565b5060009081526006602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b610f428282600161291d565b5050565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f5610f70816128a4565b600c80548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff16640100000000836002811115610fb157610fb1613fd1565b0217905550816002811115610fc857610fc8613fd1565b6040517fe0eae91ebff5418892939b1d0a83f1b2b96cdfa59c4cb9b67400a7d0cc8501f490600090a25050565b600061100082612a0b565b73ffffffffffffffffffffffffffffffffffffffff948516949091508116841461104d5761104d7fa114810000000000000000000000000000000000000000000000000000000000612913565b600082815260066020526040902080543380821473ffffffffffffffffffffffffffffffffffffffff8816909114176110b75761108a8633610cde565b6110b7576110b77f59c896be00000000000000000000000000000000000000000000000000000000612913565b80156110c257600082555b73ffffffffffffffffffffffffffffffffffffffff86811660009081526005602052604080822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055918716808252919020805460010190554260a01b177c0200000000000000000000000000000000000000000000000000000000176000858152600460205260408120919091557c0200000000000000000000000000000000000000000000000000000000841690036111b1576001840160008181526004602052604081205490036111af5760005481146111af5760008181526004602052604090208490555b505b73ffffffffffffffffffffffffffffffffffffffff85168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003611221576112217fea553b3400000000000000000000000000000000000000000000000000000000612913565b50505050505050565b806127108161125e600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b611268919061459d565b1061129f576040517f502252bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600c546301000000900460ff1660028111156112bf576112bf613fd1565b146112f6576040517f88a75ca100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526013602052604090205460039061131490849061459d565b111561134c576040517ff382050300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81600b5461135a91906145b5565b3414611392576040517f7df3a4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61139f83600d5433612b47565b6113d5576040517f3c72a94000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260136020526040812080548492906113f490849061459d565b9091555061140490503383612b9f565b604051829033907f371f0f9c5c7bb591d0f296e39127584eede508133f32e126261d929e7a6d5a2790600090a3505050565b600082815260096020526040902060010154611451816128a4565b61145b8383612bb9565b505050565b8061271081611494600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b61149e919061459d565b106114d5576040517f502252bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600c54640100000000900460ff1660028111156114f6576114f6613fd1565b1461152d576040517fce6231f600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360009081526014602052604090205460029061154b90849061459d565b1115611583576040517ff382050300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61159083600e5433612b47565b6115c6576040517f3c72a94000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260146020526040812080548492906115e590849061459d565b909155506115f590503383612b9f565b604051829033907fcebbbce55cb558a80c89a83b5e23dca5186979853be88c28e9e01232c7fdc98b90600090a3505050565b73ffffffffffffffffffffffffffffffffffffffff811633146116d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084015b60405180910390fd5b610f428282612cad565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260146020526040812054610ddc9060026145f2565b61145b83838360405180602001604052806000815250611dfc565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f5611751816128a4565b600c80548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff166201000083600281111561179057611790613fd1565b02179055508160028111156117a7576117a7613fd1565b6040517fa09f7b1058a9835c609b90ec0dfc60e671c6d555cb5bebc8130fe833c6ecb97d90600090a25050565b600f80546117e19061451b565b80601f016020809104026020016040519081016040528092919081815260200182805461180d9061451b565b801561185a5780601f1061182f5761010080835404028352916020019161185a565b820191906000526020600020905b81548152906001019060200180831161183d57829003601f168201915b505050505081565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f561188c816128a4565b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00811660ff9182161590811790925560405191161515907f25211413ffce62a27a28709c5fc52567e1380cbc1acdd68b59044c48752bea0a90600090a250565b60408051828152600583901b8082016020019092526060915b8015611952577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08082019186010135600061194382611f57565b84840160200152506119099050565b509392505050565b7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c27611984816128a4565b600d82905560405182907f510e05160985363ac4acb7c495836e5098e299c42b492eb222700c900f768ada90600090a25050565b6000610ddc82612a0b565b7f97d6fdc3ae489aa531f5e814ba618970ea8b329d8f3eda451a6194ffb022b3f56119ed816128a4565b600c80548391907fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff166301000000836002811115611a2d57611a2d613fd1565b0217905550816002811115611a4457611a44613fd1565b6040517f3f8ec15ee9296f186f61e1166b0a54e27b26c24a46d7928b184aac9cf9e5d31b90600090a25050565b600073ffffffffffffffffffffffffffffffffffffffff8216611ab757611ab77f8f4eb60400000000000000000000000000000000000000000000000000000000612913565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205467ffffffffffffffff1690565b7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a611b14816128a4565b600a82905560405182907fbb0ff8b419f825a4b145a00145425bd8f55d6ac00e3872c2b79f3b6460d80b7890600090a25050565b7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c27611b72816128a4565b600e82905560405182907fa4a51824897725dd3d8d70b93a57127d92bc875375fc7eeed08b3d00b23e546690600090a25050565b60005460609060019082828214611bc557611bc2858484612d68565b90505b949350505050565b6000611bdc83600d5484612b47565b9392505050565b606060038054610e529061451b565b6060611bc5848484612d68565b33600081815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260136020526040812054610ddc9060036145f2565b60008173ffffffffffffffffffffffffffffffffffffffff16611d4b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d4592507fd25f1cb268e7212783aa2330ac94ff078b1182c7819977d67e23a42dd800b8739150612e889050565b90612edb565b73ffffffffffffffffffffffffffffffffffffffff1614949350505050565b6000611d75816128a4565b8151611d8890600f906020850190613aba565b5081604051611d9791906144ff565b604051908190038120907f57d002fe76862b94302988f1cec4c18eface67ad7464b54eafe8ec7c6429b1ea90600090a25050565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260126020526040812054610ddc90600a6145f2565b611e07848484610ff5565b73ffffffffffffffffffffffffffffffffffffffff83163b15611e5d57611e3084848484612ef7565b611e5d57611e5d7fd1a57ed600000000000000000000000000000000000000000000000000000000612913565b50505050565b7f3515f38d031dcbca5f1dac4c5afc1efca2020e42efdd9c5806ae7e963d18435a611e8d816128a4565b600b82905560405182907f8dc645e4c9b73ceafaafe53b4dbf1f80ee9f3d35ba1a0b7530636f6dca82ee2090600090a25050565b6000611ecc816128a4565b600c54610100900460ff1615611f0e576040517f2f2f1b9800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055611f453360c8612b9f565b50565b606060118054610e529061451b565b60408051608081018252600080825260208201819052918101829052606081019190915260018210611fd457600054821015611fd4575b600082815260046020526040902054611fcb577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90910190611f8e565b610ddc82613067565b919050565b6060611fe4826128ae565b61201a576040517f4494362200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c5460ff166120b657600f80546120319061451b565b80601f016020809104026020016040519081016040528092919081815260200182805461205d9061451b565b80156120aa5780601f1061207f576101008083540402835291602001916120aa565b820191906000526020600020905b81548152906001019060200180831161208d57829003601f168201915b50505050509050919050565b6000601080546120c59061451b565b9050116120e15760405180602001604052806000815250610ddc565b60106120ec8361310c565b6040516020016120fd929190614609565b60405160208183030381529060405292915050565b6000611bdc83600e5484612b47565b60008281526009602052604090206001015461213c816128a4565b61145b8383612cad565b826127108161217a600154600054037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b612184919061459d565b106121bb576040517f502252bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600c5462010000900460ff1660028111156121da576121da613fd1565b14612211576040517fca9d429900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61221c838333611cc7565b612252576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260126020526040902054600a9061227090869061459d565b11156122a8576040517ff382050300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83600a546122b691906145b5565b34146122ee576040517f7df3a4ce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336000908152601260205260408120805486929061230d90849061459d565b9091555061231d90503385612b9f565b604051849033907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a350505050565b7fc75fc0428491f4bf421288dab02b2cef48d12da9a01aee87f9bebef756f37c2761237a816128a4565b61238660118484613b3e565b508282604051612397929190614712565b604051908190038120907f7d3a31a926b1a1c99548198a1471e07606a4df544c218b03a9a33a1f1612e21e90600090a2505050565b828114612405576040517fc33c509e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000808267ffffffffffffffff81111561242157612421613c6f565b60405190808252806020026020018201604052801561244a578160200160208202803683370190505b50905060005b858110156125dc57600087878381811061246c5761246c614722565b90506020020160208101906124819190613c52565b73ffffffffffffffffffffffffffffffffffffffff16146125ca578773ffffffffffffffffffffffffffffffffffffffff166342842e0e338989858181106124cb576124cb614722565b90506020020160208101906124e09190613c52565b8888868181106124f2576124f2614722565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561256e57600080fd5b505af1158015612582573d6000803e3d6000fd5b5050505084848281811061259857612598614722565b905060200201358284815181106125b1576125b1614722565b60209081029190910101526125c760018461459d565b92505b806125d481614751565b915050612450565b50806040516125eb9190614789565b60405190819003812090339073ffffffffffffffffffffffffffffffffffffffff8a16907f9d8c0b36781d045176b27ff445fb16c019ba72659ecb800239e371a48ca2d4c490600090a450505050505050565b6000612649816128a4565b60008373ffffffffffffffffffffffffffffffffffffffff168360405160006040518083038185875af1925050503d80600081146126a3576040519150601f19603f3d011682016040523d82523d6000602084013e6126a8565b606091505b50509050806126e3576040517f05b2a7fd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051839073ffffffffffffffffffffffffffffffffffffffff8616907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a942436490600090a350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806127bf57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b80610ddc5750507fffffffff00000000000000000000000000000000000000000000000000000000167f5b5e139f000000000000000000000000000000000000000000000000000000001490565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f7965db0b000000000000000000000000000000000000000000000000000000001480610ddc57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610ddc565b611f45813361316e565b600081600111611fd457600054821015611fd45760005b50600082815260046020526040812054908190036128ed576128e6836147bf565b92506128c5565b7c0100000000000000000000000000000000000000000000000000000000161592915050565b8060005260046000fd5b6000612928836119b8565b905081801561294d57503373ffffffffffffffffffffffffffffffffffffffff821614155b156129895761295c8133610cde565b612989576129897fcfb3b94200000000000000000000000000000000000000000000000000000000612913565b60008381526006602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b600081600111612b1e575060008181526004602052604090205480600003612af2576000548210612a5f57612a5f7fdf2d9b4200000000000000000000000000000000000000000000000000000000612913565b5b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff016000818152600460205260409020548015612a60577c01000000000000000000000000000000000000000000000000000000008116600003612ac457919050565b612aed7fdf2d9b4200000000000000000000000000000000000000000000000000000000612913565b612a60565b7c01000000000000000000000000000000000000000000000000000000008116600003612b1e57919050565b611fd47fdf2d9b4200000000000000000000000000000000000000000000000000000000612913565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606083901b166020820152600090611bc5908590859060340160405160208183030381529060405280519060200120613240565b610f42828260405180602001604052806000815250613256565b600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610f4257600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055612c4f3390565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff1615610f4257600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6060818310612d9a57612d9a7f32c1995a00000000000000000000000000000000000000000000000000000000612913565b6001831015612da857600192505b60005480808410612db7578093505b6000612dc287611a71565b9050848610612dcf575060005b8015612e7e578086860311612de357508484035b604080516001830160051b81019182905294506000612e0188611f57565b905060008160400151612e12575080515b60005b612e1e8a613067565b9250604083015160008114612e365760009250612e5b565b835115612e4257835192505b8b831860601b612e5b576001820191508a8260051b8a01525b5060018a01995083604052888a1480612e7357508481145b15612e155787525050505b5050509392505050565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6000806000612eea85856132e0565b915091506119528161334e565b6040517f150b7a0200000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290612f529033908990889088906004016147f4565b6020604051808303816000875af1925050508015612fab575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612fa89181019061483d565b60015b613019573d808015612fd9576040519150601f19603f3d011682016040523d82523d6000602084013e612fde565b606091505b508051600003613011576130117fd1a57ed600000000000000000000000000000000000000000000000000000000612913565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a0200000000000000000000000000000000000000000000000000000000149050949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610ddc906040805160808101825273ffffffffffffffffffffffffffffffffffffffff8316815260a083901c67ffffffffffffffff1660208201527c0100000000000000000000000000000000000000000000000000000000831615159181019190915260e89190911c606082015290565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a90048061312657508190037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909101908152919050565b600082815260096020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610f42576131c68173ffffffffffffffffffffffffffffffffffffffff1660146135a2565b6131d18360206135a2565b6040516020016131e292919061485a565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290527f08c379a00000000000000000000000000000000000000000000000000000000082526116c891600401613e22565b60008261324d85846137e5565b14949350505050565b6132608383613851565b73ffffffffffffffffffffffffffffffffffffffff83163b1561145b576000548281035b6132976000868380600101945086612ef7565b6132c4576132c47fd1a57ed600000000000000000000000000000000000000000000000000000000612913565b8181106132845781600054146132d957600080fd5b5050505050565b60008082516041036133165760208301516040840151606085015160001a61330a87828585613950565b94509450505050613347565b825160400361333f5760208301516040840151613334868383613a68565b935093505050613347565b506000905060025b9250929050565b600081600481111561336257613362613fd1565b0361336a5750565b600181600481111561337e5761337e613fd1565b036133e5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016116c8565b60028160048111156133f9576133f9613fd1565b03613460576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016116c8565b600381600481111561347457613474613fd1565b03613501576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016116c8565b600481600481111561351557613515613fd1565b03611f45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016116c8565b606060006135b18360026145b5565b6135bc90600261459d565b67ffffffffffffffff8111156135d4576135d4613c6f565b6040519080825280601f01601f1916602001820160405280156135fe576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061363557613635614722565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061369857613698614722565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060006136d48460026145b5565b6136df90600161459d565b90505b600181111561377c577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061372057613720614722565b1a60f81b82828151811061373657613736614722565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535060049490941c93613775816147bf565b90506136e2565b508315611bdc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016116c8565b600081815b845181101561195257600085828151811061380757613807614722565b6020026020010151905080831161382d576000838152602082905260409020925061383e565b600081815260208490526040902092505b508061384981614751565b9150506137ea565b6000805490829003613886576138867fb562e8dd00000000000000000000000000000000000000000000000000000000612913565b600081815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff87164260a01b6001881460e11b1781179091558084526005909252822080546801000000000000000186020190559081900361390b5761390b7f2e07630000000000000000000000000000000000000000000000000000000000612913565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103613910575060005550505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156139875750600090506003613a5f565b8460ff16601b1415801561399f57508460ff16601c14155b156139b05750600090506004613a5f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613a04573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116613a5857600060019250925050613a5f565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831681613a9e60ff86901c601b61459d565b9050613aac87828885613950565b935093505050935093915050565b828054613ac69061451b565b90600052602060002090601f016020900481019282613ae85760008555613b2e565b82601f10613b0157805160ff1916838001178555613b2e565b82800160010185558215613b2e579182015b82811115613b2e578251825591602001919060010190613b13565b50613b3a929150613bd0565b5090565b828054613b4a9061451b565b90600052602060002090601f016020900481019282613b6c5760008555613b2e565b82601f10613ba3578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555613b2e565b82800160010185558215613b2e579182015b82811115613b2e578235825591602001919060010190613bb5565b5b80821115613b3a5760008155600101613bd1565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114611f4557600080fd5b600060208284031215613c2557600080fd5b8135611bdc81613be5565b73ffffffffffffffffffffffffffffffffffffffff81168114611f4557600080fd5b600060208284031215613c6457600080fd5b8135611bdc81613c30565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613ce557613ce5613c6f565b604052919050565b600067ffffffffffffffff831115613d0757613d07613c6f565b613d3860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f86011601613c9e565b9050828152838383011115613d4c57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613d7557600080fd5b813567ffffffffffffffff811115613d8c57600080fd5b8201601f81018413613d9d57600080fd5b611bc584823560208401613ced565b60005b83811015613dc7578181015183820152602001613daf565b83811115611e5d5750506000910152565b60008151808452613df0816020860160208601613dac565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611bdc6020830184613dd8565b600060208284031215613e4757600080fd5b5035919050565b60008060408385031215613e6157600080fd5b8235613e6c81613c30565b946020939093013593505050565b600060208284031215613e8c57600080fd5b813560038110611bdc57600080fd5b600080600060608486031215613eb057600080fd5b8335613ebb81613c30565b92506020840135613ecb81613c30565b929592945050506040919091013590565b600082601f830112613eed57600080fd5b8135602067ffffffffffffffff821115613f0957613f09613c6f565b8160051b613f18828201613c9e565b9283528481018201928281019087851115613f3257600080fd5b83870192505b84831015613f5157823582529183019190830190613f38565b979650505050505050565b60008060408385031215613f6f57600080fd5b823567ffffffffffffffff811115613f8657600080fd5b613f9285828601613edc565b95602094909401359450505050565b60008060408385031215613fb457600080fd5b823591506020830135613fc681613c30565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016003831061403b577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b91905290565b60008083601f84011261405357600080fd5b50813567ffffffffffffffff81111561406b57600080fd5b6020830191508360208260051b850101111561334757600080fd5b6000806020838503121561409957600080fd5b823567ffffffffffffffff8111156140b057600080fd5b6140bc85828601614041565b90969095509350505050565b6020808252825182820181905260009190848201906040850190845b818110156141525761413f83855173ffffffffffffffffffffffffffffffffffffffff815116825267ffffffffffffffff602082015116602083015260408101511515604083015262ffffff60608201511660608301525050565b92840192608092909201916001016140e4565b50909695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156141525783518352928401929184019160010161417a565b600080604083850312156141a957600080fd5b823567ffffffffffffffff8111156141c057600080fd5b6141cc85828601613edc565b9250506020830135613fc681613c30565b6000806000606084860312156141f257600080fd5b83356141fd81613c30565b95602085013595506040909401359392505050565b6000806040838503121561422557600080fd5b823561423081613c30565b915060208301358015158114613fc657600080fd5b60008083601f84011261425757600080fd5b50813567ffffffffffffffff81111561426f57600080fd5b60208301915083602082850101111561334757600080fd5b60008060006040848603121561429c57600080fd5b833567ffffffffffffffff8111156142b357600080fd5b6142bf86828701614245565b90945092505060208401356142d381613c30565b809150509250925092565b600080600080608085870312156142f457600080fd5b84356142ff81613c30565b9350602085013561430f81613c30565b925060408501359150606085013567ffffffffffffffff81111561433257600080fd5b8501601f8101871361434357600080fd5b61435287823560208401613ced565b91505092959194509250565b815173ffffffffffffffffffffffffffffffffffffffff16815260208083015167ffffffffffffffff169082015260408083015115159082015260608083015162ffffff169082015260808101610ddc565b6000806000604084860312156143c557600080fd5b83359250602084013567ffffffffffffffff8111156143e357600080fd5b6143ef86828701614245565b9497909650939450505050565b6000806040838503121561440f57600080fd5b823561441a81613c30565b91506020830135613fc681613c30565b6000806020838503121561443d57600080fd5b823567ffffffffffffffff81111561445457600080fd5b6140bc85828601614245565b60008060008060006060868803121561447857600080fd5b853561448381613c30565b9450602086013567ffffffffffffffff808211156144a057600080fd5b6144ac89838a01614041565b909650945060408801359150808211156144c557600080fd5b506144d288828901614041565b969995985093965092949392505050565b600081516144f5818560208601613dac565b9290920192915050565b60008251614511818460208701613dac565b9190910192915050565b600181811c9082168061452f57607f821691505b602082108103614568577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156145b0576145b061456e565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156145ed576145ed61456e565b500290565b6000828210156146045761460461456e565b500390565b600080845481600182811c91508083168061462557607f831692505b6020808410820361465d577f4e487b710000000000000000000000000000000000000000000000000000000086526022600452602486fd5b81801561467157600181146146a0576146cd565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616895284890196506146cd565b60008b81526020902060005b868110156146c55781548b8201529085019083016146ac565b505084890196505b5050505050506147096146e082866144e3565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b95945050505050565b8183823760009101908152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036147825761478261456e565b5060010190565b815160009082906020808601845b838110156147b357815185529382019390820190600101614797565b50929695505050505050565b6000816147ce576147ce61456e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600073ffffffffffffffffffffffffffffffffffffffff8087168352808616602084015250836040830152608060608301526148336080830184613dd8565b9695505050505050565b60006020828403121561484f57600080fd5b8151611bdc81613be5565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614892816017850160208801613dac565b7f206973206d697373696e6720726f6c652000000000000000000000000000000060179184019182015283516148cf816028840160208801613dac565b0160280194935050505056fea264697066735822122041029015c81a40a8ff6d2be1389c4404fdedc51d8251925cfe0c28b57a661a8e64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c
-----Decoded View---------------
Arg [0] : priceManager (address): 0x32bb35Fc246CB3979c4Df996F18366C6c753c29c
Arg [1] : sellManager (address): 0x32bb35Fc246CB3979c4Df996F18366C6c753c29c
Arg [2] : whiteListManager (address): 0x32bb35Fc246CB3979c4Df996F18366C6c753c29c
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c
Arg [1] : 00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c
Arg [2] : 00000000000000000000000032bb35fc246cb3979c4df996f18366c6c753c29c
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.