Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MintableEditions
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /** * ░█▄█░▄▀▄▒█▀▒▄▀▄░░░▒░░░▒██▀░█▀▄░█░▀█▀░█░▄▀▄░█▄░█░▄▀▀░░░█▄░█▒█▀░▀█▀ * ▒█▒█░▀▄▀░█▀░█▀█▒░░▀▀▒░░█▄▄▒█▄▀░█░▒█▒░█░▀▄▀░█▒▀█▒▄██▒░░█▒▀█░█▀░▒█▒ * * Made with 🧡 by Kreation.tech */ pragma solidity ^0.8.6; import {ERC721Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import {IERC2981Upgradeable, IERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; import {OwnableUpgradeable} from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import {CountersUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import {AddressUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "./EditionsMetadataHelper.sol"; import "./IMintableEditions.sol"; /** * This contract allows dynamic NFT minting. * * Operations allow for selling publicly, partial or total giveaways, direct giveaways and rewardings. */ contract MintableEditions is ERC721Upgradeable, IERC2981Upgradeable, IMintableEditions, OwnableUpgradeable { using CountersUpgradeable for CountersUpgradeable.Counter; event PriceChanged(uint256 amount); event EditionSold(uint256 price, address owner); event SharesPaid(address to, uint256 amount); struct Shares { address payable holder; uint16 bps; } struct Allowance { address minter; uint16 amount; } struct Info { // name of editions, used in the title as "$name $tokenId/$size" string name; // symbol of the tokens minted by this contract string symbol; // description of token editions string description; // content URL of the token editions string contentUrl; // SHA256 of the token editions content in bytes32 format (0xHASH) bytes32 contentHash; // optional token editions content thumbnail URL, for animated content only string thumbnailUrl; } // token id counter CountersUpgradeable.Counter private counter; // token description string public description; // token content URL string public contentUrl; // hash for the associated content bytes32 public contentHash; // token thumbnail URL, for animated content only string public thumbnailUrl; // the number of editions this contract can mint uint64 public size; // royalties ERC2981 in bps uint16 public royalties; // NFT rendering logic EditionsMetadataHelper private immutable metadata; // addresses allowed to mint editions mapping(address => uint16) public allowedMinters; // price for sale uint256 public price; // contract shareholders and shares information address[] private shareholders; mapping(address => uint16) public shares; // shares withdrawals uint256 private withdrawn; mapping(address => uint256) private withdrawals; constructor(EditionsMetadataHelper _metadata) initializer { metadata = _metadata; } /** * Creates a new edition and sets the only allowed minter to the address that creates/owns the edition: this can be re-assigned or updated later. * * @param _owner can authorize, mint, gets royalties and a dividend of sales, can update the content URL. * @param _info token properties * @param _size number of NFTs that can be minted from this contract: set to 0 for unbound * @param _price sale price in wei * @param _royalties perpetual royalties paid to the creator upon token selling * @param _shares array of tuples listing the shareholders and their respective shares in bps (one per each shareholder) * @param _allowances array of tuples listing the allowed minters and their allowances */ function initialize( address _owner, Info memory _info, uint64 _size, uint256 _price, uint16 _royalties, Shares[] memory _shares, Allowance[] memory _allowances ) public initializer { __ERC721_init(_info.name, _info.symbol); __Ownable_init(); transferOwnership(_owner); // set ownership description = _info.description; require(bytes(_info.contentUrl).length > 0, "Empty content URL"); contentUrl = _info.contentUrl; contentHash = _info.contentHash; thumbnailUrl = _info.thumbnailUrl; size = _size; price = _price; _setAllowances(_allowances); counter.increment(); // token ids start at 1 require(_royalties < 10_000, "Royalties too high"); royalties = _royalties; uint16 _totalShares; for (uint256 i = 0; i < _shares.length; i++) { _addPayee(_shares[i].holder, _shares[i].bps); _totalShares += _shares[i].bps; } require(_totalShares < 10_000, "Shares too high"); _addPayee(payable(_owner), 10_000 - _totalShares); } function _addPayee(address payable _account, uint16 _shares) internal { require(_account != address(0), "Shareholder is zero address"); require(_shares > 0 && _shares <= 10_000, "Shares are invalid"); require(shares[_account] == 0, "Shareholder already has shares"); shareholders.push(_account); shares[_account] = _shares; } /** * Returns the number of tokens minted so far */ function totalSupply() public view returns (uint256) { return counter.current() - 1; } /** * Basic ETH-based sales operation, performed at the given set price. * This operation is open to everyone as soon as the salePrice is set to a non-zero value. */ function purchase() external payable returns (uint256) { require(price > 0, "Not for sale"); require(msg.value == price, "Wrong price"); address[] memory toMint = new address[](1); toMint[0] = msg.sender; emit EditionSold(price, msg.sender); return _mintEditions(toMint); } /** * This operation sets the sale price, thus allowing anyone to acquire a token from this edition at the sale price via the purchase operation. * Setting the sale price to 0 prevents purchase of the tokens which is then allowed only to permitted addresses. * * @param _wei if sale price is 0, no sale is allowed, otherwise the provided amount of WEI is needed to start the sale. */ function setPrice(uint256 _wei) external onlyOwner { price = _wei; emit PriceChanged(price); } /** * Transfers all ETHs from the contract balance to the owner and shareholders. */ function shake() external { for (uint i = 0; i < shareholders.length; i++) { _withdraw(payable(shareholders[i])); } } /** * Transfers `withdrawable(msg.sender)` to the caller. */ function withdraw() external { _withdraw(payable(msg.sender)); } /** * Returns how much the account can withdraw from this contract. */ function withdrawable(address payable _account) external view returns (uint256) { uint256 _totalReceived = address(this).balance + withdrawn; return (_totalReceived * shares[_account]) / 10_000 - withdrawals[_account]; } /** * INTERNAL: attempts to transfer part of the contract balance to the caller, provided the account is a shareholder and * on the basis of its shares and previous withdrawals. * * @param _account the address of the shareholder to pay out */ function _withdraw(address payable _account) internal { uint256 _amount = this.withdrawable(_account); require(_amount != 0, "Account is not due payment"); withdrawals[_account] += _amount; withdrawn += _amount; AddressUpgradeable.sendValue(_account, _amount); emit SharesPaid(_account, _amount); } /** * INTERNAL: checks if the msg.sender is allowed to mint. */ function _isAllowedToMint() internal view returns (bool) { return (owner() == msg.sender) || _isPublicAllowed() || (allowedMinters[msg.sender] > 0); } /** * INTERNAL: checks if the ZeroAddress is allowed to mint. */ function _isPublicAllowed() internal view returns (bool) { return (allowedMinters[address(0x0)] > 0); } /** * If caller is listed as an allowed minter, mints one NFT for him. */ function mint() external override returns (uint256) { require(_isAllowedToMint(), "Minting not allowed"); address[] memory toMint = new address[](1); toMint[0] = msg.sender; if (owner() != msg.sender && !_isPublicAllowed()) { allowedMinters[msg.sender]--; } return _mintEditions(toMint); } /** * Mints multiple tokens, one for each of the given list of addresses. * Only the edition owner can use this operation and it is intended fo partial giveaways. * * @param recipients list of addresses to send the newly minted tokens to */ function mintAndTransfer(address[] memory recipients) external override returns (uint256) { require(_isAllowedToMint(), "Minting not allowed"); if (owner() != msg.sender && !_isPublicAllowed()) { require(allowedMinters[msg.sender] >= recipients.length, "Allowance exceeded"); allowedMinters[msg.sender] = allowedMinters[msg.sender] - uint16(recipients.length); } return _mintEditions(recipients); } /** * Returns the owner of the collection of editions. */ function owner() public view override(OwnableUpgradeable, IMintableEditions) returns (address) { return super.owner(); } function transferOwnership(address newOwner) public override onlyOwner { require(newOwner != address(0), "New owner is the zero address"); shares[newOwner] = shares[newOwner] + shares[owner()]; shares[owner()] = 0; _transferOwnership(newOwner); } function renounceOwnership() public override onlyOwner { require(address(this).balance == 0 && price == 0, "Potential loss of funds"); _transferOwnership(address(0)); } /** * Allows the edition owner to set the amount of tokens (max 65535) an address is allowed to mint. * * If the ZeroAddress (address(0x0)) is set as a minter with an allowance greater than 0, anyone will be allowed * to mint any amount of tokens, similarly to setApprovalForAll in the ERC721 spec. * If the allowed amount is set to 0 then the address will NOT be allowed to mint. * * @param allowances tuples of (address, uint16) describing how many tokens an address is allowed to mint, 0 disables minting */ function setApprovedMinters(Allowance[] memory allowances) external onlyOwner { _setAllowances(allowances); } function _setAllowances(Allowance[] memory allowances) internal { for (uint i = 0; i < allowances.length; i++) { allowedMinters[allowances[i].minter] = allowances[i].amount; } } /** * Allows for updates of edition urls by the owner of the edition. * Only URLs can be updated (data-uris are supported), hashes cannot be updated. */ function updateEditionsURLs(string memory _contentUrl, string memory _thumbnailUrl) external onlyOwner { require(bytes(_contentUrl).length > 0, "Empty content URL"); contentUrl = _contentUrl; thumbnailUrl = _thumbnailUrl; } /** * Returns the number of tokens still available for minting (uint64 when open edition) */ function mintable() public view override returns (uint256) { // atEditionId is one-indexed hence the need to remove one here return ((size == 0) ? type(uint64).max : size + 1) - counter.current(); } /** * User burn function for token id. * * @param tokenId token edition identifier to burn */ function burn(uint256 tokenId) external { require(_isApprovedOrOwner(_msgSender(), tokenId), "Not approved"); _burn(tokenId); } /** * Private function to mint without any access checks. * Called by the public edition minting functions. */ function _mintEditions(address[] memory recipients) internal returns (uint256) { require(uint64(mintable()) >= recipients.length, "Sold out"); for (uint i = 0; i < recipients.length; i++) { _mint(recipients[i], counter.current()); counter.increment(); } return counter.current(); } /** * Get URIs and hash for edition NFT * * @return contentUrl, contentHash */ function getURI() public view returns (string memory, bytes32, string memory) { return (contentUrl, contentHash, thumbnailUrl); } /** * Get URI for given token id * * @param tokenId token id to get uri for * @return base64-encoded json metadata object */ function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "Edition doesn't exist"); return metadata.createTokenURI(name(), description, contentUrl, thumbnailUrl, tokenId, size); } /** * ERC2981 - Gets royalty information for token * * @param _value the sale price for this token */ function royaltyInfo(uint256, uint256 _value) external view override returns (address receiver, uint256 royaltyAmount) { if (owner() == address(0x0)) { return (owner(), 0); } return (owner(), (_value * royalties) / 10_000); } function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, IERC165Upgradeable) returns (bool) { return type(IERC2981Upgradeable).interfaceId == interfaceId || ERC721Upgradeable.supportsInterface(interfaceId); } }
// 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 (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @dev Called with the sale price to determine how much royalty is owed and to whom. * @param tokenId - the NFT asset queried for royalty information * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// 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/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.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 /** * ░█▄█░▄▀▄▒█▀▒▄▀▄░░░▒░░░▒██▀░█▀▄░█░▀█▀░█░▄▀▄░█▄░█░▄▀▀░░░█▄░█▒█▀░▀█▀ * ▒█▒█░▀▄▀░█▀░█▀█▒░░▀▀▒░░█▄▄▒█▄▀░█░▒█▒░█░▀▄▀░█▒▀█▒▄██▒░░█▒▀█░█▀░▒█▒ * * Made with 🧡 by Kreation.tech */ pragma solidity ^0.8.6; import {MetadataHelper} from "./MetadataHelper.sol"; /** * Shared NFT logic for rendering metadata associated with editions */ contract EditionsMetadataHelper is MetadataHelper { /** * Generates edition metadata from storage information as base64-json blob * Combines the media data and metadata * * @param name Name of NFT in metadata * @param description Description of NFT in metadata * @param contentUrl URL of content to render * @param thumbnailUrl optional URL of a thumbnail to render, for animated content only * @param tokenOfEdition unique identifier of a token edition * @param size total count of editions */ function createTokenURI(string memory name, string memory description, string memory contentUrl, string memory thumbnailUrl, uint256 tokenOfEdition, uint256 size) external pure returns (string memory) { string memory _tokenMediaData = tokenMediaData(contentUrl, thumbnailUrl, tokenOfEdition); bytes memory json = createMetadata(name, description, _tokenMediaData, tokenOfEdition, size); return encodeMetadata(json); } /** * Function to create the metadata json string for the nft edition * * @param name Name of NFT in metadata * @param description Description of NFT in metadata * @param mediaData Data for media to include in json object * @param tokenOfEdition Token ID for specific token * @param size Size of entire edition to show */ function createMetadata(string memory name, string memory description, string memory mediaData, uint256 tokenOfEdition, uint256 size) public pure returns (bytes memory) { bytes memory sizeText; if (size > 0) { sizeText = abi.encodePacked("/", numberToString(size)); } return abi.encodePacked('{"name":"', name, " ", numberToString(tokenOfEdition), sizeText, '","description":"', description, '","', mediaData, 'properties":{"number":', numberToString(tokenOfEdition), ',"name":"', name, '"}}'); } /** * Generates edition metadata from storage information as base64-json blob * Combines the media data and metadata * * @param contentUrl URL of image to render for edition * @param thumbnailUrl index of the content type to render for edition * @param tokenOfEdition token identifier */ function tokenMediaData(string memory contentUrl, string memory thumbnailUrl, uint256 tokenOfEdition) public pure returns (string memory) { if (bytes(thumbnailUrl).length == 0) { return string( abi.encodePacked( 'image":"', contentUrl, "?id=", numberToString(tokenOfEdition),'","')); } else { return string( abi.encodePacked( 'image":"', thumbnailUrl, "?id=", numberToString(tokenOfEdition),'","animation_url":"', contentUrl, "?id=", numberToString(tokenOfEdition),'","')); } } }
// SPDX-License-Identifier: MIT /** * ░█▄█░▄▀▄▒█▀▒▄▀▄░░░▒░░░▒██▀░█▀▄░█░▀█▀░█░▄▀▄░█▄░█░▄▀▀░░░█▄░█▒█▀░▀█▀ * ▒█▒█░▀▄▀░█▀░█▀█▒░░▀▀▒░░█▄▄▒█▄▀░█░▒█▒░█░▀▄▀░█▒▀█▒▄██▒░░█▒▀█░█▀░▒█▒ * * Made with 🧡 by Kreation.tech */ pragma solidity ^0.8.6; interface IMintableEditions { /** * Mints one token for the msg.sender. */ function mint() external returns (uint256); /** * Mints multiple tokens, one for each of the given addresses. * * @param to list of addresses to send the newly minted tokens to */ function mintAndTransfer(address[] memory to) external returns (uint256); /** * Returns the number of tokens still available for minting */ function mintable() external view returns (uint256); /** * Returns the owner of the editions contract. */ function owner() external view returns (address); }
// 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/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 // OpenZeppelin Contracts v4.4.0 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol";
// SPDX-License-Identifier: MIT /** * ░█▄█░▄▀▄▒█▀▒▄▀▄░░░▒░░░▒██▀░█▀▄░█░▀█▀░█░▄▀▄░█▄░█░▄▀▀░░░█▄░█▒█▀░▀█▀ * ▒█▒█░▀▄▀░█▀░█▀█▒░░▀▀▒░░█▄▄▒█▄▀░█░▒█▒░█░▀▄▀░█▒▀█▒▄██▒░░█▒▀█░█▀░▒█▒ * * Made with 🧡 by Kreation.tech */ pragma solidity ^0.8.6; import {StringsUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import {Base64} from "base64-sol/base64.sol"; /** * Shared utility functions for rendering on-chain metadata */ contract MetadataHelper { /** * @param unencoded bytes to base64-encode */ function base64Encode(bytes memory unencoded) public pure returns (string memory) { return Base64.encode(unencoded); } /** * Encodes the argument json bytes into base64-data uri format * * @param json raw json to base64 and turn into a data-uri */ function encodeMetadata(bytes memory json) public pure returns (string memory) { return string(abi.encodePacked("data:application/json;base64,", base64Encode(json))); } /** * Proxy to openzeppelin's toString function * * @param value number to return as a string */ function numberToString(uint256 value) public pure returns (string memory) { return StringsUpgradeable.toString(value); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
{ "optimizer": { "enabled": true, "runs": 200000 }, "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":"contract EditionsMetadataHelper","name":"_metadata","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"EditionSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"SharesPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedMinters","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contentHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contentUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getURI","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"contentUrl","type":"string"},{"internalType":"bytes32","name":"contentHash","type":"bytes32"},{"internalType":"string","name":"thumbnailUrl","type":"string"}],"internalType":"struct MintableEditions.Info","name":"_info","type":"tuple"},{"internalType":"uint64","name":"_size","type":"uint64"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"uint16","name":"_royalties","type":"uint16"},{"components":[{"internalType":"address payable","name":"holder","type":"address"},{"internalType":"uint16","name":"bps","type":"uint16"}],"internalType":"struct MintableEditions.Shares[]","name":"_shares","type":"tuple[]"},{"components":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint16","name":"amount","type":"uint16"}],"internalType":"struct MintableEditions.Allowance[]","name":"_allowances","type":"tuple[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"mintAndTransfer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"purchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalties","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"minter","type":"address"},{"internalType":"uint16","name":"amount","type":"uint16"}],"internalType":"struct MintableEditions.Allowance[]","name":"allowances","type":"tuple[]"}],"name":"setApprovedMinters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_wei","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"shares","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"size","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"thumbnailUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contentUrl","type":"string"},{"internalType":"string","name":"_thumbnailUrl","type":"string"}],"name":"updateEditionsURLs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_account","type":"address"}],"name":"withdrawable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162004ac638038062004ac6833981016040819052620000349162000101565b600054610100900460ff16806200004e575060005460ff16155b620000b65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff16158015620000d9576000805461ffff19166101011790555b6001600160a01b0382166080528015620000f9576000805461ff00191690555b505062000133565b6000602082840312156200011457600080fd5b81516001600160a01b03811681146200012c57600080fd5b9392505050565b6080516149776200014f6000396000611c2901526149776000f3fe6080604052600436106102bb5760003560e01c80637754305c1161016e578063b4db8f45116100cb578063d7b97ef61161007f578063f053dc5c11610064578063f053dc5c146107bc578063f0553be7146107e3578063f2fde38b1461080357600080fd5b8063d7b97ef614610746578063e985e9c51461076657600080fd5b8063c87b56dd116100b0578063c87b56dd146106d5578063ce513b6f146106f5578063ce7c2ac21461071557600080fd5b8063b4db8f45146106a0578063b88d4fde146106b557600080fd5b8063949d225d11610122578063a035b1fe11610107578063a035b1fe1461064a578063a22cb46514610660578063af5213601461068057600080fd5b8063949d225d146105fb57806395d89b411461063557600080fd5b8063850710c311610153578063850710c3146105b15780638da5cb5b146105c657806391b7f5ed146105db57600080fd5b80637754305c14610578578063825f98d41461059c57600080fd5b806342842e0e1161021c57806364edfbf0116101d057806370a08231116101b557806370a082311461052e578063715018a61461054e5780637284e4161461056357600080fd5b806364edfbf01461050657806366412c011461050e57600080fd5b80634bf365df116102015780634bf365df146104bb5780636352211e146104d0578063646c2e33146104f057600080fd5b806342842e0e1461047b57806342966c681461049b57600080fd5b806318160ddd116102735780632a55205a116102585780632a55205a146103d65780633ccfd60b14610422578063423afa661461043757600080fd5b806318160ddd146103a157806323b872dd146103b657600080fd5b8063081812fc116102a4578063081812fc14610317578063095ea7b31461035c5780631249c58b1461037e57600080fd5b806301ffc9a7146102c057806306fdde03146102f5575b600080fd5b3480156102cc57600080fd5b506102e06102db366004613c7a565b610823565b60405190151581526020015b60405180910390f35b34801561030157600080fd5b5061030a61087f565b6040516102ec9190613d0d565b34801561032357600080fd5b50610337610332366004613d20565b610911565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b34801561036857600080fd5b5061037c610377366004613d5b565b6109f0565b005b34801561038a57600080fd5b50610393610b7d565b6040519081526020016102ec565b3480156103ad57600080fd5b50610393610cf0565b3480156103c257600080fd5b5061037c6103d1366004613d87565b610d0c565b3480156103e257600080fd5b506103f66103f1366004613dc8565b610dae565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016102ec565b34801561042e57600080fd5b5061037c610e28565b34801561044357600080fd5b50610468610452366004613dea565b60cf6020526000908152604090205461ffff1681565b60405161ffff90911681526020016102ec565b34801561048757600080fd5b5061037c610496366004613d87565b610e33565b3480156104a757600080fd5b5061037c6104b6366004613d20565b610e4e565b3480156104c757600080fd5b50610393610ec9565b3480156104dc57600080fd5b506103376104eb366004613d20565b610f21565b3480156104fc57600080fd5b5061039360cc5481565b610393610fd3565b34801561051a57600080fd5b5061037c610529366004613fab565b61114b565b34801561053a57600080fd5b50610393610549366004613dea565b6111da565b34801561055a57600080fd5b5061037c6112a8565b34801561056f57600080fd5b5061030a6113ac565b34801561058457600080fd5b5061058d61143a565b6040516102ec93929190613fe0565b3480156105a857600080fd5b5061037c61156a565b3480156105bd57600080fd5b5061030a6115c6565b3480156105d257600080fd5b506103376115d3565b3480156105e757600080fd5b5061037c6105f6366004613d20565b6115f4565b34801561060757600080fd5b5060ce5461061c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102ec565b34801561064157600080fd5b5061030a6116b5565b34801561065657600080fd5b5061039360d05481565b34801561066c57600080fd5b5061037c61067b366004614015565b6116c4565b34801561068c57600080fd5b5061037c61069b366004614199565b6116d3565b3480156106ac57600080fd5b5061030a611ae4565b3480156106c157600080fd5b5061037c6106d0366004614327565b611af1565b3480156106e157600080fd5b5061030a6106f0366004613d20565b611b99565b34801561070157600080fd5b50610393610710366004613dea565b611d2f565b34801561072157600080fd5b50610468610730366004613dea565b60d26020526000908152604090205461ffff1681565b34801561075257600080fd5b506103936107613660046143a7565b611da3565b34801561077257600080fd5b506102e0610781366004614441565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b3480156107c857600080fd5b5060ce546104689068010000000000000000900461ffff1681565b3480156107ef57600080fd5b5061037c6107fe36600461446f565b611f59565b34801561080f57600080fd5b5061037c61081e366004613dea565b612071565b60007f2a55205a000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061087957506108798261228f565b92915050565b60606065805461088e906144d3565b80601f01602080910402602001604051908101604052809291908181526020018280546108ba906144d3565b80156109075780601f106108dc57610100808354040283529160200191610907565b820191906000526020600020905b8154815290600101906020018083116108ea57829003601f168201915b5050505050905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff166109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006109fb82610f21565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016109be565b3373ffffffffffffffffffffffffffffffffffffffff82161480610ae25750610ae28133610781565b610b6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109be565b610b788383612372565b505050565b6000610b87612412565b610bed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4d696e74696e67206e6f7420616c6c6f7765640000000000000000000000000060448201526064016109be565b604080516001808252818301909252600091602080830190803683370190505090503381600081518110610c2357610c23614527565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015233610c516115d3565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ca157506000805260cf6020527fe02c59459e6ae69bba35526a32783b104c6119df0d640a9ac4990ec2f8d493a95461ffff16155b15610ce15733600090815260cf60205260408120805461ffff1691610cc583614585565b91906101000a81548161ffff021916908361ffff160217905550505b610cea8161248c565b91505090565b60006001610cfd60c95490565b610d0791906145c1565b905090565b610d17335b8261256a565b610da3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109be565b610b788383836126da565b60008080610dba6115d3565b73ffffffffffffffffffffffffffffffffffffffff161415610de957610dde6115d3565b600091509150610e21565b610df16115d3565b60ce5461271090610e129068010000000000000000900461ffff16866145d8565b610e1c9190614615565b915091505b9250929050565b610e3133612941565b565b610b7883838360405180602001604052806000815250611af1565b610e5733610d11565b610ebd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f7420617070726f766564000000000000000000000000000000000000000060448201526064016109be565b610ec681612afb565b50565b6000610ed460c95490565b60ce5467ffffffffffffffff1615610f035760ce54610efe9067ffffffffffffffff166001614650565b610f0d565b67ffffffffffffffff5b67ffffffffffffffff16610d0791906145c1565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109be565b60008060d05411611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f7420666f722073616c65000000000000000000000000000000000000000060448201526064016109be565b60d05434146110ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f57726f6e6720707269636500000000000000000000000000000000000000000060448201526064016109be565b6040805160018082528183019092526000916020808301908036833701905050905033816000815181106110e1576110e1614527565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910182015260d0546040805191825233928201929092527f60a6c75698fadb72223808131f9f9bb9db3afa32122db6d94fb8fc985a504baa910160405180910390a1610cea8161248c565b336111546115d3565b73ffffffffffffffffffffffffffffffffffffffff16146111d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b610ec681612bc8565b600073ffffffffffffffffffffffffffffffffffffffff821661127f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016109be565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b336112b16115d3565b73ffffffffffffffffffffffffffffffffffffffff161461132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b4715801561133c575060d054155b6113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f506f74656e7469616c206c6f7373206f662066756e647300000000000000000060448201526064016109be565b610e316000612c7c565b60ca80546113b9906144d3565b80601f01602080910402602001604051908101604052809291908181526020018280546113e5906144d3565b80156114325780601f1061140757610100808354040283529160200191611432565b820191906000526020600020905b81548152906001019060200180831161141557829003601f168201915b505050505081565b60606000606060cb60cc5460cd828054611453906144d3565b80601f016020809104026020016040519081016040528092919081815260200182805461147f906144d3565b80156114cc5780601f106114a1576101008083540402835291602001916114cc565b820191906000526020600020905b8154815290600101906020018083116114af57829003601f168201915b505050505092508080546114df906144d3565b80601f016020809104026020016040519081016040528092919081815260200182805461150b906144d3565b80156115585780601f1061152d57610100808354040283529160200191611558565b820191906000526020600020905b81548152906001019060200180831161153b57829003601f168201915b50505050509050925092509250909192565b60005b60d154811015610ec6576115b460d1828154811061158d5761158d614527565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16612941565b806115be8161467c565b91505061156d565b60cb80546113b9906144d3565b6000610d0760975473ffffffffffffffffffffffffffffffffffffffff1690565b336115fd6115d3565b73ffffffffffffffffffffffffffffffffffffffff161461167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b60d08190556040518181527fa6dc15bdb68da224c66db4b3838d9a2b205138e8cff6774e57d0af91e196d6229060200160405180910390a150565b60606066805461088e906144d3565b6116cf338383612cf3565b5050565b600054610100900460ff16806116ec575060005460ff16155b611778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff161580156117b757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b6117c987600001518860200151612e21565b6117d1612f52565b6117da88612071565b604087015180516117f39160ca91602090910190613bb3565b50600087606001515111611863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f456d70747920636f6e74656e742055524c00000000000000000000000000000060448201526064016109be565b6060870151805161187c9160cb91602090910190613bb3565b50608087015160cc5560a0870151805161189e9160cd91602090910190613bb3565b5060ce80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff881617905560d08590556118e182612bc8565b6118ef60c980546001019055565b6127108461ffff161061195e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f79616c7469657320746f6f2068696768000000000000000000000000000060448201526064016109be565b60ce80547fffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffff166801000000000000000061ffff8716021790556000805b8451811015611a25576119e88582815181106119b9576119b9614527565b6020026020010151600001518683815181106119d7576119d7614527565b602002602001015160200151613077565b8481815181106119fa576119fa614527565b60200260200101516020015182611a1191906146b5565b915080611a1d8161467c565b91505061199b565b506127108161ffff1610611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f53686172657320746f6f2068696768000000000000000000000000000000000060448201526064016109be565b611aaa89611aa5836127106146d2565b613077565b508015611ada57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050505050505050565b60cd80546113b9906144d3565b611afb338361256a565b611b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109be565b611b93848484846132b5565b50505050565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16611c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f45646974696f6e20646f65736e2774206578697374000000000000000000000060448201526064016109be565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a50e6a68611c6b61087f565b60ce546040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b168152611cbd929160ca9160cb9160cd918a9167ffffffffffffffff16906004016147cc565b60006040518083038186803b158015611cd557600080fd5b505afa158015611ce9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610879919081019061483d565b60008060d35447611d4091906148b4565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260d4602090815260408083205460d2909252909120549192509061271090611d889061ffff16846145d8565b611d929190614615565b611d9c91906145c1565b9392505050565b6000611dad612412565b611e13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4d696e74696e67206e6f7420616c6c6f7765640000000000000000000000000060448201526064016109be565b33611e1c6115d3565b73ffffffffffffffffffffffffffffffffffffffff1614158015611e6c57506000805260cf6020527fe02c59459e6ae69bba35526a32783b104c6119df0d640a9ac4990ec2f8d493a95461ffff16155b15611f5057815133600090815260cf602052604090205461ffff161015611eef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f416c6c6f77616e6365206578636565646564000000000000000000000000000060448201526064016109be565b815133600090815260cf6020526040902054611f0f919061ffff166146d2565b33600090815260cf6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff929092169190911790555b6108798261248c565b33611f626115d3565b73ffffffffffffffffffffffffffffffffffffffff1614611fdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b600082511161204a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f456d70747920636f6e74656e742055524c00000000000000000000000000000060448201526064016109be565b815161205d9060cb906020850190613bb3565b508051610b789060cd906020840190613bb3565b3361207a6115d3565b73ffffffffffffffffffffffffffffffffffffffff16146120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8116612174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016109be565b60d260006121806115d3565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040918201600090812054918516815260d29093529120546121cc9161ffff90811691166146b5565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260d260208190526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9490941693909317909255908161222f6115d3565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff92909216919091179055610ec681612c7c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061232257507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610879565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906123cc82610f21565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60003361241d6115d3565b73ffffffffffffffffffffffffffffffffffffffff16148061246c57506000805260cf6020527fe02c59459e6ae69bba35526a32783b104c6119df0d640a9ac4990ec2f8d493a95461ffff1615155b80610d0757505033600090815260cf602052604090205461ffff16151590565b60008151612498610ec9565b67ffffffffffffffff16101561250a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64206f757400000000000000000000000000000000000000000000000060448201526064016109be565b60005b82518110156125615761254183828151811061252b5761252b614527565b602002602001015161253c60c95490565b613358565b61254f60c980546001019055565b806125598161467c565b91505061250d565b5060c954610879565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1661261b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109be565b600061262683610f21565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061269557508373ffffffffffffffffffffffffffffffffffffffff1661267d84610911565b73ffffffffffffffffffffffffffffffffffffffff16145b806126d2575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166126fa82610f21565b73ffffffffffffffffffffffffffffffffffffffff161461279d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016109be565b73ffffffffffffffffffffffffffffffffffffffff821661283f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109be565b61284a600082612372565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906128809084906145c1565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906128bb9084906148b4565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040517fce513b6f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152600090309063ce513b6f9060240160206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e191906148cc565b905080612a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4163636f756e74206973206e6f7420647565207061796d656e7400000000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260d4602052604081208054839290612a7f9084906148b4565b925050819055508060d36000828254612a9891906148b4565b90915550612aa89050828261351a565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527fc271d5cc8e899d2f13fb92ceb234c8beb4f1b82ebee351bd4fd728a79773e12b910160405180910390a15050565b6000612b0682610f21565b9050612b13600083612372565b73ffffffffffffffffffffffffffffffffffffffff81166000908152606860205260408120805460019290612b499084906145c1565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60005b81518110156116cf57818181518110612be657612be6614527565b60200260200101516020015160cf6000848481518110612c0857612c08614527565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9290921691909117905580612c748161467c565b915050612bcb565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612d89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff1680612e3a575060005460ff16155b612ec6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff16158015612f0557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612f0d613674565b612f15613674565b612f1f8383613788565b8015610b7857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b600054610100900460ff1680612f6b575060005460ff16155b612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff1615801561303657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b61303e613674565b6130466138c7565b8015610ec657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b73ffffffffffffffffffffffffffffffffffffffff82166130f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5368617265686f6c646572206973207a65726f2061646472657373000000000060448201526064016109be565b60008161ffff1611801561310e57506127108161ffff1611155b613174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5368617265732061726520696e76616c6964000000000000000000000000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260d2602052604090205461ffff1615613205576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5368617265686f6c64657220616c72656164792068617320736861726573000060448201526064016109be565b60d18054600181019091557f695fb3134ad82c3b8022bc5464edd0bcc9424ef672b52245dcb6ab2374327ce30180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169283179055600091825260d2602052604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff909216919091179055565b6132c08484846126da565b6132cc848484846139b4565b611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109be565b73ffffffffffffffffffffffffffffffffffffffff82166133d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109be565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613461576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906134979084906148b4565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80471015613584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109be565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146135de576040519150601f19603f3d011682016040523d82523d6000602084013e6135e3565b606091505b5050905080610b78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109be565b600054610100900460ff168061368d575060005460ff16155b613719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff1615801561304657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790558015610ec657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b600054610100900460ff16806137a1575060005460ff16155b61382d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff1615801561386c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b825161387f906065906020860190613bb3565b508151613893906066906020850190613bb3565b508015610b7857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b600054610100900460ff16806138e0575060005460ff16155b61396c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff161580156139ab57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b61304633612c7c565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613ba8576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613a2b9033908990889088906004016148e5565b602060405180830381600087803b158015613a4557600080fd5b505af1925050508015613a93575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613a9091810190614924565b60015b613b5d573d808015613ac1576040519150601f19603f3d011682016040523d82523d6000602084013e613ac6565b606091505b508051613b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109be565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506126d2565b506001949350505050565b828054613bbf906144d3565b90600052602060002090601f016020900481019282613be15760008555613c27565b82601f10613bfa57805160ff1916838001178555613c27565b82800160010185558215613c27579182015b82811115613c27578251825591602001919060010190613c0c565b50613c33929150613c37565b5090565b5b80821115613c335760008155600101613c38565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610ec657600080fd5b600060208284031215613c8c57600080fd5b8135611d9c81613c4c565b60005b83811015613cb2578181015183820152602001613c9a565b83811115611b935750506000910152565b60008151808452613cdb816020860160208601613c97565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611d9c6020830184613cc3565b600060208284031215613d3257600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610ec657600080fd5b60008060408385031215613d6e57600080fd5b8235613d7981613d39565b946020939093013593505050565b600080600060608486031215613d9c57600080fd5b8335613da781613d39565b92506020840135613db781613d39565b929592945050506040919091013590565b60008060408385031215613ddb57600080fd5b50508035926020909101359150565b600060208284031215613dfc57600080fd5b8135611d9c81613d39565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613e5957613e59613e07565b60405290565b60405160c0810167ffffffffffffffff81118282101715613e5957613e59613e07565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613ec957613ec9613e07565b604052919050565b600067ffffffffffffffff821115613eeb57613eeb613e07565b5060051b60200190565b803561ffff81168114613f0757600080fd5b919050565b600082601f830112613f1d57600080fd5b81356020613f32613f2d83613ed1565b613e82565b82815260069290921b84018101918181019086841115613f5157600080fd5b8286015b84811015613fa05760408189031215613f6e5760008081fd5b613f76613e36565b8135613f8181613d39565b8152613f8e828601613ef5565b81860152835291830191604001613f55565b509695505050505050565b600060208284031215613fbd57600080fd5b813567ffffffffffffffff811115613fd457600080fd5b6126d284828501613f0c565b606081526000613ff36060830186613cc3565b846020840152828103604084015261400b8185613cc3565b9695505050505050565b6000806040838503121561402857600080fd5b823561403381613d39565b91506020830135801515811461404857600080fd5b809150509250929050565b600067ffffffffffffffff82111561406d5761406d613e07565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60006140a7613f2d84614053565b90508281528383830111156140bb57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126140e357600080fd5b611d9c83833560208501614099565b803567ffffffffffffffff81168114613f0757600080fd5b600082601f83011261411b57600080fd5b8135602061412b613f2d83613ed1565b82815260069290921b8401810191818101908684111561414a57600080fd5b8286015b84811015613fa057604081890312156141675760008081fd5b61416f613e36565b813561417a81613d39565b8152614187828601613ef5565b8186015283529183019160400161414e565b600080600080600080600060e0888a0312156141b457600080fd5b87356141bf81613d39565b9650602088013567ffffffffffffffff808211156141dc57600080fd5b9089019060c0828c0312156141f057600080fd5b6141f8613e5f565b82358281111561420757600080fd5b6142138d8286016140d2565b82525060208301358281111561422857600080fd5b6142348d8286016140d2565b60208301525060408301358281111561424c57600080fd5b6142588d8286016140d2565b60408301525060608301358281111561427057600080fd5b61427c8d8286016140d2565b6060830152506080830135608082015260a08301358281111561429e57600080fd5b6142aa8d8286016140d2565b60a08301525097506142be60408b016140f2565b965060608a013595506142d360808b01613ef5565b945060a08a01359150808211156142e957600080fd5b6142f58b838c0161410a565b935060c08a013591508082111561430b57600080fd5b506143188a828b01613f0c565b91505092959891949750929550565b6000806000806080858703121561433d57600080fd5b843561434881613d39565b9350602085013561435881613d39565b925060408501359150606085013567ffffffffffffffff81111561437b57600080fd5b8501601f8101871361438c57600080fd5b61439b87823560208401614099565b91505092959194509250565b600060208083850312156143ba57600080fd5b823567ffffffffffffffff8111156143d157600080fd5b8301601f810185136143e257600080fd5b80356143f0613f2d82613ed1565b81815260059190911b8201830190838101908783111561440f57600080fd5b928401925b8284101561443657833561442781613d39565b82529284019290840190614414565b979650505050505050565b6000806040838503121561445457600080fd5b823561445f81613d39565b9150602083013561404881613d39565b6000806040838503121561448257600080fd5b823567ffffffffffffffff8082111561449a57600080fd5b6144a6868387016140d2565b935060208501359150808211156144bc57600080fd5b506144c9858286016140d2565b9150509250929050565b600181811c908216806144e757607f821691505b60208210811415614521577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061ffff82168061459957614599614556565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b6000828210156145d3576145d3614556565b500390565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561461057614610614556565b500290565b60008261464b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600067ffffffffffffffff80831681851680830382111561467357614673614556565b01949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156146ae576146ae614556565b5060010190565b600061ffff80831681851680830382111561467357614673614556565b600061ffff838116908316818110156146ed576146ed614556565b039392505050565b8054600090600181811c908083168061470f57607f831692505b602080841082141561474a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b838852602088018280156147655760018114614794576147bf565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008716825282820197506147bf565b60008981526020902060005b878110156147b9578154848201529086019084016147a0565b83019850505b5050505050505092915050565b60c0815260006147df60c0830189613cc3565b82810360208401526147f181896146f5565b9050828103604084015261480581886146f5565b9050828103606084015261481981876146f5565b91505083608083015267ffffffffffffffff831660a0830152979650505050505050565b60006020828403121561484f57600080fd5b815167ffffffffffffffff81111561486657600080fd5b8201601f8101841361487757600080fd5b8051614885613f2d82614053565b81815285602083850101111561489a57600080fd5b6148ab826020830160208601613c97565b95945050505050565b600082198211156148c7576148c7614556565b500190565b6000602082840312156148de57600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261400b6080830184613cc3565b60006020828403121561493657600080fd5b8151611d9c81613c4c56fea2646970667358221220141d25c229ac80e89b11f898b1da63b660f04741526ae92fe2634e09d17395f264736f6c634300080900330000000000000000000000003e9434606a403d8479539c5dcf53e660f0808168
Deployed Bytecode
0x6080604052600436106102bb5760003560e01c80637754305c1161016e578063b4db8f45116100cb578063d7b97ef61161007f578063f053dc5c11610064578063f053dc5c146107bc578063f0553be7146107e3578063f2fde38b1461080357600080fd5b8063d7b97ef614610746578063e985e9c51461076657600080fd5b8063c87b56dd116100b0578063c87b56dd146106d5578063ce513b6f146106f5578063ce7c2ac21461071557600080fd5b8063b4db8f45146106a0578063b88d4fde146106b557600080fd5b8063949d225d11610122578063a035b1fe11610107578063a035b1fe1461064a578063a22cb46514610660578063af5213601461068057600080fd5b8063949d225d146105fb57806395d89b411461063557600080fd5b8063850710c311610153578063850710c3146105b15780638da5cb5b146105c657806391b7f5ed146105db57600080fd5b80637754305c14610578578063825f98d41461059c57600080fd5b806342842e0e1161021c57806364edfbf0116101d057806370a08231116101b557806370a082311461052e578063715018a61461054e5780637284e4161461056357600080fd5b806364edfbf01461050657806366412c011461050e57600080fd5b80634bf365df116102015780634bf365df146104bb5780636352211e146104d0578063646c2e33146104f057600080fd5b806342842e0e1461047b57806342966c681461049b57600080fd5b806318160ddd116102735780632a55205a116102585780632a55205a146103d65780633ccfd60b14610422578063423afa661461043757600080fd5b806318160ddd146103a157806323b872dd146103b657600080fd5b8063081812fc116102a4578063081812fc14610317578063095ea7b31461035c5780631249c58b1461037e57600080fd5b806301ffc9a7146102c057806306fdde03146102f5575b600080fd5b3480156102cc57600080fd5b506102e06102db366004613c7a565b610823565b60405190151581526020015b60405180910390f35b34801561030157600080fd5b5061030a61087f565b6040516102ec9190613d0d565b34801561032357600080fd5b50610337610332366004613d20565b610911565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102ec565b34801561036857600080fd5b5061037c610377366004613d5b565b6109f0565b005b34801561038a57600080fd5b50610393610b7d565b6040519081526020016102ec565b3480156103ad57600080fd5b50610393610cf0565b3480156103c257600080fd5b5061037c6103d1366004613d87565b610d0c565b3480156103e257600080fd5b506103f66103f1366004613dc8565b610dae565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016102ec565b34801561042e57600080fd5b5061037c610e28565b34801561044357600080fd5b50610468610452366004613dea565b60cf6020526000908152604090205461ffff1681565b60405161ffff90911681526020016102ec565b34801561048757600080fd5b5061037c610496366004613d87565b610e33565b3480156104a757600080fd5b5061037c6104b6366004613d20565b610e4e565b3480156104c757600080fd5b50610393610ec9565b3480156104dc57600080fd5b506103376104eb366004613d20565b610f21565b3480156104fc57600080fd5b5061039360cc5481565b610393610fd3565b34801561051a57600080fd5b5061037c610529366004613fab565b61114b565b34801561053a57600080fd5b50610393610549366004613dea565b6111da565b34801561055a57600080fd5b5061037c6112a8565b34801561056f57600080fd5b5061030a6113ac565b34801561058457600080fd5b5061058d61143a565b6040516102ec93929190613fe0565b3480156105a857600080fd5b5061037c61156a565b3480156105bd57600080fd5b5061030a6115c6565b3480156105d257600080fd5b506103376115d3565b3480156105e757600080fd5b5061037c6105f6366004613d20565b6115f4565b34801561060757600080fd5b5060ce5461061c9067ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016102ec565b34801561064157600080fd5b5061030a6116b5565b34801561065657600080fd5b5061039360d05481565b34801561066c57600080fd5b5061037c61067b366004614015565b6116c4565b34801561068c57600080fd5b5061037c61069b366004614199565b6116d3565b3480156106ac57600080fd5b5061030a611ae4565b3480156106c157600080fd5b5061037c6106d0366004614327565b611af1565b3480156106e157600080fd5b5061030a6106f0366004613d20565b611b99565b34801561070157600080fd5b50610393610710366004613dea565b611d2f565b34801561072157600080fd5b50610468610730366004613dea565b60d26020526000908152604090205461ffff1681565b34801561075257600080fd5b506103936107613660046143a7565b611da3565b34801561077257600080fd5b506102e0610781366004614441565b73ffffffffffffffffffffffffffffffffffffffff9182166000908152606a6020908152604080832093909416825291909152205460ff1690565b3480156107c857600080fd5b5060ce546104689068010000000000000000900461ffff1681565b3480156107ef57600080fd5b5061037c6107fe36600461446f565b611f59565b34801561080f57600080fd5b5061037c61081e366004613dea565b612071565b60007f2a55205a000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316148061087957506108798261228f565b92915050565b60606065805461088e906144d3565b80601f01602080910402602001604051908101604052809291908181526020018280546108ba906144d3565b80156109075780601f106108dc57610100808354040283529160200191610907565b820191906000526020600020905b8154815290600101906020018083116108ea57829003601f168201915b5050505050905090565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff166109c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526069602052604090205473ffffffffffffffffffffffffffffffffffffffff1690565b60006109fb82610f21565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ab9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016109be565b3373ffffffffffffffffffffffffffffffffffffffff82161480610ae25750610ae28133610781565b610b6e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109be565b610b788383612372565b505050565b6000610b87612412565b610bed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4d696e74696e67206e6f7420616c6c6f7765640000000000000000000000000060448201526064016109be565b604080516001808252818301909252600091602080830190803683370190505090503381600081518110610c2357610c23614527565b73ffffffffffffffffffffffffffffffffffffffff9092166020928302919091019091015233610c516115d3565b73ffffffffffffffffffffffffffffffffffffffff1614158015610ca157506000805260cf6020527fe02c59459e6ae69bba35526a32783b104c6119df0d640a9ac4990ec2f8d493a95461ffff16155b15610ce15733600090815260cf60205260408120805461ffff1691610cc583614585565b91906101000a81548161ffff021916908361ffff160217905550505b610cea8161248c565b91505090565b60006001610cfd60c95490565b610d0791906145c1565b905090565b610d17335b8261256a565b610da3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109be565b610b788383836126da565b60008080610dba6115d3565b73ffffffffffffffffffffffffffffffffffffffff161415610de957610dde6115d3565b600091509150610e21565b610df16115d3565b60ce5461271090610e129068010000000000000000900461ffff16866145d8565b610e1c9190614615565b915091505b9250929050565b610e3133612941565b565b610b7883838360405180602001604052806000815250611af1565b610e5733610d11565b610ebd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f7420617070726f766564000000000000000000000000000000000000000060448201526064016109be565b610ec681612afb565b50565b6000610ed460c95490565b60ce5467ffffffffffffffff1615610f035760ce54610efe9067ffffffffffffffff166001614650565b610f0d565b67ffffffffffffffff5b67ffffffffffffffff16610d0791906145c1565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1680610879576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109be565b60008060d05411611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f4e6f7420666f722073616c65000000000000000000000000000000000000000060448201526064016109be565b60d05434146110ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f57726f6e6720707269636500000000000000000000000000000000000000000060448201526064016109be565b6040805160018082528183019092526000916020808301908036833701905050905033816000815181106110e1576110e1614527565b73ffffffffffffffffffffffffffffffffffffffff90921660209283029190910182015260d0546040805191825233928201929092527f60a6c75698fadb72223808131f9f9bb9db3afa32122db6d94fb8fc985a504baa910160405180910390a1610cea8161248c565b336111546115d3565b73ffffffffffffffffffffffffffffffffffffffff16146111d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b610ec681612bc8565b600073ffffffffffffffffffffffffffffffffffffffff821661127f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016109be565b5073ffffffffffffffffffffffffffffffffffffffff1660009081526068602052604090205490565b336112b16115d3565b73ffffffffffffffffffffffffffffffffffffffff161461132e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b4715801561133c575060d054155b6113a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f506f74656e7469616c206c6f7373206f662066756e647300000000000000000060448201526064016109be565b610e316000612c7c565b60ca80546113b9906144d3565b80601f01602080910402602001604051908101604052809291908181526020018280546113e5906144d3565b80156114325780601f1061140757610100808354040283529160200191611432565b820191906000526020600020905b81548152906001019060200180831161141557829003601f168201915b505050505081565b60606000606060cb60cc5460cd828054611453906144d3565b80601f016020809104026020016040519081016040528092919081815260200182805461147f906144d3565b80156114cc5780601f106114a1576101008083540402835291602001916114cc565b820191906000526020600020905b8154815290600101906020018083116114af57829003601f168201915b505050505092508080546114df906144d3565b80601f016020809104026020016040519081016040528092919081815260200182805461150b906144d3565b80156115585780601f1061152d57610100808354040283529160200191611558565b820191906000526020600020905b81548152906001019060200180831161153b57829003601f168201915b50505050509050925092509250909192565b60005b60d154811015610ec6576115b460d1828154811061158d5761158d614527565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16612941565b806115be8161467c565b91505061156d565b60cb80546113b9906144d3565b6000610d0760975473ffffffffffffffffffffffffffffffffffffffff1690565b336115fd6115d3565b73ffffffffffffffffffffffffffffffffffffffff161461167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b60d08190556040518181527fa6dc15bdb68da224c66db4b3838d9a2b205138e8cff6774e57d0af91e196d6229060200160405180910390a150565b60606066805461088e906144d3565b6116cf338383612cf3565b5050565b600054610100900460ff16806116ec575060005460ff16155b611778576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff161580156117b757600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b6117c987600001518860200151612e21565b6117d1612f52565b6117da88612071565b604087015180516117f39160ca91602090910190613bb3565b50600087606001515111611863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f456d70747920636f6e74656e742055524c00000000000000000000000000000060448201526064016109be565b6060870151805161187c9160cb91602090910190613bb3565b50608087015160cc5560a0870151805161189e9160cd91602090910190613bb3565b5060ce80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff881617905560d08590556118e182612bc8565b6118ef60c980546001019055565b6127108461ffff161061195e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f526f79616c7469657320746f6f2068696768000000000000000000000000000060448201526064016109be565b60ce80547fffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffff166801000000000000000061ffff8716021790556000805b8451811015611a25576119e88582815181106119b9576119b9614527565b6020026020010151600001518683815181106119d7576119d7614527565b602002602001015160200151613077565b8481815181106119fa576119fa614527565b60200260200101516020015182611a1191906146b5565b915080611a1d8161467c565b91505061199b565b506127108161ffff1610611a95576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f53686172657320746f6f2068696768000000000000000000000000000000000060448201526064016109be565b611aaa89611aa5836127106146d2565b613077565b508015611ada57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050505050505050565b60cd80546113b9906144d3565b611afb338361256a565b611b87576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109be565b611b93848484846132b5565b50505050565b60008181526067602052604090205460609073ffffffffffffffffffffffffffffffffffffffff16611c27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f45646974696f6e20646f65736e2774206578697374000000000000000000000060448201526064016109be565b7f0000000000000000000000003e9434606a403d8479539c5dcf53e660f080816873ffffffffffffffffffffffffffffffffffffffff1663a50e6a68611c6b61087f565b60ce546040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b168152611cbd929160ca9160cb9160cd918a9167ffffffffffffffff16906004016147cc565b60006040518083038186803b158015611cd557600080fd5b505afa158015611ce9573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610879919081019061483d565b60008060d35447611d4091906148b4565b73ffffffffffffffffffffffffffffffffffffffff8416600090815260d4602090815260408083205460d2909252909120549192509061271090611d889061ffff16846145d8565b611d929190614615565b611d9c91906145c1565b9392505050565b6000611dad612412565b611e13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4d696e74696e67206e6f7420616c6c6f7765640000000000000000000000000060448201526064016109be565b33611e1c6115d3565b73ffffffffffffffffffffffffffffffffffffffff1614158015611e6c57506000805260cf6020527fe02c59459e6ae69bba35526a32783b104c6119df0d640a9ac4990ec2f8d493a95461ffff16155b15611f5057815133600090815260cf602052604090205461ffff161015611eef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f416c6c6f77616e6365206578636565646564000000000000000000000000000060448201526064016109be565b815133600090815260cf6020526040902054611f0f919061ffff166146d2565b33600090815260cf6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff929092169190911790555b6108798261248c565b33611f626115d3565b73ffffffffffffffffffffffffffffffffffffffff1614611fdf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b600082511161204a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f456d70747920636f6e74656e742055524c00000000000000000000000000000060448201526064016109be565b815161205d9060cb906020850190613bb3565b508051610b789060cd906020840190613bb3565b3361207a6115d3565b73ffffffffffffffffffffffffffffffffffffffff16146120f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8116612174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6577206f776e657220697320746865207a65726f206164647265737300000060448201526064016109be565b60d260006121806115d3565b73ffffffffffffffffffffffffffffffffffffffff90811682526020808301939093526040918201600090812054918516815260d29093529120546121cc9161ffff90811691166146b5565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260d260208190526040822080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9490941693909317909255908161222f6115d3565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff92909216919091179055610ec681612c7c565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061232257507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061087957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610879565b600081815260696020526040902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841690811790915581906123cc82610f21565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60003361241d6115d3565b73ffffffffffffffffffffffffffffffffffffffff16148061246c57506000805260cf6020527fe02c59459e6ae69bba35526a32783b104c6119df0d640a9ac4990ec2f8d493a95461ffff1615155b80610d0757505033600090815260cf602052604090205461ffff16151590565b60008151612498610ec9565b67ffffffffffffffff16101561250a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f536f6c64206f757400000000000000000000000000000000000000000000000060448201526064016109be565b60005b82518110156125615761254183828151811061252b5761252b614527565b602002602001015161253c60c95490565b613358565b61254f60c980546001019055565b806125598161467c565b91505061250d565b5060c954610879565b60008181526067602052604081205473ffffffffffffffffffffffffffffffffffffffff1661261b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109be565b600061262683610f21565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148061269557508373ffffffffffffffffffffffffffffffffffffffff1661267d84610911565b73ffffffffffffffffffffffffffffffffffffffff16145b806126d2575073ffffffffffffffffffffffffffffffffffffffff8082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b8273ffffffffffffffffffffffffffffffffffffffff166126fa82610f21565b73ffffffffffffffffffffffffffffffffffffffff161461279d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016109be565b73ffffffffffffffffffffffffffffffffffffffff821661283f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109be565b61284a600082612372565b73ffffffffffffffffffffffffffffffffffffffff831660009081526068602052604081208054600192906128809084906145c1565b909155505073ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906128bb9084906148b4565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff86811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040517fce513b6f00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152600090309063ce513b6f9060240160206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e191906148cc565b905080612a4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4163636f756e74206973206e6f7420647565207061796d656e7400000000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260d4602052604081208054839290612a7f9084906148b4565b925050819055508060d36000828254612a9891906148b4565b90915550612aa89050828261351a565b6040805173ffffffffffffffffffffffffffffffffffffffff84168152602081018390527fc271d5cc8e899d2f13fb92ceb234c8beb4f1b82ebee351bd4fd728a79773e12b910160405180910390a15050565b6000612b0682610f21565b9050612b13600083612372565b73ffffffffffffffffffffffffffffffffffffffff81166000908152606860205260408120805460019290612b499084906145c1565b909155505060008281526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555183919073ffffffffffffffffffffffffffffffffffffffff8416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60005b81518110156116cf57818181518110612be657612be6614527565b60200260200101516020015160cf6000848481518110612c0857612c08614527565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff16825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff9290921691909117905580612c748161467c565b915050612bcb565b6097805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612d89576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8381166000818152606a602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600054610100900460ff1680612e3a575060005460ff16155b612ec6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff16158015612f0557600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b612f0d613674565b612f15613674565b612f1f8383613788565b8015610b7857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b600054610100900460ff1680612f6b575060005460ff16155b612ff7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff1615801561303657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b61303e613674565b6130466138c7565b8015610ec657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b73ffffffffffffffffffffffffffffffffffffffff82166130f4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f5368617265686f6c646572206973207a65726f2061646472657373000000000060448201526064016109be565b60008161ffff1611801561310e57506127108161ffff1611155b613174576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f5368617265732061726520696e76616c6964000000000000000000000000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260d2602052604090205461ffff1615613205576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f5368617265686f6c64657220616c72656164792068617320736861726573000060448201526064016109be565b60d18054600181019091557f695fb3134ad82c3b8022bc5464edd0bcc9424ef672b52245dcb6ab2374327ce30180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff939093169283179055600091825260d2602052604090912080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001661ffff909216919091179055565b6132c08484846126da565b6132cc848484846139b4565b611b93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109be565b73ffffffffffffffffffffffffffffffffffffffff82166133d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109be565b60008181526067602052604090205473ffffffffffffffffffffffffffffffffffffffff1615613461576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109be565b73ffffffffffffffffffffffffffffffffffffffff821660009081526068602052604081208054600192906134979084906148b4565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b80471015613584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016109be565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146135de576040519150601f19603f3d011682016040523d82523d6000602084013e6135e3565b606091505b5050905080610b78576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016109be565b600054610100900460ff168061368d575060005460ff16155b613719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff1615801561304657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790558015610ec657600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16905550565b600054610100900460ff16806137a1575060005460ff16155b61382d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff1615801561386c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b825161387f906065906020860190613bb3565b508151613893906066906020850190613bb3565b508015610b7857600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055505050565b600054610100900460ff16806138e0575060005460ff16155b61396c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084016109be565b600054610100900460ff161580156139ab57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b61304633612c7c565b600073ffffffffffffffffffffffffffffffffffffffff84163b15613ba8576040517f150b7a0200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063150b7a0290613a2b9033908990889088906004016148e5565b602060405180830381600087803b158015613a4557600080fd5b505af1925050508015613a93575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252613a9091810190614924565b60015b613b5d573d808015613ac1576040519150601f19603f3d011682016040523d82523d6000602084013e613ac6565b606091505b508051613b55576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109be565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506126d2565b506001949350505050565b828054613bbf906144d3565b90600052602060002090601f016020900481019282613be15760008555613c27565b82601f10613bfa57805160ff1916838001178555613c27565b82800160010185558215613c27579182015b82811115613c27578251825591602001919060010190613c0c565b50613c33929150613c37565b5090565b5b80821115613c335760008155600101613c38565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114610ec657600080fd5b600060208284031215613c8c57600080fd5b8135611d9c81613c4c565b60005b83811015613cb2578181015183820152602001613c9a565b83811115611b935750506000910152565b60008151808452613cdb816020860160208601613c97565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611d9c6020830184613cc3565b600060208284031215613d3257600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610ec657600080fd5b60008060408385031215613d6e57600080fd5b8235613d7981613d39565b946020939093013593505050565b600080600060608486031215613d9c57600080fd5b8335613da781613d39565b92506020840135613db781613d39565b929592945050506040919091013590565b60008060408385031215613ddb57600080fd5b50508035926020909101359150565b600060208284031215613dfc57600080fd5b8135611d9c81613d39565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff81118282101715613e5957613e59613e07565b60405290565b60405160c0810167ffffffffffffffff81118282101715613e5957613e59613e07565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715613ec957613ec9613e07565b604052919050565b600067ffffffffffffffff821115613eeb57613eeb613e07565b5060051b60200190565b803561ffff81168114613f0757600080fd5b919050565b600082601f830112613f1d57600080fd5b81356020613f32613f2d83613ed1565b613e82565b82815260069290921b84018101918181019086841115613f5157600080fd5b8286015b84811015613fa05760408189031215613f6e5760008081fd5b613f76613e36565b8135613f8181613d39565b8152613f8e828601613ef5565b81860152835291830191604001613f55565b509695505050505050565b600060208284031215613fbd57600080fd5b813567ffffffffffffffff811115613fd457600080fd5b6126d284828501613f0c565b606081526000613ff36060830186613cc3565b846020840152828103604084015261400b8185613cc3565b9695505050505050565b6000806040838503121561402857600080fd5b823561403381613d39565b91506020830135801515811461404857600080fd5b809150509250929050565b600067ffffffffffffffff82111561406d5761406d613e07565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60006140a7613f2d84614053565b90508281528383830111156140bb57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126140e357600080fd5b611d9c83833560208501614099565b803567ffffffffffffffff81168114613f0757600080fd5b600082601f83011261411b57600080fd5b8135602061412b613f2d83613ed1565b82815260069290921b8401810191818101908684111561414a57600080fd5b8286015b84811015613fa057604081890312156141675760008081fd5b61416f613e36565b813561417a81613d39565b8152614187828601613ef5565b8186015283529183019160400161414e565b600080600080600080600060e0888a0312156141b457600080fd5b87356141bf81613d39565b9650602088013567ffffffffffffffff808211156141dc57600080fd5b9089019060c0828c0312156141f057600080fd5b6141f8613e5f565b82358281111561420757600080fd5b6142138d8286016140d2565b82525060208301358281111561422857600080fd5b6142348d8286016140d2565b60208301525060408301358281111561424c57600080fd5b6142588d8286016140d2565b60408301525060608301358281111561427057600080fd5b61427c8d8286016140d2565b6060830152506080830135608082015260a08301358281111561429e57600080fd5b6142aa8d8286016140d2565b60a08301525097506142be60408b016140f2565b965060608a013595506142d360808b01613ef5565b945060a08a01359150808211156142e957600080fd5b6142f58b838c0161410a565b935060c08a013591508082111561430b57600080fd5b506143188a828b01613f0c565b91505092959891949750929550565b6000806000806080858703121561433d57600080fd5b843561434881613d39565b9350602085013561435881613d39565b925060408501359150606085013567ffffffffffffffff81111561437b57600080fd5b8501601f8101871361438c57600080fd5b61439b87823560208401614099565b91505092959194509250565b600060208083850312156143ba57600080fd5b823567ffffffffffffffff8111156143d157600080fd5b8301601f810185136143e257600080fd5b80356143f0613f2d82613ed1565b81815260059190911b8201830190838101908783111561440f57600080fd5b928401925b8284101561443657833561442781613d39565b82529284019290840190614414565b979650505050505050565b6000806040838503121561445457600080fd5b823561445f81613d39565b9150602083013561404881613d39565b6000806040838503121561448257600080fd5b823567ffffffffffffffff8082111561449a57600080fd5b6144a6868387016140d2565b935060208501359150808211156144bc57600080fd5b506144c9858286016140d2565b9150509250929050565b600181811c908216806144e757607f821691505b60208210811415614521577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061ffff82168061459957614599614556565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0192915050565b6000828210156145d3576145d3614556565b500390565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561461057614610614556565b500290565b60008261464b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600067ffffffffffffffff80831681851680830382111561467357614673614556565b01949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156146ae576146ae614556565b5060010190565b600061ffff80831681851680830382111561467357614673614556565b600061ffff838116908316818110156146ed576146ed614556565b039392505050565b8054600090600181811c908083168061470f57607f831692505b602080841082141561474a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b838852602088018280156147655760018114614794576147bf565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008716825282820197506147bf565b60008981526020902060005b878110156147b9578154848201529086019084016147a0565b83019850505b5050505050505092915050565b60c0815260006147df60c0830189613cc3565b82810360208401526147f181896146f5565b9050828103604084015261480581886146f5565b9050828103606084015261481981876146f5565b91505083608083015267ffffffffffffffff831660a0830152979650505050505050565b60006020828403121561484f57600080fd5b815167ffffffffffffffff81111561486657600080fd5b8201601f8101841361487757600080fd5b8051614885613f2d82614053565b81815285602083850101111561489a57600080fd5b6148ab826020830160208601613c97565b95945050505050565b600082198211156148c7576148c7614556565b500190565b6000602082840312156148de57600080fd5b5051919050565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261400b6080830184613cc3565b60006020828403121561493657600080fd5b8151611d9c81613c4c56fea2646970667358221220141d25c229ac80e89b11f898b1da63b660f04741526ae92fe2634e09d17395f264736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003e9434606a403d8479539c5dcf53e660f0808168
-----Decoded View---------------
Arg [0] : _metadata (address): 0x3e9434606A403D8479539c5DCf53E660f0808168
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003e9434606a403d8479539c5dcf53e660f0808168
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.