More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,442 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 15834001 | 758 days ago | IN | 0 ETH | 0.00158161 | ||||
Buy | 15537578 | 800 days ago | IN | 0 ETH | 0.00429736 | ||||
Buy | 15356550 | 829 days ago | IN | 0 ETH | 0.00026523 | ||||
Buy | 15354945 | 829 days ago | IN | 0 ETH | 0.00079266 | ||||
Buy | 15354945 | 829 days ago | IN | 0 ETH | 0.00079266 | ||||
Buy | 15354945 | 829 days ago | IN | 0 ETH | 0.00079266 | ||||
Buy | 15354945 | 829 days ago | IN | 0 ETH | 0.00079266 | ||||
Buy | 15353715 | 829 days ago | IN | 0 ETH | 0.00075859 | ||||
Buy | 15352224 | 829 days ago | IN | 0 ETH | 0.00046418 | ||||
Buy | 15352063 | 829 days ago | IN | 0 ETH | 0.00051937 | ||||
Buy | 15352056 | 829 days ago | IN | 0 ETH | 0.00064044 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00066309 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00066309 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00066309 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00066309 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00066309 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070791 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070791 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070791 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070436 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070804 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070804 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070804 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070804 | ||||
Buy | 15352051 | 829 days ago | IN | 0 ETH | 0.00070804 |
Loading...
Loading
Contract Name:
Seller
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "./Collection.sol"; import "./Store.sol"; import "./utils/Structs.sol"; contract Seller is Stoppable { Store store; mapping(address => mapping(uint256 => mapping(address => uint256))) public presaleTokens; mapping(address => uint256) balance; mapping(address => uint256) lastTokenId; mapping(address => mapping(uint256 => uint256)) public sold; event Withdraw(address collection, address owner, uint256 balance); event PaymentReceived( address indexed payer, address collection, uint256 saleId, uint256 quantity, uint256 payment ); event RequestForMint( address indexed payer, address indexed to, address collection, uint256 nonce, uint256 quantity ); modifier validCollection(address _collection) { store.validateCollection(_collection); _; } modifier storeOrCollectionAuthorized(address _collection) { require( store.isAuthorized(msg.sender, _collection), "UNAUTHORIZED: Sender is not authorized" ); _; } constructor(address _store) { store = Store(_store); } function buy( address _collection, uint256 _saleId, address _to, uint256 _qtyAllowed, uint256 _qtyToBuy, bytes32[] calldata _proof, bool _mintL1 ) external payable nonStopped validCollection(_collection) { (bytes32 whitelistRoot, , , uint256 price) = store.sales( _collection, _saleId ); if (whitelistRoot != bytes32(0)) { _verifyPresaleBuy(_collection, _saleId, _qtyToBuy, _qtyAllowed, _proof); presaleTokens[_collection][_saleId][msg.sender] += _qtyToBuy; } require(msg.value >= price * _qtyToBuy, "PAYMENT: Insufficient funds"); balance[_collection] += msg.value; _mintRequest(_collection, _saleId, _to, _qtyToBuy, _mintL1); emit PaymentReceived( msg.sender, _collection, _saleId, _qtyToBuy, msg.value ); } function reserve( address _collection, uint256 _saleId, address[] memory _to, uint256[] memory _qty, bool _mintL1 ) external nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { require( _to.length == _qty.length, "A quantity must be set for each benefited" ); for (uint256 i = 0; i < _to.length; i++) { _mintRequest(_collection, _saleId, _to[i], _qty[i], _mintL1); } } function withdraw(address _collection, address receiver) external nonStopped validCollection(_collection) { require( Collection(_collection).owner() == msg.sender, "Sender is not the owner of the collection" ); uint256 balanceToWithdraw = balance[_collection]; balance[_collection] = 0; payable(receiver).transfer(balanceToWithdraw); emit Withdraw(_collection, msg.sender, balanceToWithdraw); } function verifyPresale( address _collection, uint256 _saleId, address account, uint256 qty, bytes32[] memory proof ) public view nonStopped validCollection(_collection) returns (bool) { return _verify(_collection, _saleId, _leaf(account, qty), proof); } function _mintRequest( address _collection, uint256 _saleId, address _to, uint256 _qty, bool _mintL1 ) internal { _verifyMintRequest(_collection, _saleId, _qty, _mintL1); uint256 initialTokenId = lastTokenId[_collection] + 1; sold[_collection][_saleId] += _qty; lastTokenId[_collection] += _qty; if (_mintL1) { for (uint256 i = initialTokenId; i <= lastTokenId[_collection]; i++) { Collection(_collection).mint(_to, i); } } else { emit RequestForMint(msg.sender, _to, _collection, initialTokenId, _qty); } } function _verify( address _collection, uint256 _saleId, bytes32 leaf, bytes32[] memory proof ) internal view returns (bool) { (bytes32 whitelistRoot, , , ) = store.sales(_collection, _saleId); return MerkleProof.verify(proof, whitelistRoot, leaf); } function _verifyMintRequest( address _collection, uint256 _saleId, uint256 _qtyToBuy, bool _mintL1 ) internal view { (, bool mintL1Authorized) = store.collection(_collection); (, bool active, uint256 supply, ) = store.sales(_collection, _saleId); require(!_mintL1 || mintL1Authorized, "Minting to L1 is not authorized"); require( active || Collection(_collection).owner() == msg.sender, "TRANSACTION: Sale is not active" ); require( _qtyToBuy + sold[_collection][_saleId] <= supply, "SUPPLY: Value exceeds supply" ); } function _verifyPresaleBuy( address _collection, uint256 _saleId, uint256 _qtyToBuy, uint256 _qtyAllowed, bytes32[] calldata _proof ) internal view { require( verifyPresale(_collection, _saleId, msg.sender, _qtyAllowed, _proof), "TRANSACTION: Invalid proof" ); require( presaleTokens[_collection][_saleId][msg.sender] + _qtyToBuy <= _qtyAllowed, "TRANSACTION: More than allowed" ); } function _leaf(address account, uint256 qty) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account, qty)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./utils/Parsing.sol"; import "./features/AuthorizableUpgradeable.sol"; contract Collection is ERC721Upgradeable, AuthorizableUpgradeable { using StringsUpgradeable for uint256; uint256 public supply; string public baseTokenURI; mapping(uint256 => string) private _tokenURIs; event AssetMinted(address to, uint256 id); function init( string memory _name, string memory _symbol, string memory _baseTokenURI, address _seller, uint256 _supply, address[] memory _authorized, address _owner ) public initializer { __ERC721_init(_name, _symbol); __Ownable_init(); supply = _supply; for (uint256 i = 0; i < _authorized.length; i++) { authorize(_authorized[i], true); } authorize(_seller, true); authorize(_owner, true); baseTokenURI = _baseTokenURI; transferOwnership(_owner); } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); return _calculateTokenURI(_tokenId); } function mintFor( address _user, uint256 _quantity, bytes calldata _mintingBlob ) external onlyAuthorized { require(_quantity == 1, "Mintable: invalid quantity"); uint256 id = Parsing.getTokenId(_mintingBlob); mint(_user, id); } function mint(address _user, uint256 _id) public onlyAuthorized { _safeMint(_user, _id); emit AssetMinted(_user, _id); } function _calculateTokenURI(uint256 _tokenId) internal view returns (string memory) { return string(abi.encodePacked(baseTokenURI, "/", Strings.toString(_tokenId))); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./Factory.sol"; import "./Collection.sol"; import "./features/Authorizable.sol"; import "./features/Stoppable.sol"; import "./utils/Parsing.sol"; import "./utils/Structs.sol"; struct CollectionStatus { bool isBlacklisted; bool mintL1Authorized; } contract Store is Stoppable, Authorizable { Factory public factory; mapping(address => CollectionStatus) public collection; mapping(address => Sale[]) public sales; event SalesAdded(address collection, Sale[] sales); event CollectionAdded(address collection); event PriceChanged( address collection, uint256 saleId, uint256 oldValue, uint256 newValue ); event SupplyChanged( address collection, uint256 saleId, uint256 oldValue, uint256 newValue ); event WhitelistChanged( address collection, uint256 saleId, bytes32 oldValue, bytes32 newValue ); event CollectionBlacklisted(address collection, bool blacklisted); modifier storeOrCollectionAuthorized(address _collection) { require( isAuthorized(msg.sender, _collection), "UNAUTHORIZED: Sender is not authorized" ); _; } modifier validCollection(address _collection) { validateCollection(_collection); _; } constructor(address _factory) { factory = Factory(_factory); authorize(_factory, true); authorize(msg.sender, true); } function addCollection(address _collection, bool _mintL1Authorized) external nonStopped { require( factory.isCollection(_collection), "TRANSACTION: Invalid collection" ); collection[_collection].mintL1Authorized = _mintL1Authorized; emit CollectionAdded(_collection); } function addSales(address _collection, Sale[] memory _sales) external nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { for (uint256 i = 0; i < _sales.length; i++) { _addSale(_collection, _sales[i]); } emit SalesAdded(_collection, _sales); } function blacklistCollection(address _collection, bool _blacklist) external nonStopped onlyOwner { collection[_collection].isBlacklisted = _blacklist; emit CollectionBlacklisted(_collection, _blacklist); } function authorizeMintL1(address _collection, bool _authorize) external nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { collection[_collection].mintL1Authorized = _authorize; } function setSaleActive( address _collection, uint256 _saleId, bool _active ) public nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { sales[_collection][_saleId].active = _active; } function setPrice( address _collection, uint256 _saleId, uint256 _newPrice ) public nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { uint256 oldValue = sales[_collection][_saleId].price; sales[_collection][_saleId].price = _newPrice; emit PriceChanged(_collection, _saleId, oldValue, _newPrice); } function setSupply( address _collection, uint256 _saleId, uint256 _newSupply ) public nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { uint256 currentSaleSupply = sales[_collection][_saleId].supply; uint256 currentTotalSupply = 0; for (uint256 i = 0; i < sales[_collection].length; i++) { currentTotalSupply += sales[_collection][i].supply; } require( currentTotalSupply - currentSaleSupply + _newSupply <= Collection(_collection).supply(), "SUPPLY: value exeeds collection max supply" ); uint256 oldValue = sales[_collection][_saleId].supply; sales[_collection][_saleId].supply = uint216(_newSupply); emit SupplyChanged(_collection, _saleId, oldValue, _newSupply); } function setRoot( address _collection, uint256 _saleId, bytes32 _newRoot ) public nonStopped validCollection(_collection) storeOrCollectionAuthorized(_collection) { bytes32 oldValue = sales[_collection][_saleId].whitelistRoot; sales[_collection][_saleId].whitelistRoot = _newRoot; emit WhitelistChanged(_collection, _saleId, oldValue, _newRoot); } function getState(address _collection, uint256 _saleId) external view validCollection(_collection) returns (Sale memory) { return sales[_collection][_saleId]; } function getSalesCount(address _collection) external view returns (uint256) { return sales[_collection].length; } function validateCollection(address _collection) public view { require( factory.isCollection(_collection), "Collection is not part of the store" ); require( !collection[_collection].isBlacklisted, "Collection has been blacklisted" ); } function isAuthorized(address _user, address _collection) public view returns (bool) { return authorized[_user] || Collection(_collection).authorized(_user); } function transferOwnership(address newOwner) public virtual override(Authorizable, Ownable) onlyOwner { super.transferOwnership(newOwner); } function _addSale(address _collection, Sale memory _sale) internal { uint256 currentSupply = 0; for (uint256 i = 0; i < sales[_collection].length; i++) { currentSupply += sales[_collection][i].supply; } require( currentSupply + _sale.supply <= Collection(_collection).supply(), "SUPPLY: value exeeds collection max supply" ); sales[_collection].push(_sale); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; struct Sale { bytes32 whitelistRoot; bool active; uint216 supply; uint256 price; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); 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 virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * 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, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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 pragma solidity ^0.8.4; // Helper library for handling and manipulating bytes import "./Bytes.sol"; library Parsing { // Split the minting blob into token_id and blueprint portions // {token_id}:{blueprint} function split(bytes calldata blob) internal pure returns (uint256, bytes memory) { int256 index = Bytes.indexOf(blob, ":", 0); require(index >= 0, "Separator must exist"); // Trim the { and } from the parameters uint256 tokenID = Bytes.toUint(blob[1:uint256(index) - 1]); uint256 blueprintLength = blob.length - uint256(index) - 3; if (blueprintLength == 0) { return (tokenID, bytes("")); } bytes calldata blueprint = blob[uint256(index) + 2:blob.length - 1]; return (tokenID, blueprint); } function getTokenId(bytes calldata blob) internal pure returns (uint256) { int256 index = Bytes.indexOf(blob, ":", 0); require(index >= 0, "Separator must exist"); // Trim the { and } from the parameters return Bytes.toUint(blob[1:uint256(index) - 1]); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract AuthorizableUpgradeable is OwnableUpgradeable { mapping(address => bool) public authorized; modifier onlyAuthorized() { require(authorized[msg.sender], "UNAUTHORIZED: Sender is not authorized"); _; } function transferOwnership(address newOwner) public virtual override onlyOwner { authorized[owner()] = false; super.transferOwnership(newOwner); authorized[newOwner] = true; } function authorize(address _user, bool _authorize) public onlyOwner { authorized[_user] = _authorize; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) 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 Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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 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); /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 IERC721ReceiverUpgradeable { /** * @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 `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @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.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 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 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 v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { 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.0 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; library Bytes { bytes constant alphabet = "0123456789abcdef"; /** * @dev Converts a `uint256` to a `string`. * via OraclizeAPI - MIT licence * https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol */ function fromUint(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = bytes1(uint8(48 + (temp % 10))); temp /= 10; } return string(buffer); } /** * Index Of * * Locates and returns the position of a character within a string starting * from a defined offset * * @param _base When being used for a data type this is the extended object * otherwise this is the string acting as the haystack to be * searched * @param _value The needle to search for, at present this is currently * limited to one character * @param _offset The starting point to start searching from which can start * from 0, but must not exceed the length of the string * @return int The position of the needle starting from 0 and returning -1 * in the case of no matches found */ function indexOf( bytes memory _base, string memory _value, uint256 _offset ) internal pure returns (int256) { bytes memory _valueBytes = bytes(_value); assert(_valueBytes.length == 1); for (uint256 i = _offset; i < _base.length; i++) { if (_base[i] == _valueBytes[0]) { return int256(i); } } return -1; } function substring( bytes memory strBytes, uint256 startIndex, uint256 endIndex ) internal pure returns (string memory) { bytes memory result = new bytes(endIndex - startIndex); for (uint256 i = startIndex; i < endIndex; i++) { result[i - startIndex] = strBytes[i]; } return string(result); } function toUint(bytes memory b) internal pure returns (uint256) { uint256 result = 0; for (uint256 i = 0; i < b.length; i++) { uint256 val = uint256(uint8(b[i])); if (val >= 48 && val <= 57) { result = result * 10 + (val - 48); } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _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); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts/proxy/Clones.sol"; import "./utils/Address.sol"; import "./utils/Structs.sol"; import "./Collection.sol"; import "./Store.sol"; struct CollectionData { string name; string symbol; string baseTokenURI; uint256 supply; address[] authorizedAddresses; bool mintL1Authorized; } contract Factory is Ownable { address public collectionTemplate; address public store; address public seller; mapping(address => bool) public isCollection; event CollectionCreated( string name, string symbol, address store, address seller, address collectionAddress ); constructor(address _collectionTemplate) { collectionTemplate = _collectionTemplate; } function setStore(address _store, address _seller) external onlyOwner { store = _store; seller = _seller; } function setCollectionTemplate(address _collectionTemplate) external onlyOwner { collectionTemplate = _collectionTemplate; } function createCollection( CollectionData memory _collection, Sale[] memory _sales, address _owner ) external { require(store != address(0), "No store was set"); require(seller != address(0), "No seller was set"); address collectionAddress = Clones.clone(collectionTemplate); string memory strAddress = Address.toAsciiString(collectionAddress); string memory baseTokenURI = string( abi.encodePacked(_collection.baseTokenURI, "/0x", strAddress) ); isCollection[collectionAddress] = true; Collection(collectionAddress).init( _collection.name, _collection.symbol, baseTokenURI, seller, _collection.supply, _collection.authorizedAddresses, _owner ); Store(store).addCollection(collectionAddress, _collection.mintL1Authorized); if (_sales.length > 0) { Store(store).addSales(collectionAddress, _sales); } emit CollectionCreated( _collection.name, _collection.symbol, store, seller, collectionAddress ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; contract Authorizable is Ownable { mapping(address => bool) public authorized; modifier onlyAuthorized() { require(authorized[msg.sender], "UNAUTHORIZED: Sender is not authorized"); _; } function transferOwnership(address newOwner) public virtual override onlyOwner { authorized[owner()] = false; super.transferOwnership(newOwner); authorized[newOwner] = true; } function authorize(address _user, bool _authorize) public onlyOwner { authorized[_user] = _authorize; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; contract Stoppable is Ownable { bool stopped; modifier nonStopped() { require(!stopped, "STOPPED: Contract is stopped"); _; } function stop(bool _stop) public onlyOwner { stopped = _stop; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (proxy/Clones.sol) pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.4; library Address { function toAsciiString(address x) internal pure returns (string memory) { bytes memory s = new bytes(40); for (uint256 i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2**(8 * (19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2 * i] = char(hi); s[2 * i + 1] = char(lo); } return string(s); } function char(bytes1 b) internal pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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.0 (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; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_store","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"payer","type":"address"},{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"saleId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"payment","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payer","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"RequestForMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_saleId","type":"uint256"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_qtyAllowed","type":"uint256"},{"internalType":"uint256","name":"_qtyToBuy","type":"uint256"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"},{"internalType":"bool","name":"_mintL1","type":"bool"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"presaleTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_saleId","type":"uint256"},{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_qty","type":"uint256[]"},{"internalType":"bool","name":"_mintL1","type":"bool"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"sold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_stop","type":"bool"}],"name":"stop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"uint256","name":"_saleId","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"qty","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"verifyPresale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_collection","type":"address"},{"internalType":"address","name":"receiver","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002d2538038062002d25833981810160405281019062000037919062000182565b620000576200004b6200009f60201b60201c565b620000a760201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050620001fc565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000815190506200017c81620001e2565b92915050565b6000602082840312156200019557600080fd5b6000620001a5848285016200016b565b91505092915050565b6000620001bb82620001c2565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b620001ed81620001ae565b8114620001f957600080fd5b50565b612b19806200020c6000396000f3fe6080604052600436106100915760003560e01c8063715018a611610059578063715018a6146101925780638da5cb5b146101a9578063c15a483f146101d4578063f2fde38b146101fd578063f940e3851461022657610091565b8063023646c9146100965780632f9a35a7146100bf5780635b0833cc146100fc5780636a107cd8146101395780636b58ca9114610176575b600080fd5b3480156100a257600080fd5b506100bd60048036038101906100b89190611dff565b61024f565b005b3480156100cb57600080fd5b506100e660048036038101906100e19190611cb6565b610512565b6040516100f39190612325565b60405180910390f35b34801561010857600080fd5b50610123600480360381019061011e9190611c2b565b610610565b60405161013091906124c0565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b9190611c67565b610635565b60405161016d91906124c0565b60405180910390f35b610190600480360381019061018b9190611d45565b610667565b005b34801561019e57600080fd5b506101a76109c8565b005b3480156101b557600080fd5b506101be610a50565b6040516101cb9190612205565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f69190611ea6565b610a79565b005b34801561020957600080fd5b50610224600480360381019061021f9190611b9d565b610b12565b005b34801561023257600080fd5b5061024d60048036038101906102489190611bef565b610c0a565b005b600060149054906101000a900460ff161561029f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029690612420565b60405180910390fd5b84600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b81526004016102fb9190612205565b60006040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b5050505085600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166365e4ad9e33836040518363ffffffff1660e01b8152600401610389929190612220565b60206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190611ecf565b610418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040f906124a0565b60405180910390fd5b835185511461045c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045390612340565b60405180910390fd5b60005b8551811015610508576104f588888884815181106104a6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518885815181106104e7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015188610ee2565b8080610500906126ef565b91505061045f565b5050505050505050565b60008060149054906101000a900460ff1615610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055a90612420565b60405180910390fd5b85600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b81526004016105bf9190612205565b60006040518083038186803b1580156105d757600080fd5b505afa1580156105eb573d6000803e3d6000fd5b5050505061060487876105fe8888611145565b86611178565b91505095945050505050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600260205282600052604060002060205281600052604060002060205280600052604060002060009250925050505481565b600060149054906101000a900460ff16156106b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ae90612420565b60405180910390fd5b87600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b81526004016107139190612205565b60006040518083038186803b15801561072b57600080fd5b505afa15801561073f573d6000803e3d6000fd5b50505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a1c83ac8c8c6040518363ffffffff1660e01b81526004016107a3929190612280565b60806040518083038186803b1580156107bb57600080fd5b505afa1580156107cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f39190611f34565b9350505091506000801b82146108b6576108118b8b898b8a8a611243565b86600260008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546108ae9190612595565b925050819055505b86816108c291906125eb565b341015610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb906123a0565b60405180910390fd5b34600360008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109539190612595565b925050819055506109678b8b8b8a88610ee2565b3373ffffffffffffffffffffffffffffffffffffffff167fc7b46480d33c7777f384469a19809970cd36d96f3f1fc921e4b6a304e4b761f98c8c8a346040516109b394939291906122e0565b60405180910390a25050505050505050505050565b6109d06113b3565b73ffffffffffffffffffffffffffffffffffffffff166109ee610a50565b73ffffffffffffffffffffffffffffffffffffffff1614610a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3b90612400565b60405180910390fd5b610a4e60006113bb565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610a816113b3565b73ffffffffffffffffffffffffffffffffffffffff16610a9f610a50565b73ffffffffffffffffffffffffffffffffffffffff1614610af5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aec90612400565b60405180910390fd5b80600060146101000a81548160ff02191690831515021790555050565b610b1a6113b3565b73ffffffffffffffffffffffffffffffffffffffff16610b38610a50565b73ffffffffffffffffffffffffffffffffffffffff1614610b8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8590612400565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610bfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf590612360565b60405180910390fd5b610c07816113bb565b50565b600060149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612420565b60405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b8152600401610cb69190612205565b60006040518083038186803b158015610cce57600080fd5b505afa158015610ce2573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4357600080fd5b505afa158015610d57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7b9190611bc6565b73ffffffffffffffffffffffffffffffffffffffff1614610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890612440565b60405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ea0573d6000803e3d6000fd5b507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb843383604051610ed493929190612249565b60405180910390a150505050565b610eee8585848461147f565b60006001600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f3c9190612595565b905082600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206000828254610f9e9190612595565b9250508190555082600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ff49190612595565b9250508190555081156110d35760008190505b600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481116110cd578673ffffffffffffffffffffffffffffffffffffffff166340c10f1986836040518363ffffffff1660e01b8152600401611088929190612280565b600060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b5050505080806110c5906126ef565b915050611007565b5061113d565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f080c39a0fd67301da54cbcaea0dffe24ddf025c849ddb85f3449adb43b190c6c888487604051611134939291906122a9565b60405180910390a35b505050505050565b6000828260405160200161115a9291906121ad565b60405160208183030381529060405280519060200120905092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a1c83ac87876040518363ffffffff1660e01b81526004016111d8929190612280565b60806040518083038186803b1580156111f057600080fd5b505afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190611f34565b50505090506112388382866117e4565b915050949350505050565b61129186863386868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050610512565b6112d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c7906123c0565b60405180910390fd5b8284600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136a9190612595565b11156113ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a290612480565b60405180910390fd5b505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e94886d2866040518263ffffffff1660e01b81526004016114dc9190612205565b604080518083038186803b1580156114f357600080fd5b505afa158015611507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152b9190611ef8565b915050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a1c83ac88886040518363ffffffff1660e01b815260040161158e929190612280565b60806040518083038186803b1580156115a657600080fd5b505afa1580156115ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115de9190611f34565b507affffffffffffffffffffffffffffffffffffffffffffffffffffff16925092505083158061160b5750825b61164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164190612380565b60405180910390fd5b81806116fe57503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116ae57600080fd5b505afa1580156116c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e69190611bc6565b73ffffffffffffffffffffffffffffffffffffffff16145b61173d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173490612460565b60405180910390fd5b80600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000888152602001908152602001600020548661179a9190612595565b11156117db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d2906123e0565b60405180910390fd5b50505050505050565b6000826117f185846117fb565b1490509392505050565b60008082905060005b84518110156118c9576000858281518110611848577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151905080831161188957828160405160200161186c9291906121d9565b6040516020818303038152906040528051906020012092506118b5565b808360405160200161189c9291906121d9565b6040516020818303038152906040528051906020012092505b5080806118c1906126ef565b915050611804565b508091505092915050565b60006118e76118e284612500565b6124db565b9050808382526020820190508285602086028201111561190657600080fd5b60005b85811015611936578161191c8882611a18565b845260208401935060208301925050600181019050611909565b5050509392505050565b600061195361194e8461252c565b6124db565b9050808382526020820190508285602086028201111561197257600080fd5b60005b858110156119a257816119888882611b34565b845260208401935060208301925050600181019050611975565b5050509392505050565b60006119bf6119ba84612558565b6124db565b905080838252602082019050828560208602820111156119de57600080fd5b60005b85811015611a0e57816119f48882611b73565b8452602084019350602083019250506001810190506119e1565b5050509392505050565b600081359050611a2781612a70565b92915050565b600081519050611a3c81612a70565b92915050565b600082601f830112611a5357600080fd5b8135611a638482602086016118d4565b91505092915050565b60008083601f840112611a7e57600080fd5b8235905067ffffffffffffffff811115611a9757600080fd5b602083019150836020820283011115611aaf57600080fd5b9250929050565b600082601f830112611ac757600080fd5b8135611ad7848260208601611940565b91505092915050565b600082601f830112611af157600080fd5b8135611b018482602086016119ac565b91505092915050565b600081359050611b1981612a87565b92915050565b600081519050611b2e81612a87565b92915050565b600081359050611b4381612a9e565b92915050565b600081519050611b5881612a9e565b92915050565b600081519050611b6d81612ab5565b92915050565b600081359050611b8281612acc565b92915050565b600081519050611b9781612acc565b92915050565b600060208284031215611baf57600080fd5b6000611bbd84828501611a18565b91505092915050565b600060208284031215611bd857600080fd5b6000611be684828501611a2d565b91505092915050565b60008060408385031215611c0257600080fd5b6000611c1085828601611a18565b9250506020611c2185828601611a18565b9150509250929050565b60008060408385031215611c3e57600080fd5b6000611c4c85828601611a18565b9250506020611c5d85828601611b73565b9150509250929050565b600080600060608486031215611c7c57600080fd5b6000611c8a86828701611a18565b9350506020611c9b86828701611b73565b9250506040611cac86828701611a18565b9150509250925092565b600080600080600060a08688031215611cce57600080fd5b6000611cdc88828901611a18565b9550506020611ced88828901611b73565b9450506040611cfe88828901611a18565b9350506060611d0f88828901611b73565b925050608086013567ffffffffffffffff811115611d2c57600080fd5b611d3888828901611ab6565b9150509295509295909350565b60008060008060008060008060e0898b031215611d6157600080fd5b6000611d6f8b828c01611a18565b9850506020611d808b828c01611b73565b9750506040611d918b828c01611a18565b9650506060611da28b828c01611b73565b9550506080611db38b828c01611b73565b94505060a089013567ffffffffffffffff811115611dd057600080fd5b611ddc8b828c01611a6c565b935093505060c0611def8b828c01611b0a565b9150509295985092959890939650565b600080600080600060a08688031215611e1757600080fd5b6000611e2588828901611a18565b9550506020611e3688828901611b73565b945050604086013567ffffffffffffffff811115611e5357600080fd5b611e5f88828901611a42565b935050606086013567ffffffffffffffff811115611e7c57600080fd5b611e8888828901611ae0565b9250506080611e9988828901611b0a565b9150509295509295909350565b600060208284031215611eb857600080fd5b6000611ec684828501611b0a565b91505092915050565b600060208284031215611ee157600080fd5b6000611eef84828501611b1f565b91505092915050565b60008060408385031215611f0b57600080fd5b6000611f1985828601611b1f565b9250506020611f2a85828601611b1f565b9150509250929050565b60008060008060808587031215611f4a57600080fd5b6000611f5887828801611b49565b9450506020611f6987828801611b1f565b9350506040611f7a87828801611b5e565b9250506060611f8b87828801611b88565b91505092959194509250565b611fa081612645565b82525050565b611fb7611fb282612645565b612738565b82525050565b611fc681612657565b82525050565b611fdd611fd882612663565b61274a565b82525050565b6000611ff0602983612584565b9150611ffb826127ec565b604082019050919050565b6000612013602683612584565b915061201e8261283b565b604082019050919050565b6000612036601f83612584565b91506120418261288a565b602082019050919050565b6000612059601b83612584565b9150612064826128b3565b602082019050919050565b600061207c601a83612584565b9150612087826128dc565b602082019050919050565b600061209f601c83612584565b91506120aa82612905565b602082019050919050565b60006120c2602083612584565b91506120cd8261292e565b602082019050919050565b60006120e5601c83612584565b91506120f082612957565b602082019050919050565b6000612108602983612584565b915061211382612980565b604082019050919050565b600061212b601f83612584565b9150612136826129cf565b602082019050919050565b600061214e601e83612584565b9150612159826129f8565b602082019050919050565b6000612171602683612584565b915061217c82612a21565b604082019050919050565b612190816126b4565b82525050565b6121a76121a2826126b4565b612766565b82525050565b60006121b98285611fa6565b6014820191506121c98284612196565b6020820191508190509392505050565b60006121e58285611fcc565b6020820191506121f58284611fcc565b6020820191508190509392505050565b600060208201905061221a6000830184611f97565b92915050565b60006040820190506122356000830185611f97565b6122426020830184611f97565b9392505050565b600060608201905061225e6000830186611f97565b61226b6020830185611f97565b6122786040830184612187565b949350505050565b60006040820190506122956000830185611f97565b6122a26020830184612187565b9392505050565b60006060820190506122be6000830186611f97565b6122cb6020830185612187565b6122d86040830184612187565b949350505050565b60006080820190506122f56000830187611f97565b6123026020830186612187565b61230f6040830185612187565b61231c6060830184612187565b95945050505050565b600060208201905061233a6000830184611fbd565b92915050565b6000602082019050818103600083015261235981611fe3565b9050919050565b6000602082019050818103600083015261237981612006565b9050919050565b6000602082019050818103600083015261239981612029565b9050919050565b600060208201905081810360008301526123b98161204c565b9050919050565b600060208201905081810360008301526123d98161206f565b9050919050565b600060208201905081810360008301526123f981612092565b9050919050565b60006020820190508181036000830152612419816120b5565b9050919050565b60006020820190508181036000830152612439816120d8565b9050919050565b60006020820190508181036000830152612459816120fb565b9050919050565b600060208201905081810360008301526124798161211e565b9050919050565b6000602082019050818103600083015261249981612141565b9050919050565b600060208201905081810360008301526124b981612164565b9050919050565b60006020820190506124d56000830184612187565b92915050565b60006124e56124f6565b90506124f182826126be565b919050565b6000604051905090565b600067ffffffffffffffff82111561251b5761251a61279f565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156125475761254661279f565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156125735761257261279f565b5b602082029050602081019050919050565b600082825260208201905092915050565b60006125a0826126b4565b91506125ab836126b4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125e0576125df612770565b5b828201905092915050565b60006125f6826126b4565b9150612601836126b4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561263a57612639612770565b5b828202905092915050565b60006126508261266d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60007affffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6126c7826127ce565b810181811067ffffffffffffffff821117156126e6576126e561279f565b5b80604052505050565b60006126fa826126b4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561272d5761272c612770565b5b600182019050919050565b600061274382612754565b9050919050565b6000819050919050565b600061275f826127df565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f41207175616e74697479206d7573742062652073657420666f7220656163682060008201527f62656e6566697465640000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4d696e74696e6720746f204c31206973206e6f7420617574686f72697a656400600082015250565b7f5041594d454e543a20496e73756666696369656e742066756e64730000000000600082015250565b7f5452414e53414354494f4e3a20496e76616c69642070726f6f66000000000000600082015250565b7f535550504c593a2056616c7565206578636565647320737570706c7900000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f53544f505045443a20436f6e74726163742069732073746f7070656400000000600082015250565b7f53656e646572206973206e6f7420746865206f776e6572206f6620746865206360008201527f6f6c6c656374696f6e0000000000000000000000000000000000000000000000602082015250565b7f5452414e53414354494f4e3a2053616c65206973206e6f742061637469766500600082015250565b7f5452414e53414354494f4e3a204d6f7265207468616e20616c6c6f7765640000600082015250565b7f554e415554484f52495a45443a2053656e646572206973206e6f74206175746860008201527f6f72697a65640000000000000000000000000000000000000000000000000000602082015250565b612a7981612645565b8114612a8457600080fd5b50565b612a9081612657565b8114612a9b57600080fd5b50565b612aa781612663565b8114612ab257600080fd5b50565b612abe8161268d565b8114612ac957600080fd5b50565b612ad5816126b4565b8114612ae057600080fd5b5056fea264697066735822122012122ec587de83628dc9050580ad158a84d52c0f3cb15864630f6b380ea2d19b64736f6c63430008040033000000000000000000000000a8e81e5b14d99ac77d7f072d093f619f1030288f
Deployed Bytecode
0x6080604052600436106100915760003560e01c8063715018a611610059578063715018a6146101925780638da5cb5b146101a9578063c15a483f146101d4578063f2fde38b146101fd578063f940e3851461022657610091565b8063023646c9146100965780632f9a35a7146100bf5780635b0833cc146100fc5780636a107cd8146101395780636b58ca9114610176575b600080fd5b3480156100a257600080fd5b506100bd60048036038101906100b89190611dff565b61024f565b005b3480156100cb57600080fd5b506100e660048036038101906100e19190611cb6565b610512565b6040516100f39190612325565b60405180910390f35b34801561010857600080fd5b50610123600480360381019061011e9190611c2b565b610610565b60405161013091906124c0565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b9190611c67565b610635565b60405161016d91906124c0565b60405180910390f35b610190600480360381019061018b9190611d45565b610667565b005b34801561019e57600080fd5b506101a76109c8565b005b3480156101b557600080fd5b506101be610a50565b6040516101cb9190612205565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f69190611ea6565b610a79565b005b34801561020957600080fd5b50610224600480360381019061021f9190611b9d565b610b12565b005b34801561023257600080fd5b5061024d60048036038101906102489190611bef565b610c0a565b005b600060149054906101000a900460ff161561029f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161029690612420565b60405180910390fd5b84600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b81526004016102fb9190612205565b60006040518083038186803b15801561031357600080fd5b505afa158015610327573d6000803e3d6000fd5b5050505085600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166365e4ad9e33836040518363ffffffff1660e01b8152600401610389929190612220565b60206040518083038186803b1580156103a157600080fd5b505afa1580156103b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d99190611ecf565b610418576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161040f906124a0565b60405180910390fd5b835185511461045c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161045390612340565b60405180910390fd5b60005b8551811015610508576104f588888884815181106104a6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60200260200101518885815181106104e7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015188610ee2565b8080610500906126ef565b91505061045f565b5050505050505050565b60008060149054906101000a900460ff1615610563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055a90612420565b60405180910390fd5b85600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b81526004016105bf9190612205565b60006040518083038186803b1580156105d757600080fd5b505afa1580156105eb573d6000803e3d6000fd5b5050505061060487876105fe8888611145565b86611178565b91505095945050505050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600260205282600052604060002060205281600052604060002060205280600052604060002060009250925050505481565b600060149054906101000a900460ff16156106b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ae90612420565b60405180910390fd5b87600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b81526004016107139190612205565b60006040518083038186803b15801561072b57600080fd5b505afa15801561073f573d6000803e3d6000fd5b50505050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a1c83ac8c8c6040518363ffffffff1660e01b81526004016107a3929190612280565b60806040518083038186803b1580156107bb57600080fd5b505afa1580156107cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f39190611f34565b9350505091506000801b82146108b6576108118b8b898b8a8a611243565b86600260008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546108ae9190612595565b925050819055505b86816108c291906125eb565b341015610904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108fb906123a0565b60405180910390fd5b34600360008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546109539190612595565b925050819055506109678b8b8b8a88610ee2565b3373ffffffffffffffffffffffffffffffffffffffff167fc7b46480d33c7777f384469a19809970cd36d96f3f1fc921e4b6a304e4b761f98c8c8a346040516109b394939291906122e0565b60405180910390a25050505050505050505050565b6109d06113b3565b73ffffffffffffffffffffffffffffffffffffffff166109ee610a50565b73ffffffffffffffffffffffffffffffffffffffff1614610a44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3b90612400565b60405180910390fd5b610a4e60006113bb565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610a816113b3565b73ffffffffffffffffffffffffffffffffffffffff16610a9f610a50565b73ffffffffffffffffffffffffffffffffffffffff1614610af5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aec90612400565b60405180910390fd5b80600060146101000a81548160ff02191690831515021790555050565b610b1a6113b3565b73ffffffffffffffffffffffffffffffffffffffff16610b38610a50565b73ffffffffffffffffffffffffffffffffffffffff1614610b8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8590612400565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610bfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf590612360565b60405180910390fd5b610c07816113bb565b50565b600060149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612420565b60405180910390fd5b81600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638eec8e2a826040518263ffffffff1660e01b8152600401610cb69190612205565b60006040518083038186803b158015610cce57600080fd5b505afa158015610ce2573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4357600080fd5b505afa158015610d57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7b9190611bc6565b73ffffffffffffffffffffffffffffffffffffffff1614610dd1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dc890612440565b60405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ea0573d6000803e3d6000fd5b507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb843383604051610ed493929190612249565b60405180910390a150505050565b610eee8585848461147f565b60006001600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f3c9190612595565b905082600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008781526020019081526020016000206000828254610f9e9190612595565b9250508190555082600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ff49190612595565b9250508190555081156110d35760008190505b600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481116110cd578673ffffffffffffffffffffffffffffffffffffffff166340c10f1986836040518363ffffffff1660e01b8152600401611088929190612280565b600060405180830381600087803b1580156110a257600080fd5b505af11580156110b6573d6000803e3d6000fd5b5050505080806110c5906126ef565b915050611007565b5061113d565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f080c39a0fd67301da54cbcaea0dffe24ddf025c849ddb85f3449adb43b190c6c888487604051611134939291906122a9565b60405180910390a35b505050505050565b6000828260405160200161115a9291906121ad565b60405160208183030381529060405280519060200120905092915050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a1c83ac87876040518363ffffffff1660e01b81526004016111d8929190612280565b60806040518083038186803b1580156111f057600080fd5b505afa158015611204573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112289190611f34565b50505090506112388382866117e4565b915050949350505050565b61129186863386868680806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050610512565b6112d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c7906123c0565b60405180910390fd5b8284600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600088815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461136a9190612595565b11156113ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113a290612480565b60405180910390fd5b505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e94886d2866040518263ffffffff1660e01b81526004016114dc9190612205565b604080518083038186803b1580156114f357600080fd5b505afa158015611507573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061152b9190611ef8565b915050600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633a1c83ac88886040518363ffffffff1660e01b815260040161158e929190612280565b60806040518083038186803b1580156115a657600080fd5b505afa1580156115ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115de9190611f34565b507affffffffffffffffffffffffffffffffffffffffffffffffffffff16925092505083158061160b5750825b61164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161164190612380565b60405180910390fd5b81806116fe57503373ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156116ae57600080fd5b505afa1580156116c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e69190611bc6565b73ffffffffffffffffffffffffffffffffffffffff16145b61173d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173490612460565b60405180910390fd5b80600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000888152602001908152602001600020548661179a9190612595565b11156117db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d2906123e0565b60405180910390fd5b50505050505050565b6000826117f185846117fb565b1490509392505050565b60008082905060005b84518110156118c9576000858281518110611848577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010151905080831161188957828160405160200161186c9291906121d9565b6040516020818303038152906040528051906020012092506118b5565b808360405160200161189c9291906121d9565b6040516020818303038152906040528051906020012092505b5080806118c1906126ef565b915050611804565b508091505092915050565b60006118e76118e284612500565b6124db565b9050808382526020820190508285602086028201111561190657600080fd5b60005b85811015611936578161191c8882611a18565b845260208401935060208301925050600181019050611909565b5050509392505050565b600061195361194e8461252c565b6124db565b9050808382526020820190508285602086028201111561197257600080fd5b60005b858110156119a257816119888882611b34565b845260208401935060208301925050600181019050611975565b5050509392505050565b60006119bf6119ba84612558565b6124db565b905080838252602082019050828560208602820111156119de57600080fd5b60005b85811015611a0e57816119f48882611b73565b8452602084019350602083019250506001810190506119e1565b5050509392505050565b600081359050611a2781612a70565b92915050565b600081519050611a3c81612a70565b92915050565b600082601f830112611a5357600080fd5b8135611a638482602086016118d4565b91505092915050565b60008083601f840112611a7e57600080fd5b8235905067ffffffffffffffff811115611a9757600080fd5b602083019150836020820283011115611aaf57600080fd5b9250929050565b600082601f830112611ac757600080fd5b8135611ad7848260208601611940565b91505092915050565b600082601f830112611af157600080fd5b8135611b018482602086016119ac565b91505092915050565b600081359050611b1981612a87565b92915050565b600081519050611b2e81612a87565b92915050565b600081359050611b4381612a9e565b92915050565b600081519050611b5881612a9e565b92915050565b600081519050611b6d81612ab5565b92915050565b600081359050611b8281612acc565b92915050565b600081519050611b9781612acc565b92915050565b600060208284031215611baf57600080fd5b6000611bbd84828501611a18565b91505092915050565b600060208284031215611bd857600080fd5b6000611be684828501611a2d565b91505092915050565b60008060408385031215611c0257600080fd5b6000611c1085828601611a18565b9250506020611c2185828601611a18565b9150509250929050565b60008060408385031215611c3e57600080fd5b6000611c4c85828601611a18565b9250506020611c5d85828601611b73565b9150509250929050565b600080600060608486031215611c7c57600080fd5b6000611c8a86828701611a18565b9350506020611c9b86828701611b73565b9250506040611cac86828701611a18565b9150509250925092565b600080600080600060a08688031215611cce57600080fd5b6000611cdc88828901611a18565b9550506020611ced88828901611b73565b9450506040611cfe88828901611a18565b9350506060611d0f88828901611b73565b925050608086013567ffffffffffffffff811115611d2c57600080fd5b611d3888828901611ab6565b9150509295509295909350565b60008060008060008060008060e0898b031215611d6157600080fd5b6000611d6f8b828c01611a18565b9850506020611d808b828c01611b73565b9750506040611d918b828c01611a18565b9650506060611da28b828c01611b73565b9550506080611db38b828c01611b73565b94505060a089013567ffffffffffffffff811115611dd057600080fd5b611ddc8b828c01611a6c565b935093505060c0611def8b828c01611b0a565b9150509295985092959890939650565b600080600080600060a08688031215611e1757600080fd5b6000611e2588828901611a18565b9550506020611e3688828901611b73565b945050604086013567ffffffffffffffff811115611e5357600080fd5b611e5f88828901611a42565b935050606086013567ffffffffffffffff811115611e7c57600080fd5b611e8888828901611ae0565b9250506080611e9988828901611b0a565b9150509295509295909350565b600060208284031215611eb857600080fd5b6000611ec684828501611b0a565b91505092915050565b600060208284031215611ee157600080fd5b6000611eef84828501611b1f565b91505092915050565b60008060408385031215611f0b57600080fd5b6000611f1985828601611b1f565b9250506020611f2a85828601611b1f565b9150509250929050565b60008060008060808587031215611f4a57600080fd5b6000611f5887828801611b49565b9450506020611f6987828801611b1f565b9350506040611f7a87828801611b5e565b9250506060611f8b87828801611b88565b91505092959194509250565b611fa081612645565b82525050565b611fb7611fb282612645565b612738565b82525050565b611fc681612657565b82525050565b611fdd611fd882612663565b61274a565b82525050565b6000611ff0602983612584565b9150611ffb826127ec565b604082019050919050565b6000612013602683612584565b915061201e8261283b565b604082019050919050565b6000612036601f83612584565b91506120418261288a565b602082019050919050565b6000612059601b83612584565b9150612064826128b3565b602082019050919050565b600061207c601a83612584565b9150612087826128dc565b602082019050919050565b600061209f601c83612584565b91506120aa82612905565b602082019050919050565b60006120c2602083612584565b91506120cd8261292e565b602082019050919050565b60006120e5601c83612584565b91506120f082612957565b602082019050919050565b6000612108602983612584565b915061211382612980565b604082019050919050565b600061212b601f83612584565b9150612136826129cf565b602082019050919050565b600061214e601e83612584565b9150612159826129f8565b602082019050919050565b6000612171602683612584565b915061217c82612a21565b604082019050919050565b612190816126b4565b82525050565b6121a76121a2826126b4565b612766565b82525050565b60006121b98285611fa6565b6014820191506121c98284612196565b6020820191508190509392505050565b60006121e58285611fcc565b6020820191506121f58284611fcc565b6020820191508190509392505050565b600060208201905061221a6000830184611f97565b92915050565b60006040820190506122356000830185611f97565b6122426020830184611f97565b9392505050565b600060608201905061225e6000830186611f97565b61226b6020830185611f97565b6122786040830184612187565b949350505050565b60006040820190506122956000830185611f97565b6122a26020830184612187565b9392505050565b60006060820190506122be6000830186611f97565b6122cb6020830185612187565b6122d86040830184612187565b949350505050565b60006080820190506122f56000830187611f97565b6123026020830186612187565b61230f6040830185612187565b61231c6060830184612187565b95945050505050565b600060208201905061233a6000830184611fbd565b92915050565b6000602082019050818103600083015261235981611fe3565b9050919050565b6000602082019050818103600083015261237981612006565b9050919050565b6000602082019050818103600083015261239981612029565b9050919050565b600060208201905081810360008301526123b98161204c565b9050919050565b600060208201905081810360008301526123d98161206f565b9050919050565b600060208201905081810360008301526123f981612092565b9050919050565b60006020820190508181036000830152612419816120b5565b9050919050565b60006020820190508181036000830152612439816120d8565b9050919050565b60006020820190508181036000830152612459816120fb565b9050919050565b600060208201905081810360008301526124798161211e565b9050919050565b6000602082019050818103600083015261249981612141565b9050919050565b600060208201905081810360008301526124b981612164565b9050919050565b60006020820190506124d56000830184612187565b92915050565b60006124e56124f6565b90506124f182826126be565b919050565b6000604051905090565b600067ffffffffffffffff82111561251b5761251a61279f565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156125475761254661279f565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156125735761257261279f565b5b602082029050602081019050919050565b600082825260208201905092915050565b60006125a0826126b4565b91506125ab836126b4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125e0576125df612770565b5b828201905092915050565b60006125f6826126b4565b9150612601836126b4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561263a57612639612770565b5b828202905092915050565b60006126508261266d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60007affffffffffffffffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6126c7826127ce565b810181811067ffffffffffffffff821117156126e6576126e561279f565b5b80604052505050565b60006126fa826126b4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561272d5761272c612770565b5b600182019050919050565b600061274382612754565b9050919050565b6000819050919050565b600061275f826127df565b9050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b7f41207175616e74697479206d7573742062652073657420666f7220656163682060008201527f62656e6566697465640000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4d696e74696e6720746f204c31206973206e6f7420617574686f72697a656400600082015250565b7f5041594d454e543a20496e73756666696369656e742066756e64730000000000600082015250565b7f5452414e53414354494f4e3a20496e76616c69642070726f6f66000000000000600082015250565b7f535550504c593a2056616c7565206578636565647320737570706c7900000000600082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f53544f505045443a20436f6e74726163742069732073746f7070656400000000600082015250565b7f53656e646572206973206e6f7420746865206f776e6572206f6620746865206360008201527f6f6c6c656374696f6e0000000000000000000000000000000000000000000000602082015250565b7f5452414e53414354494f4e3a2053616c65206973206e6f742061637469766500600082015250565b7f5452414e53414354494f4e3a204d6f7265207468616e20616c6c6f7765640000600082015250565b7f554e415554484f52495a45443a2053656e646572206973206e6f74206175746860008201527f6f72697a65640000000000000000000000000000000000000000000000000000602082015250565b612a7981612645565b8114612a8457600080fd5b50565b612a9081612657565b8114612a9b57600080fd5b50565b612aa781612663565b8114612ab257600080fd5b50565b612abe8161268d565b8114612ac957600080fd5b50565b612ad5816126b4565b8114612ae057600080fd5b5056fea264697066735822122012122ec587de83628dc9050580ad158a84d52c0f3cb15864630f6b380ea2d19b64736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a8e81e5b14d99ac77d7f072d093f619f1030288f
-----Decoded View---------------
Arg [0] : _store (address): 0xA8E81E5B14D99aC77d7F072D093F619f1030288F
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a8e81e5b14d99ac77d7f072d093f619f1030288f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,379.39 | 0.9 | $3,041.45 |
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.