ERC-1155
Overview
Max Total Supply
0
Holders
253
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:
SurrealMintPassFactory
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 10 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./SignedMinting.sol"; contract SurrealMintPassFactory is ERC1155, ERC1155Supply, AccessControlEnumerable, PaymentSplitter, SignedMinting, ReentrancyGuard { using Address for address; using Strings for string; struct MintPass { uint256 mintPrice; uint256 passMintLimit; uint256 walletMintLimit; uint256 totalMinted; string tokenURI; bool requiresSignature; bool saleActive; uint256 numberMinted; mapping(address => uint256) mintsPerAddress; } bytes32 private constant INTEGRATION_ROLE = keccak256("INTEGRATION_ROLE"); mapping(uint256 => MintPass) private mintPasses; uint256 private currentMintPassIndex = 0; address private surrealContractAddress; constructor( address signer_, address adminAddress, address devAddress, address surrealContractAddress_, address[] memory payees, uint256[] memory shares_ ) ERC1155("") PaymentSplitter(payees, shares_) SignedMinting(signer_) ReentrancyGuard() { surrealContractAddress = surrealContractAddress_; _grantRole(DEFAULT_ADMIN_ROLE, adminAddress); _grantRole(DEFAULT_ADMIN_ROLE, devAddress); } function createNewMintPass( uint256 mintPrice, uint256 passMintLimit, uint256 walletMintLimit, string memory tokenURI, bool requiresSignature ) public onlyAuthorized { currentMintPassIndex++; updateMintPass( currentMintPassIndex, mintPrice, passMintLimit, walletMintLimit, requiresSignature ); MintPass storage newPass = mintPasses[currentMintPassIndex]; newPass.tokenURI = tokenURI; } function updateMintPass( uint256 id, uint256 mintPrice, uint256 passMintLimit, uint256 walletMintLimit, bool requiresSignature ) public onlyAuthorized { MintPass storage newPass = mintPasses[id]; newPass.mintPrice = mintPrice; newPass.passMintLimit = passMintLimit; newPass.walletMintLimit = walletMintLimit; newPass.requiresSignature = requiresSignature; } function uri(uint256 tokenId) public view virtual override returns (string memory) { return mintPasses[tokenId].tokenURI; } function burn( address account, uint256 id, uint256 value ) public { require( surrealContractAddress == _msgSender(), "Only surreal contract can burn mint passes" ); _burn(account, id, value); } function publicMint( address to, uint256 amount, bytes memory signature ) public payable nonReentrant { MintPass storage mintPass = mintPasses[currentMintPassIndex]; require(mintPass.saleActive, "Sale not active"); require( !mintPass.requiresSignature || validateSignature(signature), "Requires valid signature" ); require( msg.value == (mintPass.mintPrice * amount), "Incorrect eth value sent" ); require( (mintPass.mintsPerAddress[_msgSender()] + amount) <= mintPass.walletMintLimit, "Exceeds wallet mint limit" ); require( (mintPass.numberMinted + amount) <= mintPass.passMintLimit, "Not enough tokens remaining in this pass" ); mintPass.mintsPerAddress[_msgSender()] += amount; uint256 tokenId = currentMintPassIndex; mintPass.numberMinted += amount; _mint(to, tokenId, amount, ""); } function mint( address to, uint256 tokenId, uint256 amount ) public onlyAuthorized { _mint(to, tokenId, amount, ""); } /* * @note Emergency override. Should never been needed. */ function overrideCurrentActiveMintPass(uint256 overrideIndex) public onlyAuthorized { currentMintPassIndex = overrideIndex; } function toggleSale(uint256 tokenId) public onlyAuthorized { mintPasses[tokenId].saleActive = !mintPasses[tokenId].saleActive; } /* * @note For OpenSea Integration */ function owner() public view returns (address) { return getRoleMember(DEFAULT_ADMIN_ROLE, 0); } /* * @dev Function access control handled by AccessControl contract * @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00 */ function addIntegration(address account) public { grantRole(INTEGRATION_ROLE, account); } /* * @dev Function access control handled by AccessControl contract * @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00 */ function removeIntegration(address account) public { require(account != _msgSender(), "Cannot revoke yourself"); revokeRole(INTEGRATION_ROLE, account); } /* * @dev Function access control handled by AccessControl contract * @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00 */ function grantAdminRole(address account) public { grantRole(DEFAULT_ADMIN_ROLE, account); } /* * @dev Function access control handled by AccessControl contract * @dev Internal role admin check resolves to DEFAULT_ADMIN_ROLE at 0x00 */ function removeAdminRole(address account) public { require(account != _msgSender(), "Cannot revoke yourself"); revokeRole(DEFAULT_ADMIN_ROLE, account); } function setMintingSigner(address _signer) public onlyAuthorized { _setMintingSigner(_signer); } function _grantRole(bytes32 role, address account) internal virtual override { require( role != INTEGRATION_ROLE || account.isContract(), "Integration must be a contract" ); super._grantRole(role, account); } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC1155) returns (bool) { return AccessControlEnumerable.supportsInterface(interfaceId) || ERC1155.supportsInterface(interfaceId); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override(ERC1155Supply, ERC1155) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } modifier onlyAuthorized() { require( hasRole(INTEGRATION_ROLE, _msgSender()) || hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "Not authorized to perform that action" ); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (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.0 (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.0 (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] -= amounts[i]; } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library 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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev 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.0 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; //🎩🐭 fancyrats.eth contract SignedMinting { using ECDSA for bytes32; using Address for address; address public signer; constructor(address _signer) { signer = _signer; } function _setMintingSigner(address _signer) internal { signer = _signer; } // Assumes the signed message was human-readable msg.sender address (lowercase, without the '0x') function validateSignature(bytes memory signature) internal view returns (bool) { bytes32 messageHash = toEthSignedMessageHash(asciiSender()); address _signer = messageHash.recover(signature); return signer == _signer; } modifier isValidSignature(bytes memory signature) { require(validateSignature(signature), "Invalid whitelist signature"); _; } function recoveredAddress(bytes memory signature) public view returns (bytes memory) { address recoveredSigner = recover(signature); return abi.encodePacked(recoveredSigner); } function recover(bytes memory signature) public view returns (address) { bytes32 messageHash = toEthSignedMessageHash(asciiSender()); address recoveredSigner = messageHash.recover(signature); return recoveredSigner; } function generateSenderHash() public view returns (bytes32) { return toEthSignedMessageHash(asciiSender()); } // Because at time of writing, 5b28259dacf47fc208e03611eb3ba8eeaed63cc0 hasn't made it into // OpenZepplin ECDSA release yet. // https://github.com/OpenZeppelin/openzeppelin-contracts/commit/5b28259dacf47fc208e03611eb3ba8eeaed63cc0#diff-ff09871806bcccfd38e43de481f3e7e2fb92134c58e1a1f97b054e2d0d727458R209 function toEthSignedMessageHash(string memory s) public pure returns (bytes32) { bytes memory b = bytes(s); return keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n", Strings.toString(b.length), b ) ); } function asciiSender() public view returns (string memory) { return toAsciiString(msg.sender); } function toAsciiString(address x) internal pure returns (string memory) { bytes memory s = new bytes(40); for (uint256 i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2**(8 * (19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2 * i] = char(hi); s[2 * i + 1] = char(lo); } return string(s); } function char(bytes1 b) internal pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.0 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.0 (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.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. 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. 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.0 (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 v4.4.0 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
{ "optimizer": { "enabled": true, "runs": 10 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"signer_","type":"address"},{"internalType":"address","name":"adminAddress","type":"address"},{"internalType":"address","name":"devAddress","type":"address"},{"internalType":"address","name":"surrealContractAddress_","type":"address"},{"internalType":"address[]","name":"payees","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":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":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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addIntegration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asciiSender","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"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":[{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"passMintLimit","type":"uint256"},{"internalType":"uint256","name":"walletMintLimit","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"requiresSignature","type":"bool"}],"name":"createNewMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"generateSenderHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"overrideIndex","type":"uint256"}],"name":"overrideCurrentActiveMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"recover","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"recoveredAddress","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","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":[{"internalType":"address","name":"account","type":"address"}],"name":"removeAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"removeIntegration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"address","name":"_signer","type":"address"}],"name":"setMintingSigner","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":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"s","type":"string"}],"name":"toEthSignedMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","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":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"passMintLimit","type":"uint256"},{"internalType":"uint256","name":"walletMintLimit","type":"uint256"},{"internalType":"bool","name":"requiresSignature","type":"bool"}],"name":"updateMintPass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260006010553480156200001657600080fd5b5060405162004b8238038062004b82833981016040819052620000399162000754565b858282604051806020016040528060008152506200005d816200020560201b60201c565b508051825114620000d05760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001235760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620000c7565b60005b8251811015620001a757620001928382815181106200015557634e487b7160e01b600052603260045260246000fd5b60200260200101518383815181106200017e57634e487b7160e01b600052603260045260246000fd5b60200260200101516200021e60201b60201c565b806200019e8162000920565b91505062000126565b5050600d80546001600160a01b03199081166001600160a01b03948516179091556001600e55601180549091169286169290921790915550620001ec6000866200040c565b620001f96000856200040c565b5050505050506200096a565b80516200021a9060029060208401906200061a565b5050565b6001600160a01b0382166200028b5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620000c7565b60008111620002dd5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620000c7565b6001600160a01b03821660009081526008602052604090205415620003595760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620000c7565b600a8054600181019091557fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80180546001600160a01b0319166001600160a01b0384169081179091556000908152600860205260409020819055600654620003c3908290620008c8565b600655604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b7f5f924c6b1faae42f36fa6b66af882e9a987aefb9164fceeea420ca4168959c668214158062000456575062000456816001600160a01b0316620004bb60201b620018091760201c565b620004a45760405162461bcd60e51b815260206004820152601e60248201527f496e746567726174696f6e206d757374206265206120636f6e747261637400006044820152606401620000c7565b6200021a8282620004c160201b6200180f1760201c565b3b151590565b620004d882826200050460201b620018311760201c565b6000828152600560209081526040909120620004ff918390620018b7620005a8821b17901c565b505050565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff166200021a5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005643390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620005bf836001600160a01b038416620005c8565b90505b92915050565b60008181526001830160205260408120546200061157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005c2565b506000620005c2565b8280546200062890620008e3565b90600052602060002090601f0160209004810192826200064c576000855562000697565b82601f106200066757805160ff191683800117855562000697565b8280016001018555821562000697579182015b82811115620006975782518255916020019190600101906200067a565b50620006a5929150620006a9565b5090565b5b80821115620006a55760008155600101620006aa565b80516001600160a01b0381168114620006d857600080fd5b919050565b600082601f830112620006ee578081fd5b81516020620007076200070183620008a2565b6200086f565b80838252828201915082860187848660051b890101111562000727578586fd5b855b85811015620007475781518452928401929084019060010162000729565b5090979650505050505050565b60008060008060008060c087890312156200076d578182fd5b6200077887620006c0565b9550602062000789818901620006c0565b95506200079960408901620006c0565b9450620007a960608901620006c0565b60808901519094506001600160401b0380821115620007c6578485fd5b818a0191508a601f830112620007da578485fd5b8151620007eb6200070182620008a2565b8082825285820191508585018e878560051b88010111156200080b578889fd5b8895505b8386101562000838576200082381620006c0565b8352600195909501949186019186016200080f565b5060a08d0151909750945050508083111562000852578384fd5b50506200086289828a01620006dd565b9150509295509295509295565b604051601f8201601f191681016001600160401b03811182821017156200089a576200089a62000954565b604052919050565b60006001600160401b03821115620008be57620008be62000954565b5060051b60200190565b60008219821115620008de57620008de6200093e565b500190565b600181811c90821680620008f857607f821691505b602082108114156200091a57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200093757620009376200093e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b614208806200097a6000396000f3fe6080604052600436106102105760003560e01c8062fdd58e1461025557806301ffc9a7146102885780630e89341c146102b85780631013ed6e146102e5578063156e29f6146103075780631916558714610327578063238ac93314610347578063248a9ca3146103745780632eb2c2d6146103945780632f2ff15d146103b4578063346d14ae146103d457806336568abe146103e95780633a98ef3914610409578063406072a91461041e57806340838f741461043e57806348b75044146104535780634e1273f4146104735780634f558e79146104a05780635f6c03d9146104cf5780637947eac5146104ef5780638b83209b1461050f5780638da5cb5b1461052f5780639010d07c1461054457806391d14854146105645780639852595c146105845780639c6add8e146105a4578063a217fddf146105c4578063a22cb465146105d9578063a4a1edb1146105f9578063a5f6029014610619578063bc56641b14610639578063bd85b03914610659578063beb4018c14610686578063c634b78e146106a6578063ca15c873146106c6578063cc6ee03a146106e6578063ce7c2ac2146106f9578063d547741f1461072f578063d720f9da1461074f578063d79779b21461076f578063dccfe3101461078f578063e33b7de3146107af578063e72f9843146107c4578063e985e9c5146107e4578063f242432a1461082d578063f5298aca1461084d57600080fd5b36610250577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7703334604051610246929190613abc565b60405180910390a1005b600080fd5b34801561026157600080fd5b50610275610270366004613626565b61086d565b6040519081526020015b60405180910390f35b34801561029457600080fd5b506102a86102a3366004613820565b610907565b604051901515815260200161027f565b3480156102c457600080fd5b506102d86102d33660046137c3565b610921565b60405161027f9190613bae565b3480156102f157600080fd5b506103056103003660046137c3565b6109c6565b005b34801561031357600080fd5b506103056103223660046136a7565b610a10565b34801561033357600080fd5b50610305610342366004613496565b610a75565b34801561035357600080fd5b50600d54610367906001600160a01b031681565b60405161027f9190613aa8565b34801561038057600080fd5b5061027561038f3660046137c3565b610b84565b3480156103a057600080fd5b506103056103af3660046134ea565b610b99565b3480156103c057600080fd5b506103056103cf3660046137db565b610c30565b3480156103e057600080fd5b506102d8610c4d565b3480156103f557600080fd5b506103056104043660046137db565b610c5d565b34801561041557600080fd5b50600654610275565b34801561042a57600080fd5b5061027561043936600461388a565b610cdb565b34801561044a57600080fd5b50610275610d06565b34801561045f57600080fd5b5061030561046e36600461388a565b610d13565b34801561047f57600080fd5b5061049361048e3660046136db565b610ec9565b60405161027f9190613b6d565b3480156104ac57600080fd5b506102a86104bb3660046137c3565b600090815260036020526040902054151590565b3480156104db57600080fd5b506103056104ea366004613920565b61102a565b3480156104fb57600080fd5b5061030561050a3660046138b4565b6110a2565b34801561051b57600080fd5b5061036761052a3660046137c3565b61113d565b34801561053b57600080fd5b5061036761117b565b34801561055057600080fd5b5061036761055f3660046137ff565b611183565b34801561057057600080fd5b506102a861057f3660046137db565b6111a2565b34801561059057600080fd5b5061027561059f366004613496565b6111cd565b3480156105b057600080fd5b506102d86105bf366004613858565b6111e8565b3480156105d057600080fd5b50610275600081565b3480156105e557600080fd5b506103056105f43660046135f9565b611226565b34801561060557600080fd5b50610367610614366004613858565b611231565b34801561062557600080fd5b50610305610634366004613496565b611255565b34801561064557600080fd5b50610305610654366004613496565b6112bb565b34801561066557600080fd5b506102756106743660046137c3565b60009081526003602052604090205490565b34801561069257600080fd5b506103056106a1366004613496565b6112fc565b3480156106b257600080fd5b506103056106c1366004613496565b611314565b3480156106d257600080fd5b506102756106e13660046137c3565b61131f565b6103056106f4366004613651565b611336565b34801561070557600080fd5b50610275610714366004613496565b6001600160a01b031660009081526008602052604090205490565b34801561073b57600080fd5b5061030561074a3660046137db565b6115ed565b34801561075b57600080fd5b5061027561076a366004613858565b61160a565b34801561077b57600080fd5b5061027561078a366004613496565b61164a565b34801561079b57600080fd5b506103056107aa366004613496565b611665565b3480156107bb57600080fd5b50600754610275565b3480156107d057600080fd5b506103056107df3660046137c3565b611699565b3480156107f057600080fd5b506102a86107ff3660046134b2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561083957600080fd5b50610305610848366004613593565b61170a565b34801561085957600080fd5b506103056108683660046136a7565b611791565b60006001600160a01b0383166108de5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610912826118cc565b806109015750610901826118f1565b6000818152600f6020526040902060040180546060919061094190613fe0565b80601f016020809104026020016040519081016040528092919081815260200182805461096d90613fe0565b80156109ba5780601f1061098f576101008083540402835291602001916109ba565b820191906000526020600020905b81548152906001019060200180831161099d57829003601f168201915b50505050509050919050565b6109de6000805160206141b3833981519152336111a2565b806109ef57506109ef6000336111a2565b610a0b5760405162461bcd60e51b81526004016108d590613d59565b601055565b610a286000805160206141b3833981519152336111a2565b80610a395750610a396000336111a2565b610a555760405162461bcd60e51b81526004016108d590613d59565b610a7083838360405180602001604052806000815250611941565b505050565b6001600160a01b038116600090815260086020526040902054610aaa5760405162461bcd60e51b81526004016108d590613c39565b6000610ab560075490565b610abf9047613dc1565b90506000610ad68383610ad1866111cd565b611a3f565b905080610af55760405162461bcd60e51b81526004016108d590613c7f565b6001600160a01b03831660009081526009602052604081208054839290610b1d908490613dc1565b925050819055508060076000828254610b369190613dc1565b90915550610b4690508382611a7d565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610b77929190613abc565b60405180910390a1505050565b60009081526004602052604090206001015490565b6001600160a01b038516331480610bb55750610bb585336107ff565b610c1c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016108d5565b610c298585858585611b93565b5050505050565b610c3982610b84565b610c438133611d9a565b610a708383611dfe565b6060610c5833611e7a565b905090565b6001600160a01b0381163314610ccd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108d5565b610cd78282611fdd565b5050565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b6000610c5861076a610c4d565b6001600160a01b038116600090815260086020526040902054610d485760405162461bcd60e51b81526004016108d590613c39565b6000610d538361164a565b6040516370a0823160e01b81526001600160a01b038516906370a0823190610d7f903090600401613aa8565b60206040518083038186803b158015610d9757600080fd5b505afa158015610dab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcf919061389c565b610dd99190613dc1565b90506000610dec8383610ad18787610cdb565b905080610e0b5760405162461bcd60e51b81526004016108d590613c7f565b6001600160a01b038085166000908152600c6020908152604080832093871683529290529081208054839290610e42908490613dc1565b90915550506001600160a01b0384166000908152600b602052604081208054839290610e6f908490613dc1565b90915550610e809050848483611fff565b836001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8483604051610ebb929190613abc565b60405180910390a250505050565b60608151835114610f2e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016108d5565b600083516001600160401b03811115610f5757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f80578160200160208202803683370190505b50905060005b845181101561102257610fe7858281518110610fb257634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610fda57634e487b7160e01b600052603260045260246000fd5b602002602001015161086d565b82828151811061100757634e487b7160e01b600052603260045260246000fd5b602090810291909101015261101b81614047565b9050610f86565b509392505050565b6110426000805160206141b3833981519152336111a2565b8061105357506110536000336111a2565b61106f5760405162461bcd60e51b81526004016108d590613d59565b6000948552600f602052604090942092835560018301919091556002820155600501805460ff1916911515919091179055565b6110ba6000805160206141b3833981519152336111a2565b806110cb57506110cb6000336111a2565b6110e75760405162461bcd60e51b81526004016108d590613d59565b601080549060006110f783614047565b919050555061110b6010548686868561102a565b6010546000908152600f602090815260409091208351909161113491600484019186019061331b565b50505050505050565b6000600a828154811061116057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b6000610c5881805b600082815260056020526040812061119b9083612055565b9392505050565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6001600160a01b031660009081526009602052604090205490565b606060006111f583611231565b6040805160609290921b6001600160601b031916602083015280516014818403018152603490920190529392505050565b610cd7338383612061565b60008061123f61076a610c4d565b9050600061124d8285612142565b949350505050565b61126d6000805160206141b3833981519152336111a2565b8061127e575061127e6000336111a2565b61129a5760405162461bcd60e51b81526004016108d590613d59565b600d80546001600160a01b0319166001600160a01b03831617905550565b50565b6001600160a01b0381163314156112e45760405162461bcd60e51b81526004016108d590613c09565b6112b86000805160206141b3833981519152826115ed565b6112b86000805160206141b383398151915282610c30565b6112b8600082610c30565b60008181526005602052604081206109019061215e565b6002600e5414156113895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d5565b6002600e556010546000908152600f602052604090206005810154610100900460ff166113ea5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016108d5565b600581015460ff161580611402575061140282612168565b6114495760405162461bcd60e51b815260206004820152601860248201527752657175697265732076616c6964207369676e617475726560401b60448201526064016108d5565b8054611456908490613f1f565b341461149f5760405162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd08195d1a081d985b1d59481cd95b9d60421b60448201526064016108d5565b60028101543360009081526007830160205260409020546114c1908590613dc1565b111561150b5760405162461bcd60e51b8152602060048201526019602482015278115e18d959591cc81dd85b1b195d081b5a5b9d081b1a5b5a5d603a1b60448201526064016108d5565b80600101548382600601546115209190613dc1565b111561157f5760405162461bcd60e51b815260206004820152602860248201527f4e6f7420656e6f75676820746f6b656e732072656d61696e696e6720696e2074604482015267686973207061737360c01b60648201526084016108d5565b336000908152600782016020526040812080548592906115a0908490613dc1565b90915550506010546006820180548591906000906115bf908490613dc1565b925050819055506115e185828660405180602001604052806000815250611941565b50506001600e55505050565b6115f682610b84565b6116008133611d9a565b610a708383611fdd565b60008082905061161a815161219d565b8160405160200161162c9291906139e0565b60405160208183030381529060405280519060200120915050919050565b6001600160a01b03166000908152600b602052604090205490565b6001600160a01b03811633141561168e5760405162461bcd60e51b81526004016108d590613c09565b6112b86000826115ed565b6116b16000805160206141b3833981519152336111a2565b806116c257506116c26000336111a2565b6116de5760405162461bcd60e51b81526004016108d590613d59565b6000908152600f60205260409020600501805461ff001981166101009182900460ff1615909102179055565b6001600160a01b038516331480611726575061172685336107ff565b6117845760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016108d5565b610c2985858585856122b6565b6011546001600160a01b031633146117fe5760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c79207375727265616c20636f6e74726163742063616e206275726e206d604482015269696e742070617373657360b01b60648201526084016108d5565b610a708383836123b8565b3b151590565b6118198282611831565b6000828152600560205260409020610a7090826118b7565b61183b82826111a2565b610cd75760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556118733390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061119b836001600160a01b03841661251f565b60006001600160e01b03198216635a05180f60e01b148061090157506109018261256e565b60006001600160e01b03198216636cdb3d1360e11b148061192257506001600160e01b031982166303a24d0760e21b145b8061090157506301ffc9a760e01b6001600160e01b0319831614610901565b6001600160a01b0384166119a15760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016108d5565b336119c1816000876119b288612593565b6119bb88612593565b876125ec565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906119f1908490613dc1565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020614193833981519152910160405180910390a4610c29816000878787876125fa565b6006546001600160a01b03841660009081526008602052604081205490918391611a699086613f1f565b611a739190613dfe565b61124d9190613f5f565b80471015611acd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108d5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611b1a576040519150601f19603f3d011682016040523d82523d6000602084013e611b1f565b606091505b5050905080610a705760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b60648201526084016108d5565b8151835114611bf55760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016108d5565b6001600160a01b038416611c1b5760405162461bcd60e51b81526004016108d590613cca565b33611c2a8187878787876125ec565b60005b8451811015611d2c576000858281518110611c5857634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110611c8457634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611cd45760405162461bcd60e51b81526004016108d590613d0f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d11908490613dc1565b9250508190555050505080611d2590614047565b9050611c2d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d7c929190613b80565b60405180910390a4611d92818787878787612765565b505050505050565b611da482826111a2565b610cd757611dbc816001600160a01b0316601461282f565b611dc783602061282f565b604051602001611dd8929190613a39565b60408051601f198184030181529082905262461bcd60e51b82526108d591600401613bae565b6000805160206141b383398151915282141580611e2457506001600160a01b0381163b15155b611e705760405162461bcd60e51b815260206004820152601e60248201527f496e746567726174696f6e206d757374206265206120636f6e7472616374000060448201526064016108d5565b610cd7828261180f565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015611fd6576000611eb7826013613f5f565b611ec2906008613f1f565b611ecd906002613e77565b611ee0906001600160a01b038716613dfe565b60f81b9050600060108260f81c611ef79190613e12565b60f81b905060008160f81c6010611f0e9190613f3e565b8360f81c611f1c9190613f76565b60f81b9050611f2a82612a10565b85611f36866002613f1f565b81518110611f5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611f7481612a10565b85611f80866002613f1f565b611f8b906001613dc1565b81518110611fa957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505050508080611fce90614047565b915050611ea1565b5092915050565b611fe78282612a46565b6000828152600560205260409020610a709082612aad565b610a708363a9059cbb60e01b848460405160240161201e929190613abc565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612ac2565b600061119b8383612b94565b816001600160a01b0316836001600160a01b031614156120d55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016108d5565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008060006121518585612bcc565b9150915061102281612c3c565b6000610901825490565b60008061217661076a610c4d565b905060006121848285612142565b600d546001600160a01b03908116911614949350505050565b6060816121c15750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121eb57806121d581614047565b91506121e49050600a83613dfe565b91506121c5565b6000816001600160401b0381111561221357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561223d576020820181803683370190505b5090505b841561124d57612252600183613f5f565b915061225f600a86614062565b61226a906030613dc1565b60f81b81838151811061228d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506122af600a86613dfe565b9450612241565b6001600160a01b0384166122dc5760405162461bcd60e51b81526004016108d590613cca565b336122ec8187876119b288612593565b6000848152602081815260408083206001600160a01b038a1684529091529020548381101561232d5760405162461bcd60e51b81526004016108d590613d0f565b6000858152602081815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061236a908490613dc1565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020614193833981519152910160405180910390a46111348288888888886125fa565b6001600160a01b03831661241a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016108d5565b336124498185600061242b87612593565b61243487612593565b604051806020016040528060008152506125ec565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156124c65760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016108d5565b6000848152602081815260408083206001600160a01b0389811680865291845282852088870390558251898152938401889052909290861691600080516020614193833981519152910160405180910390a45050505050565b600081815260018301602052604081205461256657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610901565b506000610901565b60006001600160e01b03198216637965db0b60e01b14806109015750610901826118f1565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106125db57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b611d92868686868686612e38565b6001600160a01b0384163b15611d925760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061263e9089908990889088908890600401613b33565b602060405180830381600087803b15801561265857600080fd5b505af1925050508015612688575060408051601f3d908101601f191682019092526126859181019061383c565b60015b612735576126946140b8565b806308c379a014156126ce57506126a96140d0565b806126b457506126d0565b8060405162461bcd60e51b81526004016108d59190613bae565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016108d5565b6001600160e01b0319811663f23a6e6160e01b146111345760405162461bcd60e51b81526004016108d590613bc1565b6001600160a01b0384163b15611d925760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906127a99089908990889088908890600401613ad5565b602060405180830381600087803b1580156127c357600080fd5b505af19250505080156127f3575060408051601f3d908101601f191682019092526127f09181019061383c565b60015b6127ff576126946140b8565b6001600160e01b0319811663bc197c8160e01b146111345760405162461bcd60e51b81526004016108d590613bc1565b6060600061283e836002613f1f565b612849906002613dc1565b6001600160401b0381111561286e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612898576020820181803683370190505b509050600360fc1b816000815181106128c157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106128fe57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612922846002613f1f565b61292d906001613dc1565b90505b60018111156129c1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061296f57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061299357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936129ba81613fc9565b9050612930565b50831561119b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108d5565b6000600a60f883901c1015612a3757612a2e60f883901c6030613dd9565b60f81b92915050565b612a2e60f883901c6057613dd9565b612a5082826111a2565b15610cd75760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061119b836001600160a01b038416612f7c565b6000612b17826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130999092919063ffffffff16565b805190915015610a705780806020019051810190612b3591906137a7565b610a705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108d5565b6000826000018281548110612bb957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600080825160411415612c035760208301516040840151606085015160001a612bf7878285856130a8565b94509450505050612c35565b825160401415612c2d5760208301516040840151612c2286838361318b565b935093505050612c35565b506000905060025b9250929050565b6000816004811115612c5e57634e487b7160e01b600052602160045260246000fd5b1415612c675750565b6001816004811115612c8957634e487b7160e01b600052602160045260246000fd5b1415612cd25760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b60448201526064016108d5565b6002816004811115612cf457634e487b7160e01b600052602160045260246000fd5b1415612d425760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108d5565b6003816004811115612d6457634e487b7160e01b600052602160045260246000fd5b1415612dbd5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108d5565b6004816004811115612ddf57634e487b7160e01b600052602160045260246000fd5b14156112b85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108d5565b6001600160a01b038516612edb5760005b8351811015612ed957828181518110612e7257634e487b7160e01b600052603260045260246000fd5b602002602001015160036000868481518110612e9e57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612ec39190613dc1565b90915550612ed2905081614047565b9050612e49565b505b6001600160a01b038416611d925760005b835181101561113457828181518110612f1557634e487b7160e01b600052603260045260246000fd5b602002602001015160036000868481518110612f4157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612f669190613f5f565b90915550612f75905081614047565b9050612eec565b6000818152600183016020526040812054801561308f576000612fa0600183613f5f565b8554909150600090612fb490600190613f5f565b9050818114613035576000866000018281548110612fe257634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061301357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061305457634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610901565b6000915050610901565b606061124d84846000856131ba565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156130d55750600090506003613182565b8460ff16601b141580156130ed57508460ff16601c14155b156130fe5750600090506004613182565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613152573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661317b57600060019250925050613182565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016131ac878288856130a8565b935093505050935093915050565b60608247101561321b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108d5565b843b6132695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108d5565b600080866001600160a01b0316858760405161328591906139c4565b60006040518083038185875af1925050503d80600081146132c2576040519150601f19603f3d011682016040523d82523d6000602084013e6132c7565b606091505b50915091506132d78282866132e2565b979650505050505050565b606083156132f157508161119b565b8251156133015782518084602001fd5b8160405162461bcd60e51b81526004016108d59190613bae565b82805461332790613fe0565b90600052602060002090601f016020900481019282613349576000855561338f565b82601f1061336257805160ff191683800117855561338f565b8280016001018555821561338f579182015b8281111561338f578251825591602001919060010190613374565b5061339b92915061339f565b5090565b5b8082111561339b57600081556001016133a0565b600082601f8301126133c4578081fd5b813560206133d182613d9e565b6040516133de828261401b565b8381528281019150858301600585901b870184018810156133fd578586fd5b855b8581101561341b578135845292840192908401906001016133ff565b5090979650505050505050565b600082601f830112613438578081fd5b81356001600160401b03811115613451576134516140a2565b604051613468601f8301601f19166020018261401b565b81815284602083860101111561347c578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156134a7578081fd5b813561119b81614159565b600080604083850312156134c4578081fd5b82356134cf81614159565b915060208301356134df81614159565b809150509250929050565b600080600080600060a08688031215613501578081fd5b853561350c81614159565b9450602086013561351c81614159565b935060408601356001600160401b0380821115613537578283fd5b61354389838a016133b4565b94506060880135915080821115613558578283fd5b61356489838a016133b4565b93506080880135915080821115613579578283fd5b5061358688828901613428565b9150509295509295909350565b600080600080600060a086880312156135aa578081fd5b85356135b581614159565b945060208601356135c581614159565b9350604086013592506060860135915060808601356001600160401b038111156135ed578182fd5b61358688828901613428565b6000806040838503121561360b578182fd5b823561361681614159565b915060208301356134df8161416e565b60008060408385031215613638578182fd5b823561364381614159565b946020939093013593505050565b600080600060608486031215613665578081fd5b833561367081614159565b92506020840135915060408401356001600160401b03811115613691578182fd5b61369d86828701613428565b9150509250925092565b6000806000606084860312156136bb578081fd5b83356136c681614159565b95602085013595506040909401359392505050565b600080604083850312156136ed578182fd5b82356001600160401b0380821115613703578384fd5b818501915085601f830112613716578384fd5b8135602061372382613d9e565b604051613730828261401b565b8381528281019150858301600585901b870184018b101561374f578889fd5b8896505b8487101561377a57803561376681614159565b835260019690960195918301918301613753565b5096505086013592505080821115613790578283fd5b5061379d858286016133b4565b9150509250929050565b6000602082840312156137b8578081fd5b815161119b8161416e565b6000602082840312156137d4578081fd5b5035919050565b600080604083850312156137ed578182fd5b8235915060208301356134df81614159565b60008060408385031215613811578182fd5b50508035926020909101359150565b600060208284031215613831578081fd5b813561119b8161417c565b60006020828403121561384d578081fd5b815161119b8161417c565b600060208284031215613869578081fd5b81356001600160401b0381111561387e578182fd5b61124d84828501613428565b600080604083850312156134c4578182fd5b6000602082840312156138ad578081fd5b5051919050565b600080600080600060a086880312156138cb578283fd5b85359450602086013593506040860135925060608601356001600160401b038111156138f5578182fd5b61390188828901613428565b92505060808601356139128161416e565b809150509295509295909350565b600080600080600060a08688031215613937578283fd5b8535945060208601359350604086013592506060860135915060808601356139128161416e565b6000815180845260208085019450808401835b8381101561398d57815187529582019590820190600101613971565b509495945050505050565b600081518084526139b0816020860160208601613f99565b601f01601f19169290920160200192915050565b600082516139d6818460208701613f99565b9190910192915050565b790ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d0560311b81528251600090613a1681601a850160208801613f99565b835190830190613a2d81601a840160208801613f99565b01601a01949350505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613a6b816017850160208801613f99565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613a9c816028840160208801613f99565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0386811682528516602082015260a060408201819052600090613b019083018661395e565b8281036060840152613b13818661395e565b90508281036080840152613b278185613998565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906132d790830184613998565b60208152600061119b602083018461395e565b604081526000613b93604083018561395e565b8281036020840152613ba5818561395e565b95945050505050565b60208152600061119b6020830184613998565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526016908201527521b0b73737ba103932bb37b5b2903cb7bab939b2b63360511b604082015260600190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526025908201527f4e6f7420617574686f72697a656420746f20706572666f726d2074686174206160408201526431ba34b7b760d91b606082015260800190565b60006001600160401b03821115613db757613db76140a2565b5060051b60200190565b60008219821115613dd457613dd4614076565b500190565b600060ff821660ff84168060ff03821115613df657613df6614076565b019392505050565b600082613e0d57613e0d61408c565b500490565b600060ff831680613e2557613e2561408c565b8060ff84160491505092915050565b600181815b80851115613e6f578160001904821115613e5557613e55614076565b80851615613e6257918102915b93841c9390800290613e39565b509250929050565b600061119b8383600082613e8d57506001610901565b81613e9a57506000610901565b8160018114613eb05760028114613eba57613ed6565b6001915050610901565b60ff841115613ecb57613ecb614076565b50506001821b610901565b5060208310610133831016604e8410600b8410161715613ef9575081810a610901565b613f038383613e34565b8060001904821115613f1757613f17614076565b029392505050565b6000816000190483118215151615613f3957613f39614076565b500290565b600060ff821660ff84168160ff0481118215151615613f1757613f17614076565b600082821015613f7157613f71614076565b500390565b600060ff821660ff841680821015613f9057613f90614076565b90039392505050565b60005b83811015613fb4578181015183820152602001613f9c565b83811115613fc3576000848401525b50505050565b600081613fd857613fd8614076565b506000190190565b600181811c90821680613ff457607f821691505b6020821081141561401557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b0381118282101715614040576140406140a2565b6040525050565b600060001982141561405b5761405b614076565b5060010190565b6000826140715761407161408c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156140cd57600481823e5160e01c5b90565b600060443d10156140de5790565b6040516003193d81016004833e81513d6001600160401b03808311602484018310171561410d57505050505090565b82850191508151818111156141255750505050505090565b843d870101602082850101111561413f5750505050505090565b61414e6020828601018761401b565b509095945050505050565b6001600160a01b03811681146112b857600080fd5b80151581146112b857600080fd5b6001600160e01b0319811681146112b857600080fdfec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f625f924c6b1faae42f36fa6b66af882e9a987aefb9164fceeea420ca4168959c66a2646970667358221220c6976b3f509b177f4076d813adf31b22f240d1ec6a95fbba5d54f89c7ab67ec764736f6c634300080400330000000000000000000000006560c8df05a0823faaebf40e52adcad1e8a5371a00000000000000000000000037c6e1d755112213d5e7d5e2aca2b83192f7cf350000000000000000000000005fea9dacde1fb43e87b8a9259aebc937d995f51b000000000000000000000000bc4aee331e970f6e7a5e91f7b911bdbfdf928a9800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000037c6e1d755112213d5e7d5e2aca2b83192f7cf35000000000000000000000000fad0fec24047f510d110fb03b73e57a72e91f33d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004b0000000000000000000000000000000000000000000000000000000000000019
Deployed Bytecode
0x6080604052600436106102105760003560e01c8062fdd58e1461025557806301ffc9a7146102885780630e89341c146102b85780631013ed6e146102e5578063156e29f6146103075780631916558714610327578063238ac93314610347578063248a9ca3146103745780632eb2c2d6146103945780632f2ff15d146103b4578063346d14ae146103d457806336568abe146103e95780633a98ef3914610409578063406072a91461041e57806340838f741461043e57806348b75044146104535780634e1273f4146104735780634f558e79146104a05780635f6c03d9146104cf5780637947eac5146104ef5780638b83209b1461050f5780638da5cb5b1461052f5780639010d07c1461054457806391d14854146105645780639852595c146105845780639c6add8e146105a4578063a217fddf146105c4578063a22cb465146105d9578063a4a1edb1146105f9578063a5f6029014610619578063bc56641b14610639578063bd85b03914610659578063beb4018c14610686578063c634b78e146106a6578063ca15c873146106c6578063cc6ee03a146106e6578063ce7c2ac2146106f9578063d547741f1461072f578063d720f9da1461074f578063d79779b21461076f578063dccfe3101461078f578063e33b7de3146107af578063e72f9843146107c4578063e985e9c5146107e4578063f242432a1461082d578063f5298aca1461084d57600080fd5b36610250577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7703334604051610246929190613abc565b60405180910390a1005b600080fd5b34801561026157600080fd5b50610275610270366004613626565b61086d565b6040519081526020015b60405180910390f35b34801561029457600080fd5b506102a86102a3366004613820565b610907565b604051901515815260200161027f565b3480156102c457600080fd5b506102d86102d33660046137c3565b610921565b60405161027f9190613bae565b3480156102f157600080fd5b506103056103003660046137c3565b6109c6565b005b34801561031357600080fd5b506103056103223660046136a7565b610a10565b34801561033357600080fd5b50610305610342366004613496565b610a75565b34801561035357600080fd5b50600d54610367906001600160a01b031681565b60405161027f9190613aa8565b34801561038057600080fd5b5061027561038f3660046137c3565b610b84565b3480156103a057600080fd5b506103056103af3660046134ea565b610b99565b3480156103c057600080fd5b506103056103cf3660046137db565b610c30565b3480156103e057600080fd5b506102d8610c4d565b3480156103f557600080fd5b506103056104043660046137db565b610c5d565b34801561041557600080fd5b50600654610275565b34801561042a57600080fd5b5061027561043936600461388a565b610cdb565b34801561044a57600080fd5b50610275610d06565b34801561045f57600080fd5b5061030561046e36600461388a565b610d13565b34801561047f57600080fd5b5061049361048e3660046136db565b610ec9565b60405161027f9190613b6d565b3480156104ac57600080fd5b506102a86104bb3660046137c3565b600090815260036020526040902054151590565b3480156104db57600080fd5b506103056104ea366004613920565b61102a565b3480156104fb57600080fd5b5061030561050a3660046138b4565b6110a2565b34801561051b57600080fd5b5061036761052a3660046137c3565b61113d565b34801561053b57600080fd5b5061036761117b565b34801561055057600080fd5b5061036761055f3660046137ff565b611183565b34801561057057600080fd5b506102a861057f3660046137db565b6111a2565b34801561059057600080fd5b5061027561059f366004613496565b6111cd565b3480156105b057600080fd5b506102d86105bf366004613858565b6111e8565b3480156105d057600080fd5b50610275600081565b3480156105e557600080fd5b506103056105f43660046135f9565b611226565b34801561060557600080fd5b50610367610614366004613858565b611231565b34801561062557600080fd5b50610305610634366004613496565b611255565b34801561064557600080fd5b50610305610654366004613496565b6112bb565b34801561066557600080fd5b506102756106743660046137c3565b60009081526003602052604090205490565b34801561069257600080fd5b506103056106a1366004613496565b6112fc565b3480156106b257600080fd5b506103056106c1366004613496565b611314565b3480156106d257600080fd5b506102756106e13660046137c3565b61131f565b6103056106f4366004613651565b611336565b34801561070557600080fd5b50610275610714366004613496565b6001600160a01b031660009081526008602052604090205490565b34801561073b57600080fd5b5061030561074a3660046137db565b6115ed565b34801561075b57600080fd5b5061027561076a366004613858565b61160a565b34801561077b57600080fd5b5061027561078a366004613496565b61164a565b34801561079b57600080fd5b506103056107aa366004613496565b611665565b3480156107bb57600080fd5b50600754610275565b3480156107d057600080fd5b506103056107df3660046137c3565b611699565b3480156107f057600080fd5b506102a86107ff3660046134b2565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b34801561083957600080fd5b50610305610848366004613593565b61170a565b34801561085957600080fd5b506103056108683660046136a7565b611791565b60006001600160a01b0383166108de5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b6000610912826118cc565b806109015750610901826118f1565b6000818152600f6020526040902060040180546060919061094190613fe0565b80601f016020809104026020016040519081016040528092919081815260200182805461096d90613fe0565b80156109ba5780601f1061098f576101008083540402835291602001916109ba565b820191906000526020600020905b81548152906001019060200180831161099d57829003601f168201915b50505050509050919050565b6109de6000805160206141b3833981519152336111a2565b806109ef57506109ef6000336111a2565b610a0b5760405162461bcd60e51b81526004016108d590613d59565b601055565b610a286000805160206141b3833981519152336111a2565b80610a395750610a396000336111a2565b610a555760405162461bcd60e51b81526004016108d590613d59565b610a7083838360405180602001604052806000815250611941565b505050565b6001600160a01b038116600090815260086020526040902054610aaa5760405162461bcd60e51b81526004016108d590613c39565b6000610ab560075490565b610abf9047613dc1565b90506000610ad68383610ad1866111cd565b611a3f565b905080610af55760405162461bcd60e51b81526004016108d590613c7f565b6001600160a01b03831660009081526009602052604081208054839290610b1d908490613dc1565b925050819055508060076000828254610b369190613dc1565b90915550610b4690508382611a7d565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610b77929190613abc565b60405180910390a1505050565b60009081526004602052604090206001015490565b6001600160a01b038516331480610bb55750610bb585336107ff565b610c1c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016108d5565b610c298585858585611b93565b5050505050565b610c3982610b84565b610c438133611d9a565b610a708383611dfe565b6060610c5833611e7a565b905090565b6001600160a01b0381163314610ccd5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016108d5565b610cd78282611fdd565b5050565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205490565b6000610c5861076a610c4d565b6001600160a01b038116600090815260086020526040902054610d485760405162461bcd60e51b81526004016108d590613c39565b6000610d538361164a565b6040516370a0823160e01b81526001600160a01b038516906370a0823190610d7f903090600401613aa8565b60206040518083038186803b158015610d9757600080fd5b505afa158015610dab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dcf919061389c565b610dd99190613dc1565b90506000610dec8383610ad18787610cdb565b905080610e0b5760405162461bcd60e51b81526004016108d590613c7f565b6001600160a01b038085166000908152600c6020908152604080832093871683529290529081208054839290610e42908490613dc1565b90915550506001600160a01b0384166000908152600b602052604081208054839290610e6f908490613dc1565b90915550610e809050848483611fff565b836001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8483604051610ebb929190613abc565b60405180910390a250505050565b60608151835114610f2e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016108d5565b600083516001600160401b03811115610f5757634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610f80578160200160208202803683370190505b50905060005b845181101561102257610fe7858281518110610fb257634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610fda57634e487b7160e01b600052603260045260246000fd5b602002602001015161086d565b82828151811061100757634e487b7160e01b600052603260045260246000fd5b602090810291909101015261101b81614047565b9050610f86565b509392505050565b6110426000805160206141b3833981519152336111a2565b8061105357506110536000336111a2565b61106f5760405162461bcd60e51b81526004016108d590613d59565b6000948552600f602052604090942092835560018301919091556002820155600501805460ff1916911515919091179055565b6110ba6000805160206141b3833981519152336111a2565b806110cb57506110cb6000336111a2565b6110e75760405162461bcd60e51b81526004016108d590613d59565b601080549060006110f783614047565b919050555061110b6010548686868561102a565b6010546000908152600f602090815260409091208351909161113491600484019186019061331b565b50505050505050565b6000600a828154811061116057634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b6000610c5881805b600082815260056020526040812061119b9083612055565b9392505050565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6001600160a01b031660009081526009602052604090205490565b606060006111f583611231565b6040805160609290921b6001600160601b031916602083015280516014818403018152603490920190529392505050565b610cd7338383612061565b60008061123f61076a610c4d565b9050600061124d8285612142565b949350505050565b61126d6000805160206141b3833981519152336111a2565b8061127e575061127e6000336111a2565b61129a5760405162461bcd60e51b81526004016108d590613d59565b600d80546001600160a01b0319166001600160a01b03831617905550565b50565b6001600160a01b0381163314156112e45760405162461bcd60e51b81526004016108d590613c09565b6112b86000805160206141b3833981519152826115ed565b6112b86000805160206141b383398151915282610c30565b6112b8600082610c30565b60008181526005602052604081206109019061215e565b6002600e5414156113895760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108d5565b6002600e556010546000908152600f602052604090206005810154610100900460ff166113ea5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b60448201526064016108d5565b600581015460ff161580611402575061140282612168565b6114495760405162461bcd60e51b815260206004820152601860248201527752657175697265732076616c6964207369676e617475726560401b60448201526064016108d5565b8054611456908490613f1f565b341461149f5760405162461bcd60e51b8152602060048201526018602482015277125b98dbdc9c9958dd08195d1a081d985b1d59481cd95b9d60421b60448201526064016108d5565b60028101543360009081526007830160205260409020546114c1908590613dc1565b111561150b5760405162461bcd60e51b8152602060048201526019602482015278115e18d959591cc81dd85b1b195d081b5a5b9d081b1a5b5a5d603a1b60448201526064016108d5565b80600101548382600601546115209190613dc1565b111561157f5760405162461bcd60e51b815260206004820152602860248201527f4e6f7420656e6f75676820746f6b656e732072656d61696e696e6720696e2074604482015267686973207061737360c01b60648201526084016108d5565b336000908152600782016020526040812080548592906115a0908490613dc1565b90915550506010546006820180548591906000906115bf908490613dc1565b925050819055506115e185828660405180602001604052806000815250611941565b50506001600e55505050565b6115f682610b84565b6116008133611d9a565b610a708383611fdd565b60008082905061161a815161219d565b8160405160200161162c9291906139e0565b60405160208183030381529060405280519060200120915050919050565b6001600160a01b03166000908152600b602052604090205490565b6001600160a01b03811633141561168e5760405162461bcd60e51b81526004016108d590613c09565b6112b86000826115ed565b6116b16000805160206141b3833981519152336111a2565b806116c257506116c26000336111a2565b6116de5760405162461bcd60e51b81526004016108d590613d59565b6000908152600f60205260409020600501805461ff001981166101009182900460ff1615909102179055565b6001600160a01b038516331480611726575061172685336107ff565b6117845760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016108d5565b610c2985858585856122b6565b6011546001600160a01b031633146117fe5760405162461bcd60e51b815260206004820152602a60248201527f4f6e6c79207375727265616c20636f6e74726163742063616e206275726e206d604482015269696e742070617373657360b01b60648201526084016108d5565b610a708383836123b8565b3b151590565b6118198282611831565b6000828152600560205260409020610a7090826118b7565b61183b82826111a2565b610cd75760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556118733390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600061119b836001600160a01b03841661251f565b60006001600160e01b03198216635a05180f60e01b148061090157506109018261256e565b60006001600160e01b03198216636cdb3d1360e11b148061192257506001600160e01b031982166303a24d0760e21b145b8061090157506301ffc9a760e01b6001600160e01b0319831614610901565b6001600160a01b0384166119a15760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016108d5565b336119c1816000876119b288612593565b6119bb88612593565b876125ec565b6000848152602081815260408083206001600160a01b0389168452909152812080548592906119f1908490613dc1565b909155505060408051858152602081018590526001600160a01b038088169260009291851691600080516020614193833981519152910160405180910390a4610c29816000878787876125fa565b6006546001600160a01b03841660009081526008602052604081205490918391611a699086613f1f565b611a739190613dfe565b61124d9190613f5f565b80471015611acd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108d5565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611b1a576040519150601f19603f3d011682016040523d82523d6000602084013e611b1f565b606091505b5050905080610a705760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b60648201526084016108d5565b8151835114611bf55760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016108d5565b6001600160a01b038416611c1b5760405162461bcd60e51b81526004016108d590613cca565b33611c2a8187878787876125ec565b60005b8451811015611d2c576000858281518110611c5857634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110611c8457634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611cd45760405162461bcd60e51b81526004016108d590613d0f565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d11908490613dc1565b9250508190555050505080611d2590614047565b9050611c2d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d7c929190613b80565b60405180910390a4611d92818787878787612765565b505050505050565b611da482826111a2565b610cd757611dbc816001600160a01b0316601461282f565b611dc783602061282f565b604051602001611dd8929190613a39565b60408051601f198184030181529082905262461bcd60e51b82526108d591600401613bae565b6000805160206141b383398151915282141580611e2457506001600160a01b0381163b15155b611e705760405162461bcd60e51b815260206004820152601e60248201527f496e746567726174696f6e206d757374206265206120636f6e7472616374000060448201526064016108d5565b610cd7828261180f565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015611fd6576000611eb7826013613f5f565b611ec2906008613f1f565b611ecd906002613e77565b611ee0906001600160a01b038716613dfe565b60f81b9050600060108260f81c611ef79190613e12565b60f81b905060008160f81c6010611f0e9190613f3e565b8360f81c611f1c9190613f76565b60f81b9050611f2a82612a10565b85611f36866002613f1f565b81518110611f5457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611f7481612a10565b85611f80866002613f1f565b611f8b906001613dc1565b81518110611fa957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505050508080611fce90614047565b915050611ea1565b5092915050565b611fe78282612a46565b6000828152600560205260409020610a709082612aad565b610a708363a9059cbb60e01b848460405160240161201e929190613abc565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612ac2565b600061119b8383612b94565b816001600160a01b0316836001600160a01b031614156120d55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016108d5565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60008060006121518585612bcc565b9150915061102281612c3c565b6000610901825490565b60008061217661076a610c4d565b905060006121848285612142565b600d546001600160a01b03908116911614949350505050565b6060816121c15750506040805180820190915260018152600360fc1b602082015290565b8160005b81156121eb57806121d581614047565b91506121e49050600a83613dfe565b91506121c5565b6000816001600160401b0381111561221357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561223d576020820181803683370190505b5090505b841561124d57612252600183613f5f565b915061225f600a86614062565b61226a906030613dc1565b60f81b81838151811061228d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506122af600a86613dfe565b9450612241565b6001600160a01b0384166122dc5760405162461bcd60e51b81526004016108d590613cca565b336122ec8187876119b288612593565b6000848152602081815260408083206001600160a01b038a1684529091529020548381101561232d5760405162461bcd60e51b81526004016108d590613d0f565b6000858152602081815260408083206001600160a01b038b811685529252808320878503905590881682528120805486929061236a908490613dc1565b909155505060408051868152602081018690526001600160a01b03808916928a82169291861691600080516020614193833981519152910160405180910390a46111348288888888886125fa565b6001600160a01b03831661241a5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016108d5565b336124498185600061242b87612593565b61243487612593565b604051806020016040528060008152506125ec565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156124c65760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b60648201526084016108d5565b6000848152602081815260408083206001600160a01b0389811680865291845282852088870390558251898152938401889052909290861691600080516020614193833981519152910160405180910390a45050505050565b600081815260018301602052604081205461256657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610901565b506000610901565b60006001600160e01b03198216637965db0b60e01b14806109015750610901826118f1565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106125db57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b611d92868686868686612e38565b6001600160a01b0384163b15611d925760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e619061263e9089908990889088908890600401613b33565b602060405180830381600087803b15801561265857600080fd5b505af1925050508015612688575060408051601f3d908101601f191682019092526126859181019061383c565b60015b612735576126946140b8565b806308c379a014156126ce57506126a96140d0565b806126b457506126d0565b8060405162461bcd60e51b81526004016108d59190613bae565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016108d5565b6001600160e01b0319811663f23a6e6160e01b146111345760405162461bcd60e51b81526004016108d590613bc1565b6001600160a01b0384163b15611d925760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906127a99089908990889088908890600401613ad5565b602060405180830381600087803b1580156127c357600080fd5b505af19250505080156127f3575060408051601f3d908101601f191682019092526127f09181019061383c565b60015b6127ff576126946140b8565b6001600160e01b0319811663bc197c8160e01b146111345760405162461bcd60e51b81526004016108d590613bc1565b6060600061283e836002613f1f565b612849906002613dc1565b6001600160401b0381111561286e57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612898576020820181803683370190505b509050600360fc1b816000815181106128c157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106128fe57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612922846002613f1f565b61292d906001613dc1565b90505b60018111156129c1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061296f57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061299357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c936129ba81613fc9565b9050612930565b50831561119b5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016108d5565b6000600a60f883901c1015612a3757612a2e60f883901c6030613dd9565b60f81b92915050565b612a2e60f883901c6057613dd9565b612a5082826111a2565b15610cd75760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600061119b836001600160a01b038416612f7c565b6000612b17826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166130999092919063ffffffff16565b805190915015610a705780806020019051810190612b3591906137a7565b610a705760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108d5565b6000826000018281548110612bb957634e487b7160e01b600052603260045260246000fd5b9060005260206000200154905092915050565b600080825160411415612c035760208301516040840151606085015160001a612bf7878285856130a8565b94509450505050612c35565b825160401415612c2d5760208301516040840151612c2286838361318b565b935093505050612c35565b506000905060025b9250929050565b6000816004811115612c5e57634e487b7160e01b600052602160045260246000fd5b1415612c675750565b6001816004811115612c8957634e487b7160e01b600052602160045260246000fd5b1415612cd25760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b60448201526064016108d5565b6002816004811115612cf457634e487b7160e01b600052602160045260246000fd5b1415612d425760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108d5565b6003816004811115612d6457634e487b7160e01b600052602160045260246000fd5b1415612dbd5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108d5565b6004816004811115612ddf57634e487b7160e01b600052602160045260246000fd5b14156112b85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108d5565b6001600160a01b038516612edb5760005b8351811015612ed957828181518110612e7257634e487b7160e01b600052603260045260246000fd5b602002602001015160036000868481518110612e9e57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612ec39190613dc1565b90915550612ed2905081614047565b9050612e49565b505b6001600160a01b038416611d925760005b835181101561113457828181518110612f1557634e487b7160e01b600052603260045260246000fd5b602002602001015160036000868481518110612f4157634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612f669190613f5f565b90915550612f75905081614047565b9050612eec565b6000818152600183016020526040812054801561308f576000612fa0600183613f5f565b8554909150600090612fb490600190613f5f565b9050818114613035576000866000018281548110612fe257634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508087600001848154811061301357634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255918252600188019052604090208390555b855486908061305457634e487b7160e01b600052603160045260246000fd5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610901565b6000915050610901565b606061124d84846000856131ba565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b038311156130d55750600090506003613182565b8460ff16601b141580156130ed57508460ff16601c14155b156130fe5750600090506004613182565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613152573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661317b57600060019250925050613182565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b016131ac878288856130a8565b935093505050935093915050565b60608247101561321b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108d5565b843b6132695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108d5565b600080866001600160a01b0316858760405161328591906139c4565b60006040518083038185875af1925050503d80600081146132c2576040519150601f19603f3d011682016040523d82523d6000602084013e6132c7565b606091505b50915091506132d78282866132e2565b979650505050505050565b606083156132f157508161119b565b8251156133015782518084602001fd5b8160405162461bcd60e51b81526004016108d59190613bae565b82805461332790613fe0565b90600052602060002090601f016020900481019282613349576000855561338f565b82601f1061336257805160ff191683800117855561338f565b8280016001018555821561338f579182015b8281111561338f578251825591602001919060010190613374565b5061339b92915061339f565b5090565b5b8082111561339b57600081556001016133a0565b600082601f8301126133c4578081fd5b813560206133d182613d9e565b6040516133de828261401b565b8381528281019150858301600585901b870184018810156133fd578586fd5b855b8581101561341b578135845292840192908401906001016133ff565b5090979650505050505050565b600082601f830112613438578081fd5b81356001600160401b03811115613451576134516140a2565b604051613468601f8301601f19166020018261401b565b81815284602083860101111561347c578283fd5b816020850160208301379081016020019190915292915050565b6000602082840312156134a7578081fd5b813561119b81614159565b600080604083850312156134c4578081fd5b82356134cf81614159565b915060208301356134df81614159565b809150509250929050565b600080600080600060a08688031215613501578081fd5b853561350c81614159565b9450602086013561351c81614159565b935060408601356001600160401b0380821115613537578283fd5b61354389838a016133b4565b94506060880135915080821115613558578283fd5b61356489838a016133b4565b93506080880135915080821115613579578283fd5b5061358688828901613428565b9150509295509295909350565b600080600080600060a086880312156135aa578081fd5b85356135b581614159565b945060208601356135c581614159565b9350604086013592506060860135915060808601356001600160401b038111156135ed578182fd5b61358688828901613428565b6000806040838503121561360b578182fd5b823561361681614159565b915060208301356134df8161416e565b60008060408385031215613638578182fd5b823561364381614159565b946020939093013593505050565b600080600060608486031215613665578081fd5b833561367081614159565b92506020840135915060408401356001600160401b03811115613691578182fd5b61369d86828701613428565b9150509250925092565b6000806000606084860312156136bb578081fd5b83356136c681614159565b95602085013595506040909401359392505050565b600080604083850312156136ed578182fd5b82356001600160401b0380821115613703578384fd5b818501915085601f830112613716578384fd5b8135602061372382613d9e565b604051613730828261401b565b8381528281019150858301600585901b870184018b101561374f578889fd5b8896505b8487101561377a57803561376681614159565b835260019690960195918301918301613753565b5096505086013592505080821115613790578283fd5b5061379d858286016133b4565b9150509250929050565b6000602082840312156137b8578081fd5b815161119b8161416e565b6000602082840312156137d4578081fd5b5035919050565b600080604083850312156137ed578182fd5b8235915060208301356134df81614159565b60008060408385031215613811578182fd5b50508035926020909101359150565b600060208284031215613831578081fd5b813561119b8161417c565b60006020828403121561384d578081fd5b815161119b8161417c565b600060208284031215613869578081fd5b81356001600160401b0381111561387e578182fd5b61124d84828501613428565b600080604083850312156134c4578182fd5b6000602082840312156138ad578081fd5b5051919050565b600080600080600060a086880312156138cb578283fd5b85359450602086013593506040860135925060608601356001600160401b038111156138f5578182fd5b61390188828901613428565b92505060808601356139128161416e565b809150509295509295909350565b600080600080600060a08688031215613937578283fd5b8535945060208601359350604086013592506060860135915060808601356139128161416e565b6000815180845260208085019450808401835b8381101561398d57815187529582019590820190600101613971565b509495945050505050565b600081518084526139b0816020860160208601613f99565b601f01601f19169290920160200192915050565b600082516139d6818460208701613f99565b9190910192915050565b790ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d0560311b81528251600090613a1681601a850160208801613f99565b835190830190613a2d81601a840160208801613f99565b01601a01949350505050565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b815260008351613a6b816017850160208801613f99565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613a9c816028840160208801613f99565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b0386811682528516602082015260a060408201819052600090613b019083018661395e565b8281036060840152613b13818661395e565b90508281036080840152613b278185613998565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906132d790830184613998565b60208152600061119b602083018461395e565b604081526000613b93604083018561395e565b8281036020840152613ba5818561395e565b95945050505050565b60208152600061119b6020830184613998565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526016908201527521b0b73737ba103932bb37b5b2903cb7bab939b2b63360511b604082015260600190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526025908201527f4e6f7420617574686f72697a656420746f20706572666f726d2074686174206160408201526431ba34b7b760d91b606082015260800190565b60006001600160401b03821115613db757613db76140a2565b5060051b60200190565b60008219821115613dd457613dd4614076565b500190565b600060ff821660ff84168060ff03821115613df657613df6614076565b019392505050565b600082613e0d57613e0d61408c565b500490565b600060ff831680613e2557613e2561408c565b8060ff84160491505092915050565b600181815b80851115613e6f578160001904821115613e5557613e55614076565b80851615613e6257918102915b93841c9390800290613e39565b509250929050565b600061119b8383600082613e8d57506001610901565b81613e9a57506000610901565b8160018114613eb05760028114613eba57613ed6565b6001915050610901565b60ff841115613ecb57613ecb614076565b50506001821b610901565b5060208310610133831016604e8410600b8410161715613ef9575081810a610901565b613f038383613e34565b8060001904821115613f1757613f17614076565b029392505050565b6000816000190483118215151615613f3957613f39614076565b500290565b600060ff821660ff84168160ff0481118215151615613f1757613f17614076565b600082821015613f7157613f71614076565b500390565b600060ff821660ff841680821015613f9057613f90614076565b90039392505050565b60005b83811015613fb4578181015183820152602001613f9c565b83811115613fc3576000848401525b50505050565b600081613fd857613fd8614076565b506000190190565b600181811c90821680613ff457607f821691505b6020821081141561401557634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b0381118282101715614040576140406140a2565b6040525050565b600060001982141561405b5761405b614076565b5060010190565b6000826140715761407161408c565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156140cd57600481823e5160e01c5b90565b600060443d10156140de5790565b6040516003193d81016004833e81513d6001600160401b03808311602484018310171561410d57505050505090565b82850191508151818111156141255750505050505090565b843d870101602082850101111561413f5750505050505090565b61414e6020828601018761401b565b509095945050505050565b6001600160a01b03811681146112b857600080fd5b80151581146112b857600080fd5b6001600160e01b0319811681146112b857600080fdfec3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f625f924c6b1faae42f36fa6b66af882e9a987aefb9164fceeea420ca4168959c66a2646970667358221220c6976b3f509b177f4076d813adf31b22f240d1ec6a95fbba5d54f89c7ab67ec764736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000006560c8df05a0823faaebf40e52adcad1e8a5371a00000000000000000000000037c6e1d755112213d5e7d5e2aca2b83192f7cf350000000000000000000000005fea9dacde1fb43e87b8a9259aebc937d995f51b000000000000000000000000bc4aee331e970f6e7a5e91f7b911bdbfdf928a9800000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000037c6e1d755112213d5e7d5e2aca2b83192f7cf35000000000000000000000000fad0fec24047f510d110fb03b73e57a72e91f33d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004b0000000000000000000000000000000000000000000000000000000000000019
-----Decoded View---------------
Arg [0] : signer_ (address): 0x6560c8dF05a0823FAaEBF40E52Adcad1e8A5371A
Arg [1] : adminAddress (address): 0x37C6E1D755112213d5E7D5e2Aca2b83192f7cF35
Arg [2] : devAddress (address): 0x5Fea9DAcdE1fb43E87b8a9259Aebc937D995F51b
Arg [3] : surrealContractAddress_ (address): 0xBC4AEE331E970f6E7A5e91f7B911BdBFdF928A98
Arg [4] : payees (address[]): 0x37C6E1D755112213d5E7D5e2Aca2b83192f7cF35,0xfAd0feC24047f510D110fB03b73e57a72e91f33D
Arg [5] : shares_ (uint256[]): 75,25
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000006560c8df05a0823faaebf40e52adcad1e8a5371a
Arg [1] : 00000000000000000000000037c6e1d755112213d5e7d5e2aca2b83192f7cf35
Arg [2] : 0000000000000000000000005fea9dacde1fb43e87b8a9259aebc937d995f51b
Arg [3] : 000000000000000000000000bc4aee331e970f6e7a5e91f7b911bdbfdf928a98
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 00000000000000000000000037c6e1d755112213d5e7d5e2aca2b83192f7cf35
Arg [8] : 000000000000000000000000fad0fec24047f510d110fb03b73e57a72e91f33d
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [10] : 000000000000000000000000000000000000000000000000000000000000004b
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000019
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.