Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
724 PHTO
Holders
292
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PhtoExhibit
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 6000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./SaleStatus.sol"; import "./Collection.sol"; /// @author no-op.eth (nft-lab.xyz) /// @title Phto Exhibit - fine art photography (phto.io) contract PhtoExhibit is ERC1155, ReentrancyGuard, Ownable, PaymentSplitter, IERC2981 { /** Collections (drops) */ Collection[] private collections_; /** Edition sizes */ uint256[] private editions_; /** Name of collection */ string public constant name = "Phto."; /** Symbol of collection */ string public constant symbol = "PHTO"; /** URI for the contract metadata */ string public contractURI; /** Signer */ address public signer; /** Mint pass utilization - collectionId -> address -> used */ mapping(uint256 => mapping(address => bool)) public passes; /** For URI conversions */ using Strings for uint256; /** Notify on sale state change */ event SaleStateChanged(SaleStatus val); /** Notify on total supply change */ event TotalSupplyChanged(uint256 val); /** Notify when a new collection is created */ event CollectionCreated(uint256 val); constructor( string memory _uri, address[] memory shareholders, uint256[] memory shares ) ERC1155(_uri) PaymentSplitter(shareholders, shares) {} /// @notice Helper to return editions array function editions() external view returns (uint256[] memory) { return editions_; } /// @notice Helper to return collections array function collections() external view returns (Collection[] memory) { return collections_; } /// @notice Sets public sale state /// @param _val The new value function setSaleStatus(SaleStatus _val) external onlyOwner { collections_[currentCollectionId()].status = _val; emit SaleStateChanged(_val); } /// @notice Sets the authorized signer /// @param _val New signer function setSigner(address _val) external onlyOwner { signer = _val; } /// @notice Sets the base metadata URI /// @param _val The new URI function setCollectionURI(string memory _val) external onlyOwner { collections_[currentCollectionId()].uri = _val; } /// @notice Sets the contract metadata URI /// @param _val The new URI function setContractURI(string memory _val) external onlyOwner { contractURI = _val; } /// @notice Returns the amount of tokens sold /// @return supply The number of tokens sold function totalSupply() public view returns (uint256 supply) { for (uint256 i = 0; i < collections_.length; i++) { supply += collections_[i].supply; } } /// @notice Current collection ID getter /// @return Currently active collection ID function currentCollectionId() public view returns (uint256) { require(collections_.length > 0, "No collections created."); return collections_.length - 1; } /// @notice Current collection getter /// @dev External usage to view current config /// @return Collection function currentCollection() external view returns (Collection memory) { return collections_[currentCollectionId()]; } /// @notice Notify other contracts of supported interfaces /// @param interfaceId Magic bits /// @return Yes/no function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /// @notice Returns the URI for a given token ID /// @param _id The ID to return URI for /// @return Token URI function uri(uint256 _id) public view override returns (string memory) { (uint256 _collection, uint256 _identifier) = unshift(_id); return string(abi.encodePacked(collections_[_collection - 1].uri, _identifier.toString())); } /// @notice Get the royalty info for a given ID /// @param _tokenId NFT ID to check /// @param _salePrice Price sold for /// @return receiver The address receiving the royalty /// @return royaltyAmount The royalty amount to be received function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view override returns (address receiver, uint256 royaltyAmount) { (uint256 collection,) = unshift(_tokenId); Collection memory _coll = collections_[collection]; receiver = _coll.royaltyReceiver; royaltyAmount = _coll.royaltyPercentage / 100 * _salePrice; } /// @notice Verify a signed message /// @param _ids IDs from api /// @param _amount amount from api /// @param _sig API signature function isValidData(address _receiver, uint256[] memory _ids, uint256 _amount, bytes memory _sig) public view returns(bool) { bytes32 _message = keccak256(abi.encodePacked(_receiver, _ids, _amount)); return (recoverSigner(_message, _sig) == signer); } /// @notice Attempts to recover signer address /// @param _message Data /// @param _sig API signature /// @return address Signer address function recoverSigner(bytes32 _message, bytes memory _sig) public pure returns (address) { uint8 v; bytes32 r; bytes32 s; (v, r, s) = splitSignature(_sig); return ecrecover(_message, v, r, s); } /// @notice Attempts to split sig to VRS /// @param _sig API signature function splitSignature(bytes memory _sig) public pure returns (uint8, bytes32, bytes32) { require(_sig.length == 65); bytes32 r; bytes32 s; uint8 v; assembly { r := mload(add(_sig, 32)) s := mload(add(_sig, 64)) v := byte(0, mload(add(_sig, 96))) } return (v, r, s); } /// @notice Pack collection ID and NFT ID into an int /// @param _coll Collection ID /// @param _id NFT ID /// @return Packed ID function shift(uint256 _coll, uint256 _id) public pure returns (uint256) { return (_coll << 128) | _id; } /// @notice Unpack collection ID and NFT ID from an int /// @param _id Packed ID /// @return collection Collection ID /// @return identifier NFT ID function unshift(uint256 _id) public pure returns (uint256 collection, uint256 identifier) { collection = _id >> 128; identifier = _id & ~uint128(0); } /// @notice Creates a new collection /// @param _maxTx Maximum mintable per tx /// @param _maxSupply Maximum tokens in collection /// @param _royaltyPercentage Percentage to be given from secondaries /// @param _cost Cost per token /// @param _royaltyReceiver Receiving address of royalties /// @param _uri Base URI function createCollection( uint128 _maxTx, uint128 _maxSupply, uint128 _royaltyPercentage, uint256 _cost, address _royaltyReceiver, string memory _uri, uint256[] calldata _sizes ) external onlyOwner { editions_ = _sizes; collections_.push( Collection(_maxTx, _maxSupply, _royaltyPercentage, 0, _cost, _royaltyReceiver, _uri, SaleStatus.Inactive) ); emit CollectionCreated(currentCollectionId()); } /// @notice Reserves NFTs for team/giveaways/etc /// @param _ids Potential IDs to be minted /// @param _amount Amount to be minted function reserve(uint256[] memory _ids, uint256 _amount) external onlyOwner { uint256 _collId = currentCollectionId(); Collection storage _coll = collections_[_collId]; _coll.supply += uint128(_amount); mintHelper(_collId, _ids, _amount); emit TotalSupplyChanged(_coll.supply); } /// @notice Internal mint helper /// @param _ids Potential IDs to be minted /// @param _amount Amount to be minted /// @dev Called by mint/preMint function mintHelper(uint256 _collId, uint256[] memory _ids, uint256 _amount) private { uint256 _counter = 0; for (uint256 i = 0; i < _ids.length; i++) { if (editions_[_ids[i]] == 0) { continue; } editions_[_ids[i]]--; _counter++; _mint(msg.sender, shift(_collId + 1, _ids[i]), 1, "0x0000"); if (_amount == _counter) { break; } if (_ids.length - 1 == i) { i = 0; } } require(_amount == _counter, "Ran out of IDs. Please retry."); } /// @notice Mints a new token in private (pre) sale /// @param _ids Potential IDs to be minted /// @param _amount Amount to be minted /// @param _sig Authorized wallet signature /// @dev No charge function preMint(uint256[] calldata _ids, uint256 _amount, bytes memory _sig) external payable nonReentrant { uint256 _collId = currentCollectionId(); Collection storage _coll = collections_[_collId]; require(_coll.status == SaleStatus.Presale, "Presale is not yet active."); require(isValidData(msg.sender, _ids, _amount, _sig), "Invalid signature"); require(passes[_collId][msg.sender] == false, "Already redeemed."); passes[_collId][msg.sender] = true; _coll.supply += uint128(_amount); mintHelper(_collId, _ids, _amount); emit TotalSupplyChanged(_coll.supply); } /// @notice Mints a new token in public sale /// @param _ids Potential IDs to be minted /// @param _amount Amount to be minted /// @param _sig Authorized wallet signature /// @dev Must send COST * amt in ETH function mint(uint256[] calldata _ids, uint256 _amount, bytes memory _sig) external payable nonReentrant { uint256 _collId = currentCollectionId(); Collection storage _coll = collections_[_collId]; uint256 _currentSupply = _coll.supply; require(isValidData(msg.sender, _ids, _amount, _sig), "Invalid signature"); require(_coll.status == SaleStatus.Public, "Sale is not yet active."); require(_coll.cost * _amount == msg.value, "ETH sent is not correct"); require(_currentSupply + _amount <= _coll.maxSupply, "Amount exceeds supply."); _coll.supply += uint128(_amount); mintHelper(_collId, _ids, _amount); emit TotalSupplyChanged(_coll.supply); } /// @notice Burns a token /// @param _account Current token holder /// @param _id ID to burn /// @param _value Amount of ID to burn function burn( address _account, uint256 _id, uint256 _value ) external nonReentrant { require(_account == _msgSender() || isApprovedForAll(_account, _msgSender()), "ERC1155: caller is not owner nor approved"); (uint256 _collId,) = unshift(_id); Collection storage _coll = collections_[_collId - 1]; _coll.supply -= uint128(_value); _burn(_account, _id, _value); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "./SaleStatus.sol"; /** 1 Phto. Collection */ struct Collection { /** Maximum mintable per tx */ uint128 maxTx; /** Maximum tokens in collection */ uint128 maxSupply; /** Percentage to be given from secondaries */ uint128 royaltyPercentage; /** Current token supply */ uint128 supply; /** Cost per token */ uint256 cost; /** Receiving address of royalties */ address royaltyReceiver; /** Base URI */ string uri; /** Sale state */ SaleStatus status; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** Status of a given sale */ enum SaleStatus { Inactive, Presale, Public, Completed }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); } /** * @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, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
{ "optimizer": { "enabled": true, "runs": 6000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_uri","type":"string"},{"internalType":"address[]","name":"shareholders","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"val","type":"uint256"}],"name":"CollectionCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum SaleStatus","name":"val","type":"uint8"}],"name":"SaleStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"val","type":"uint256"}],"name":"TotalSupplyChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collections","outputs":[{"components":[{"internalType":"uint128","name":"maxTx","type":"uint128"},{"internalType":"uint128","name":"maxSupply","type":"uint128"},{"internalType":"uint128","name":"royaltyPercentage","type":"uint128"},{"internalType":"uint128","name":"supply","type":"uint128"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"enum SaleStatus","name":"status","type":"uint8"}],"internalType":"struct Collection[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint128","name":"_maxTx","type":"uint128"},{"internalType":"uint128","name":"_maxSupply","type":"uint128"},{"internalType":"uint128","name":"_royaltyPercentage","type":"uint128"},{"internalType":"uint256","name":"_cost","type":"uint256"},{"internalType":"address","name":"_royaltyReceiver","type":"address"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"uint256[]","name":"_sizes","type":"uint256[]"}],"name":"createCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentCollection","outputs":[{"components":[{"internalType":"uint128","name":"maxTx","type":"uint128"},{"internalType":"uint128","name":"maxSupply","type":"uint128"},{"internalType":"uint128","name":"royaltyPercentage","type":"uint128"},{"internalType":"uint128","name":"supply","type":"uint128"},{"internalType":"uint256","name":"cost","type":"uint256"},{"internalType":"address","name":"royaltyReceiver","type":"address"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"enum SaleStatus","name":"status","type":"uint8"}],"internalType":"struct Collection","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentCollectionId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"editions","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiver","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"isValidData","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"passes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"preMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_message","type":"bytes32"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"recoverSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"reserve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","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":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_val","type":"string"}],"name":"setCollectionURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_val","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum SaleStatus","name":"_val","type":"uint8"}],"name":"setSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_val","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_coll","type":"uint256"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"shift","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"splitSignature","outputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"unshift","outputs":[{"internalType":"uint256","name":"collection","type":"uint256"},{"internalType":"uint256","name":"identifier","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200568838038062005688833981016040819052620000349162000594565b818184620000428162000190565b5060016003556200005333620001a9565b8051825114620000c55760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001185760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000bc565b60005b825181101562000184576200016f8382815181106200013e576200013e62000785565b60200260200101518383815181106200015b576200015b62000785565b6020026020010151620001fb60201b60201c565b806200017b8162000751565b9150506200011b565b505050505050620007b1565b8051620001a5906002906020840190620003e9565b5050565b600480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620002685760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000bc565b60008111620002ba5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000bc565b6001600160a01b03821660009081526007602052604090205415620003365760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000bc565b60098054600181019091557f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0319166001600160a01b0384169081179091556000908152600760205260409020819055600554620003a0908290620006f9565b600555604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b828054620003f79062000714565b90600052602060002090601f0160209004810192826200041b576000855562000466565b82601f106200043657805160ff191683800117855562000466565b8280016001018555821562000466579182015b828111156200046657825182559160200191906001019062000449565b506200047492915062000478565b5090565b5b8082111562000474576000815560010162000479565b600082601f830112620004a157600080fd5b81516020620004ba620004b483620006d3565b620006a0565b80838252828201915082860187848660051b8901011115620004db57600080fd5b6000805b86811015620005125782516001600160a01b0381168114620004ff578283fd5b85529385019391850191600101620004df565b509198975050505050505050565b600082601f8301126200053257600080fd5b8151602062000545620004b483620006d3565b80838252828201915082860187848660051b89010111156200056657600080fd5b60005b85811015620005875781518452928401929084019060010162000569565b5090979650505050505050565b600080600060608486031215620005aa57600080fd5b83516001600160401b0380821115620005c257600080fd5b818601915086601f830112620005d757600080fd5b815181811115620005ec57620005ec6200079b565b602062000602601f8301601f19168201620006a0565b82815289828487010111156200061757600080fd5b60005b83811015620006375785810183015182820184015282016200061a565b83811115620006495760008385840101525b5090880151909650925050808211156200066257600080fd5b62000670878388016200048f565b935060408601519150808211156200068757600080fd5b50620006968682870162000520565b9150509250925092565b604051601f8201601f191681016001600160401b0381118282101715620006cb57620006cb6200079b565b604052919050565b60006001600160401b03821115620006ef57620006ef6200079b565b5060051b60200190565b600082198211156200070f576200070f6200076f565b500190565b600181811c908216806200072957607f821691505b602082108114156200074b57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200076857620007686200076f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b614ec780620007c16000396000f3fe6080604052600436106102f55760003560e01c80638da5cb5b1161018f578063d875c0ee116100e1578063eb95de571161008a578063f2fde38b11610064578063f2fde38b146109b6578063f5298aca146109d6578063f6b3e585146109f657600080fd5b8063eb95de5714610946578063ee6af66d1461095b578063f242432a1461099657600080fd5b8063e562dfd6116100bb578063e562dfd6146108c6578063e8a3d485146108e8578063e985e9c5146108fd57600080fd5b8063d875c0ee1461086c578063e33b7de31461088c578063e50322a2146108a157600080fd5b8063a22cb46511610143578063c4f2d27f1161011d578063c4f2d27f146107ed578063ce7c2ac214610800578063d79779b21461083657600080fd5b8063a22cb46514610779578063a7bb580314610799578063b8ddbcb3146107d857600080fd5b806395d89b411161017457806395d89b41146106da57806397aba7f9146107235780639852595c1461074357600080fd5b80638da5cb5b1461069c578063938e3d7b146106ba57600080fd5b80632eb2c2d6116102485780634e1273f4116101fc578063715018a6116101d6578063715018a6146106475780638524f4191461065c5780638b83209b1461067c57600080fd5b80634e1273f4146105d8578063604a7c92146106055780636c19e7831461062757600080fd5b8063406072a91161022d578063406072a9146105525780634891ad881461059857806348b75044146105b857600080fd5b80632eb2c2d61461051d5780633a98ef391461053d57600080fd5b806318160ddd116102aa578063238ac93311610284578063238ac933146104865780632639f460146104be5780632a55205a146104de57600080fd5b806318160ddd1461043157806319165587146104465780631c09a7781461046657600080fd5b8063038bd95a116102db578063038bd95a146103a657806306fdde03146103bb5780630e89341c1461041157600080fd5b8062fdd58e1461034357806301ffc9a71461037657600080fd5b3661033e577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561034f57600080fd5b5061036361035e3660046142f9565b610a43565b6040519081526020015b60405180910390f35b34801561038257600080fd5b50610396610391366004614526565b610aef565b604051901515815260200161036d565b6103b96103b436600461442d565b610b45565b005b3480156103c757600080fd5b506104046040518060400160405280600581526020017f5068746f2e00000000000000000000000000000000000000000000000000000081525081565b60405161036d9190614a9a565b34801561041d57600080fd5b5061040461042c36600461466e565b610ee8565b34801561043d57600080fd5b50610363610f62565b34801561045257600080fd5b506103b96104613660046140de565b610fdf565b34801561047257600080fd5b506103b96104813660046145b6565b6111b9565b34801561049257600080fd5b50600f546104a6906001600160a01b031681565b6040516001600160a01b03909116815260200161036d565b3480156104ca57600080fd5b506103b96104d9366004614560565b6113f9565b3480156104ea57600080fd5b506104fe6104f93660046146c5565b611496565b604080516001600160a01b03909316835260208301919091520161036d565b34801561052957600080fd5b506103b9610538366004614134565b611651565b34801561054957600080fd5b50600554610363565b34801561055e57600080fd5b5061036361056d3660046140fb565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b3480156105a457600080fd5b506103b96105b3366004614595565b6116f3565b3480156105c457600080fd5b506103b96105d33660046140fb565b6117d4565b3480156105e457600080fd5b506105f86105f336600461435a565b611a81565b60405161036d9190614a54565b34801561061157600080fd5b5061061a611bbf565b60405161036d9190614aad565b34801561063357600080fd5b506103b96106423660046140de565b611d7a565b34801561065357600080fd5b506103b9611e0e565b34801561066857600080fd5b5061039661067736600461424b565b611e74565b34801561068857600080fd5b506104a661069736600461466e565b611ed1565b3480156106a857600080fd5b506004546001600160a01b03166104a6565b3480156106c657600080fd5b506103b96106d5366004614560565b611f01565b3480156106e657600080fd5b506104046040518060400160405280600481526020017f5048544f0000000000000000000000000000000000000000000000000000000081525081565b34801561072f57600080fd5b506104a661073e3660046144e9565b611f6e565b34801561074f57600080fd5b5061036361075e3660046140de565b6001600160a01b031660009081526008602052604090205490565b34801561078557600080fd5b506103b96107943660046142cb565b611fed565b3480156107a557600080fd5b506107b96107b4366004614560565b611ff8565b6040805160ff909416845260208401929092529082015260600161036d565b3480156107e457600080fd5b506105f8612027565b6103b96107fb36600461442d565b61207f565b34801561080c57600080fd5b5061036361081b3660046140de565b6001600160a01b031660009081526007602052604090205490565b34801561084257600080fd5b506103636108513660046140de565b6001600160a01b03166000908152600a602052604090205490565b34801561087857600080fd5b506103b9610887366004614487565b6123aa565b34801561089857600080fd5b50600654610363565b3480156108ad57600080fd5b506103636108bc3660046146c5565b60809190911b1790565b3480156108d257600080fd5b506108db612509565b60405161036d91906149d4565b3480156108f457600080fd5b506104046126a5565b34801561090957600080fd5b506103966109183660046140fb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561095257600080fd5b50610363612733565b34801561096757600080fd5b506103966109763660046146a0565b601060209081526000928352604080842090915290825290205460ff1681565b3480156109a257600080fd5b506103b96109b13660046141e2565b612799565b3480156109c257600080fd5b506103b96109d13660046140de565b612834565b3480156109e257600080fd5b506103b96109f1366004614325565b612916565b348015610a0257600080fd5b50610a2e610a1136600461466e565b608081901c916fffffffffffffffffffffffffffffffff90911690565b6040805192835260208301919091520161036d565b60006001600160a01b038316610ac65760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610ae95750610ae982612aac565b60026003541415610b985760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abd565b60026003556000610ba7612733565b90506000600c8281548110610bbe57610bbe614d50565b9060005260206000209060060201905060008160010160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050610c46338888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250899150611e749050565b610c925760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610abd565b6002600583015460ff166003811115610cad57610cad614d3a565b14610cfa5760405162461bcd60e51b815260206004820152601760248201527f53616c65206973206e6f7420796574206163746976652e0000000000000000006044820152606401610abd565b34858360020154610d0b9190614b73565b14610d585760405162461bcd60e51b815260206004820152601760248201527f4554482073656e74206973206e6f7420636f72726563740000000000000000006044820152606401610abd565b815470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16610d8a8683614b18565b1115610dd85760405162461bcd60e51b815260206004820152601660248201527f416d6f756e74206578636565647320737570706c792e000000000000000000006044820152606401610abd565b848260010160108282829054906101000a90046fffffffffffffffffffffffffffffffff16610e079190614ae4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550610e7c838888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250612b8f915050565b60018201546040517001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1681527fc8b17f75f53401f272e9ee7fa431e81ba33779363238896180425a422420c8f79060200160405180910390a1505060016003555050505050565b6060608082901c6fffffffffffffffffffffffffffffffff8316600c610f0f600184614be1565b81548110610f1f57610f1f614d50565b9060005260206000209060060201600401610f3982612d37565b604051602001610f4a929190614897565b60405160208183030381529060405292505050919050565b6000805b600c54811015610fdb57600c8181548110610f8357610f83614d50565b6000918252602090912060069091020160010154610fc79070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1683614b18565b915080610fd381614cc1565b915050610f66565b5090565b6001600160a01b03811660009081526007602052604090205461106a5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610abd565b600061107560065490565b61107f9047614b18565b905060006110ac83836110a7866001600160a01b031660009081526008602052604090205490565b612e71565b9050806111215760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b03831660009081526008602052604081208054839290611149908490614b18565b9250508190555080600660008282546111629190614b18565b9091555061117290508382612eb9565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6004546001600160a01b031633146112135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b61121f600d8383613eb2565b50600c6040518061010001604052808a6fffffffffffffffffffffffffffffffff168152602001896fffffffffffffffffffffffffffffffff168152602001886fffffffffffffffffffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff168152602001878152602001866001600160a01b03168152602001858152602001600060038111156112bd576112bd614d3a565b905281546001808201845560009384526020938490208351848601516fffffffffffffffffffffffffffffffff918216700100000000000000000000000000000000918316820217600690950290920193845560408501516060860151908216911690910217908201556080820151600282015560a08201516003820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0390921691909117905560c082015180519293919261138a9260048501920190613ef9565b5060e082015160058201805460ff191660018360038111156113ae576113ae614d3a565b021790555050507f5baee347cce9899b119eb4f42984958a6e25dc5b505f4f1ab8f3837120cf241f6113de612733565b60405190815260200160405180910390a15050505050505050565b6004546001600160a01b031633146114535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b80600c61145e612733565b8154811061146e5761146e614d50565b90600052602060002090600602016004019080519060200190611492929190613ef9565b5050565b60008080608085901c90506000600c82815481106114b6576114b6614d50565b60009182526020918290206040805161010081018252600690930290910180546fffffffffffffffffffffffffffffffff80821685527001000000000000000000000000000000009182900481169585019590955260018201548086169385019390935290910490921660608201526002820154608082015260038201546001600160a01b031660a082015260048201805491929160c08401919061155a90614c59565b80601f016020809104026020016040519081016040528092919081815260200182805461158690614c59565b80156115d35780601f106115a8576101008083540402835291602001916115d3565b820191906000526020600020905b8154815290600101906020018083116115b657829003601f168201915b5050509183525050600582015460209091019060ff1660038111156115fa576115fa614d3a565b600381111561160b5761160b614d3a565b8152505090508060a001519350846064826040015161162a9190614b30565b6fffffffffffffffffffffffffffffffff166116469190614b73565b925050509250929050565b6001600160a01b03851633148061166d575061166d8533610918565b6116df5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610abd565b6116ec8585858585612fd7565b5050505050565b6004546001600160a01b0316331461174d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b80600c611758612733565b8154811061176857611768614d50565b60009182526020909120600560069092020101805460ff1916600183600381111561179557611795614d3a565b02179055507f92a17b827ee9d42ea9454bb4ca941a1800870e6d01c0842d09ba23ccc0190ee1816040516117c99190614a8c565b60405180910390a150565b6001600160a01b03811660009081526007602052604090205461185f5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b0382166000908152600a60205260408120546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a082319060240160206040518083038186803b1580156118d057600080fd5b505afa1580156118e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119089190614687565b6119129190614b18565b9050600061194b83836110a787876001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b9050806119c05760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b038085166000908152600b60209081526040808320938716835292905290812080548392906119f7908490614b18565b90915550506001600160a01b0384166000908152600a602052604081208054839290611a24908490614b18565b90915550611a359050848483613275565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b60608151835114611afa5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610abd565b6000835167ffffffffffffffff811115611b1657611b16614d66565b604051908082528060200260200182016040528015611b3f578160200160208202803683370190505b50905060005b8451811015611bb757611b8a858281518110611b6357611b63614d50565b6020026020010151858381518110611b7d57611b7d614d50565b6020026020010151610a43565b828281518110611b9c57611b9c614d50565b6020908102919091010152611bb081614cc1565b9050611b45565b509392505050565b611c03604080516101008101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c08201529060e082015290565b600c611c0d612733565b81548110611c1d57611c1d614d50565b60009182526020918290206040805161010081018252600690930290910180546fffffffffffffffffffffffffffffffff80821685527001000000000000000000000000000000009182900481169585019590955260018201548086169385019390935290910490921660608201526002820154608082015260038201546001600160a01b031660a082015260048201805491929160c084019190611cc190614c59565b80601f0160208091040260200160405190810160405280929190818152602001828054611ced90614c59565b8015611d3a5780601f10611d0f57610100808354040283529160200191611d3a565b820191906000526020600020905b815481529060010190602001808311611d1d57829003601f168201915b5050509183525050600582015460209091019060ff166003811115611d6157611d61614d3a565b6003811115611d7257611d72614d3a565b905250919050565b6004546001600160a01b03163314611dd45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b600f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6004546001600160a01b03163314611e685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b611e7260006132f5565b565b600080858585604051602001611e8c93929190614816565b60408051601f198184030181529190528051602090910120600f549091506001600160a01b0316611ebd8285611f6e565b6001600160a01b0316149695505050505050565b600060098281548110611ee657611ee6614d50565b6000918252602090912001546001600160a01b031692915050565b6004546001600160a01b03163314611f5b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b805161149290600e906020840190613ef9565b600080600080611f7d85611ff8565b6040805160008152602081018083528b905260ff8516918101919091526060810183905260808101829052929550909350915060019060a0016020604051602081039080840390855afa158015611fd8573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b61149233838361335f565b6000806000835160411461200b57600080fd5b5050506020810151604082015160609092015160001a92909190565b6060600d80548060200260200160405190810160405280929190818152602001828054801561207557602002820191906000526020600020905b815481526020019060010190808311612061575b5050505050905090565b600260035414156120d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abd565b600260035560006120e1612733565b90506000600c82815481106120f8576120f8614d50565b6000918252602090912060069091020190506001600582015460ff16600381111561212557612125614d3a565b146121725760405162461bcd60e51b815260206004820152601a60248201527f50726573616c65206973206e6f7420796574206163746976652e0000000000006044820152606401610abd565b6121b333878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250889150611e749050565b6121ff5760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610abd565b600082815260106020908152604080832033845290915290205460ff16156122695760405162461bcd60e51b815260206004820152601160248201527f416c72656164792072656465656d65642e0000000000000000000000000000006044820152606401610abd565b6000828152601060208181526040808420338552909152909120805460ff19166001908117909155820180548692906122ca9084906fffffffffffffffffffffffffffffffff70010000000000000000000000000000000090910416614ae4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555061233f82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b8f915050565b60018101546040517001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1681527fc8b17f75f53401f272e9ee7fa431e81ba33779363238896180425a422420c8f79060200160405180910390a15050600160035550505050565b6004546001600160a01b031633146124045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b600061240e612733565b90506000600c828154811061242557612425614d50565b90600052602060002090600602019050828160010160108282829054906101000a90046fffffffffffffffffffffffffffffffff166124649190614ae4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506124a5828585612b8f565b60018101546040517001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1681527fc8b17f75f53401f272e9ee7fa431e81ba33779363238896180425a422420c8f79060200160405180910390a150505050565b6060600c805480602002602001604051908101604052809291908181526020016000905b8282101561269c57600084815260209081902060408051610100810182526006860290920180546fffffffffffffffffffffffffffffffff80821685527001000000000000000000000000000000009182900481169585019590955260018201548086169385019390935290910490921660608201526002820154608082015260038201546001600160a01b031660a082015260048201805491929160c0840191906125d890614c59565b80601f016020809104026020016040519081016040528092919081815260200182805461260490614c59565b80156126515780601f1061262657610100808354040283529160200191612651565b820191906000526020600020905b81548152906001019060200180831161263457829003601f168201915b5050509183525050600582015460209091019060ff16600381111561267857612678614d3a565b600381111561268957612689614d3a565b815250508152602001906001019061252d565b50505050905090565b600e80546126b290614c59565b80601f01602080910402602001604051908101604052809291908181526020018280546126de90614c59565b801561272b5780601f106127005761010080835404028352916020019161272b565b820191906000526020600020905b81548152906001019060200180831161270e57829003601f168201915b505050505081565b600c546000906127855760405162461bcd60e51b815260206004820152601760248201527f4e6f20636f6c6c656374696f6e7320637265617465642e0000000000000000006044820152606401610abd565b600c5461279490600190614be1565b905090565b6001600160a01b0385163314806127b557506127b58533610918565b6128275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610abd565b6116ec8585858585613454565b6004546001600160a01b0316331461288e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b6001600160a01b03811661290a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610abd565b612913816132f5565b50565b600260035414156129695760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abd565b60026003556001600160a01b03831633148061298a575061298a8333610918565b6129fc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610abd565b608082901c6000600c612a10600184614be1565b81548110612a2057612a20614d50565b90600052602060002090600602019050828160010160108282829054906101000a90046fffffffffffffffffffffffffffffffff16612a5f9190614bb0565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550612aa0858585613626565b50506001600355505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a26000000000000000000000000000000000000000000000000000000001480612b3f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610ae957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610ae9565b6000805b8351811015612ce157600d848281518110612bb057612bb0614d50565b602002602001015181548110612bc857612bc8614d50565b906000526020600020015460001415612be057612ccf565b600d848281518110612bf457612bf4614d50565b602002602001015181548110612c0c57612c0c614d50565b60009182526020822001805491612c2283614c24565b91905055508180612c3290614cc1565b9250612ca9905033612c6c612c48886001614b18565b878581518110612c5a57612c5a614d50565b602002602001015160809190911b1790565b60016040518060400160405280600681526020017f30783030303000000000000000000000000000000000000000000000000000008152506137d3565b81831415612cb657612ce1565b8060018551612cc59190614be1565b1415612ccf575060005b80612cd981614cc1565b915050612b93565b50808214612d315760405162461bcd60e51b815260206004820152601e60248201527f52616e206f7574206f66204944732e2020506c656173652072657472792e00006044820152606401610abd565b50505050565b606081612d7757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612da15780612d8b81614cc1565b9150612d9a9050600a83614b5f565b9150612d7b565b60008167ffffffffffffffff811115612dbc57612dbc614d66565b6040519080825280601f01601f191660200182016040528015612de6576020820181803683370190505b5090505b8415612e6957612dfb600183614be1565b9150612e08600a86614cfa565b612e13906030614b18565b60f81b818381518110612e2857612e28614d50565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612e62600a86614b5f565b9450612dea565b949350505050565b6005546001600160a01b03841660009081526007602052604081205490918391612e9b9086614b73565b612ea59190614b5f565b612eaf9190614be1565b90505b9392505050565b80471015612f095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610abd565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612f56576040519150601f19603f3d011682016040523d82523d6000602084013e612f5b565b606091505b5050905080612fd25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610abd565b505050565b815183511461304e5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b0384166130ca5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610abd565b3360005b84518110156132075760008582815181106130eb576130eb614d50565b60200260200101519050600085838151811061310957613109614d50565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156131af5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610abd565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906131ec908490614b18565b925050819055505050508061320090614cc1565b90506130ce565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613257929190614a67565b60405180910390a461326d8187878787876138f0565b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612fd2908490613b04565b600480546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156133e75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166134d05760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610abd565b336134e98187876134e088613be9565b6116ec88613be9565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156135805760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610abd565b6000858152602081815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906135bd908490614b18565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461361d828888888888613c34565b50505050505050565b6001600160a01b0383166136a25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610abd565b336136d2818560006136b387613be9565b6136bc87613be9565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156137685760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610abd565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b03841661384f5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610abd565b33613860816000876134e088613be9565b6000848152602081815260408083206001600160a01b038916845290915281208054859290613890908490614b18565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116ec81600087878787613c34565b6001600160a01b0384163b1561326d576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c819061394d908990899088908890889060040161493e565b602060405180830381600087803b15801561396757600080fd5b505af1925050508015613997575060408051601f3d908101601f1916820190925261399491810190614543565b60015b613a4d576139a3614d7c565b806308c379a014156139dd57506139b8614d98565b806139c357506139df565b8060405162461bcd60e51b8152600401610abd9190614a9a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610abd565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c81000000000000000000000000000000000000000000000000000000001461361d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610abd565b6000613b59826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613d9e9092919063ffffffff16565b805190915015612fd25780806020019051810190613b7791906144cc565b612fd25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610abd565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613c2357613c23614d50565b602090810291909101015292915050565b6001600160a01b0384163b1561326d576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e6190613c91908990899088908890889060040161499c565b602060405180830381600087803b158015613cab57600080fd5b505af1925050508015613cdb575060408051601f3d908101601f19168201909252613cd891810190614543565b60015b613ce7576139a3614d7c565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e61000000000000000000000000000000000000000000000000000000001461361d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610abd565b6060612eaf8484600085856001600160a01b0385163b613e005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610abd565b600080866001600160a01b03168587604051613e1c919061487b565b60006040518083038185875af1925050503d8060008114613e59576040519150601f19603f3d011682016040523d82523d6000602084013e613e5e565b606091505b5091509150613e6e828286613e79565b979650505050505050565b60608315613e88575081612eb2565b825115613e985782518084602001fd5b8160405162461bcd60e51b8152600401610abd9190614a9a565b828054828255906000526020600020908101928215613eed579160200282015b82811115613eed578235825591602001919060010190613ed2565b50610fdb929150613f6d565b828054613f0590614c59565b90600052602060002090601f016020900481019282613f275760008555613eed565b82601f10613f4057805160ff1916838001178555613eed565b82800160010185558215613eed579182015b82811115613eed578251825591602001919060010190613f52565b5b80821115610fdb5760008155600101613f6e565b60008083601f840112613f9457600080fd5b50813567ffffffffffffffff811115613fac57600080fd5b6020830191508360208260051b8501011115613fc757600080fd5b9250929050565b600082601f830112613fdf57600080fd5b81356020613fec82614ac0565b604051613ff98282614c94565b8381528281019150858301600585901b8701840188101561401957600080fd5b60005b858110156140385781358452928401929084019060010161401c565b5090979650505050505050565b600082601f83011261405657600080fd5b813567ffffffffffffffff81111561407057614070614d66565b6040516140876020601f19601f8501160182614c94565b81815284602083860101111561409c57600080fd5b816020850160208301376000918101602001919091529392505050565b80356fffffffffffffffffffffffffffffffff811681146140d957600080fd5b919050565b6000602082840312156140f057600080fd5b8135612eb281614e40565b6000806040838503121561410e57600080fd5b823561411981614e40565b9150602083013561412981614e40565b809150509250929050565b600080600080600060a0868803121561414c57600080fd5b853561415781614e40565b9450602086013561416781614e40565b9350604086013567ffffffffffffffff8082111561418457600080fd5b61419089838a01613fce565b945060608801359150808211156141a657600080fd5b6141b289838a01613fce565b935060808801359150808211156141c857600080fd5b506141d588828901614045565b9150509295509295909350565b600080600080600060a086880312156141fa57600080fd5b853561420581614e40565b9450602086013561421581614e40565b93506040860135925060608601359150608086013567ffffffffffffffff81111561423f57600080fd5b6141d588828901614045565b6000806000806080858703121561426157600080fd5b843561426c81614e40565b9350602085013567ffffffffffffffff8082111561428957600080fd5b61429588838901613fce565b94506040870135935060608701359150808211156142b257600080fd5b506142bf87828801614045565b91505092959194509250565b600080604083850312156142de57600080fd5b82356142e981614e40565b9150602083013561412981614e55565b6000806040838503121561430c57600080fd5b823561431781614e40565b946020939093013593505050565b60008060006060848603121561433a57600080fd5b833561434581614e40565b95602085013595506040909401359392505050565b6000806040838503121561436d57600080fd5b823567ffffffffffffffff8082111561438557600080fd5b818501915085601f83011261439957600080fd5b813560206143a682614ac0565b6040516143b38282614c94565b8381528281019150858301600585901b870184018b10156143d357600080fd5b600096505b848710156143ff5780356143eb81614e40565b8352600196909601959183019183016143d8565b509650508601359250508082111561441657600080fd5b5061442385828601613fce565b9150509250929050565b6000806000806060858703121561444357600080fd5b843567ffffffffffffffff8082111561445b57600080fd5b61446788838901613f82565b90965094506020870135935060408701359150808211156142b257600080fd5b6000806040838503121561449a57600080fd5b823567ffffffffffffffff8111156144b157600080fd5b6144bd85828601613fce565b95602094909401359450505050565b6000602082840312156144de57600080fd5b8151612eb281614e55565b600080604083850312156144fc57600080fd5b82359150602083013567ffffffffffffffff81111561451a57600080fd5b61442385828601614045565b60006020828403121561453857600080fd5b8135612eb281614e63565b60006020828403121561455557600080fd5b8151612eb281614e63565b60006020828403121561457257600080fd5b813567ffffffffffffffff81111561458957600080fd5b612e6984828501614045565b6000602082840312156145a757600080fd5b813560048110612eb257600080fd5b60008060008060008060008060e0898b0312156145d257600080fd5b6145db896140b9565b97506145e960208a016140b9565b96506145f760408a016140b9565b955060608901359450608089013561460e81614e40565b935060a089013567ffffffffffffffff8082111561462b57600080fd5b6146378c838d01614045565b945060c08b013591508082111561464d57600080fd5b5061465a8b828c01613f82565b999c989b5096995094979396929594505050565b60006020828403121561468057600080fd5b5035919050565b60006020828403121561469957600080fd5b5051919050565b600080604083850312156146b357600080fd5b82359150602083013561412981614e40565b600080604083850312156146d857600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015614717578151875295820195908201906001016146fb565b509495945050505050565b6000815180845261473a816020860160208601614bf8565b601f01601f19169290920160200192915050565b60008151614760818560208601614bf8565b9290920192915050565b6004811061478857634e487b7160e01b600052602160045260246000fd5b9052565b60006101006fffffffffffffffffffffffffffffffff80845116855280602085015116602086015280604085015116604086015280606085015116606086015250608083015160808501526001600160a01b0360a08401511660a085015260c08301518160c086015261480182860182614722565b91505060e0830151611bb760e086018261476a565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b1681526000601482018451602080870160005b8381101561486a5781518552938201939082019060010161484e565b505094825250909201949350505050565b6000825161488d818460208701614bf8565b9190910192915050565b600080845481600182811c9150808316806148b357607f831692505b60208084108214156148d357634e487b7160e01b86526022600452602486fd5b8180156148e757600181146148f857614925565b60ff19861689528489019650614925565b60008b81526020902060005b8681101561491d5781548b820152908501908301614904565b505084890196505b505050505050614935818561474e565b95945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261496a60a08301866146e7565b828103606084015261497c81866146e7565b905082810360808401526149908185614722565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152613e6e60a0830184614722565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015614a47577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614a3585835161478c565b945092850192908501906001016149fb565b5092979650505050505050565b602081526000612eb260208301846146e7565b604081526000614a7a60408301856146e7565b828103602084015261493581856146e7565b60208101610ae9828461476a565b602081526000612eb26020830184614722565b602081526000612eb2602083018461478c565b600067ffffffffffffffff821115614ada57614ada614d66565b5060051b60200190565b60006fffffffffffffffffffffffffffffffff808316818516808303821115614b0f57614b0f614d0e565b01949350505050565b60008219821115614b2b57614b2b614d0e565b500190565b60006fffffffffffffffffffffffffffffffff80841680614b5357614b53614d24565b92169190910492915050565b600082614b6e57614b6e614d24565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614bab57614bab614d0e565b500290565b60006fffffffffffffffffffffffffffffffff83811690831681811015614bd957614bd9614d0e565b039392505050565b600082821015614bf357614bf3614d0e565b500390565b60005b83811015614c13578181015183820152602001614bfb565b83811115612d315750506000910152565b600081614c3357614c33614d0e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680614c6d57607f821691505b60208210811415614c8e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f19601f830116810181811067ffffffffffffffff82111715614cba57614cba614d66565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cf357614cf3614d0e565b5060010190565b600082614d0957614d09614d24565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614d955760046000803e5060005160e01c5b90565b600060443d1015614da65790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715614df457505050505090565b8285019150815181811115614e0c5750505050505090565b843d8701016020828501011115614e265750505050505090565b614e3560208286010187614c94565b509095945050505050565b6001600160a01b038116811461291357600080fd5b801515811461291357600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461291357600080fdfea2646970667358221220a69e975275ea5ab48169ff723f1f236beeb712123d2ff410c43b47e009eded0764736f6c63430008070033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d51414a4652636f4733337068614c715941585a55586652524631334552596f56484134484e536f79553772652f0000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b99d2b10f3cc0ce6b871a9f5f94e1ecd6222f4700000000000000000000000058c99d011217558ba27fed197b87e93f99bd8a710000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000005a
Deployed Bytecode
0x6080604052600436106102f55760003560e01c80638da5cb5b1161018f578063d875c0ee116100e1578063eb95de571161008a578063f2fde38b11610064578063f2fde38b146109b6578063f5298aca146109d6578063f6b3e585146109f657600080fd5b8063eb95de5714610946578063ee6af66d1461095b578063f242432a1461099657600080fd5b8063e562dfd6116100bb578063e562dfd6146108c6578063e8a3d485146108e8578063e985e9c5146108fd57600080fd5b8063d875c0ee1461086c578063e33b7de31461088c578063e50322a2146108a157600080fd5b8063a22cb46511610143578063c4f2d27f1161011d578063c4f2d27f146107ed578063ce7c2ac214610800578063d79779b21461083657600080fd5b8063a22cb46514610779578063a7bb580314610799578063b8ddbcb3146107d857600080fd5b806395d89b411161017457806395d89b41146106da57806397aba7f9146107235780639852595c1461074357600080fd5b80638da5cb5b1461069c578063938e3d7b146106ba57600080fd5b80632eb2c2d6116102485780634e1273f4116101fc578063715018a6116101d6578063715018a6146106475780638524f4191461065c5780638b83209b1461067c57600080fd5b80634e1273f4146105d8578063604a7c92146106055780636c19e7831461062757600080fd5b8063406072a91161022d578063406072a9146105525780634891ad881461059857806348b75044146105b857600080fd5b80632eb2c2d61461051d5780633a98ef391461053d57600080fd5b806318160ddd116102aa578063238ac93311610284578063238ac933146104865780632639f460146104be5780632a55205a146104de57600080fd5b806318160ddd1461043157806319165587146104465780631c09a7781461046657600080fd5b8063038bd95a116102db578063038bd95a146103a657806306fdde03146103bb5780630e89341c1461041157600080fd5b8062fdd58e1461034357806301ffc9a71461037657600080fd5b3661033e577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561034f57600080fd5b5061036361035e3660046142f9565b610a43565b6040519081526020015b60405180910390f35b34801561038257600080fd5b50610396610391366004614526565b610aef565b604051901515815260200161036d565b6103b96103b436600461442d565b610b45565b005b3480156103c757600080fd5b506104046040518060400160405280600581526020017f5068746f2e00000000000000000000000000000000000000000000000000000081525081565b60405161036d9190614a9a565b34801561041d57600080fd5b5061040461042c36600461466e565b610ee8565b34801561043d57600080fd5b50610363610f62565b34801561045257600080fd5b506103b96104613660046140de565b610fdf565b34801561047257600080fd5b506103b96104813660046145b6565b6111b9565b34801561049257600080fd5b50600f546104a6906001600160a01b031681565b6040516001600160a01b03909116815260200161036d565b3480156104ca57600080fd5b506103b96104d9366004614560565b6113f9565b3480156104ea57600080fd5b506104fe6104f93660046146c5565b611496565b604080516001600160a01b03909316835260208301919091520161036d565b34801561052957600080fd5b506103b9610538366004614134565b611651565b34801561054957600080fd5b50600554610363565b34801561055e57600080fd5b5061036361056d3660046140fb565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b3480156105a457600080fd5b506103b96105b3366004614595565b6116f3565b3480156105c457600080fd5b506103b96105d33660046140fb565b6117d4565b3480156105e457600080fd5b506105f86105f336600461435a565b611a81565b60405161036d9190614a54565b34801561061157600080fd5b5061061a611bbf565b60405161036d9190614aad565b34801561063357600080fd5b506103b96106423660046140de565b611d7a565b34801561065357600080fd5b506103b9611e0e565b34801561066857600080fd5b5061039661067736600461424b565b611e74565b34801561068857600080fd5b506104a661069736600461466e565b611ed1565b3480156106a857600080fd5b506004546001600160a01b03166104a6565b3480156106c657600080fd5b506103b96106d5366004614560565b611f01565b3480156106e657600080fd5b506104046040518060400160405280600481526020017f5048544f0000000000000000000000000000000000000000000000000000000081525081565b34801561072f57600080fd5b506104a661073e3660046144e9565b611f6e565b34801561074f57600080fd5b5061036361075e3660046140de565b6001600160a01b031660009081526008602052604090205490565b34801561078557600080fd5b506103b96107943660046142cb565b611fed565b3480156107a557600080fd5b506107b96107b4366004614560565b611ff8565b6040805160ff909416845260208401929092529082015260600161036d565b3480156107e457600080fd5b506105f8612027565b6103b96107fb36600461442d565b61207f565b34801561080c57600080fd5b5061036361081b3660046140de565b6001600160a01b031660009081526007602052604090205490565b34801561084257600080fd5b506103636108513660046140de565b6001600160a01b03166000908152600a602052604090205490565b34801561087857600080fd5b506103b9610887366004614487565b6123aa565b34801561089857600080fd5b50600654610363565b3480156108ad57600080fd5b506103636108bc3660046146c5565b60809190911b1790565b3480156108d257600080fd5b506108db612509565b60405161036d91906149d4565b3480156108f457600080fd5b506104046126a5565b34801561090957600080fd5b506103966109183660046140fb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561095257600080fd5b50610363612733565b34801561096757600080fd5b506103966109763660046146a0565b601060209081526000928352604080842090915290825290205460ff1681565b3480156109a257600080fd5b506103b96109b13660046141e2565b612799565b3480156109c257600080fd5b506103b96109d13660046140de565b612834565b3480156109e257600080fd5b506103b96109f1366004614325565b612916565b348015610a0257600080fd5b50610a2e610a1136600461466e565b608081901c916fffffffffffffffffffffffffffffffff90911690565b6040805192835260208301919091520161036d565b60006001600160a01b038316610ac65760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610ae95750610ae982612aac565b60026003541415610b985760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abd565b60026003556000610ba7612733565b90506000600c8281548110610bbe57610bbe614d50565b9060005260206000209060060201905060008160010160109054906101000a90046fffffffffffffffffffffffffffffffff166fffffffffffffffffffffffffffffffff169050610c46338888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250899150611e749050565b610c925760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610abd565b6002600583015460ff166003811115610cad57610cad614d3a565b14610cfa5760405162461bcd60e51b815260206004820152601760248201527f53616c65206973206e6f7420796574206163746976652e0000000000000000006044820152606401610abd565b34858360020154610d0b9190614b73565b14610d585760405162461bcd60e51b815260206004820152601760248201527f4554482073656e74206973206e6f7420636f72726563740000000000000000006044820152606401610abd565b815470010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff16610d8a8683614b18565b1115610dd85760405162461bcd60e51b815260206004820152601660248201527f416d6f756e74206578636565647320737570706c792e000000000000000000006044820152606401610abd565b848260010160108282829054906101000a90046fffffffffffffffffffffffffffffffff16610e079190614ae4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550610e7c838888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250612b8f915050565b60018201546040517001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1681527fc8b17f75f53401f272e9ee7fa431e81ba33779363238896180425a422420c8f79060200160405180910390a1505060016003555050505050565b6060608082901c6fffffffffffffffffffffffffffffffff8316600c610f0f600184614be1565b81548110610f1f57610f1f614d50565b9060005260206000209060060201600401610f3982612d37565b604051602001610f4a929190614897565b60405160208183030381529060405292505050919050565b6000805b600c54811015610fdb57600c8181548110610f8357610f83614d50565b6000918252602090912060069091020160010154610fc79070010000000000000000000000000000000090046fffffffffffffffffffffffffffffffff1683614b18565b915080610fd381614cc1565b915050610f66565b5090565b6001600160a01b03811660009081526007602052604090205461106a5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610abd565b600061107560065490565b61107f9047614b18565b905060006110ac83836110a7866001600160a01b031660009081526008602052604090205490565b612e71565b9050806111215760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b03831660009081526008602052604081208054839290611149908490614b18565b9250508190555080600660008282546111629190614b18565b9091555061117290508382612eb9565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6004546001600160a01b031633146112135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b61121f600d8383613eb2565b50600c6040518061010001604052808a6fffffffffffffffffffffffffffffffff168152602001896fffffffffffffffffffffffffffffffff168152602001886fffffffffffffffffffffffffffffffff16815260200160006fffffffffffffffffffffffffffffffff168152602001878152602001866001600160a01b03168152602001858152602001600060038111156112bd576112bd614d3a565b905281546001808201845560009384526020938490208351848601516fffffffffffffffffffffffffffffffff918216700100000000000000000000000000000000918316820217600690950290920193845560408501516060860151908216911690910217908201556080820151600282015560a08201516003820180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0390921691909117905560c082015180519293919261138a9260048501920190613ef9565b5060e082015160058201805460ff191660018360038111156113ae576113ae614d3a565b021790555050507f5baee347cce9899b119eb4f42984958a6e25dc5b505f4f1ab8f3837120cf241f6113de612733565b60405190815260200160405180910390a15050505050505050565b6004546001600160a01b031633146114535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b80600c61145e612733565b8154811061146e5761146e614d50565b90600052602060002090600602016004019080519060200190611492929190613ef9565b5050565b60008080608085901c90506000600c82815481106114b6576114b6614d50565b60009182526020918290206040805161010081018252600690930290910180546fffffffffffffffffffffffffffffffff80821685527001000000000000000000000000000000009182900481169585019590955260018201548086169385019390935290910490921660608201526002820154608082015260038201546001600160a01b031660a082015260048201805491929160c08401919061155a90614c59565b80601f016020809104026020016040519081016040528092919081815260200182805461158690614c59565b80156115d35780601f106115a8576101008083540402835291602001916115d3565b820191906000526020600020905b8154815290600101906020018083116115b657829003601f168201915b5050509183525050600582015460209091019060ff1660038111156115fa576115fa614d3a565b600381111561160b5761160b614d3a565b8152505090508060a001519350846064826040015161162a9190614b30565b6fffffffffffffffffffffffffffffffff166116469190614b73565b925050509250929050565b6001600160a01b03851633148061166d575061166d8533610918565b6116df5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610abd565b6116ec8585858585612fd7565b5050505050565b6004546001600160a01b0316331461174d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b80600c611758612733565b8154811061176857611768614d50565b60009182526020909120600560069092020101805460ff1916600183600381111561179557611795614d3a565b02179055507f92a17b827ee9d42ea9454bb4ca941a1800870e6d01c0842d09ba23ccc0190ee1816040516117c99190614a8c565b60405180910390a150565b6001600160a01b03811660009081526007602052604090205461185f5760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201527f73686172657300000000000000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b0382166000908152600a60205260408120546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038516906370a082319060240160206040518083038186803b1580156118d057600080fd5b505afa1580156118e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119089190614687565b6119129190614b18565b9050600061194b83836110a787876001600160a01b039182166000908152600b6020908152604080832093909416825291909152205490565b9050806119c05760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201527f647565207061796d656e740000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b038085166000908152600b60209081526040808320938716835292905290812080548392906119f7908490614b18565b90915550506001600160a01b0384166000908152600a602052604081208054839290611a24908490614b18565b90915550611a359050848483613275565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b60608151835114611afa5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610abd565b6000835167ffffffffffffffff811115611b1657611b16614d66565b604051908082528060200260200182016040528015611b3f578160200160208202803683370190505b50905060005b8451811015611bb757611b8a858281518110611b6357611b63614d50565b6020026020010151858381518110611b7d57611b7d614d50565b6020026020010151610a43565b828281518110611b9c57611b9c614d50565b6020908102919091010152611bb081614cc1565b9050611b45565b509392505050565b611c03604080516101008101825260008082526020820181905291810182905260608082018390526080820183905260a0820183905260c08201529060e082015290565b600c611c0d612733565b81548110611c1d57611c1d614d50565b60009182526020918290206040805161010081018252600690930290910180546fffffffffffffffffffffffffffffffff80821685527001000000000000000000000000000000009182900481169585019590955260018201548086169385019390935290910490921660608201526002820154608082015260038201546001600160a01b031660a082015260048201805491929160c084019190611cc190614c59565b80601f0160208091040260200160405190810160405280929190818152602001828054611ced90614c59565b8015611d3a5780601f10611d0f57610100808354040283529160200191611d3a565b820191906000526020600020905b815481529060010190602001808311611d1d57829003601f168201915b5050509183525050600582015460209091019060ff166003811115611d6157611d61614d3a565b6003811115611d7257611d72614d3a565b905250919050565b6004546001600160a01b03163314611dd45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b600f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b6004546001600160a01b03163314611e685760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b611e7260006132f5565b565b600080858585604051602001611e8c93929190614816565b60408051601f198184030181529190528051602090910120600f549091506001600160a01b0316611ebd8285611f6e565b6001600160a01b0316149695505050505050565b600060098281548110611ee657611ee6614d50565b6000918252602090912001546001600160a01b031692915050565b6004546001600160a01b03163314611f5b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b805161149290600e906020840190613ef9565b600080600080611f7d85611ff8565b6040805160008152602081018083528b905260ff8516918101919091526060810183905260808101829052929550909350915060019060a0016020604051602081039080840390855afa158015611fd8573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b61149233838361335f565b6000806000835160411461200b57600080fd5b5050506020810151604082015160609092015160001a92909190565b6060600d80548060200260200160405190810160405280929190818152602001828054801561207557602002820191906000526020600020905b815481526020019060010190808311612061575b5050505050905090565b600260035414156120d25760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abd565b600260035560006120e1612733565b90506000600c82815481106120f8576120f8614d50565b6000918252602090912060069091020190506001600582015460ff16600381111561212557612125614d3a565b146121725760405162461bcd60e51b815260206004820152601a60248201527f50726573616c65206973206e6f7420796574206163746976652e0000000000006044820152606401610abd565b6121b333878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250889150611e749050565b6121ff5760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610abd565b600082815260106020908152604080832033845290915290205460ff16156122695760405162461bcd60e51b815260206004820152601160248201527f416c72656164792072656465656d65642e0000000000000000000000000000006044820152606401610abd565b6000828152601060208181526040808420338552909152909120805460ff19166001908117909155820180548692906122ca9084906fffffffffffffffffffffffffffffffff70010000000000000000000000000000000090910416614ae4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff16021790555061233f82878780806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250612b8f915050565b60018101546040517001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1681527fc8b17f75f53401f272e9ee7fa431e81ba33779363238896180425a422420c8f79060200160405180910390a15050600160035550505050565b6004546001600160a01b031633146124045760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b600061240e612733565b90506000600c828154811061242557612425614d50565b90600052602060002090600602019050828160010160108282829054906101000a90046fffffffffffffffffffffffffffffffff166124649190614ae4565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506124a5828585612b8f565b60018101546040517001000000000000000000000000000000009091046fffffffffffffffffffffffffffffffff1681527fc8b17f75f53401f272e9ee7fa431e81ba33779363238896180425a422420c8f79060200160405180910390a150505050565b6060600c805480602002602001604051908101604052809291908181526020016000905b8282101561269c57600084815260209081902060408051610100810182526006860290920180546fffffffffffffffffffffffffffffffff80821685527001000000000000000000000000000000009182900481169585019590955260018201548086169385019390935290910490921660608201526002820154608082015260038201546001600160a01b031660a082015260048201805491929160c0840191906125d890614c59565b80601f016020809104026020016040519081016040528092919081815260200182805461260490614c59565b80156126515780601f1061262657610100808354040283529160200191612651565b820191906000526020600020905b81548152906001019060200180831161263457829003601f168201915b5050509183525050600582015460209091019060ff16600381111561267857612678614d3a565b600381111561268957612689614d3a565b815250508152602001906001019061252d565b50505050905090565b600e80546126b290614c59565b80601f01602080910402602001604051908101604052809291908181526020018280546126de90614c59565b801561272b5780601f106127005761010080835404028352916020019161272b565b820191906000526020600020905b81548152906001019060200180831161270e57829003601f168201915b505050505081565b600c546000906127855760405162461bcd60e51b815260206004820152601760248201527f4e6f20636f6c6c656374696f6e7320637265617465642e0000000000000000006044820152606401610abd565b600c5461279490600190614be1565b905090565b6001600160a01b0385163314806127b557506127b58533610918565b6128275760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610abd565b6116ec8585858585613454565b6004546001600160a01b0316331461288e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610abd565b6001600160a01b03811661290a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610abd565b612913816132f5565b50565b600260035414156129695760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abd565b60026003556001600160a01b03831633148061298a575061298a8333610918565b6129fc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610abd565b608082901c6000600c612a10600184614be1565b81548110612a2057612a20614d50565b90600052602060002090600602019050828160010160108282829054906101000a90046fffffffffffffffffffffffffffffffff16612a5f9190614bb0565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff160217905550612aa0858585613626565b50506001600355505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a26000000000000000000000000000000000000000000000000000000001480612b3f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b80610ae957507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610ae9565b6000805b8351811015612ce157600d848281518110612bb057612bb0614d50565b602002602001015181548110612bc857612bc8614d50565b906000526020600020015460001415612be057612ccf565b600d848281518110612bf457612bf4614d50565b602002602001015181548110612c0c57612c0c614d50565b60009182526020822001805491612c2283614c24565b91905055508180612c3290614cc1565b9250612ca9905033612c6c612c48886001614b18565b878581518110612c5a57612c5a614d50565b602002602001015160809190911b1790565b60016040518060400160405280600681526020017f30783030303000000000000000000000000000000000000000000000000000008152506137d3565b81831415612cb657612ce1565b8060018551612cc59190614be1565b1415612ccf575060005b80612cd981614cc1565b915050612b93565b50808214612d315760405162461bcd60e51b815260206004820152601e60248201527f52616e206f7574206f66204944732e2020506c656173652072657472792e00006044820152606401610abd565b50505050565b606081612d7757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115612da15780612d8b81614cc1565b9150612d9a9050600a83614b5f565b9150612d7b565b60008167ffffffffffffffff811115612dbc57612dbc614d66565b6040519080825280601f01601f191660200182016040528015612de6576020820181803683370190505b5090505b8415612e6957612dfb600183614be1565b9150612e08600a86614cfa565b612e13906030614b18565b60f81b818381518110612e2857612e28614d50565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612e62600a86614b5f565b9450612dea565b949350505050565b6005546001600160a01b03841660009081526007602052604081205490918391612e9b9086614b73565b612ea59190614b5f565b612eaf9190614be1565b90505b9392505050565b80471015612f095760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610abd565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612f56576040519150601f19603f3d011682016040523d82523d6000602084013e612f5b565b606091505b5050905080612fd25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610abd565b505050565b815183511461304e5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b0384166130ca5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610abd565b3360005b84518110156132075760008582815181106130eb576130eb614d50565b60200260200101519050600085838151811061310957613109614d50565b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156131af5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610abd565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906131ec908490614b18565b925050819055505050508061320090614cc1565b90506130ce565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613257929190614a67565b60405180910390a461326d8187878787876138f0565b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612fd2908490613b04565b600480546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156133e75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610abd565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166134d05760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610abd565b336134e98187876134e088613be9565b6116ec88613be9565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156135805760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201527f72207472616e73666572000000000000000000000000000000000000000000006064820152608401610abd565b6000858152602081815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906135bd908490614b18565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461361d828888888888613c34565b50505050505050565b6001600160a01b0383166136a25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610abd565b336136d2818560006136b387613be9565b6136bc87613be9565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156137685760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e6365000000000000000000000000000000000000000000000000000000006064820152608401610abd565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b03841661384f5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610abd565b33613860816000876134e088613be9565b6000848152602081815260408083206001600160a01b038916845290915281208054859290613890908490614b18565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46116ec81600087878787613c34565b6001600160a01b0384163b1561326d576040517fbc197c810000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063bc197c819061394d908990899088908890889060040161493e565b602060405180830381600087803b15801561396757600080fd5b505af1925050508015613997575060408051601f3d908101601f1916820190925261399491810190614543565b60015b613a4d576139a3614d7c565b806308c379a014156139dd57506139b8614d98565b806139c357506139df565b8060405162461bcd60e51b8152600401610abd9190614a9a565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610abd565b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c81000000000000000000000000000000000000000000000000000000001461361d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610abd565b6000613b59826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613d9e9092919063ffffffff16565b805190915015612fd25780806020019051810190613b7791906144cc565b612fd25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610abd565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613c2357613c23614d50565b602090810291909101015292915050565b6001600160a01b0384163b1561326d576040517ff23a6e610000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063f23a6e6190613c91908990899088908890889060040161499c565b602060405180830381600087803b158015613cab57600080fd5b505af1925050508015613cdb575060408051601f3d908101601f19168201909252613cd891810190614543565b60015b613ce7576139a3614d7c565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e61000000000000000000000000000000000000000000000000000000001461361d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a6563746560448201527f6420746f6b656e730000000000000000000000000000000000000000000000006064820152608401610abd565b6060612eaf8484600085856001600160a01b0385163b613e005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610abd565b600080866001600160a01b03168587604051613e1c919061487b565b60006040518083038185875af1925050503d8060008114613e59576040519150601f19603f3d011682016040523d82523d6000602084013e613e5e565b606091505b5091509150613e6e828286613e79565b979650505050505050565b60608315613e88575081612eb2565b825115613e985782518084602001fd5b8160405162461bcd60e51b8152600401610abd9190614a9a565b828054828255906000526020600020908101928215613eed579160200282015b82811115613eed578235825591602001919060010190613ed2565b50610fdb929150613f6d565b828054613f0590614c59565b90600052602060002090601f016020900481019282613f275760008555613eed565b82601f10613f4057805160ff1916838001178555613eed565b82800160010185558215613eed579182015b82811115613eed578251825591602001919060010190613f52565b5b80821115610fdb5760008155600101613f6e565b60008083601f840112613f9457600080fd5b50813567ffffffffffffffff811115613fac57600080fd5b6020830191508360208260051b8501011115613fc757600080fd5b9250929050565b600082601f830112613fdf57600080fd5b81356020613fec82614ac0565b604051613ff98282614c94565b8381528281019150858301600585901b8701840188101561401957600080fd5b60005b858110156140385781358452928401929084019060010161401c565b5090979650505050505050565b600082601f83011261405657600080fd5b813567ffffffffffffffff81111561407057614070614d66565b6040516140876020601f19601f8501160182614c94565b81815284602083860101111561409c57600080fd5b816020850160208301376000918101602001919091529392505050565b80356fffffffffffffffffffffffffffffffff811681146140d957600080fd5b919050565b6000602082840312156140f057600080fd5b8135612eb281614e40565b6000806040838503121561410e57600080fd5b823561411981614e40565b9150602083013561412981614e40565b809150509250929050565b600080600080600060a0868803121561414c57600080fd5b853561415781614e40565b9450602086013561416781614e40565b9350604086013567ffffffffffffffff8082111561418457600080fd5b61419089838a01613fce565b945060608801359150808211156141a657600080fd5b6141b289838a01613fce565b935060808801359150808211156141c857600080fd5b506141d588828901614045565b9150509295509295909350565b600080600080600060a086880312156141fa57600080fd5b853561420581614e40565b9450602086013561421581614e40565b93506040860135925060608601359150608086013567ffffffffffffffff81111561423f57600080fd5b6141d588828901614045565b6000806000806080858703121561426157600080fd5b843561426c81614e40565b9350602085013567ffffffffffffffff8082111561428957600080fd5b61429588838901613fce565b94506040870135935060608701359150808211156142b257600080fd5b506142bf87828801614045565b91505092959194509250565b600080604083850312156142de57600080fd5b82356142e981614e40565b9150602083013561412981614e55565b6000806040838503121561430c57600080fd5b823561431781614e40565b946020939093013593505050565b60008060006060848603121561433a57600080fd5b833561434581614e40565b95602085013595506040909401359392505050565b6000806040838503121561436d57600080fd5b823567ffffffffffffffff8082111561438557600080fd5b818501915085601f83011261439957600080fd5b813560206143a682614ac0565b6040516143b38282614c94565b8381528281019150858301600585901b870184018b10156143d357600080fd5b600096505b848710156143ff5780356143eb81614e40565b8352600196909601959183019183016143d8565b509650508601359250508082111561441657600080fd5b5061442385828601613fce565b9150509250929050565b6000806000806060858703121561444357600080fd5b843567ffffffffffffffff8082111561445b57600080fd5b61446788838901613f82565b90965094506020870135935060408701359150808211156142b257600080fd5b6000806040838503121561449a57600080fd5b823567ffffffffffffffff8111156144b157600080fd5b6144bd85828601613fce565b95602094909401359450505050565b6000602082840312156144de57600080fd5b8151612eb281614e55565b600080604083850312156144fc57600080fd5b82359150602083013567ffffffffffffffff81111561451a57600080fd5b61442385828601614045565b60006020828403121561453857600080fd5b8135612eb281614e63565b60006020828403121561455557600080fd5b8151612eb281614e63565b60006020828403121561457257600080fd5b813567ffffffffffffffff81111561458957600080fd5b612e6984828501614045565b6000602082840312156145a757600080fd5b813560048110612eb257600080fd5b60008060008060008060008060e0898b0312156145d257600080fd5b6145db896140b9565b97506145e960208a016140b9565b96506145f760408a016140b9565b955060608901359450608089013561460e81614e40565b935060a089013567ffffffffffffffff8082111561462b57600080fd5b6146378c838d01614045565b945060c08b013591508082111561464d57600080fd5b5061465a8b828c01613f82565b999c989b5096995094979396929594505050565b60006020828403121561468057600080fd5b5035919050565b60006020828403121561469957600080fd5b5051919050565b600080604083850312156146b357600080fd5b82359150602083013561412981614e40565b600080604083850312156146d857600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015614717578151875295820195908201906001016146fb565b509495945050505050565b6000815180845261473a816020860160208601614bf8565b601f01601f19169290920160200192915050565b60008151614760818560208601614bf8565b9290920192915050565b6004811061478857634e487b7160e01b600052602160045260246000fd5b9052565b60006101006fffffffffffffffffffffffffffffffff80845116855280602085015116602086015280604085015116604086015280606085015116606086015250608083015160808501526001600160a01b0360a08401511660a085015260c08301518160c086015261480182860182614722565b91505060e0830151611bb760e086018261476a565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b1681526000601482018451602080870160005b8381101561486a5781518552938201939082019060010161484e565b505094825250909201949350505050565b6000825161488d818460208701614bf8565b9190910192915050565b600080845481600182811c9150808316806148b357607f831692505b60208084108214156148d357634e487b7160e01b86526022600452602486fd5b8180156148e757600181146148f857614925565b60ff19861689528489019650614925565b60008b81526020902060005b8681101561491d5781548b820152908501908301614904565b505084890196505b505050505050614935818561474e565b95945050505050565b60006001600160a01b03808816835280871660208401525060a0604083015261496a60a08301866146e7565b828103606084015261497c81866146e7565b905082810360808401526149908185614722565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152613e6e60a0830184614722565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015614a47577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452614a3585835161478c565b945092850192908501906001016149fb565b5092979650505050505050565b602081526000612eb260208301846146e7565b604081526000614a7a60408301856146e7565b828103602084015261493581856146e7565b60208101610ae9828461476a565b602081526000612eb26020830184614722565b602081526000612eb2602083018461478c565b600067ffffffffffffffff821115614ada57614ada614d66565b5060051b60200190565b60006fffffffffffffffffffffffffffffffff808316818516808303821115614b0f57614b0f614d0e565b01949350505050565b60008219821115614b2b57614b2b614d0e565b500190565b60006fffffffffffffffffffffffffffffffff80841680614b5357614b53614d24565b92169190910492915050565b600082614b6e57614b6e614d24565b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614bab57614bab614d0e565b500290565b60006fffffffffffffffffffffffffffffffff83811690831681811015614bd957614bd9614d0e565b039392505050565b600082821015614bf357614bf3614d0e565b500390565b60005b83811015614c13578181015183820152602001614bfb565b83811115612d315750506000910152565b600081614c3357614c33614d0e565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b600181811c90821680614c6d57607f821691505b60208210811415614c8e57634e487b7160e01b600052602260045260246000fd5b50919050565b601f19601f830116810181811067ffffffffffffffff82111715614cba57614cba614d66565b6040525050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614cf357614cf3614d0e565b5060010190565b600082614d0957614d09614d24565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d1115614d955760046000803e5060005160e01c5b90565b600060443d1015614da65790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff8160248401118184111715614df457505050505090565b8285019150815181811115614e0c5750505050505090565b843d8701016020828501011115614e265750505050505090565b614e3560208286010187614c94565b509095945050505050565b6001600160a01b038116811461291357600080fd5b801515811461291357600080fd5b7fffffffff000000000000000000000000000000000000000000000000000000008116811461291357600080fdfea2646970667358221220a69e975275ea5ab48169ff723f1f236beeb712123d2ff410c43b47e009eded0764736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000036697066733a2f2f516d51414a4652636f4733337068614c715941585a55586652524631334552596f56484134484e536f79553772652f0000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000006b99d2b10f3cc0ce6b871a9f5f94e1ecd6222f4700000000000000000000000058c99d011217558ba27fed197b87e93f99bd8a710000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000005a
-----Decoded View---------------
Arg [0] : _uri (string): ipfs://QmQAJFRcoG33phaLqYAXZUXfRRF13ERYoVHA4HNSoyU7re/
Arg [1] : shareholders (address[]): 0x6B99D2B10f3Cc0CE6b871A9F5f94e1ECD6222f47,0x58c99d011217558Ba27fed197B87E93F99bd8A71
Arg [2] : shares (uint256[]): 10,90
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000036
Arg [4] : 697066733a2f2f516d51414a4652636f4733337068614c715941585a55586652
Arg [5] : 524631334552596f56484134484e536f79553772652f00000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 0000000000000000000000006b99d2b10f3cc0ce6b871a9f5f94e1ecd6222f47
Arg [8] : 00000000000000000000000058c99d011217558ba27fed197b87e93f99bd8a71
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [11] : 000000000000000000000000000000000000000000000000000000000000005a
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.