Overview
TokenID
1
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
SacrificialAlter
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./interfaces/ISacrificialAlter.sol"; import "./interfaces/IGP.sol"; contract SacrificialAlter is ISacrificialAlter, ERC1155, Ownable, Pausable { using EnumerableSet for EnumerableSet.UintSet; using Strings for uint256; // struct to store each trait's data for metadata and rendering struct Image { string name; string png; } struct TypeInfo { uint16 mints; uint16 burns; uint16 maxSupply; uint256 gpExchangeAmt; } struct LastWrite { uint64 time; uint64 blockNum; } // Tracks the last block and timestamp that a caller has written to state. // Disallow some access to functions if they occur while a change is being written. mapping(address => LastWrite) private lastWrite; mapping(uint256 => TypeInfo) private typeInfo; // storage of each image data mapping(uint256 => Image) public traitData; // address => allowedToCallFunctions mapping(address => bool) private admins; // reference to the $GP contract for minting $GP earnings IGP public gpToken; constructor() ERC1155("") { _pause(); } modifier disallowIfStateIsChanging() { // frens can always call whenever they want :) require(admins[_msgSender()] || lastWrite[tx.origin].blockNum < block.number, "hmmmm what doing?"); _; } /** CRITICAL TO SETUP */ modifier requireContractsSet() { require(address(gpToken) != address(0), "Contracts not set"); _; } function setContracts(address _gp) external onlyOwner { gpToken = IGP(_gp); } /** * Mint a token - any payment / game logic should be handled in the game contract. */ function mint(uint256 typeId, uint16 qty, address recipient) external override whenNotPaused { require(admins[_msgSender()], "Only admins can call this"); require(typeInfo[typeId].mints - typeInfo[typeId].burns + qty <= typeInfo[typeId].maxSupply, "All tokens minted"); if(typeInfo[typeId].gpExchangeAmt > 0) { // If the ERC1155 is swapped for $GP, transfer the GP to this contract in case the swap back is desired. // NOTE: This will fail if the origin doesn't have the required amount of $GP gpToken.transferFrom(tx.origin, address(this), typeInfo[typeId].gpExchangeAmt * qty); } typeInfo[typeId].mints += qty; _mint(recipient, typeId, qty, ""); } /** * Burn a token - any payment / game logic should be handled in the game contract. */ function burn(uint256 typeId, uint16 qty, address burnFrom) external override whenNotPaused { require(admins[_msgSender()], "Only admins can call this"); if(typeInfo[typeId].gpExchangeAmt > 0) { // If the ERC1155 was swapped from $GP, transfer the GP from this contract back to whoever owns this token now. gpToken.transferFrom(address(this), tx.origin, typeInfo[typeId].gpExchangeAmt * qty); } typeInfo[typeId].burns += qty; _burn(burnFrom, typeId, qty); } function setType(uint256 typeId, uint16 maxSupply) external onlyOwner { require(typeInfo[typeId].mints <= maxSupply, "max supply too low"); typeInfo[typeId].maxSupply = maxSupply; } function setExchangeAmt(uint256 typeId, uint256 exchangeAmt) external onlyOwner { require(typeInfo[typeId].maxSupply > 0, "this type has not been set up"); typeInfo[typeId].gpExchangeAmt = exchangeAmt; } function updateOriginAccess() external override { require(admins[_msgSender()], "Only admins can call this"); lastWrite[tx.origin].blockNum = uint64(block.number); lastWrite[tx.origin].time = uint64(block.timestamp); } /** * enables an address to mint / burn * @param addr the address to enable */ function addAdmin(address addr) external onlyOwner { admins[addr] = true; } /** * disables an address from minting / burning * @param addr the address to disbale */ function removeAdmin(address addr) external onlyOwner { admins[addr] = false; } function setPaused(bool _paused) external onlyOwner requireContractsSet { if (_paused) _pause(); else _unpause(); } function getInfoForType(uint256 typeId) external view disallowIfStateIsChanging returns(TypeInfo memory) { require(typeInfo[typeId].maxSupply > 0, "invalid type"); return typeInfo[typeId]; } function uri(uint256 typeId) public view override returns (string memory) { require(typeInfo[typeId].maxSupply > 0, "invalid type"); Image memory img = traitData[typeId]; string memory metadata = string(abi.encodePacked( '{"name": "', img.name, '", "description": "Mysterious items spawned from the Sacrificial Alter of the Wizards & Dragons Tower. Fabled to hold magical properties, only Act 1 tower guardians will know the truth in the following acts. All the metadata and images are generated and stored 100% on-chain. No IPFS. NO API. Just the Ethereum blockchain.", "image": "data:image/svg+xml;base64,', base64(bytes(drawSVG(typeId))), '", "attributes": []', "}" )); return string(abi.encodePacked( "data:application/json;base64,", base64(bytes(metadata)) )); } function uploadImage(uint256 typeId, Image calldata image) external onlyOwner { traitData[typeId] = Image( image.name, image.png ); } function drawImage(Image memory image) internal pure returns (string memory) { return string(abi.encodePacked( '<image x="4" y="4" width="32" height="32" image-rendering="pixelated" preserveAspectRatio="xMidYMid" xlink:href="data:image/png;base64,', image.png, '"/>' )); } function drawSVG(uint256 typeId) internal view returns (string memory) { string memory svgString = string(abi.encodePacked( drawImage(traitData[typeId]) )); return string(abi.encodePacked( '<svg id="alter" width="100%" height="100%" version="1.1" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">', svgString, "</svg>" )); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override(ERC1155, ISacrificialAlter) { // allow admin contracts to be send without approval if(!admins[_msgSender()]) { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); } _safeTransferFrom(from, to, id, amount, data); } /** SECURITEEEEEEE */ function balanceOf(address account, uint256 id) public view virtual override(ERC1155, ISacrificialAlter) disallowIfStateIsChanging returns (uint256) { // Y U checking on this address in the same block it's being modified... hmmmm require(admins[_msgSender()] || lastWrite[account].blockNum < block.number, "hmmmm what doing?"); return super.balanceOf(account, id); } /** BASE 64 - Written by Brech Devos */ string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; function base64(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { dataPtr := add(dataPtr, 3) // read 3 bytes let input := mload(dataPtr) // write 4 characters mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F))))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a / b + (a % b == 0 ? 0 : 1); } }
// SPDX-License-Identifier: MIT 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 { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, 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 `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } emit TransferSingle(operator, account, 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 account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @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 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 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 LICENSE pragma solidity ^0.8.0; interface ISacrificialAlter { function mint(uint256 typeId, uint16 qty, address recipient) external; function burn(uint256 typeId, uint16 qty, address burnFrom) external; function updateOriginAccess() external; function balanceOf(address account, uint256 id) external returns (uint256); function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external; }
// SPDX-License-Identifier: MIT LICENSE pragma solidity ^0.8.0; interface IGP { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; function updateOriginAccess() external; function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT 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 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 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 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 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 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 pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"typeId","type":"uint256"},{"internalType":"uint16","name":"qty","type":"uint16"},{"internalType":"address","name":"burnFrom","type":"address"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"typeId","type":"uint256"}],"name":"getInfoForType","outputs":[{"components":[{"internalType":"uint16","name":"mints","type":"uint16"},{"internalType":"uint16","name":"burns","type":"uint16"},{"internalType":"uint16","name":"maxSupply","type":"uint16"},{"internalType":"uint256","name":"gpExchangeAmt","type":"uint256"}],"internalType":"struct SacrificialAlter.TypeInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gpToken","outputs":[{"internalType":"contract IGP","name":"","type":"address"}],"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":"uint256","name":"typeId","type":"uint256"},{"internalType":"uint16","name":"qty","type":"uint16"},{"internalType":"address","name":"recipient","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"_gp","type":"address"}],"name":"setContracts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"typeId","type":"uint256"},{"internalType":"uint256","name":"exchangeAmt","type":"uint256"}],"name":"setExchangeAmt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"typeId","type":"uint256"},{"internalType":"uint16","name":"maxSupply","type":"uint16"}],"name":"setType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitData","outputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"png","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateOriginAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"typeId","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"png","type":"string"}],"internalType":"struct SacrificialAlter.Image","name":"image","type":"tuple"}],"name":"uploadImage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"typeId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040805160208101909152600081526200002c8162000055565b5062000038336200006e565b6003805460ff60a01b191690556200004f620000c0565b62000255565b80516200006a90600290602084019062000172565b5050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620000d4600354600160a01b900460ff1690565b15620001195760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640160405180910390fd5b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620001553390565b6040516001600160a01b03909116815260200160405180910390a1565b828054620001809062000218565b90600052602060002090601f016020900481019282620001a45760008555620001ef565b82601f10620001bf57805160ff1916838001178555620001ef565b82800160010185558215620001ef579182015b82811115620001ef578251825591602001919060010190620001d2565b50620001fd92915062000201565b5090565b5b80821115620001fd576000815560010162000202565b600181811c908216806200022d57607f821691505b602082108114156200024f57634e487b7160e01b600052602260045260246000fd5b50919050565b6132ee80620002656000396000f3fe608060405234801561001057600080fd5b50600436106101725760003560e01c806370480275116100de578063a22cb46511610097578063e985e9c511610071578063e985e9c51461037f578063f242432a146103bb578063f2fde38b146103ce578063f6bb451f146103e157600080fd5b8063a22cb46514610346578063c499418014610359578063c81227291461036c57600080fd5b806370480275146102b1578063715018a6146102c45780637d26c78c146102cc5780638da5cb5b146102df5780639c47ee3b146102f05780639ca0f29b146102f857600080fd5b80632eb2c2d6116101305780632eb2c2d61461021b5780634e1273f41461022e578063514160191461024e5780635a2e2f47146102615780635c975abb146102745780636f7bb00a1461028657600080fd5b8062fdd58e1461017757806301ffc9a71461019d57806306e7b953146101c05780630e89341c146101d557806316c38b3c146101f55780631785f53c14610208575b600080fd5b61018a610185366004612615565b610402565b6040519081526020015b60405180910390f35b6101b06101ab366004612740565b6104d7565b6040519015158152602001610194565b6101d36101ce3660046127f1565b610529565b005b6101e86101e3366004612778565b6106b5565b6040516101949190612df7565b6101d3610203366004612708565b6108b5565b6101d361021636600461248c565b610944565b6101d36102293660046124d8565b61098f565b61024161023c36600461263e565b610a26565b6040516101949190612dbf565b6101d361025c3660046127f1565b610b87565b6101d361026f36600461248c565b610d97565b600354600160a01b900460ff166101b0565b600854610299906001600160a01b031681565b6040516001600160a01b039091168152602001610194565b6101d36102bf36600461248c565b610de3565b6101d3610e31565b6101d36102da366004612790565b610e67565b6003546001600160a01b0316610299565b6101d3610f62565b61030b610306366004612778565b610fe3565b60408051825161ffff908116825260208085015182169083015283830151169181019190915260609182015191810191909152608001610194565b6101d36103543660046125df565b611109565b6101d361036736600461282c565b6111e0565b6101d361037a3660046127cf565b611286565b6101b061038d3660046124a6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6101d36103c936600461257d565b61133b565b6101d36103dc36600461248c565b6113d9565b6103f46103ef366004612778565b611471565b604051610194929190612e0a565b3360009081526007602052604081205460ff168061043f57503260009081526004602052604090205443600160401b9091046001600160401b0316105b6104645760405162461bcd60e51b815260040161045b90612eae565b60405180910390fd5b3360009081526007602052604090205460ff16806104aa57506001600160a01b03831660009081526004602052604090205443600160401b9091046001600160401b0316105b6104c65760405162461bcd60e51b815260040161045b90612eae565b6104d0838361159d565b9392505050565b60006001600160e01b03198216636cdb3d1360e11b148061050857506001600160e01b031982166303a24d0760e21b145b8061052357506301ffc9a760e01b6001600160e01b03198316145b92915050565b600354600160a01b900460ff16156105535760405162461bcd60e51b815260040161045b90612ed9565b3360009081526007602052604090205460ff166105825760405162461bcd60e51b815260040161045b90612e77565b6000838152600560205260409020600101541561065c576008546000848152600560205260409020600101546001600160a01b03909116906323b872dd90309032906105d39061ffff881690613093565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561062257600080fd5b505af1158015610636573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065a9190612724565b505b6000838152600560205260409020805483919060029061068790849062010000900461ffff16613035565b92506101000a81548161ffff021916908361ffff1602179055506106b081848461ffff1661162f565b505050565b600081815260056020526040902054606090640100000000900461ffff1661070e5760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b604482015260640161045b565b600082815260066020526040808220815180830190925280548290829061073490613105565b80601f016020809104026020016040519081016040528092919081815260200182805461076090613105565b80156107ad5780601f10610782576101008083540402835291602001916107ad565b820191906000526020600020905b81548152906001019060200180831161079057829003601f168201915b505050505081526020016001820180546107c690613105565b80601f01602080910402602001604051908101604052809291908181526020018280546107f290613105565b801561083f5780601f106108145761010080835404028352916020019161083f565b820191906000526020600020905b81548152906001019060200180831161082257829003601f168201915b50505050508152505090506000816000015161086261085d866117a9565b611940565b604051602001610873929190612aac565b604051602081830303815290604052905061088d81611940565b60405160200161089d9190612cd7565b60405160208183030381529060405292505050919050565b6003546001600160a01b031633146108df5760405162461bcd60e51b815260040161045b90612f92565b6008546001600160a01b031661092b5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b604482015260640161045b565b801561093c57610939611ab5565b50565b610939611b37565b6003546001600160a01b0316331461096e5760405162461bcd60e51b815260040161045b90612f92565b6001600160a01b03166000908152600760205260409020805460ff19169055565b6001600160a01b0385163314806109ab57506109ab853361038d565b610a125760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161045b565b610a1f8585858585611bbb565b5050505050565b60608151835114610a8b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161045b565b600083516001600160401b03811115610ab457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610add578160200160208202803683370190505b50905060005b8451811015610b7f57610b44858281518110610b0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610b3757634e487b7160e01b600052603260045260246000fd5b6020026020010151610402565b828281518110610b6457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610b788161316c565b9050610ae3565b509392505050565b600354600160a01b900460ff1615610bb15760405162461bcd60e51b815260040161045b90612ed9565b3360009081526007602052604090205460ff16610be05760405162461bcd60e51b815260040161045b90612e77565b60008381526005602052604090205461ffff64010000000082048116918491610c1291620100008104821691166130b2565b610c1c9190613035565b61ffff161115610c625760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b604482015260640161045b565b60008381526005602052604090206001015415610d3c576008546000848152600560205260409020600101546001600160a01b03909116906323b872dd9032903090610cb39061ffff881690613093565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b158015610d0257600080fd5b505af1158015610d16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3a9190612724565b505b60008381526005602052604081208054849290610d5e90849061ffff16613035565b92506101000a81548161ffff021916908361ffff1602179055506106b081848461ffff1660405180602001604052806000815250611db4565b6003546001600160a01b03163314610dc15760405162461bcd60e51b815260040161045b90612f92565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314610e0d5760405162461bcd60e51b815260040161045b90612f92565b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b6003546001600160a01b03163314610e5b5760405162461bcd60e51b815260040161045b90612f92565b610e656000611ebe565b565b6003546001600160a01b03163314610e915760405162461bcd60e51b815260040161045b90612f92565b6040805180820190915280610ea68380612fc7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602090810190610eef90840184612fc7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505084815260066020908152604090912083518051919350610f499284929101906122e8565b506020828101518051610a1f92600185019201906122e8565b3360009081526007602052604090205460ff16610f915760405162461bcd60e51b815260040161045b90612e77565b32600090815260046020526040902080546fffffffffffffffffffffffffffffffff1916600160401b436001600160401b039081169190910267ffffffffffffffff1916919091174291909116179055565b60408051608081018252600080825260208083018290528284018290526060830182905233825260079052919091205460ff168061104057503260009081526004602052604090205443600160401b9091046001600160401b0316105b61105c5760405162461bcd60e51b815260040161045b90612eae565b600082815260056020526040902054640100000000900461ffff166110b25760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b604482015260640161045b565b506000818152600560209081526040918290208251608081018452815461ffff808216835262010000820481169483019490945264010000000090049092169282019290925260019091015460608201525b919050565b336001600160a01b03831614156111745760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161045b565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6003546001600160a01b0316331461120a5760405162461bcd60e51b815260040161045b90612f92565b600082815260056020526040902054640100000000900461ffff166112715760405162461bcd60e51b815260206004820152601d60248201527f74686973207479706520686173206e6f74206265656e20736574207570000000604482015260640161045b565b60009182526005602052604090912060010155565b6003546001600160a01b031633146112b05760405162461bcd60e51b815260040161045b90612f92565b60008281526005602052604090205461ffff8083169116111561130a5760405162461bcd60e51b81526020600482015260126024820152716d617820737570706c7920746f6f206c6f7760701b604482015260640161045b565b600091825260056020526040909120805461ffff9092166401000000000265ffff0000000019909216919091179055565b3360009081526007602052604090205460ff166113cc576001600160a01b03851633148061136e575061136e853361038d565b6113cc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b606482015260840161045b565b610a1f8585858585611f10565b6003546001600160a01b031633146114035760405162461bcd60e51b815260040161045b90612f92565b6001600160a01b0381166114685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045b565b61093981611ebe565b60066020526000908152604090208054819061148c90613105565b80601f01602080910402602001604051908101604052809291908181526020018280546114b890613105565b80156115055780601f106114da57610100808354040283529160200191611505565b820191906000526020600020905b8154815290600101906020018083116114e857829003601f168201915b50505050509080600101805461151a90613105565b80601f016020809104026020016040519081016040528092919081815260200182805461154690613105565b80156115935780601f1061156857610100808354040283529160200191611593565b820191906000526020600020905b81548152906001019060200180831161157657829003601f168201915b5050505050905082565b60006001600160a01b0383166116095760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b606482015260840161045b565b506000908152602081815260408083206001600160a01b03949094168352929052205490565b6001600160a01b0383166116915760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161045b565b336116c1818560006116a28761202d565b6116ab8761202d565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b03881684529091529020548281101561173e5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161045b565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b606060006118f7600660008581526020019081526020016000206040518060400160405290816000820180546117de90613105565b80601f016020809104026020016040519081016040528092919081815260200182805461180a90613105565b80156118575780601f1061182c57610100808354040283529160200191611857565b820191906000526020600020905b81548152906001019060200180831161183a57829003601f168201915b5050505050815260200160018201805461187090613105565b80601f016020809104026020016040519081016040528092919081815260200182805461189c90613105565b80156118e95780601f106118be576101008083540402835291602001916118e9565b820191906000526020600020905b8154815290600101906020018083116118cc57829003601f168201915b505050505081525050612086565b60405160200161190791906128cf565b60405160208183030381529060405290508060405160200161192991906129bf565b604051602081830303815290604052915050919050565b606081516000141561196057505060408051602081019091526000815290565b6000604051806060016040528060408152602001613279604091399050600060038451600261198f919061305b565b6119999190613073565b6119a4906004613093565b905060006119b382602061305b565b6001600160401b038111156119d857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611a02576020820181803683370190505b509050818152600183018586518101602084015b81831015611a705760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611a16565b600389510660018114611a8a5760028114611a9b57611aa7565b613d3d60f01b600119830152611aa7565b603d60f81b6000198301525b509398975050505050505050565b600354600160a01b900460ff1615611adf5760405162461bcd60e51b815260040161045b90612ed9565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b1a3390565b6040516001600160a01b03909116815260200160405180910390a1565b600354600160a01b900460ff16611b875760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161045b565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b1a565b8151835114611c1d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161045b565b6001600160a01b038416611c435760405162461bcd60e51b815260040161045b90612f03565b3360005b8451811015611d46576000858281518110611c7257634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110611c9e57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611cee5760405162461bcd60e51b815260040161045b90612f48565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d2b90849061305b565b9250508190555050505080611d3f9061316c565b9050611c47565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d96929190612dd2565b60405180910390a4611dac8187878787876120b3565b505050505050565b6001600160a01b038416611e145760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161045b565b33611e2e81600087611e258861202d565b610a1f8861202d565b6000848152602081815260408083206001600160a01b038916845290915281208054859290611e5e90849061305b565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610a1f8160008787878761221e565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416611f365760405162461bcd60e51b815260040161045b90612f03565b33611f46818787611e258861202d565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015611f875760405162461bcd60e51b815260040161045b90612f48565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611fc490849061305b565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461202482888888888861221e565b50505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061207557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6060816020015160405160200161209d91906128eb565b6040516020818303038152906040529050919050565b6001600160a01b0384163b15611dac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906120f79089908990889088908890600401612d1c565b602060405180830381600087803b15801561211157600080fd5b505af1925050508015612141575060408051601f3d908101601f1916820190925261213e9181019061275c565b60015b6121ee5761214d6131b3565b806308c379a0141561218757506121626131cb565b8061216d5750612189565b8060405162461bcd60e51b815260040161045b9190612df7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161045b565b6001600160e01b0319811663bc197c8160e01b146120245760405162461bcd60e51b815260040161045b90612e2f565b6001600160a01b0384163b15611dac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906122629089908990889088908890600401612d7a565b602060405180830381600087803b15801561227c57600080fd5b505af19250505080156122ac575060408051601f3d908101601f191682019092526122a99181019061275c565b60015b6122b85761214d6131b3565b6001600160e01b0319811663f23a6e6160e01b146120245760405162461bcd60e51b815260040161045b90612e2f565b8280546122f490613105565b90600052602060002090601f016020900481019282612316576000855561235c565b82601f1061232f57805160ff191683800117855561235c565b8280016001018555821561235c579182015b8281111561235c578251825591602001919060010190612341565b5061236892915061236c565b5090565b5b80821115612368576000815560010161236d565b80356001600160a01b038116811461110457600080fd5b600082601f8301126123a8578081fd5b813560206123b582613012565b6040516123c28282613140565b8381528281019150858301600585901b870184018810156123e1578586fd5b855b858110156123ff578135845292840192908401906001016123e3565b5090979650505050505050565b600082601f83011261241c578081fd5b81356001600160401b038111156124355761243561319d565b60405161244c601f8301601f191660200182613140565b818152846020838601011115612460578283fd5b816020850160208301379081016020019190915292915050565b803561ffff8116811461110457600080fd5b60006020828403121561249d578081fd5b6104d082612381565b600080604083850312156124b8578081fd5b6124c183612381565b91506124cf60208401612381565b90509250929050565b600080600080600060a086880312156124ef578081fd5b6124f886612381565b945061250660208701612381565b935060408601356001600160401b0380821115612521578283fd5b61252d89838a01612398565b94506060880135915080821115612542578283fd5b61254e89838a01612398565b93506080880135915080821115612563578283fd5b506125708882890161240c565b9150509295509295909350565b600080600080600060a08688031215612594578081fd5b61259d86612381565b94506125ab60208701612381565b9350604086013592506060860135915060808601356001600160401b038111156125d3578182fd5b6125708882890161240c565b600080604083850312156125f1578182fd5b6125fa83612381565b9150602083013561260a81613254565b809150509250929050565b60008060408385031215612627578182fd5b61263083612381565b946020939093013593505050565b60008060408385031215612650578182fd5b82356001600160401b0380821115612666578384fd5b818501915085601f830112612679578384fd5b8135602061268682613012565b6040516126938282613140565b8381528281019150858301600585901b870184018b10156126b2578889fd5b8896505b848710156126db576126c781612381565b8352600196909601959183019183016126b6565b50965050860135925050808211156126f1578283fd5b506126fe85828601612398565b9150509250929050565b600060208284031215612719578081fd5b81356104d081613254565b600060208284031215612735578081fd5b81516104d081613254565b600060208284031215612751578081fd5b81356104d081613262565b60006020828403121561276d578081fd5b81516104d081613262565b600060208284031215612789578081fd5b5035919050565b600080604083850312156127a2578182fd5b8235915060208301356001600160401b038111156127be578182fd5b83016040818603121561260a578182fd5b600080604083850312156127e1578182fd5b823591506124cf6020840161247a565b600080600060608486031215612805578081fd5b833592506128156020850161247a565b915061282360408501612381565b90509250925092565b6000806040838503121561283e578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b8381101561287c57815187529582019590820190600101612860565b509495945050505050565b6000815180845261289f8160208601602086016130d5565b601f01601f19169290920160200192915050565b600081516128c58185602086016130d5565b9290920192915050565b600082516128e18184602087016130d5565b9190910192915050565b7f3c696d61676520783d22342220793d2234222077696474683d2233322220686581527f696768743d2233322220696d6167652d72656e646572696e673d22706978656c60208201527f6174656422207072657365727665417370656374526174696f3d22784d69645960408201527f4d69642220786c696e6b3a687265663d22646174613a696d6167652f706e673b60608201526618985cd94d8d0b60ca1b6080820152600082516129a58160878501602087016130d5565b6211179f60e91b6087939091019283015250608a01919050565b7f3c7376672069643d22616c746572222077696474683d2231303025222068656981527f6768743d2231303025222076657273696f6e3d22312e31222076696577426f7860208201527f3d223020302034302034302220786d6c6e733d22687474703a2f2f7777772e7760408201527f332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d2268747460608201527f703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e0000000000608082015260008251612a8f81609b8501602087016130d5565b651e17b9bb339f60d11b609b93909101928301525060a101919050565b693d913730b6b2911d101160b11b81528251600090612ad281600a8501602088016130d5565b7f222c20226465736372697074696f6e223a20224d7973746572696f7573206974600a918401918201527f656d7320737061776e65642066726f6d2074686520536163726966696369616c602a8201527f20416c746572206f66207468652057697a61726473202620447261676f6e7320604a8201527f546f7765722e204661626c656420746f20686f6c64206d61676963616c207072606a8201527f6f706572746965732c206f6e6c7920416374203120746f776572206775617264608a8201527f69616e732077696c6c206b6e6f772074686520747275746820696e207468652060aa8201527f666f6c6c6f77696e6720616374732e20416c6c20746865206d6574616461746160ca8201527f20616e6420696d61676573206172652067656e65726174656420616e6420737460ea8201527f6f7265642031303025206f6e2d636861696e2e204e6f20495046532e204e4f2061010a8201527f4150492e204a7573742074686520457468657265756d20626c6f636b6368616961012a8201527f6e2e222c2022696d616765223a2022646174613a696d6167652f7376672b786d61014a820152681b0ed8985cd94d8d0b60ba1b61016a820152612cce612cc1612ca26101738401876128b3565b72222c202261747472696275746573223a205b5d60681b815260130190565b607d60f81b815260010190565b95945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612d0f81601d8501602087016130d5565b91909101601d0192915050565b6001600160a01b0386811682528516602082015260a060408201819052600090612d489083018661284d565b8281036060840152612d5a818661284d565b90508281036080840152612d6e8185612887565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612db490830184612887565b979650505050505050565b6020815260006104d0602083018461284d565b604081526000612de5604083018561284d565b8281036020840152612cce818561284d565b6020815260006104d06020830184612887565b604081526000612e1d6040830185612887565b8281036020840152612cce8185612887565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e19843603018112612fdd578283fd5b8301803591506001600160401b03821115612ff6578283fd5b60200191503681900382131561300b57600080fd5b9250929050565b60006001600160401b0382111561302b5761302b61319d565b5060051b60200190565b600061ffff80831681851680830382111561305257613052613187565b01949350505050565b6000821982111561306e5761306e613187565b500190565b60008261308e57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156130ad576130ad613187565b500290565b600061ffff838116908316818110156130cd576130cd613187565b039392505050565b60005b838110156130f05781810151838201526020016130d8565b838111156130ff576000848401525b50505050565b600181811c9082168061311957607f821691505b6020821081141561313a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156131655761316561319d565b6040525050565b600060001982141561318057613180613187565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156131c857600481823e5160e01c5b90565b600060443d10156131d95790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561320857505050505090565b82850191508151818111156132205750505050505090565b843d870101602082850101111561323a5750505050505090565b61324960208286010187613140565b509095945050505050565b801515811461093957600080fd5b6001600160e01b03198116811461093957600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212202ff3abf9d8beaeff84d6644c4682aa6030c4477910a9f6f47706d9c22713ade364736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101725760003560e01c806370480275116100de578063a22cb46511610097578063e985e9c511610071578063e985e9c51461037f578063f242432a146103bb578063f2fde38b146103ce578063f6bb451f146103e157600080fd5b8063a22cb46514610346578063c499418014610359578063c81227291461036c57600080fd5b806370480275146102b1578063715018a6146102c45780637d26c78c146102cc5780638da5cb5b146102df5780639c47ee3b146102f05780639ca0f29b146102f857600080fd5b80632eb2c2d6116101305780632eb2c2d61461021b5780634e1273f41461022e578063514160191461024e5780635a2e2f47146102615780635c975abb146102745780636f7bb00a1461028657600080fd5b8062fdd58e1461017757806301ffc9a71461019d57806306e7b953146101c05780630e89341c146101d557806316c38b3c146101f55780631785f53c14610208575b600080fd5b61018a610185366004612615565b610402565b6040519081526020015b60405180910390f35b6101b06101ab366004612740565b6104d7565b6040519015158152602001610194565b6101d36101ce3660046127f1565b610529565b005b6101e86101e3366004612778565b6106b5565b6040516101949190612df7565b6101d3610203366004612708565b6108b5565b6101d361021636600461248c565b610944565b6101d36102293660046124d8565b61098f565b61024161023c36600461263e565b610a26565b6040516101949190612dbf565b6101d361025c3660046127f1565b610b87565b6101d361026f36600461248c565b610d97565b600354600160a01b900460ff166101b0565b600854610299906001600160a01b031681565b6040516001600160a01b039091168152602001610194565b6101d36102bf36600461248c565b610de3565b6101d3610e31565b6101d36102da366004612790565b610e67565b6003546001600160a01b0316610299565b6101d3610f62565b61030b610306366004612778565b610fe3565b60408051825161ffff908116825260208085015182169083015283830151169181019190915260609182015191810191909152608001610194565b6101d36103543660046125df565b611109565b6101d361036736600461282c565b6111e0565b6101d361037a3660046127cf565b611286565b6101b061038d3660046124a6565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b6101d36103c936600461257d565b61133b565b6101d36103dc36600461248c565b6113d9565b6103f46103ef366004612778565b611471565b604051610194929190612e0a565b3360009081526007602052604081205460ff168061043f57503260009081526004602052604090205443600160401b9091046001600160401b0316105b6104645760405162461bcd60e51b815260040161045b90612eae565b60405180910390fd5b3360009081526007602052604090205460ff16806104aa57506001600160a01b03831660009081526004602052604090205443600160401b9091046001600160401b0316105b6104c65760405162461bcd60e51b815260040161045b90612eae565b6104d0838361159d565b9392505050565b60006001600160e01b03198216636cdb3d1360e11b148061050857506001600160e01b031982166303a24d0760e21b145b8061052357506301ffc9a760e01b6001600160e01b03198316145b92915050565b600354600160a01b900460ff16156105535760405162461bcd60e51b815260040161045b90612ed9565b3360009081526007602052604090205460ff166105825760405162461bcd60e51b815260040161045b90612e77565b6000838152600560205260409020600101541561065c576008546000848152600560205260409020600101546001600160a01b03909116906323b872dd90309032906105d39061ffff881690613093565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b15801561062257600080fd5b505af1158015610636573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061065a9190612724565b505b6000838152600560205260409020805483919060029061068790849062010000900461ffff16613035565b92506101000a81548161ffff021916908361ffff1602179055506106b081848461ffff1661162f565b505050565b600081815260056020526040902054606090640100000000900461ffff1661070e5760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b604482015260640161045b565b600082815260066020526040808220815180830190925280548290829061073490613105565b80601f016020809104026020016040519081016040528092919081815260200182805461076090613105565b80156107ad5780601f10610782576101008083540402835291602001916107ad565b820191906000526020600020905b81548152906001019060200180831161079057829003601f168201915b505050505081526020016001820180546107c690613105565b80601f01602080910402602001604051908101604052809291908181526020018280546107f290613105565b801561083f5780601f106108145761010080835404028352916020019161083f565b820191906000526020600020905b81548152906001019060200180831161082257829003601f168201915b50505050508152505090506000816000015161086261085d866117a9565b611940565b604051602001610873929190612aac565b604051602081830303815290604052905061088d81611940565b60405160200161089d9190612cd7565b60405160208183030381529060405292505050919050565b6003546001600160a01b031633146108df5760405162461bcd60e51b815260040161045b90612f92565b6008546001600160a01b031661092b5760405162461bcd60e51b815260206004820152601160248201527010dbdb9d1c9858dd1cc81b9bdd081cd95d607a1b604482015260640161045b565b801561093c57610939611ab5565b50565b610939611b37565b6003546001600160a01b0316331461096e5760405162461bcd60e51b815260040161045b90612f92565b6001600160a01b03166000908152600760205260409020805460ff19169055565b6001600160a01b0385163314806109ab57506109ab853361038d565b610a125760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606482015260840161045b565b610a1f8585858585611bbb565b5050505050565b60608151835114610a8b5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b606482015260840161045b565b600083516001600160401b03811115610ab457634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610add578160200160208202803683370190505b50905060005b8451811015610b7f57610b44858281518110610b0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610b3757634e487b7160e01b600052603260045260246000fd5b6020026020010151610402565b828281518110610b6457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610b788161316c565b9050610ae3565b509392505050565b600354600160a01b900460ff1615610bb15760405162461bcd60e51b815260040161045b90612ed9565b3360009081526007602052604090205460ff16610be05760405162461bcd60e51b815260040161045b90612e77565b60008381526005602052604090205461ffff64010000000082048116918491610c1291620100008104821691166130b2565b610c1c9190613035565b61ffff161115610c625760405162461bcd60e51b8152602060048201526011602482015270105b1b081d1bdad95b9cc81b5a5b9d1959607a1b604482015260640161045b565b60008381526005602052604090206001015415610d3c576008546000848152600560205260409020600101546001600160a01b03909116906323b872dd9032903090610cb39061ffff881690613093565b6040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401602060405180830381600087803b158015610d0257600080fd5b505af1158015610d16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d3a9190612724565b505b60008381526005602052604081208054849290610d5e90849061ffff16613035565b92506101000a81548161ffff021916908361ffff1602179055506106b081848461ffff1660405180602001604052806000815250611db4565b6003546001600160a01b03163314610dc15760405162461bcd60e51b815260040161045b90612f92565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b03163314610e0d5760405162461bcd60e51b815260040161045b90612f92565b6001600160a01b03166000908152600760205260409020805460ff19166001179055565b6003546001600160a01b03163314610e5b5760405162461bcd60e51b815260040161045b90612f92565b610e656000611ebe565b565b6003546001600160a01b03163314610e915760405162461bcd60e51b815260040161045b90612f92565b6040805180820190915280610ea68380612fc7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505090825250602090810190610eef90840184612fc7565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505084815260066020908152604090912083518051919350610f499284929101906122e8565b506020828101518051610a1f92600185019201906122e8565b3360009081526007602052604090205460ff16610f915760405162461bcd60e51b815260040161045b90612e77565b32600090815260046020526040902080546fffffffffffffffffffffffffffffffff1916600160401b436001600160401b039081169190910267ffffffffffffffff1916919091174291909116179055565b60408051608081018252600080825260208083018290528284018290526060830182905233825260079052919091205460ff168061104057503260009081526004602052604090205443600160401b9091046001600160401b0316105b61105c5760405162461bcd60e51b815260040161045b90612eae565b600082815260056020526040902054640100000000900461ffff166110b25760405162461bcd60e51b815260206004820152600c60248201526b696e76616c6964207479706560a01b604482015260640161045b565b506000818152600560209081526040918290208251608081018452815461ffff808216835262010000820481169483019490945264010000000090049092169282019290925260019091015460608201525b919050565b336001600160a01b03831614156111745760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b606482015260840161045b565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6003546001600160a01b0316331461120a5760405162461bcd60e51b815260040161045b90612f92565b600082815260056020526040902054640100000000900461ffff166112715760405162461bcd60e51b815260206004820152601d60248201527f74686973207479706520686173206e6f74206265656e20736574207570000000604482015260640161045b565b60009182526005602052604090912060010155565b6003546001600160a01b031633146112b05760405162461bcd60e51b815260040161045b90612f92565b60008281526005602052604090205461ffff8083169116111561130a5760405162461bcd60e51b81526020600482015260126024820152716d617820737570706c7920746f6f206c6f7760701b604482015260640161045b565b600091825260056020526040909120805461ffff9092166401000000000265ffff0000000019909216919091179055565b3360009081526007602052604090205460ff166113cc576001600160a01b03851633148061136e575061136e853361038d565b6113cc5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b606482015260840161045b565b610a1f8585858585611f10565b6003546001600160a01b031633146114035760405162461bcd60e51b815260040161045b90612f92565b6001600160a01b0381166114685760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161045b565b61093981611ebe565b60066020526000908152604090208054819061148c90613105565b80601f01602080910402602001604051908101604052809291908181526020018280546114b890613105565b80156115055780601f106114da57610100808354040283529160200191611505565b820191906000526020600020905b8154815290600101906020018083116114e857829003601f168201915b50505050509080600101805461151a90613105565b80601f016020809104026020016040519081016040528092919081815260200182805461154690613105565b80156115935780601f1061156857610100808354040283529160200191611593565b820191906000526020600020905b81548152906001019060200180831161157657829003601f168201915b5050505050905082565b60006001600160a01b0383166116095760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b606482015260840161045b565b506000908152602081815260408083206001600160a01b03949094168352929052205490565b6001600160a01b0383166116915760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b606482015260840161045b565b336116c1818560006116a28761202d565b6116ab8761202d565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b03881684529091529020548281101561173e5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b606482015260840161045b565b6000848152602081815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b606060006118f7600660008581526020019081526020016000206040518060400160405290816000820180546117de90613105565b80601f016020809104026020016040519081016040528092919081815260200182805461180a90613105565b80156118575780601f1061182c57610100808354040283529160200191611857565b820191906000526020600020905b81548152906001019060200180831161183a57829003601f168201915b5050505050815260200160018201805461187090613105565b80601f016020809104026020016040519081016040528092919081815260200182805461189c90613105565b80156118e95780601f106118be576101008083540402835291602001916118e9565b820191906000526020600020905b8154815290600101906020018083116118cc57829003601f168201915b505050505081525050612086565b60405160200161190791906128cf565b60405160208183030381529060405290508060405160200161192991906129bf565b604051602081830303815290604052915050919050565b606081516000141561196057505060408051602081019091526000815290565b6000604051806060016040528060408152602001613279604091399050600060038451600261198f919061305b565b6119999190613073565b6119a4906004613093565b905060006119b382602061305b565b6001600160401b038111156119d857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611a02576020820181803683370190505b509050818152600183018586518101602084015b81831015611a705760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611a16565b600389510660018114611a8a5760028114611a9b57611aa7565b613d3d60f01b600119830152611aa7565b603d60f81b6000198301525b509398975050505050505050565b600354600160a01b900460ff1615611adf5760405162461bcd60e51b815260040161045b90612ed9565b6003805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b1a3390565b6040516001600160a01b03909116815260200160405180910390a1565b600354600160a01b900460ff16611b875760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161045b565b6003805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b1a565b8151835114611c1d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b606482015260840161045b565b6001600160a01b038416611c435760405162461bcd60e51b815260040161045b90612f03565b3360005b8451811015611d46576000858281518110611c7257634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110611c9e57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015611cee5760405162461bcd60e51b815260040161045b90612f48565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611d2b90849061305b565b9250508190555050505080611d3f9061316c565b9050611c47565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d96929190612dd2565b60405180910390a4611dac8187878787876120b3565b505050505050565b6001600160a01b038416611e145760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b606482015260840161045b565b33611e2e81600087611e258861202d565b610a1f8861202d565b6000848152602081815260408083206001600160a01b038916845290915281208054859290611e5e90849061305b565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610a1f8160008787878761221e565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038416611f365760405162461bcd60e51b815260040161045b90612f03565b33611f46818787611e258861202d565b6000848152602081815260408083206001600160a01b038a16845290915290205483811015611f875760405162461bcd60e51b815260040161045b90612f48565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611fc490849061305b565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461202482888888888861221e565b50505050505050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061207557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6060816020015160405160200161209d91906128eb565b6040516020818303038152906040529050919050565b6001600160a01b0384163b15611dac5760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906120f79089908990889088908890600401612d1c565b602060405180830381600087803b15801561211157600080fd5b505af1925050508015612141575060408051601f3d908101601f1916820190925261213e9181019061275c565b60015b6121ee5761214d6131b3565b806308c379a0141561218757506121626131cb565b8061216d5750612189565b8060405162461bcd60e51b815260040161045b9190612df7565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606482015260840161045b565b6001600160e01b0319811663bc197c8160e01b146120245760405162461bcd60e51b815260040161045b90612e2f565b6001600160a01b0384163b15611dac5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906122629089908990889088908890600401612d7a565b602060405180830381600087803b15801561227c57600080fd5b505af19250505080156122ac575060408051601f3d908101601f191682019092526122a99181019061275c565b60015b6122b85761214d6131b3565b6001600160e01b0319811663f23a6e6160e01b146120245760405162461bcd60e51b815260040161045b90612e2f565b8280546122f490613105565b90600052602060002090601f016020900481019282612316576000855561235c565b82601f1061232f57805160ff191683800117855561235c565b8280016001018555821561235c579182015b8281111561235c578251825591602001919060010190612341565b5061236892915061236c565b5090565b5b80821115612368576000815560010161236d565b80356001600160a01b038116811461110457600080fd5b600082601f8301126123a8578081fd5b813560206123b582613012565b6040516123c28282613140565b8381528281019150858301600585901b870184018810156123e1578586fd5b855b858110156123ff578135845292840192908401906001016123e3565b5090979650505050505050565b600082601f83011261241c578081fd5b81356001600160401b038111156124355761243561319d565b60405161244c601f8301601f191660200182613140565b818152846020838601011115612460578283fd5b816020850160208301379081016020019190915292915050565b803561ffff8116811461110457600080fd5b60006020828403121561249d578081fd5b6104d082612381565b600080604083850312156124b8578081fd5b6124c183612381565b91506124cf60208401612381565b90509250929050565b600080600080600060a086880312156124ef578081fd5b6124f886612381565b945061250660208701612381565b935060408601356001600160401b0380821115612521578283fd5b61252d89838a01612398565b94506060880135915080821115612542578283fd5b61254e89838a01612398565b93506080880135915080821115612563578283fd5b506125708882890161240c565b9150509295509295909350565b600080600080600060a08688031215612594578081fd5b61259d86612381565b94506125ab60208701612381565b9350604086013592506060860135915060808601356001600160401b038111156125d3578182fd5b6125708882890161240c565b600080604083850312156125f1578182fd5b6125fa83612381565b9150602083013561260a81613254565b809150509250929050565b60008060408385031215612627578182fd5b61263083612381565b946020939093013593505050565b60008060408385031215612650578182fd5b82356001600160401b0380821115612666578384fd5b818501915085601f830112612679578384fd5b8135602061268682613012565b6040516126938282613140565b8381528281019150858301600585901b870184018b10156126b2578889fd5b8896505b848710156126db576126c781612381565b8352600196909601959183019183016126b6565b50965050860135925050808211156126f1578283fd5b506126fe85828601612398565b9150509250929050565b600060208284031215612719578081fd5b81356104d081613254565b600060208284031215612735578081fd5b81516104d081613254565b600060208284031215612751578081fd5b81356104d081613262565b60006020828403121561276d578081fd5b81516104d081613262565b600060208284031215612789578081fd5b5035919050565b600080604083850312156127a2578182fd5b8235915060208301356001600160401b038111156127be578182fd5b83016040818603121561260a578182fd5b600080604083850312156127e1578182fd5b823591506124cf6020840161247a565b600080600060608486031215612805578081fd5b833592506128156020850161247a565b915061282360408501612381565b90509250925092565b6000806040838503121561283e578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b8381101561287c57815187529582019590820190600101612860565b509495945050505050565b6000815180845261289f8160208601602086016130d5565b601f01601f19169290920160200192915050565b600081516128c58185602086016130d5565b9290920192915050565b600082516128e18184602087016130d5565b9190910192915050565b7f3c696d61676520783d22342220793d2234222077696474683d2233322220686581527f696768743d2233322220696d6167652d72656e646572696e673d22706978656c60208201527f6174656422207072657365727665417370656374526174696f3d22784d69645960408201527f4d69642220786c696e6b3a687265663d22646174613a696d6167652f706e673b60608201526618985cd94d8d0b60ca1b6080820152600082516129a58160878501602087016130d5565b6211179f60e91b6087939091019283015250608a01919050565b7f3c7376672069643d22616c746572222077696474683d2231303025222068656981527f6768743d2231303025222076657273696f6e3d22312e31222076696577426f7860208201527f3d223020302034302034302220786d6c6e733d22687474703a2f2f7777772e7760408201527f332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d2268747460608201527f703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e0000000000608082015260008251612a8f81609b8501602087016130d5565b651e17b9bb339f60d11b609b93909101928301525060a101919050565b693d913730b6b2911d101160b11b81528251600090612ad281600a8501602088016130d5565b7f222c20226465736372697074696f6e223a20224d7973746572696f7573206974600a918401918201527f656d7320737061776e65642066726f6d2074686520536163726966696369616c602a8201527f20416c746572206f66207468652057697a61726473202620447261676f6e7320604a8201527f546f7765722e204661626c656420746f20686f6c64206d61676963616c207072606a8201527f6f706572746965732c206f6e6c7920416374203120746f776572206775617264608a8201527f69616e732077696c6c206b6e6f772074686520747275746820696e207468652060aa8201527f666f6c6c6f77696e6720616374732e20416c6c20746865206d6574616461746160ca8201527f20616e6420696d61676573206172652067656e65726174656420616e6420737460ea8201527f6f7265642031303025206f6e2d636861696e2e204e6f20495046532e204e4f2061010a8201527f4150492e204a7573742074686520457468657265756d20626c6f636b6368616961012a8201527f6e2e222c2022696d616765223a2022646174613a696d6167652f7376672b786d61014a820152681b0ed8985cd94d8d0b60ba1b61016a820152612cce612cc1612ca26101738401876128b3565b72222c202261747472696275746573223a205b5d60681b815260130190565b607d60f81b815260010190565b95945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612d0f81601d8501602087016130d5565b91909101601d0192915050565b6001600160a01b0386811682528516602082015260a060408201819052600090612d489083018661284d565b8281036060840152612d5a818661284d565b90508281036080840152612d6e8185612887565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a060808201819052600090612db490830184612887565b979650505050505050565b6020815260006104d0602083018461284d565b604081526000612de5604083018561284d565b8281036020840152612cce818561284d565b6020815260006104d06020830184612887565b604081526000612e1d6040830185612887565b8281036020840152612cce8185612887565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526019908201527f4f6e6c792061646d696e732063616e2063616c6c207468697300000000000000604082015260600190565b602080825260119082015270686d6d6d6d207768617420646f696e673f60781b604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000808335601e19843603018112612fdd578283fd5b8301803591506001600160401b03821115612ff6578283fd5b60200191503681900382131561300b57600080fd5b9250929050565b60006001600160401b0382111561302b5761302b61319d565b5060051b60200190565b600061ffff80831681851680830382111561305257613052613187565b01949350505050565b6000821982111561306e5761306e613187565b500190565b60008261308e57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156130ad576130ad613187565b500290565b600061ffff838116908316818110156130cd576130cd613187565b039392505050565b60005b838110156130f05781810151838201526020016130d8565b838111156130ff576000848401525b50505050565b600181811c9082168061311957607f821691505b6020821081141561313a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156131655761316561319d565b6040525050565b600060001982141561318057613180613187565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d11156131c857600481823e5160e01c5b90565b600060443d10156131d95790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561320857505050505090565b82850191508151818111156132205750505050505090565b843d870101602082850101111561323a5750505050505090565b61324960208286010187613140565b509095945050505050565b801515811461093957600080fd5b6001600160e01b03198116811461093957600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212202ff3abf9d8beaeff84d6644c4682aa6030c4477910a9f6f47706d9c22713ade364736f6c63430008040033
Loading...
Loading
Loading...
Loading
[ 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.