Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 347 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 19222225 | 306 days ago | IN | 0 ETH | 0.00058137 | ||||
Set Approval For... | 18085614 | 465 days ago | IN | 0 ETH | 0.00148394 | ||||
Set Approval For... | 16191803 | 731 days ago | IN | 0 ETH | 0.00073864 | ||||
Set Approval For... | 16139745 | 739 days ago | IN | 0 ETH | 0.00061003 | ||||
Set Approval For... | 16139595 | 739 days ago | IN | 0 ETH | 0.0006699 | ||||
Set Approval For... | 16054038 | 751 days ago | IN | 0 ETH | 0.00042057 | ||||
Set Approval For... | 15623932 | 811 days ago | IN | 0 ETH | 0.00032052 | ||||
Set Approval For... | 15434299 | 840 days ago | IN | 0 ETH | 0.00040481 | ||||
Set Approval For... | 15386801 | 847 days ago | IN | 0 ETH | 0.00018897 | ||||
Set Approval For... | 15337842 | 855 days ago | IN | 0 ETH | 0.00034616 | ||||
Set Approval For... | 15336532 | 855 days ago | IN | 0 ETH | 0.00033144 | ||||
Set Approval For... | 15309980 | 859 days ago | IN | 0 ETH | 0.00028343 | ||||
Set Approval For... | 15309711 | 859 days ago | IN | 0 ETH | 0.0054265 | ||||
Set Approval For... | 15307880 | 860 days ago | IN | 0 ETH | 0.00060328 | ||||
Set Approval For... | 15277887 | 864 days ago | IN | 0 ETH | 0.00066568 | ||||
Set Approval For... | 15226533 | 872 days ago | IN | 0 ETH | 0.00051424 | ||||
Set Approval For... | 15194354 | 877 days ago | IN | 0 ETH | 0.00055712 | ||||
Set Approval For... | 15159923 | 883 days ago | IN | 0 ETH | 0.00092293 | ||||
Set Approval For... | 15104187 | 891 days ago | IN | 0 ETH | 0.0004296 | ||||
Set Approval For... | 15079432 | 895 days ago | IN | 0 ETH | 0.00067365 | ||||
Set Approval For... | 15054857 | 899 days ago | IN | 0 ETH | 0.02588275 | ||||
Set Approval For... | 15050509 | 900 days ago | IN | 0 ETH | 0.00343746 | ||||
Set Approval For... | 14999363 | 909 days ago | IN | 0 ETH | 0.00027106 | ||||
Set Approval For... | 14989442 | 911 days ago | IN | 0 ETH | 0.0011731 | ||||
Set Approval For... | 14976467 | 913 days ago | IN | 0 ETH | 0.00167878 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14794020 | 943 days ago | 0.025 ETH | ||||
14792931 | 944 days ago | 0.005 ETH | ||||
14792333 | 944 days ago | 0.025 ETH | ||||
14792211 | 944 days ago | 0.005 ETH | ||||
14791581 | 944 days ago | 0.01 ETH | ||||
14790978 | 944 days ago | 0.005 ETH | ||||
14790634 | 944 days ago | 0.025 ETH | ||||
14790542 | 944 days ago | 0.025 ETH | ||||
14790207 | 944 days ago | 0.005 ETH | ||||
14790196 | 944 days ago | 0.025 ETH | ||||
14790156 | 944 days ago | 0.025 ETH | ||||
14790125 | 944 days ago | 0.005 ETH | ||||
14790120 | 944 days ago | 0.025 ETH | ||||
14790084 | 944 days ago | 0.01 ETH | ||||
14789798 | 944 days ago | 0.005 ETH | ||||
14789782 | 944 days ago | 0.005 ETH | ||||
14789105 | 944 days ago | 0.02 ETH | ||||
14789096 | 944 days ago | 0.01 ETH | ||||
14789084 | 944 days ago | 0.01 ETH | ||||
14788999 | 944 days ago | 0.005 ETH | ||||
14788903 | 944 days ago | 0.005 ETH | ||||
14788436 | 944 days ago | 0.005 ETH | ||||
14788199 | 944 days ago | 0.005 ETH | ||||
14788059 | 944 days ago | 0.01 ETH | ||||
14787862 | 944 days ago | 0.005 ETH |
Loading...
Loading
Contract Name:
Atmospace
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** SPDX-License-Identifier: GPL-3.0 ░█████╗░████████╗███╗░░░███╗░█████╗░░██████╗██████╗░░█████╗░░█████╗░███████╗ ██╔══██╗╚══██╔══╝████╗░████║██╔══██╗██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔════╝ ███████║░░░██║░░░██╔████╔██║██║░░██║╚█████╗░██████╔╝███████║██║░░╚═╝█████╗░░ ██╔══██║░░░██║░░░██║╚██╔╝██║██║░░██║░╚═══██╗██╔═══╝░██╔══██║██║░░██╗██╔══╝░░ ██║░░██║░░░██║░░░██║░╚═╝░██║╚█████╔╝██████╔╝██║░░░░░██║░░██║╚█████╔╝███████╗ ╚═╝░░╚═╝░░░╚═╝░░░╚═╝░░░░░╚═╝░╚════╝░╚═════╝░╚═╝░░░░░╚═╝░░╚═╝░╚════╝░╚══════╝ Written by: Lacuna Strategies */ // Solidity Version pragma solidity ^0.8.9; // Inherited Contracts Being Used import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "erc721a/contracts/ERC721A.sol"; contract Atmospace is ERC721A, Ownable { using Counters for Counters.Counter; string public customBaseURI; // Variable to override Base URI address public couponSigner; // Address of the wallet that generated the coupons address public bankManager; // Address that controls payment splitter release uint256 public maxPublicSupply = 7000; // Maximum tokens available during Public Sale mint phase uint256 public maxWhitelistSupply = 3000; // Maximum tokens available during Whitelist mint phase uint256 public maxReserveSupply = 100; // Maximum tokens available during Reserve mint phase uint256 public maxPerTx = 5; // Maximum number of tokens allowed per address uint256 public mintPrice = 0.02 ether; // Price of each NFT in Ethereum struct MintTypes { uint256 _whitelistMintsByAddress; // Mint type used to track number of whitelist mints by address } struct Coupon { bytes32 r; bytes32 s; uint8 v; } enum CouponType { Whitelist } enum SalePhase { Locked, Reserve, PublicSale, Whitelist } mapping(address => MintTypes) public addressToMinted; SalePhase public phase = SalePhase.Locked; // Set initial phase to "Locked" Counters.Counter private supplyMintCounter; // Counter used to track total number of tokens minted Counters.Counter private reserveMintCounter; // Counter used to track total number of reserve tokens minted Counters.Counter private whitelistMintCounter; // Counter used to track total number of whitelist tokens minted PaymentSplitter private splitter; // Payment splitter for allocating % shares to specified wallets constructor( string memory _customBaseURI, address _couponSigner, address _bankManager, address[] memory _payees, uint256[] memory _shares ) ERC721A("Atmospace", "ATMO") { customBaseURI = _customBaseURI; couponSigner = _couponSigner; bankManager = _bankManager; splitter = new PaymentSplitter(_payees, _shares); } // ====== Admin Functions ====== // /** * * Set Mint Phase * @dev Set the mint phase: Locked, Presale, PublicSale * @param _phase The new mint phase */ function setSalePhase(SalePhase _phase) external onlyOwner { phase = _phase; } /** * * Set Mint Price * @dev Set the mint price (ether) * @param _price The new mint price */ function setMintPrice(uint256 _price) external onlyOwner { mintPrice = _price; } /** * * Set Public Supply * @dev Set the maximum public supply currently available to mint * @param _maxPublicSupply The new maximum supply available to be minted */ function setMaxPublicSupply(uint256 _maxPublicSupply) external onlyOwner { maxPublicSupply = _maxPublicSupply; } /** * * Set Whitelist Supply * @dev Set the maximum whitelist supply currently available to mint * @param _maxWhitelistSupply The new maximum supply available to be minted */ function setMaxWhitelistSupply(uint256 _maxWhitelistSupply) external onlyOwner { maxWhitelistSupply = _maxWhitelistSupply; } /** * * Set Reserve Supply * @dev Set the maximum reserve supply currently available to mint * @param _maxReserveSupply The new maximum supply available to be minted */ function setMaxReserveSupply(uint256 _maxReserveSupply) external onlyOwner { maxReserveSupply = _maxReserveSupply; } /** * * Set Max Per Transaction * @dev Set the maximum quantity allowed per transaction during Public Mint * @param _maxPerTx The new maximum supply available to be minted */ function setMaxPerTx(uint256 _maxPerTx) external onlyOwner { maxPerTx = _maxPerTx; } /** * * Set Coupon Signer * @dev Set the coupon signing wallet * @param _couponSigner The new coupon signing wallet address */ function setCouponSigner(address _couponSigner) external onlyOwner { couponSigner = _couponSigner; } /** * * Override Base URI * @dev Overrides default base URI * @notice Default base URI is "" */ function _baseURI() internal view virtual override returns (string memory) { return customBaseURI; } /** * * Set Base URI * @dev Set a custom Base URI for token metadata * @param _newBaseURI The new URI to set as the base URI for token metadata */ function setBaseURI(string calldata _newBaseURI) external onlyOwner { customBaseURI = _newBaseURI; } /** * * Release Payout * @dev Disburse payments to associated payees according to shareholder amount. * @notice A separate wallet can be provided for a "Bank Manager" to control payment release * @param _account Payee wallet address to release payment for */ function release(address payable _account) public virtual { if (_msgSender() == bankManager || _msgSender() == owner()){ splitter.release(_account); } else { revert(); } } // ====== Helper Functions ====== // /** * * Verify Coupon * @dev Verify that the coupon sent was signed by the coupon signer and is a valid coupon * @notice Valid coupons will include coupon signer, type [Presale, Reserve], address, and allotted mints * @notice Returns a boolean value * @param _digest The digest * @param _coupon The coupon */ function _isVerifiedCoupon(bytes32 _digest, Coupon memory _coupon) internal view returns (bool) { address signer = ecrecover(_digest, _coupon.v, _coupon.r, _coupon.s); require(signer != address(0), 'Zero Address'); return signer == couponSigner; } // ====== Minting Functions ====== // /** * * Mint Reserve Tokens * @dev Minting function for tokens held in Reserve * @notice This mint function can only be called by the owner * @param _qty The number of tokens being minted by sender */ function mintReserves(address _to, uint256 _qty) external onlyOwner { // Verify phase is set to Reserve require(phase == SalePhase.Reserve, "Reserve Phase Not Active"); // Verify available supply has not been exceeded require(reserveMintCounter.current() + _qty < maxReserveSupply + 1, "Exceeded Max Reserve Supply"); // Update Counter for (uint256 i = 0; i < _qty; i++) { reserveMintCounter.increment(); } // Mint Tokens _mint(_to, _qty, "", true); } /** * * Mint Public Sale Tokens * @dev Minting function for tokens available during the Public Sale phase * @param _qty The number of tokens being minted by sender */ function mint(uint256 _qty) external payable { // Check for Buy 5 Get 1 Deal uint256 mintQty; if (_qty == 5) { mintQty = 6; } else { mintQty = _qty; } // Verify phase is set to Public Sale require(phase == SalePhase.PublicSale, "Public Sale Not Active"); // Verify available supply has not been exceeded require(supplyMintCounter.current() + mintQty < maxPublicSupply + 1, "Exceeded Max Supply"); // Verify quantity minted has not exceed max allowed per transaction require(_qty < maxPerTx + 1, "Exceeded Max Per Transaction"); // Verify Payment require(msg.value == mintPrice * _qty, "Incorrect Payment"); // Update Counter for (uint256 i = 0; i < mintQty; i++) { supplyMintCounter.increment(); } // Mint Tokens _mint(_msgSender(), mintQty, "", true); // Split Payment payable(splitter).transfer(msg.value); } /** * * Mint Whitelist Tokens * @dev Minting function for tokens available during the Whitelist phase * @notice Minting Whitelist tokens requires a valid coupon, associated with wallet and allotted amount * @param _qty The number of tokens being minted by sender * @param _allotted The allotted number of tokens specified in the Whitelist Coupon * @param _coupon The signed coupon */ function mintWhitelist(uint256 _qty, uint256 _allotted, Coupon memory _coupon) external { // Verify phase is not locked require(phase == SalePhase.Whitelist, "Whitelist Not Active"); // Create digest to verify against signed coupon bytes32 digest = keccak256( abi.encode(CouponType.Whitelist, _allotted, _msgSender()) ); // Verify digest against signed coupon require(_isVerifiedCoupon(digest,_coupon), "Invalid Coupon"); // Verify quantity (including already minted reserves) does not exceed allotted reserve amount require(_qty + addressToMinted[_msgSender()]._whitelistMintsByAddress < _allotted + 1, "Exceeds Max Allotted"); // Increment number of whitelist tokens minted by wallet addressToMinted[_msgSender()]._whitelistMintsByAddress += _qty; // Mint Reserve Tokens _mint(_msgSender(), _qty, "", true); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerQueryForNonexistentToken(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr && curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (safe && to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex != end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex != end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev This is equivalent to _burn(tokenId, false) */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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 // 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); }
{ "optimizer": { "enabled": true, "runs": 10000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_customBaseURI","type":"string"},{"internalType":"address","name":"_couponSigner","type":"address"},{"internalType":"address","name":"_bankManager","type":"address"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressToMinted","outputs":[{"internalType":"uint256","name":"_whitelistMintsByAddress","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bankManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"couponSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"maxPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPublicSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxReserveSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWhitelistSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_qty","type":"uint256"}],"name":"mintReserves","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_qty","type":"uint256"},{"internalType":"uint256","name":"_allotted","type":"uint256"},{"components":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"internalType":"struct Atmospace.Coupon","name":"_coupon","type":"tuple"}],"name":"mintWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phase","outputs":[{"internalType":"enum Atmospace.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"nonpayable","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":"nonpayable","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":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_couponSigner","type":"address"}],"name":"setCouponSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerTx","type":"uint256"}],"name":"setMaxPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPublicSupply","type":"uint256"}],"name":"setMaxPublicSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxReserveSupply","type":"uint256"}],"name":"setMaxReserveSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxWhitelistSupply","type":"uint256"}],"name":"setMaxWhitelistSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum Atmospace.SalePhase","name":"_phase","type":"uint8"}],"name":"setSalePhase","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052611b58600c55610bb8600d556064600e556005600f5566470de4df8200006010556012805460ff191690553480156200003c57600080fd5b506040516200470c3803806200470c8339810160408190526200005f91620003f3565b604080518082018252600981526841746d6f737061636560b81b60208083019182528351808501909452600484526341544d4f60e01b908401528151919291620000ac91600291620001d5565b508051620000c2906003906020840190620001d5565b50506000805550620000d43362000183565b8451620000e9906009906020880190620001d5565b50600a80546001600160a01b038087166001600160a01b031992831617909255600b805492861692909116919091179055604051829082906200012c9062000264565b6200013992919062000525565b604051809103906000f08015801562000156573d6000803e3d6000fd5b50601680546001600160a01b0319166001600160a01b039290921691909117905550620005ea9350505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001e390620005ad565b90600052602060002090601f01602090048101928262000207576000855562000252565b82601f106200022257805160ff191683800117855562000252565b8280016001018555821562000252579182015b828111156200025257825182559160200191906001019062000235565b506200026092915062000272565b5090565b61154180620031cb83390190565b5b8082111562000260576000815560010162000273565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620002ca57620002ca62000289565b604052919050565b80516001600160a01b0381168114620002ea57600080fd5b919050565b60006001600160401b038211156200030b576200030b62000289565b5060051b60200190565b600082601f8301126200032757600080fd5b81516020620003406200033a83620002ef565b6200029f565b82815260059290921b840181019181810190868411156200036057600080fd5b8286015b8481101562000386576200037881620002d2565b835291830191830162000364565b509695505050505050565b600082601f830112620003a357600080fd5b81516020620003b66200033a83620002ef565b82815260059290921b84018101918181019086841115620003d657600080fd5b8286015b84811015620003865780518352918301918301620003da565b600080600080600060a086880312156200040c57600080fd5b85516001600160401b03808211156200042457600080fd5b818801915088601f8301126200043957600080fd5b8151818111156200044e576200044e62000289565b602062000464601f8301601f191682016200029f565b8281528b828487010111156200047957600080fd5b60005b83811015620004995785810183015182820184015282016200047c565b83811115620004ab5760008385840101525b509850620004bb8a8201620002d2565b97505050620004cd60408901620002d2565b94506060880151915080821115620004e457600080fd5b620004f289838a0162000315565b935060808801519150808211156200050957600080fd5b50620005188882890162000391565b9150509295509295909350565b604080825283519082018190526000906020906060840190828701845b82811015620005695781516001600160a01b03168452928401929084019060010162000542565b5050508381038285015284518082528583019183019060005b81811015620005a05783518352928401929184019160010162000582565b5090979650505050505050565b600181811c90821680620005c257607f821691505b60208210811415620005e457634e487b7160e01b600052602260045260246000fd5b50919050565b612bd180620005fa6000396000f3fe6080604052600436106102a05760003560e01c8063889a3f191161016e578063c6f6f216116100cb578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b1461073e578063f4a0a5281461075e578063f968adbe1461077e57600080fd5b8063e985e9c5146106d5578063e9e2990e1461071e57600080fd5b8063caaaf69f116100b0578063caaaf69f1461067f578063cffb47cf1461069f578063e5bcf063146106b557600080fd5b8063c6f6f2161461063f578063c87b56dd1461065f57600080fd5b80639ec00c9511610122578063a22cb46511610107578063a22cb465146105d8578063b1c9fe6e146105f8578063b88d4fde1461061f57600080fd5b80639ec00c9514610598578063a0712d68146105c557600080fd5b8063953f049d11610153578063953f049d1461054d57806395d89b41146105635780639b1a51731461057857600080fd5b8063889a3f191461051a5780638da5cb5b1461052f57600080fd5b806337eaafa51161021c5780636352211e116101d057806370a08231116101b557806370a08231146104c5578063715018a6146104e55780637ad59431146104fa57600080fd5b80636352211e1461048f5780636817c76c146104af57600080fd5b806354e5c18c1161020157806354e5c18c1461042f57806355f804b31461044f5780635fe95a301461046f57600080fd5b806337eaafa5146103ef57806342842e0e1461040f57600080fd5b806318160ddd116102735780631ea11179116102585780631ea111791461039957806323b872dd146103b957806326a74d8e146103d957600080fd5b806318160ddd14610356578063191655871461037957600080fd5b806301ffc9a7146102a557806306fdde03146102da578063081812fc146102fc578063095ea7b314610334575b600080fd5b3480156102b157600080fd5b506102c56102c0366004612480565b610794565b60405190151581526020015b60405180910390f35b3480156102e657600080fd5b506102ef610879565b6040516102d19190612513565b34801561030857600080fd5b5061031c610317366004612526565b61090b565b6040516001600160a01b0390911681526020016102d1565b34801561034057600080fd5b5061035461034f366004612554565b610968565b005b34801561036257600080fd5b50600154600054035b6040519081526020016102d1565b34801561038557600080fd5b50610354610394366004612580565b610a28565b3480156103a557600080fd5b50600a5461031c906001600160a01b031681565b3480156103c557600080fd5b506103546103d436600461259d565b610ad7565b3480156103e557600080fd5b5061036b600c5481565b3480156103fb57600080fd5b5061035461040a366004612554565b610ae2565b34801561041b57600080fd5b5061035461042a36600461259d565b610c62565b34801561043b57600080fd5b5061035461044a366004612526565b610c7d565b34801561045b57600080fd5b5061035461046a3660046125de565b610cdc565b34801561047b57600080fd5b5061035461048a3660046126ce565b610d42565b34801561049b57600080fd5b5061031c6104aa366004612526565b610ee6565b3480156104bb57600080fd5b5061036b60105481565b3480156104d157600080fd5b5061036b6104e0366004612580565b610ef8565b3480156104f157600080fd5b50610354610f60565b34801561050657600080fd5b5061035461051536600461277c565b610fc6565b34801561052657600080fd5b506102ef611065565b34801561053b57600080fd5b506008546001600160a01b031661031c565b34801561055957600080fd5b5061036b600d5481565b34801561056f57600080fd5b506102ef6110f3565b34801561058457600080fd5b50610354610593366004612580565b611102565b3480156105a457600080fd5b5061036b6105b3366004612580565b60116020526000908152604090205481565b6103546105d3366004612526565b611196565b3480156105e457600080fd5b506103546105f336600461279d565b6113ba565b34801561060457600080fd5b506012546106129060ff1681565b6040516102d1919061280a565b34801561062b57600080fd5b5061035461063a366004612824565b611487565b34801561064b57600080fd5b5061035461065a366004612526565b6114eb565b34801561066b57600080fd5b506102ef61067a366004612526565b61154a565b34801561068b57600080fd5b5061035461069a366004612526565b6115e8565b3480156106ab57600080fd5b5061036b600e5481565b3480156106c157600080fd5b506103546106d0366004612526565b611647565b3480156106e157600080fd5b506102c56106f0366004612906565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561072a57600080fd5b50600b5461031c906001600160a01b031681565b34801561074a57600080fd5b50610354610759366004612580565b6116a6565b34801561076a57600080fd5b50610354610779366004612526565b611785565b34801561078a57600080fd5b5061036b600f5481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061082757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60606002805461088890612934565b80601f01602080910402602001604051908101604052809291908181526020018280546108b490612934565b80156109015780601f106108d657610100808354040283529160200191610901565b820191906000526020600020905b8154815290600101906020018083116108e457829003601f168201915b5050505050905090565b6000610916826117e4565b61094c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061097382610ee6565b9050806001600160a01b0316836001600160a01b031614156109c1576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216148015906109e157506109df81336106f0565b155b15610a18576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a23838383611828565b505050565b600b546001600160a01b0316336001600160a01b03161480610a5457506008546001600160a01b031633145b156102a0576016546040517f191655870000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b5050505050565b50565b610a2383838361189c565b6008546001600160a01b03163314610b415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600160125460ff166003811115610b5a57610b5a6127db565b14610ba75760405162461bcd60e51b815260206004820152601860248201527f52657365727665205068617365204e6f742041637469766500000000000000006044820152606401610b38565b600e54610bb59060016129b7565b81610bbf60145490565b610bc991906129b7565b10610c165760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564204d6178205265736572766520537570706c7900000000006044820152606401610b38565b60005b81811015610c4157610c2f601480546001019055565b80610c39816129cf565b915050610c19565b50610c5e8282604051806020016040528060008152506001611b5e565b5050565b610a2383838360405180602001604052806000815250611487565b6008546001600160a01b03163314610cd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600d55565b6008546001600160a01b03163314610d365760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b610a236009838361239b565b600360125460ff166003811115610d5b57610d5b6127db565b14610da85760405162461bcd60e51b815260206004820152601460248201527f57686974656c697374204e6f74204163746976650000000000000000000000006044820152606401610b38565b6000808333604051602001610dbf93929190612a08565b604051602081830303815290604052805190602001209050610de18183611dca565b610e2d5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420436f75706f6e0000000000000000000000000000000000006044820152606401610b38565b610e388360016129b7565b33600090815260116020526040902054610e5290866129b7565b10610e9f5760405162461bcd60e51b815260206004820152601460248201527f45786365656473204d617820416c6c6f747465640000000000000000000000006044820152606401610b38565b3360009081526011602052604081208054869290610ebe9084906129b7565b90915550610ee090503385604051806020016040528060008152506001611b5e565b50505050565b6000610ef182611ed0565b5192915050565b60006001600160a01b038216610f3a576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610fba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b610fc46000612077565b565b6008546001600160a01b031633146110205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b601280548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561105d5761105d6127db565b021790555050565b6009805461107290612934565b80601f016020809104026020016040519081016040528092919081815260200182805461109e90612934565b80156110eb5780601f106110c0576101008083540402835291602001916110eb565b820191906000526020600020905b8154815290600101906020018083116110ce57829003601f168201915b505050505081565b60606003805461088890612934565b6008546001600160a01b0316331461115c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600081600514156111a9575060066111ac565b50805b600260125460ff1660038111156111c5576111c56127db565b146112125760405162461bcd60e51b815260206004820152601660248201527f5075626c69632053616c65204e6f7420416374697665000000000000000000006044820152606401610b38565b600c546112209060016129b7565b8161122a60135490565b61123491906129b7565b106112815760405162461bcd60e51b815260206004820152601360248201527f4578636565646564204d617820537570706c79000000000000000000000000006044820152606401610b38565b600f5461128f9060016129b7565b82106112dd5760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564204d617820506572205472616e73616374696f6e000000006044820152606401610b38565b816010546112eb9190612a39565b34146113395760405162461bcd60e51b815260206004820152601160248201527f496e636f7272656374205061796d656e740000000000000000000000000000006044820152606401610b38565b60005b8181101561136457611352601380546001019055565b8061135c816129cf565b91505061133c565b506113813382604051806020016040528060008152506001611b5e565b6016546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610a23573d6000803e3d6000fd5b6001600160a01b0382163314156113fd576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61149284848461189c565b6001600160a01b0383163b151580156114b457506114b2848484846120e1565b155b15610ee0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008546001600160a01b031633146115455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600f55565b6060611555826117e4565b61158b576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061159561225a565b90508051600014156115b657604051806020016040528060008152506115e1565b806115c084612269565b6040516020016115d1929190612a76565b6040516020818303038152906040525b9392505050565b6008546001600160a01b031633146116425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600e55565b6008546001600160a01b031633146116a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600c55565b6008546001600160a01b031633146117005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b6001600160a01b03811661177c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b38565b610ad481612077565b6008546001600160a01b031633146117df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b601055565b60008054821080156108735750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000900460ff161590565b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006118a782611ed0565b9050836001600160a01b031681600001516001600160a01b0316146118f8576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480611916575061191685336106f0565b806119315750336119268461090b565b6001600160a01b0316145b90508061196a576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166119aa576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b660008487611828565b6001600160a01b03858116600090815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff9283167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080547fffffffff00000000000000000000000000000000000000000000000000000000169094177401000000000000000000000000000000000000000042909216919091021783558701808452922080549193909116611b13576000548214611b13578054602086015167ffffffffffffffff1674010000000000000000000000000000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b6000546001600160a01b038516611ba1576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83611bd8576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168c01811690920217909155858452600490925290912080547fffffffff000000000000000000000000000000000000000000000000000000001690921774010000000000000000000000000000000000000000429092169190910217905580808501838015611cd957506001600160a01b0387163b15155b15611d7b575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611d2a60008884806001019550886120e1565b611d60576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80821415611cdf578260005414611d7657600080fd5b611dc1565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415611d7c575b50600055610acd565b60008060018484604001518560000151866020015160405160008152602001604052604051611e15949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611e37573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b038116611eb85760405162461bcd60e51b815260206004820152600c60248201527f5a65726f204164647265737300000000000000000000000000000000000000006044820152606401610b38565b600a546001600160a01b039081169116149392505050565b60408051606081018252600080825260208201819052918101919091528160005481101561204557600081815260046020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161515918101829052906120435780516001600160a01b031615611f91579392505050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260046020908152604091829020825160608101845290546001600160a01b03811680835274010000000000000000000000000000000000000000820467ffffffffffffffff16938301939093527c0100000000000000000000000000000000000000000000000000000000900460ff161515928101929092521561203e579392505050565b611f91565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a029061212f903390899088908890600401612aa5565b602060405180830381600087803b15801561214957600080fd5b505af1925050508015612197575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261219491810190612ae1565b60015b61220b573d8080156121c5576040519150601f19603f3d011682016040523d82523d6000602084013e6121ca565b606091505b508051612203576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b60606009805461088890612934565b6060816122a957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156122d357806122bd816129cf565b91506122cc9050600a83612b2d565b91506122ad565b60008167ffffffffffffffff8111156122ee576122ee612650565b6040519080825280601f01601f191660200182016040528015612318576020820181803683370190505b5090505b84156122525761232d600183612b41565b915061233a600a86612b58565b6123459060306129b7565b60f81b81838151811061235a5761235a612b6c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612394600a86612b2d565b945061231c565b8280546123a790612934565b90600052602060002090601f0160209004810192826123c9576000855561242d565b82601f10612400578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082351617855561242d565b8280016001018555821561242d579182015b8281111561242d578235825591602001919060010190612412565b5061243992915061243d565b5090565b5b80821115612439576000815560010161243e565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610ad457600080fd5b60006020828403121561249257600080fd5b81356115e181612452565b60005b838110156124b85781810151838201526020016124a0565b83811115610ee05750506000910152565b600081518084526124e181602086016020860161249d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115e160208301846124c9565b60006020828403121561253857600080fd5b5035919050565b6001600160a01b0381168114610ad457600080fd5b6000806040838503121561256757600080fd5b82356125728161253f565b946020939093013593505050565b60006020828403121561259257600080fd5b81356115e18161253f565b6000806000606084860312156125b257600080fd5b83356125bd8161253f565b925060208401356125cd8161253f565b929592945050506040919091013590565b600080602083850312156125f157600080fd5b823567ffffffffffffffff8082111561260957600080fd5b818501915085601f83011261261d57600080fd5b81358181111561262c57600080fd5b86602082850101111561263e57600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156126c6576126c6612650565b604052919050565b600080600083850360a08112156126e457600080fd5b843593506020850135925060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08201121561271f57600080fd5b506040516060810181811067ffffffffffffffff8211171561274357612743612650565b6040908152850135815260608501356020820152608085013560ff8116811461276b57600080fd5b604082015292959194509192509050565b60006020828403121561278e57600080fd5b8135600481106115e157600080fd5b600080604083850312156127b057600080fd5b82356127bb8161253f565b9150602083013580151581146127d057600080fd5b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016004831061281e5761281e6127db565b91905290565b6000806000806080858703121561283a57600080fd5b84356128458161253f565b93506020858101356128568161253f565b935060408601359250606086013567ffffffffffffffff8082111561287a57600080fd5b818801915088601f83011261288e57600080fd5b8135818111156128a0576128a0612650565b6128d0847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161267f565b915080825289848285010111156128e657600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000806040838503121561291957600080fd5b82356129248161253f565b915060208301356127d08161253f565b600181811c9082168061294857607f821691505b60208210811415612982577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156129ca576129ca612988565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612a0157612a01612988565b5060010190565b6060810160018510612a1c57612a1c6127db565b93815260208101929092526001600160a01b031660409091015290565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a7157612a71612988565b500290565b60008351612a8881846020880161249d565b835190830190612a9c81836020880161249d565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ad760808301846124c9565b9695505050505050565b600060208284031215612af357600080fd5b81516115e181612452565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612b3c57612b3c612afe565b500490565b600082821015612b5357612b53612988565b500390565b600082612b6757612b67612afe565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220cd0a9f8c9786f1d4c98aa318421d31b54b2a58b660f0c2ca69fc2416d7a92dad64736f6c634300080900336080604052604051620015413803806200154183398101604081905262000026916200042e565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b82518110156200015757620001428382815181106200011157620001116200050c565b60200260200101518383815181106200012e576200012e6200050c565b60200260200101516200016060201b60201c565b806200014e8162000538565b915050620000ee565b50505062000571565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000556565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038d576200038d6200034c565b604052919050565b60006001600160401b03821115620003b157620003b16200034c565b5060051b60200190565b600082601f830112620003cd57600080fd5b81516020620003e6620003e08362000395565b62000362565b82815260059290921b840181019181810190868411156200040657600080fd5b8286015b848110156200042357805183529183019183016200040a565b509695505050505050565b600080604083850312156200044257600080fd5b82516001600160401b03808211156200045a57600080fd5b818501915085601f8301126200046f57600080fd5b8151602062000482620003e08362000395565b82815260059290921b84018101918181019089841115620004a257600080fd5b948201945b83861015620004d95785516001600160a01b0381168114620004c95760008081fd5b82529482019490820190620004a7565b91880151919650909350505080821115620004f357600080fd5b506200050285828601620003bb565b9150509250929050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156200054f576200054f62000522565b5060010190565b600082198211156200056c576200056c62000522565b500190565b610fc080620005816000396000f3fe60806040526004361061009a5760003560e01c80638b83209b11610069578063ce7c2ac21161004e578063ce7c2ac214610236578063d79779b214610279578063e33b7de3146102bc57600080fd5b80638b83209b146101ae5780639852595c146101f357600080fd5b806319165587146100f55780633a98ef3914610117578063406072a91461013b57806348b750441461018e57600080fd5b366100f0577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770336040805173ffffffffffffffffffffffffffffffffffffffff90921682523460208301520160405180910390a1005b600080fd5b34801561010157600080fd5b50610115610110366004610d3e565b6102d1565b005b34801561012357600080fd5b506000545b6040519081526020015b60405180910390f35b34801561014757600080fd5b50610128610156366004610d5b565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260066020908152604080832093909416825291909152205490565b34801561019a57600080fd5b506101156101a9366004610d5b565b610518565b3480156101ba57600080fd5b506101ce6101c9366004610d94565b610854565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610132565b3480156101ff57600080fd5b5061012861020e366004610d3e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b34801561024257600080fd5b50610128610251366004610d3e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526002602052604090205490565b34801561028557600080fd5b50610128610294366004610d3e565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b3480156102c857600080fd5b50600154610128565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020526040902054610388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f736861726573000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600061039360015490565b61039d9047610ddc565b905060006103d783836103d28673ffffffffffffffffffffffffffffffffffffffff1660009081526003602052604090205490565b610891565b905080610466576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e74000000000000000000000000000000000000000000606482015260840161037f565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600360205260408120805483929061049b908490610ddc565b9250508190555080600160008282546104b49190610ddc565b909155506104c4905083826108e3565b6040805173ffffffffffffffffffffffffffffffffffffffff85168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600260205260409020546105ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f7368617265730000000000000000000000000000000000000000000000000000606482015260840161037f565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600560205260408120546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8516906370a082319060240160206040518083038186803b15801561065557600080fd5b505afa158015610669573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068d9190610df4565b6106979190610ddc565b905060006106dd83836103d2878773ffffffffffffffffffffffffffffffffffffffff918216600090815260066020908152604080832093909416825291909152205490565b90508061076c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e74000000000000000000000000000000000000000000606482015260840161037f565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600660209081526040808320938716835292905290812080548392906107b0908490610ddc565b909155505073ffffffffffffffffffffffffffffffffffffffff8416600090815260056020526040812080548392906107ea908490610ddc565b909155506107fb9050848483610a42565b6040805173ffffffffffffffffffffffffffffffffffffffff8581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b60006004828154811061086957610869610e0d565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff1692915050565b6000805473ffffffffffffffffffffffffffffffffffffffff85168252600260205260408220548391906108c59086610e3c565b6108cf9190610e79565b6108d99190610eb4565b90505b9392505050565b8047101561094d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161037f565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146109a7576040519150601f19603f3d011682016040523d82523d6000602084013e6109ac565b606091505b5050905080610a3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161037f565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff848116602483015260448083018590528351808403909101815260649092018352602080830180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656490840152610a3d92869291600091610b0d918516908490610bb7565b805190915015610a3d5780806020019051810190610b2b9190610ecb565b610a3d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161037f565b60606108d984846000858573ffffffffffffffffffffffffffffffffffffffff85163b610c40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161037f565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610c699190610f1d565b60006040518083038185875af1925050503d8060008114610ca6576040519150601f19603f3d011682016040523d82523d6000602084013e610cab565b606091505b5091509150610cbb828286610cc6565b979650505050505050565b60608315610cd55750816108dc565b825115610ce55782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161037f9190610f39565b73ffffffffffffffffffffffffffffffffffffffff81168114610d3b57600080fd5b50565b600060208284031215610d5057600080fd5b81356108dc81610d19565b60008060408385031215610d6e57600080fd5b8235610d7981610d19565b91506020830135610d8981610d19565b809150509250929050565b600060208284031215610da657600080fd5b5035919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115610def57610def610dad565b500190565b600060208284031215610e0657600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610e7457610e74610dad565b500290565b600082610eaf577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600082821015610ec657610ec6610dad565b500390565b600060208284031215610edd57600080fd5b815180151581146108dc57600080fd5b60005b83811015610f08578181015183820152602001610ef0565b83811115610f17576000848401525b50505050565b60008251610f2f818460208701610eed565b9190910192915050565b6020815260008251806020840152610f58816040850160208701610eed565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212205fc946813041f317470fced0fc7e90fafcd0e536ed6e0e434df25c36077ccf2964736f6c6343000809003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000008d8e1a0e3263a251dbf36455d6134bd30abd2300000000000000000000000004e5b50a66eb4bfc4ecdf121d916ff5c7f363b609000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5058344a355763554748654b35704b6670376643475777554a3643423239556264647251586f7335396b51322f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000e09d08b01957592387d5abf3f6e331356ebf9ca900000000000000000000000079c1b364acc18e95e3cdfb831959fa19c3c95dba0000000000000000000000004e5b50a66eb4bfc4ecdf121d916ff5c7f363b609000000000000000000000000c7bd77b60ac2e97abef890b08f65328738b626c700000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000028
Deployed Bytecode
0x6080604052600436106102a05760003560e01c8063889a3f191161016e578063c6f6f216116100cb578063e985e9c51161007f578063f2fde38b11610064578063f2fde38b1461073e578063f4a0a5281461075e578063f968adbe1461077e57600080fd5b8063e985e9c5146106d5578063e9e2990e1461071e57600080fd5b8063caaaf69f116100b0578063caaaf69f1461067f578063cffb47cf1461069f578063e5bcf063146106b557600080fd5b8063c6f6f2161461063f578063c87b56dd1461065f57600080fd5b80639ec00c9511610122578063a22cb46511610107578063a22cb465146105d8578063b1c9fe6e146105f8578063b88d4fde1461061f57600080fd5b80639ec00c9514610598578063a0712d68146105c557600080fd5b8063953f049d11610153578063953f049d1461054d57806395d89b41146105635780639b1a51731461057857600080fd5b8063889a3f191461051a5780638da5cb5b1461052f57600080fd5b806337eaafa51161021c5780636352211e116101d057806370a08231116101b557806370a08231146104c5578063715018a6146104e55780637ad59431146104fa57600080fd5b80636352211e1461048f5780636817c76c146104af57600080fd5b806354e5c18c1161020157806354e5c18c1461042f57806355f804b31461044f5780635fe95a301461046f57600080fd5b806337eaafa5146103ef57806342842e0e1461040f57600080fd5b806318160ddd116102735780631ea11179116102585780631ea111791461039957806323b872dd146103b957806326a74d8e146103d957600080fd5b806318160ddd14610356578063191655871461037957600080fd5b806301ffc9a7146102a557806306fdde03146102da578063081812fc146102fc578063095ea7b314610334575b600080fd5b3480156102b157600080fd5b506102c56102c0366004612480565b610794565b60405190151581526020015b60405180910390f35b3480156102e657600080fd5b506102ef610879565b6040516102d19190612513565b34801561030857600080fd5b5061031c610317366004612526565b61090b565b6040516001600160a01b0390911681526020016102d1565b34801561034057600080fd5b5061035461034f366004612554565b610968565b005b34801561036257600080fd5b50600154600054035b6040519081526020016102d1565b34801561038557600080fd5b50610354610394366004612580565b610a28565b3480156103a557600080fd5b50600a5461031c906001600160a01b031681565b3480156103c557600080fd5b506103546103d436600461259d565b610ad7565b3480156103e557600080fd5b5061036b600c5481565b3480156103fb57600080fd5b5061035461040a366004612554565b610ae2565b34801561041b57600080fd5b5061035461042a36600461259d565b610c62565b34801561043b57600080fd5b5061035461044a366004612526565b610c7d565b34801561045b57600080fd5b5061035461046a3660046125de565b610cdc565b34801561047b57600080fd5b5061035461048a3660046126ce565b610d42565b34801561049b57600080fd5b5061031c6104aa366004612526565b610ee6565b3480156104bb57600080fd5b5061036b60105481565b3480156104d157600080fd5b5061036b6104e0366004612580565b610ef8565b3480156104f157600080fd5b50610354610f60565b34801561050657600080fd5b5061035461051536600461277c565b610fc6565b34801561052657600080fd5b506102ef611065565b34801561053b57600080fd5b506008546001600160a01b031661031c565b34801561055957600080fd5b5061036b600d5481565b34801561056f57600080fd5b506102ef6110f3565b34801561058457600080fd5b50610354610593366004612580565b611102565b3480156105a457600080fd5b5061036b6105b3366004612580565b60116020526000908152604090205481565b6103546105d3366004612526565b611196565b3480156105e457600080fd5b506103546105f336600461279d565b6113ba565b34801561060457600080fd5b506012546106129060ff1681565b6040516102d1919061280a565b34801561062b57600080fd5b5061035461063a366004612824565b611487565b34801561064b57600080fd5b5061035461065a366004612526565b6114eb565b34801561066b57600080fd5b506102ef61067a366004612526565b61154a565b34801561068b57600080fd5b5061035461069a366004612526565b6115e8565b3480156106ab57600080fd5b5061036b600e5481565b3480156106c157600080fd5b506103546106d0366004612526565b611647565b3480156106e157600080fd5b506102c56106f0366004612906565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561072a57600080fd5b50600b5461031c906001600160a01b031681565b34801561074a57600080fd5b50610354610759366004612580565b6116a6565b34801561076a57600080fd5b50610354610779366004612526565b611785565b34801561078a57600080fd5b5061036b600f5481565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061082757507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087357507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b60606002805461088890612934565b80601f01602080910402602001604051908101604052809291908181526020018280546108b490612934565b80156109015780601f106108d657610100808354040283529160200191610901565b820191906000526020600020905b8154815290600101906020018083116108e457829003601f168201915b5050505050905090565b6000610916826117e4565b61094c576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b600061097382610ee6565b9050806001600160a01b0316836001600160a01b031614156109c1576040517f943f7b8c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b038216148015906109e157506109df81336106f0565b155b15610a18576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a23838383611828565b505050565b600b546001600160a01b0316336001600160a01b03161480610a5457506008546001600160a01b031633145b156102a0576016546040517f191655870000000000000000000000000000000000000000000000000000000081526001600160a01b03838116600483015290911690631916558790602401600060405180830381600087803b158015610ab957600080fd5b505af1158015610acd573d6000803e3d6000fd5b5050505050565b50565b610a2383838361189c565b6008546001600160a01b03163314610b415760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600160125460ff166003811115610b5a57610b5a6127db565b14610ba75760405162461bcd60e51b815260206004820152601860248201527f52657365727665205068617365204e6f742041637469766500000000000000006044820152606401610b38565b600e54610bb59060016129b7565b81610bbf60145490565b610bc991906129b7565b10610c165760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564204d6178205265736572766520537570706c7900000000006044820152606401610b38565b60005b81811015610c4157610c2f601480546001019055565b80610c39816129cf565b915050610c19565b50610c5e8282604051806020016040528060008152506001611b5e565b5050565b610a2383838360405180602001604052806000815250611487565b6008546001600160a01b03163314610cd75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600d55565b6008546001600160a01b03163314610d365760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b610a236009838361239b565b600360125460ff166003811115610d5b57610d5b6127db565b14610da85760405162461bcd60e51b815260206004820152601460248201527f57686974656c697374204e6f74204163746976650000000000000000000000006044820152606401610b38565b6000808333604051602001610dbf93929190612a08565b604051602081830303815290604052805190602001209050610de18183611dca565b610e2d5760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420436f75706f6e0000000000000000000000000000000000006044820152606401610b38565b610e388360016129b7565b33600090815260116020526040902054610e5290866129b7565b10610e9f5760405162461bcd60e51b815260206004820152601460248201527f45786365656473204d617820416c6c6f747465640000000000000000000000006044820152606401610b38565b3360009081526011602052604081208054869290610ebe9084906129b7565b90915550610ee090503385604051806020016040528060008152506001611b5e565b50505050565b6000610ef182611ed0565b5192915050565b60006001600160a01b038216610f3a576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b03163314610fba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b610fc46000612077565b565b6008546001600160a01b031633146110205760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b601280548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561105d5761105d6127db565b021790555050565b6009805461107290612934565b80601f016020809104026020016040519081016040528092919081815260200182805461109e90612934565b80156110eb5780601f106110c0576101008083540402835291602001916110eb565b820191906000526020600020905b8154815290600101906020018083116110ce57829003601f168201915b505050505081565b60606003805461088890612934565b6008546001600160a01b0316331461115c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600a80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600081600514156111a9575060066111ac565b50805b600260125460ff1660038111156111c5576111c56127db565b146112125760405162461bcd60e51b815260206004820152601660248201527f5075626c69632053616c65204e6f7420416374697665000000000000000000006044820152606401610b38565b600c546112209060016129b7565b8161122a60135490565b61123491906129b7565b106112815760405162461bcd60e51b815260206004820152601360248201527f4578636565646564204d617820537570706c79000000000000000000000000006044820152606401610b38565b600f5461128f9060016129b7565b82106112dd5760405162461bcd60e51b815260206004820152601c60248201527f4578636565646564204d617820506572205472616e73616374696f6e000000006044820152606401610b38565b816010546112eb9190612a39565b34146113395760405162461bcd60e51b815260206004820152601160248201527f496e636f7272656374205061796d656e740000000000000000000000000000006044820152606401610b38565b60005b8181101561136457611352601380546001019055565b8061135c816129cf565b91505061133c565b506113813382604051806020016040528060008152506001611b5e565b6016546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610a23573d6000803e3d6000fd5b6001600160a01b0382163314156113fd576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b61149284848461189c565b6001600160a01b0383163b151580156114b457506114b2848484846120e1565b155b15610ee0576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6008546001600160a01b031633146115455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600f55565b6060611555826117e4565b61158b576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061159561225a565b90508051600014156115b657604051806020016040528060008152506115e1565b806115c084612269565b6040516020016115d1929190612a76565b6040516020818303038152906040525b9392505050565b6008546001600160a01b031633146116425760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600e55565b6008546001600160a01b031633146116a15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b600c55565b6008546001600160a01b031633146117005760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b6001600160a01b03811661177c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b38565b610ad481612077565b6008546001600160a01b031633146117df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b38565b601055565b60008054821080156108735750506000908152600460205260409020547c0100000000000000000000000000000000000000000000000000000000900460ff161590565b60008281526006602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006118a782611ed0565b9050836001600160a01b031681600001516001600160a01b0316146118f8576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000336001600160a01b0386161480611916575061191685336106f0565b806119315750336119268461090b565b6001600160a01b0316145b90508061196a576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0384166119aa576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b660008487611828565b6001600160a01b03858116600090815260056020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000080821667ffffffffffffffff9283167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01831617909255898616808652838620805493841693831660019081018416949094179055898652600490945282852080547fffffffff00000000000000000000000000000000000000000000000000000000169094177401000000000000000000000000000000000000000042909216919091021783558701808452922080549193909116611b13576000548214611b13578054602086015167ffffffffffffffff1674010000000000000000000000000000000000000000027fffffffff000000000000000000000000000000000000000000000000000000009091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b6000546001600160a01b038516611ba1576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83611bd8576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516600081815260056020908152604080832080547fffffffffffffffffffffffffffffffff00000000000000000000000000000000811667ffffffffffffffff8083168c018116918217680100000000000000007fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000090941690921783900481168c01811690920217909155858452600490925290912080547fffffffff000000000000000000000000000000000000000000000000000000001690921774010000000000000000000000000000000000000000429092169190910217905580808501838015611cd957506001600160a01b0387163b15155b15611d7b575b60405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611d2a60008884806001019550886120e1565b611d60576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80821415611cdf578260005414611d7657600080fd5b611dc1565b5b6040516001830192906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a480821415611d7c575b50600055610acd565b60008060018484604001518560000151866020015160405160008152602001604052604051611e15949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611e37573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001519150506001600160a01b038116611eb85760405162461bcd60e51b815260206004820152600c60248201527f5a65726f204164647265737300000000000000000000000000000000000000006044820152606401610b38565b600a546001600160a01b039081169116149392505050565b60408051606081018252600080825260208201819052918101919091528160005481101561204557600081815260046020908152604091829020825160608101845290546001600160a01b038116825274010000000000000000000000000000000000000000810467ffffffffffffffff16928201929092527c010000000000000000000000000000000000000000000000000000000090910460ff161515918101829052906120435780516001600160a01b031615611f91579392505050565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01600081815260046020908152604091829020825160608101845290546001600160a01b03811680835274010000000000000000000000000000000000000000820467ffffffffffffffff16938301939093527c0100000000000000000000000000000000000000000000000000000000900460ff161515928101929092521561203e579392505050565b611f91565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600880546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040517f150b7a020000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063150b7a029061212f903390899088908890600401612aa5565b602060405180830381600087803b15801561214957600080fd5b505af1925050508015612197575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261219491810190612ae1565b60015b61220b573d8080156121c5576040519150601f19603f3d011682016040523d82523d6000602084013e6121ca565b606091505b508051612203576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490505b949350505050565b60606009805461088890612934565b6060816122a957505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b81156122d357806122bd816129cf565b91506122cc9050600a83612b2d565b91506122ad565b60008167ffffffffffffffff8111156122ee576122ee612650565b6040519080825280601f01601f191660200182016040528015612318576020820181803683370190505b5090505b84156122525761232d600183612b41565b915061233a600a86612b58565b6123459060306129b7565b60f81b81838151811061235a5761235a612b6c565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612394600a86612b2d565b945061231c565b8280546123a790612934565b90600052602060002090601f0160209004810192826123c9576000855561242d565b82601f10612400578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082351617855561242d565b8280016001018555821561242d579182015b8281111561242d578235825591602001919060010190612412565b5061243992915061243d565b5090565b5b80821115612439576000815560010161243e565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610ad457600080fd5b60006020828403121561249257600080fd5b81356115e181612452565b60005b838110156124b85781810151838201526020016124a0565b83811115610ee05750506000910152565b600081518084526124e181602086016020860161249d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006115e160208301846124c9565b60006020828403121561253857600080fd5b5035919050565b6001600160a01b0381168114610ad457600080fd5b6000806040838503121561256757600080fd5b82356125728161253f565b946020939093013593505050565b60006020828403121561259257600080fd5b81356115e18161253f565b6000806000606084860312156125b257600080fd5b83356125bd8161253f565b925060208401356125cd8161253f565b929592945050506040919091013590565b600080602083850312156125f157600080fd5b823567ffffffffffffffff8082111561260957600080fd5b818501915085601f83011261261d57600080fd5b81358181111561262c57600080fd5b86602082850101111561263e57600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156126c6576126c6612650565b604052919050565b600080600083850360a08112156126e457600080fd5b843593506020850135925060607fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08201121561271f57600080fd5b506040516060810181811067ffffffffffffffff8211171561274357612743612650565b6040908152850135815260608501356020820152608085013560ff8116811461276b57600080fd5b604082015292959194509192509050565b60006020828403121561278e57600080fd5b8135600481106115e157600080fd5b600080604083850312156127b057600080fd5b82356127bb8161253f565b9150602083013580151581146127d057600080fd5b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b602081016004831061281e5761281e6127db565b91905290565b6000806000806080858703121561283a57600080fd5b84356128458161253f565b93506020858101356128568161253f565b935060408601359250606086013567ffffffffffffffff8082111561287a57600080fd5b818801915088601f83011261288e57600080fd5b8135818111156128a0576128a0612650565b6128d0847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161267f565b915080825289848285010111156128e657600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000806040838503121561291957600080fd5b82356129248161253f565b915060208301356127d08161253f565b600181811c9082168061294857607f821691505b60208210811415612982577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156129ca576129ca612988565b500190565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612a0157612a01612988565b5060010190565b6060810160018510612a1c57612a1c6127db565b93815260208101929092526001600160a01b031660409091015290565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612a7157612a71612988565b500290565b60008351612a8881846020880161249d565b835190830190612a9c81836020880161249d565b01949350505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612ad760808301846124c9565b9695505050505050565b600060208284031215612af357600080fd5b81516115e181612452565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082612b3c57612b3c612afe565b500490565b600082821015612b5357612b53612988565b500390565b600082612b6757612b67612afe565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea2646970667358221220cd0a9f8c9786f1d4c98aa318421d31b54b2a58b660f0c2ca69fc2416d7a92dad64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000008d8e1a0e3263a251dbf36455d6134bd30abd2300000000000000000000000004e5b50a66eb4bfc4ecdf121d916ff5c7f363b609000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000005168747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d5058344a355763554748654b35704b6670376643475777554a3643423239556264647251586f7335396b51322f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000e09d08b01957592387d5abf3f6e331356ebf9ca900000000000000000000000079c1b364acc18e95e3cdfb831959fa19c3c95dba0000000000000000000000004e5b50a66eb4bfc4ecdf121d916ff5c7f363b609000000000000000000000000c7bd77b60ac2e97abef890b08f65328738b626c700000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000028
-----Decoded View---------------
Arg [0] : _customBaseURI (string): https://gateway.pinata.cloud/ipfs/QmPX4J5WcUGHeK5pKfp7fCGWwUJ6CB29UbddrQXos59kQ2/
Arg [1] : _couponSigner (address): 0x08D8e1A0E3263A251dbf36455d6134bD30ABD230
Arg [2] : _bankManager (address): 0x4E5b50a66eB4bfc4Ecdf121d916fF5c7f363b609
Arg [3] : _payees (address[]): 0xe09D08b01957592387d5ABf3F6E331356eBF9ca9,0x79c1B364ACC18E95E3cdfB831959FA19c3c95Dba,0x4E5b50a66eB4bfc4Ecdf121d916fF5c7f363b609,0xc7bd77B60ac2E97AbEF890B08F65328738B626C7
Arg [4] : _shares (uint256[]): 20,20,20,40
-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000008d8e1a0e3263a251dbf36455d6134bd30abd230
Arg [2] : 0000000000000000000000004e5b50a66eb4bfc4ecdf121d916ff5c7f363b609
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000051
Arg [6] : 68747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066
Arg [7] : 732f516d5058344a355763554748654b35704b6670376643475777554a364342
Arg [8] : 3239556264647251586f7335396b51322f000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [10] : 000000000000000000000000e09d08b01957592387d5abf3f6e331356ebf9ca9
Arg [11] : 00000000000000000000000079c1b364acc18e95e3cdfb831959fa19c3c95dba
Arg [12] : 0000000000000000000000004e5b50a66eb4bfc4ecdf121d916ff5c7f363b609
Arg [13] : 000000000000000000000000c7bd77b60ac2e97abef890b08f65328738b626c7
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000028
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.