ERC-721
Source Code
NFT
Overview
Max Total Supply
11,535 GMANA
Holders
585
Transfers
-
0
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
GenesisMana
Compiler Version
v0.8.7+commit.e28d00a7
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;
/**
* @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);
}
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}
/**
* @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);
}
}
/*
* @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;
}
}
/**
* @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);
}
}
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}
/**
* @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);
}
function _verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) private 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);
}
}
}
}
/**
* @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;
}
}
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver(to).onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}
/**
* @dev This implements an optional extension of {ERC721} defined in the EIP that adds
* enumerability of all the token ids in the contract as well as all token ids owned by each
* account.
*/
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
// Mapping from owner to list of owned token IDs
mapping(address => mapping(uint256 => uint256)) private _ownedTokens;
// Mapping from token ID to index of the owner tokens list
mapping(uint256 => uint256) private _ownedTokensIndex;
// Array with all token ids, used for enumeration
uint256[] private _allTokens;
// Mapping from token id to position in the allTokens array
mapping(uint256 => uint256) private _allTokensIndex;
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
return _ownedTokens[owner][index];
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _allTokens.length;
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
return _allTokens[index];
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual override {
super._beforeTokenTransfer(from, to, tokenId);
if (from == address(0)) {
_addTokenToAllTokensEnumeration(tokenId);
} else if (from != to) {
_removeTokenFromOwnerEnumeration(from, tokenId);
}
if (to == address(0)) {
_removeTokenFromAllTokensEnumeration(tokenId);
} else if (to != from) {
_addTokenToOwnerEnumeration(to, tokenId);
}
}
/**
* @dev Private function to add a token to this extension's ownership-tracking data structures.
* @param to address representing the new owner of the given token ID
* @param tokenId uint256 ID of the token to be added to the tokens list of the given address
*/
function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
uint256 length = ERC721.balanceOf(to);
_ownedTokens[to][length] = tokenId;
_ownedTokensIndex[tokenId] = length;
}
/**
* @dev Private function to add a token to this extension's token tracking data structures.
* @param tokenId uint256 ID of the token to be added to the tokens list
*/
function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
_allTokensIndex[tokenId] = _allTokens.length;
_allTokens.push(tokenId);
}
/**
* @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
* while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
* gas optimizations e.g. when performing a transfer operation (avoiding double writes).
* This has O(1) time complexity, but alters the order of the _ownedTokens array.
* @param from address representing the previous owner of the given token ID
* @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
*/
function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
// To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
uint256 tokenIndex = _ownedTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary
if (tokenIndex != lastTokenIndex) {
uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];
_ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
}
// This also deletes the contents at the last position of the array
delete _ownedTokensIndex[tokenId];
delete _ownedTokens[from][lastTokenIndex];
}
/**
* @dev Private function to remove a token from this extension's token tracking data structures.
* This has O(1) time complexity, but alters the order of the _allTokens array.
* @param tokenId uint256 ID of the token to be removed from the tokens list
*/
function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
// To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
// then delete the last slot (swap and pop).
uint256 lastTokenIndex = _allTokens.length - 1;
uint256 tokenIndex = _allTokensIndex[tokenId];
// When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
// rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
// an 'if' statement (like in _removeTokenFromOwnerEnumeration)
uint256 lastTokenId = _allTokens[lastTokenIndex];
_allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
_allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
// This also deletes the contents at the last position of the array
delete _allTokensIndex[tokenId];
_allTokens.pop();
}
}
interface LootInterface is IERC721Enumerable {
// Loot methods
function getWeapon(uint256 tokenId) external view returns (string memory);
function getChest(uint256 tokenId) external view returns (string memory);
function getHead(uint256 tokenId) external view returns (string memory);
function getWaist(uint256 tokenId) external view returns (string memory);
function getFoot(uint256 tokenId) external view returns (string memory);
function getHand(uint256 tokenId) external view returns (string memory);
function getNeck(uint256 tokenId) external view returns (string memory);
function getRing(uint256 tokenId) external view returns (string memory);
}
contract GenesisMana is ERC721Enumerable, ReentrancyGuard, Ownable {
using strings for string;
using strings for strings.slice;
LootInterface private _lootContract = LootInterface(0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7);
// 0x79E2d470f950f2Cf78eeF41720E8ff2cf4B3CD78 // Rinkeby
// 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7 // Mainnet
struct ManaDetails {
uint256 lootTokenId;
string itemName;
uint8 suffixId;
uint8 inventoryId;
}
// Item Metadata Tracker
// Mapping is: detailsByToken[tokenId]
mapping(uint256 => ManaDetails) public detailsByToken;
uint32 private _currentTokenId = 0;
// Max allocations for lost genesis mana
// Mappings is: lostGenesisManaTotal[suffixId][inventoryId]
uint8[8][17] public lostGenesisManaTotal = [
[0,0,0,0,0,0,0,0], //No suffix
[17,26,15,17,50,32,7,0], //of Power
[30,26,0,38,44,15,32,17], //of Giants
[30,20,18,34,30,15,0,26], //of Titans
[20,24,12,0,29,20,10,23], //of Skill
[39,27,22,9,0,5,26,19], //of Perfection
[11,11,12,3,7,0,7,25], //of Brilliance
[18,31,11,0,7,28,9,28], //of Enlightenment
[15,0,25,18,11,21,24,26], //of Protection
[33,12,17,3,0,12,33,9], //of Anger
[13,0,15,13,22,20,2,14], //of Rage
[20,16,5,27,16,27,0,27], //of Fury
[27,27,26,21,18,32,25,0], //of Vitriol
[15,29,34,33,0,24,10,14], //of the Fox
[16,19,0,20,11,25,1,14], //of Detection
[0,19,15,31,5,19,11,10], //of Reflection
[2,13,8,12,18,3,32,0] //of the Twins
];
// Counter for lost genesis mana
// Mapping is: _currentLostGenesisMana[suffixId][inventoryId]
mapping(uint8 => mapping(uint8 => uint8)) private _currentLostGenesisMana;
// Inventory Id to Name allocations for lost genesis mana
// Inventory Id is offset by 1 upon entry to correspond to actual array index
// Mapping is: lostGenesisManaTotal[suffixId][inventoryId]
string[8] private _inventoryNames = [
"Weapon", //1
"Chest Armor", //2
"Head Armor", //3
"Waist Armor", //4
"Foot Armor", //5
"Hand Armor", //6
"Neck Armor", //7
"Ring" //8
];
// Array of all the suffices and corresponding color codes
// Mapping is:
// _suffices[suffixId][0] for suffix name
// _suffices[suffixId][1] for suffix color code
string[2][17] private _suffices = [
["",""], // 0
["Power","#191D7E"], // 1
["Giants","#DAC931"], // 2
["Titans","#B45FBB"], // 3
["Skill","#1FAD94"], // 4
["Perfection","#2C1A72"], // 5
["Brilliance","#36662A"], // 6
["Enlightenment","#78365E"], // 7
["Protection","#4F4B4B"], // 8
["Anger","#9B1414"], // 9
["Rage","#77CE58"], // 10
["Fury","#C07A28"], // 11
["Vitriol","#511D71"], // 12
["the Fox","#949494"], // 13
["Detection","#DB8F8B"], // 14
["Reflection","#318C9F"], // 15
["the Twins","#00AE3B"] // 16
];
// Track claimed genesis mana
// Mapping is: claimedLootTokenId[tokenId][inventoryId]
mapping(uint256 => mapping(uint8 => bool)) public claimedLootTokenId;
constructor() ERC721("Genesis Mana", "GMANA") Ownable() {}
function tokenURI(uint256 tokenId) override public view returns (string memory) {
require(
!(detailsByToken[tokenId].lootTokenId == 0 && detailsByToken[tokenId].suffixId == 0 && detailsByToken[tokenId].inventoryId == 0 && _compareStrings(detailsByToken[tokenId].itemName,"")),
"TOKEN_ID_NOT_MINTED"
);
string[11] memory parts;
string memory name = string(abi.encodePacked('Genesis Mana #', Strings.toString(tokenId)));
parts[0] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; widht: 350px} .italic {font-style: italic}</style><rect width="100%" height="100%" fill="';
parts[1] = _suffices[detailsByToken[tokenId].suffixId][1];
parts[2] = '" /><text x="10" y="20" class="base">Order: ';
parts[3] = _suffices[detailsByToken[tokenId].suffixId][0];
parts[4] = '</text><text x="10" y="40" class="base">Equipment Type: ';
parts[5] = _inventoryNames[detailsByToken[tokenId].inventoryId];
parts[6] = '</text><text x="10" y="320" class="base italic">Distilled from ';
if (detailsByToken[tokenId].lootTokenId == 0) {
parts[7] = "";
} else {
parts[7] = string(abi.encodePacked('Loot Bag #',Strings.toString(detailsByToken[tokenId].lootTokenId)));
}
parts[8] = '</text><text x="10" y="340" class="base italic">';
parts[9] = detailsByToken[tokenId].itemName;
parts[10] = '</text></svg>';
string memory output = string(abi.encodePacked(parts[0], parts[1], parts[2], parts[3], parts[4]));
output = string(abi.encodePacked(output, parts[5], parts[6], parts[7], parts[8], parts[9], parts[10]));
string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name": "', name, '", "description": "This item is Genesis Mana used in Loot (for Adventurers)", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}'))));
output = string(abi.encodePacked('data:application/json;base64,', json));
return output;
}
// Function for a loot bag holder to mint genesis mana
function claimByLootId(uint256 lootTokenId, uint8 inventoryId)
external
nonReentrant
{
// Check that the loot token ID is in range
require(
lootTokenId >= 1 && lootTokenId <= 8000,
"LOOT_TOKEN_ID_OUT_OF_RANGE"
);
// Check that the inventory ID is in range
require(
inventoryId >= 1 && inventoryId <= 8,
"INVENTORY_ID_OUT_OF_RANGE"
);
//Decrement by one to match arrays
inventoryId--;
// Check that the msgSender owns the token that is being claimed
require(
_msgSender() == _lootContract.ownerOf(lootTokenId),
"MUST_OWN_TOKEN_ID"
);
// Check that Gensis Mana has not already been claimed
require(
!claimedLootTokenId[lootTokenId][inventoryId],
"GMANA_ALREADY_CLAIMED"
);
_claim(lootTokenId, inventoryId, 0, _msgSender());
}
// Function for the contract owner to mint lost genesis mana
function daoMint(uint8 inventoryId, uint8 suffixId)
external
nonReentrant
onlyOwner
{
// Check that the inventory ID is in range
require(
inventoryId >= 1 && inventoryId <= 8,
"INVENTORY_ID_OUT_OF_RANGE"
);
//Decrement by one to match arrays
inventoryId--;
// Check that the suffix ID is in range
require(
suffixId >= 1 && suffixId <= 16,
"SUFFIX_ID_OUT_OF_RANGE"
);
// Check that the lost GM is under the allocated amount
require(
_currentLostGenesisMana[suffixId][inventoryId] < lostGenesisManaTotal[suffixId][inventoryId],
"NO_GM_LEFT_FOR_TYPE"
);
_claim(0, inventoryId, suffixId, _msgSender());
_currentLostGenesisMana[suffixId][inventoryId]++;
}
function _claim(uint256 lootTokenId, uint8 inventoryId, uint8 suffixId, address tokenOwner) internal {
// checks
string memory itemName;
if (lootTokenId > 0) {
if(inventoryId == 0) {
itemName = _lootContract.getWeapon(lootTokenId);
} else if(inventoryId == 1) {
itemName = _lootContract.getChest(lootTokenId);
} else if(inventoryId == 2) {
itemName = _lootContract.getHead(lootTokenId);
} else if(inventoryId == 3) {
itemName = _lootContract.getWaist(lootTokenId);
} else if(inventoryId == 4) {
itemName = _lootContract.getFoot(lootTokenId);
} else if(inventoryId == 5) {
itemName = _lootContract.getHand(lootTokenId);
} else if(inventoryId == 6) {
itemName = _lootContract.getNeck(lootTokenId);
} else if(inventoryId == 7) {
itemName = _lootContract.getRing(lootTokenId);
}
// Check that item has a suffix (of *)
require(
_containsString("of",itemName),
"MUST_BE_A_GENESIS_ITEM"
);
strings.slice memory itemSlice = itemName.toSlice();
//Remove any +1 from name
string memory separatorStr = " +1";
itemSlice = itemSlice.split(separatorStr.toSlice());
//Split name up by of
separatorStr = "of ";
//Split twice to get the 2nd item in string.
itemSlice.split(separatorStr.toSlice());
suffixId = _findSuffixId(itemSlice.split(separatorStr.toSlice()).toString());
} else {
itemName = string(abi.encodePacked("Lost ", _inventoryNames[inventoryId], " of ", _suffices[suffixId][0]));
}
claimedLootTokenId[lootTokenId][inventoryId] = true;
uint256 newTokenId = _getNextTokenId();
detailsByToken[newTokenId].lootTokenId = lootTokenId;
detailsByToken[newTokenId].itemName = itemName;
detailsByToken[newTokenId].suffixId = suffixId;
detailsByToken[newTokenId].inventoryId = inventoryId;
_safeMint(tokenOwner, newTokenId);
_incrementTokenId();
}
function _findSuffixId(string memory item) private view returns (uint8){
for (uint8 i = 1; i <= _suffices.length; i++) {
if (_compareStrings(_suffices[i][0], item)) {
return i;
}
}
return 0;
}
function _getNextTokenId() private view returns (uint256) {
return _currentTokenId + 1;
}
function _incrementTokenId() private {
_currentTokenId++;
}
function _compareStrings(string memory a, string memory b) private pure returns (bool) {
return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));
}
function _containsString (string memory what, string memory where) private pure returns (bool) {
bytes memory whatBytes = bytes (what);
bytes memory whereBytes = bytes (where);
bool found = false;
for (uint i = 0; i < whereBytes.length - whatBytes.length; i++) {
bool flag = true;
for (uint j = 0; j < whatBytes.length; j++)
if (whereBytes [i + j] != whatBytes [j]) {
flag = false;
break;
}
if (flag) {
found = true;
break;
}
}
return (found);
}
}
/// [MIT License]
/// @title Base64
/// @notice Provides a function for encoding some bytes in base64
/// @author Brecht Devos <[email protected]>
library Base64 {
bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
/// @notice Encodes some bytes to the base64 representation
function encode(bytes memory data) internal pure returns (string memory) {
uint256 len = data.length;
if (len == 0) return "";
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((len + 2) / 3);
// Add some extra buffer at the end
bytes memory result = new bytes(encodedLen + 32);
bytes memory table = TABLE;
assembly {
let tablePtr := add(table, 1)
let resultPtr := add(result, 32)
for {
let i := 0
} lt(i, len) {
} {
i := add(i, 3)
let input := and(mload(add(data, i)), 0xffffff)
let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
out := shl(8, out)
out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF))
out := shl(8, out)
out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF))
out := shl(8, out)
out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
out := shl(224, out)
mstore(resultPtr, out)
resultPtr := add(resultPtr, 4)
}
switch mod(len, 3)
case 1 {
mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
}
case 2 {
mstore(sub(resultPtr, 1), shl(248, 0x3d))
}
mstore(result, encodedLen)
}
return string(result);
}
}
/*
* @title String & slice utility library for Solidity contracts.
* @author Nick Johnson <[email protected]>
*
* @dev Functionality in this library is largely implemented using an
* abstraction called a 'slice'. A slice represents a part of a string -
* anything from the entire string to a single character, or even no
* characters at all (a 0-length slice). Since a slice only has to specify
* an offset and a length, copying and manipulating slices is a lot less
* expensive than copying and manipulating the strings they reference.
*
* To further reduce gas costs, most functions on slice that need to return
* a slice modify the original one instead of allocating a new one; for
* instance, `s.split(".")` will return the text up to the first '.',
* modifying s to only contain the remainder of the string after the '.'.
* In situations where you do not want to modify the original slice, you
* can make a copy first with `.copy()`, for example:
* `s.copy().split(".")`. Try and avoid using this idiom in loops; since
* Solidity has no memory management, it will result in allocating many
* short-lived slices that are later discarded.
*
* Functions that return two slices come in two versions: a non-allocating
* version that takes the second slice as an argument, modifying it in
* place, and an allocating version that allocates and returns the second
* slice; see `nextRune` for example.
*
* Functions that have to copy string data will return strings rather than
* slices; these can be cast back to slices for further processing if
* required.
*
* For convenience, some functions are provided with non-modifying
* variants that create a new slice and return both; for instance,
* `s.splitNew('.')` leaves s unmodified, and returns two values
* corresponding to the left and right parts of the string.
*/
pragma solidity ^0.8.0;
library strings {
struct slice {
uint _len;
uint _ptr;
}
function memcpy(uint dest, uint src, uint len) private pure {
// Copy word-length chunks while possible
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
dest += 32;
src += 32;
}
// Copy remaining bytes
uint mask = 256 ** (32 - len) - 1;
assembly {
let srcpart := and(mload(src), not(mask))
let destpart := and(mload(dest), mask)
mstore(dest, or(destpart, srcpart))
}
}
/*
* @dev Returns a slice containing the entire string.
* @param self The string to make a slice from.
* @return A newly allocated slice containing the entire string.
*/
function toSlice(string memory self) internal pure returns (slice memory) {
uint ptr;
assembly {
ptr := add(self, 0x20)
}
return slice(bytes(self).length, ptr);
}
/*
* @dev Copies a slice to a new string.
* @param self The slice to copy.
* @return A newly allocated string containing the slice's text.
*/
function toString(slice memory self) internal pure returns (string memory) {
string memory ret = new string(self._len);
uint retptr;
assembly { retptr := add(ret, 32) }
memcpy(retptr, self._ptr, self._len);
return ret;
}
// Returns the memory address of the first byte of the first occurrence of
// `needle` in `self`, or the first byte after `self` if not found.
function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
uint ptr = selfptr;
uint idx;
if (needlelen <= selflen) {
if (needlelen <= 32) {
bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));
bytes32 needledata;
assembly { needledata := and(mload(needleptr), mask) }
uint end = selfptr + selflen - needlelen;
bytes32 ptrdata;
assembly { ptrdata := and(mload(ptr), mask) }
while (ptrdata != needledata) {
if (ptr >= end)
return selfptr + selflen;
ptr++;
assembly { ptrdata := and(mload(ptr), mask) }
}
return ptr;
} else {
// For long needles, use hashing
bytes32 hash;
assembly { hash := keccak256(needleptr, needlelen) }
for (idx = 0; idx <= selflen - needlelen; idx++) {
bytes32 testHash;
assembly { testHash := keccak256(ptr, needlelen) }
if (hash == testHash)
return ptr;
ptr += 1;
}
}
}
return selfptr + selflen;
}
/*
* @dev Splits the slice, setting `self` to everything after the first
* occurrence of `needle`, and `token` to everything before it. If
* `needle` does not occur in `self`, `self` is set to the empty slice,
* and `token` is set to the entirety of `self`.
* @param self The slice to split.
* @param needle The text to search for in `self`.
* @param token An output parameter to which the first token is written.
* @return `token`.
*/
function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
token._ptr = self._ptr;
token._len = ptr - self._ptr;
if (ptr == self._ptr + self._len) {
// Not found
self._len = 0;
} else {
self._len -= token._len + needle._len;
self._ptr = ptr + needle._len;
}
return token;
}
/*
* @dev Splits the slice, setting `self` to everything after the first
* occurrence of `needle`, and returning everything before it. If
* `needle` does not occur in `self`, `self` is set to the empty slice,
* and the entirety of `self` is returned.
* @param self The slice to split.
* @param needle The text to search for in `self`.
* @return The part of `self` up to the first occurrence of `delim`.
*/
function split(slice memory self, slice memory needle) internal pure returns (slice memory token) {
split(self, needle, token);
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"lootTokenId","type":"uint256"},{"internalType":"uint8","name":"inventoryId","type":"uint8"}],"name":"claimByLootId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"claimedLootTokenId","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"inventoryId","type":"uint8"},{"internalType":"uint8","name":"suffixId","type":"uint8"}],"name":"daoMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"detailsByToken","outputs":[{"internalType":"uint256","name":"lootTokenId","type":"uint256"},{"internalType":"string","name":"itemName","type":"string"},{"internalType":"uint8","name":"suffixId","type":"uint8"},{"internalType":"uint8","name":"inventoryId","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"lostGenesisManaTotal","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405273ff9c1b15b16263c61d017ee9f65c50e4ae0113d7600c60006101000a8154816001600160a01b0302191690836001600160a01b031602179055506000600e60006101000a81548163ffffffff021916908363ffffffff160217905550604051806102200160405280604051806101000160405280600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152602001600060ff168152508152602001604051806101000160405280601160ff168152602001601a60ff168152602001600f60ff168152602001601160ff168152602001603260ff168152602001602060ff168152602001600760ff168152602001600060ff168152508152602001604051806101000160405280601e60ff168152602001601a60ff168152602001600060ff168152602001602660ff168152602001602c60ff168152602001600f60ff168152602001602060ff168152602001601160ff168152508152602001604051806101000160405280601e60ff168152602001601460ff168152602001601260ff168152602001602260ff168152602001601e60ff168152602001600f60ff168152602001600060ff168152602001601a60ff168152508152602001604051806101000160405280601460ff168152602001601860ff168152602001600c60ff168152602001600060ff168152602001601d60ff168152602001601460ff168152602001600a60ff168152602001601760ff168152508152602001604051806101000160405280602760ff168152602001601b60ff168152602001601660ff168152602001600960ff168152602001600060ff168152602001600560ff168152602001601a60ff168152602001601360ff168152508152602001604051806101000160405280600b60ff168152602001600b60ff168152602001600c60ff168152602001600360ff168152602001600760ff168152602001600060ff168152602001600760ff168152602001601960ff168152508152602001604051806101000160405280601260ff168152602001601f60ff168152602001600b60ff168152602001600060ff168152602001600760ff168152602001601c60ff168152602001600960ff168152602001601c60ff168152508152602001604051806101000160405280600f60ff168152602001600060ff168152602001601960ff168152602001601260ff168152602001600b60ff168152602001601560ff168152602001601860ff168152602001601a60ff168152508152602001604051806101000160405280602160ff168152602001600c60ff168152602001601160ff168152602001600360ff168152602001600060ff168152602001600c60ff168152602001602160ff168152602001600960ff168152508152602001604051806101000160405280600d60ff168152602001600060ff168152602001600f60ff168152602001600d60ff168152602001601660ff168152602001601460ff168152602001600260ff168152602001600e60ff168152508152602001604051806101000160405280601460ff168152602001601060ff168152602001600560ff168152602001601b60ff168152602001601060ff168152602001601b60ff168152602001600060ff168152602001601b60ff168152508152602001604051806101000160405280601b60ff168152602001601b60ff168152602001601a60ff168152602001601560ff168152602001601260ff168152602001602060ff168152602001601960ff168152602001600060ff168152508152602001604051806101000160405280600f60ff168152602001601d60ff168152602001602260ff168152602001602160ff168152602001600060ff168152602001601860ff168152602001600a60ff168152602001600e60ff168152508152602001604051806101000160405280601060ff168152602001601360ff168152602001600060ff168152602001601460ff168152602001600b60ff168152602001601960ff168152602001600160ff168152602001600e60ff168152508152602001604051806101000160405280600060ff168152602001601360ff168152602001600f60ff168152602001601f60ff168152602001600560ff168152602001601360ff168152602001600b60ff168152602001600a60ff168152508152602001604051806101000160405280600260ff168152602001600d60ff168152602001600860ff168152602001600c60ff168152602001601260ff168152602001600360ff168152602001602060ff168152602001600060ff16815250815250600f906011620006cc92919062000d65565b50604080516101408101825260066101008201908152652bb2b0b837b760d11b610120830152815281518083018352600b8082526a21b432b9ba1020b936b7b960a91b6020838101919091528084019290925283518085018552600a808252692432b0b21020b936b7b960b11b8285015284860191909152845180860186529182526a2bb0b4b9ba1020b936b7b960a91b82840152606084019190915283518085018552818152692337b7ba1020b936b7b960b11b81840152608084015283518085018552818152692430b7321020b936b7b960b11b8184015260a084015283518085018552908152692732b1b59020b936b7b960b11b8183015260c08301528251808401909352600483526352696e6760e01b9083015260e0810191909152620007fc90602190600862000db6565b50604080516102808101825260006102608201818152610220830190815283516020818101865292815261024084015282528251608080820185526005828601818152642837bbb2b960d91b606080860191909152908452865180880188526007808252662331393144374560c81b828801528587019190915285870194909452865180840188526006818901818152654769616e747360d01b8385015282528851808a018a52868152662344414339333160c81b8189015282880152878901919091528751808501895280890191825265546974616e7360d01b81840152908152875180890189528581526611a11a1aa3212160c91b818801528187015281870152865180840188528088018381526414dada5b1b60da1b828401528152875180890189528581526608cc5190510e4d60ca1b81880152818701528387015286518084018852600a818901818152692832b93332b1ba34b7b760b11b8385015282528851808a018a528681526611992198a09b9960c91b818901528288015260a088019190915287518085018952808901828152694272696c6c69616e636560b01b8285015281528851808a018a52868152662333363636324160c81b818901528188015260c088015287518085018952600d818a019081526c115b9b1a59da1d195b9b595b9d609a1b8285015281528851808a018a52868152662337383336354560c81b818901528188015260e08801528751808501895280890182815269283937ba32b1ba34b7b760b11b8285015281528851808a018a5286815266119a231a211a2160c91b8189015281880152610100880152875180850189528089019384526420b733b2b960d91b81840152928352875180890189528581526608ce508c4d0c4d60ca1b8188015283870152610120870192909252865180840188526004818901818152635261676560e01b8385015282528851808a018a52868152660466e6e868a6a760cb1b818901528288015261014088019190915287518085018952808901918252634675727960e01b81840152908152875180890189528581526604686606e8264760cb1b81880152818701526101608701528651808401885280880185815266159a5d1c9a5bdb60ca1b82840152815287518089018952858152662335313144373160c81b818801528187015261018087015286518084018852808801858152660e8d0ca408cdef60cb1b828401528152875180890189528581526608ce4d0e4d0e4d60ca1b81880152818701526101a0870152865180840188526009818901818152682232ba32b1ba34b7b760b91b8385015282528851808a018a528681526611a2211c231c2160c91b81890152828801526101c088019190915287518085018952808901938452692932b33632b1ba34b7b760b11b8184015292835287518089018952858152661199989c219ca360c91b81880152838701526101e08701929092528651928301875282870191825268746865205477696e7360b81b90830152815284518086019095529084526611981820a299a160c91b848301529081019290925261020081019190915262000c8490602990601162000e09565b5034801562000c9257600080fd5b50604080518082018252600c81526b47656e65736973204d616e6160a01b602080830191825283518085019094526005845264474d414e4160d81b90840152815191929162000ce49160009162000e57565b50805162000cfa90600190602084019062000e57565b50506001600a555062000d0d3362000d13565b620010cb565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b826011810192821562000da4579160200282015b8281111562000da457825162000d93908390600862000ee2565b509160200191906001019062000d79565b5062000db292915062000f77565b5090565b826008810192821562000dfb579160200282015b8281111562000dfb578251805162000dea91849160209091019062000e57565b509160200191906001019062000dca565b5062000db292915062000f8d565b60228301918390821562000e49579160200282015b8281111562000e4957825162000e38908390600262000fae565b509160200191906002019062000e1e565b5062000db292915062000ff3565b82805462000e65906200108e565b90600052602060002090601f01602090048101928262000e89576000855562000ed4565b82601f1062000ea457805160ff191683800117855562000ed4565b8280016001018555821562000ed4579182015b8281111562000ed457825182559160200191906001019062000eb7565b5062000db292915062001014565b60018301918390821562000ed45791602002820160005b8382111562000f3957835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030262000ef9565b801562000f685782816101000a81549060ff021916905560010160208160000104928301926001030262000f39565b505062000db292915062001014565b8082111562000db2576000815560010162000f77565b8082111562000db257600062000fa482826200102a565b5060010162000f8d565b826002810192821562000dfb579160200282015b8281111562000dfb578251805162000fe291849160209091019062000e57565b509160200191906001019062000fc2565b8082111562000db25760006200100a82826200106c565b5060020162000ff3565b8082111562000db2576000815560010162000f77565b50805462001038906200108e565b6000825580601f1062001049575050565b601f01602090049060005260206000209081019062001069919062001014565b50565b5060006200107b82826200102a565b506200108c9060010160006200102a565b565b600181811c90821680620010a357607f821691505b60208210811415620010c557634e487b7160e01b600052602260045260246000fd5b50919050565b613ac680620010db6000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806370a08231116100c3578063a22cb4651161007c578063a22cb46514610308578063b88d4fde1461031b578063c46ac3891461032e578063c87b56dd14610341578063e985e9c514610354578063f2fde38b1461039057600080fd5b806370a082311461028c578063715018a61461029f57806374735365146102a75780638da5cb5b146102ca5780638dda72f1146102db57806395d89b411461030057600080fd5b806323b872dd1161011557806323b872dd146101ff5780632f745c591461021257806340c3c4161461022557806342842e0e146102535780634f6ccce7146102665780636352211e1461027957600080fd5b806301ffc9a71461015d578063044202e01461018557806306fdde031461019a578063081812fc146101af578063095ea7b3146101da57806318160ddd146101ed575b600080fd5b61017061016b366004612ee3565b6103a3565b60405190151581526020015b60405180910390f35b610198610193366004612ffb565b6103ce565b005b6101a2610624565b60405161017c9190613404565b6101c26101bd366004612f94565b6106b6565b6040516001600160a01b03909116815260200161017c565b6101986101e8366004612eb7565b61074b565b6008545b60405190815260200161017c565b61019861020d366004612d94565b610861565b6101f1610220366004612eb7565b610892565b610170610233366004612fcf565b604b60209081526000928352604080842090915290825290205460ff1681565b610198610261366004612d94565b610928565b6101f1610274366004612f94565b610943565b6101c2610287366004612f94565b6109d6565b6101f161029a366004612d1a565b610a4d565b610198610ad4565b6102ba6102b5366004612f94565b610b0a565b60405161017c94939291906134ef565b600b546001600160a01b03166101c2565b6102ee6102e9366004612fad565b610bc1565b60405160ff909116815260200161017c565b6101a2610bfd565b610198610316366004612e84565b610c0c565b610198610329366004612dd5565b610cd1565b61019861033c366004612fcf565b610d09565b6101a261034f366004612f94565b610f76565b610170610362366004612d5b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61019861039e366004612d1a565b611644565b60006001600160e01b0319821663780e9d6360e01b14806103c857506103c8826116df565b92915050565b6002600a5414156104265760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600a55600b546001600160a01b031633146104555760405162461bcd60e51b815260040161041d90613469565b60018260ff161015801561046d575060088260ff1611155b6104b55760405162461bcd60e51b8152602060048201526019602482015278494e56454e544f52595f49445f4f55545f4f465f52414e474560381b604482015260640161041d565b816104bf8161371d565b92505060018160ff16101580156104da575060108160ff1611155b61051f5760405162461bcd60e51b81526020600482015260166024820152755355464649585f49445f4f55545f4f465f52414e474560501b604482015260640161041d565b600f8160ff16601181106105355761053561382a565b018260ff166008811061054a5761054a61382a565b60208082049092015460ff8481166000908152848052604080822088841683529095529390932054601f9092166101000a900482169116106105c45760405162461bcd60e51b81526020600482015260136024820152724e4f5f474d5f4c4546545f464f525f5459504560681b604482015260640161041d565b6105d1600083833361172f565b60ff80821660009081526020808052604080832086851684529091528120805490921691906105ff836137b4565b91906101000a81548160ff021916908360ff160217905550506001600a819055505050565b6060600080546106339061373a565b80601f016020809104026020016040519081016040528092919081815260200182805461065f9061373a565b80156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661072f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161041d565b506000908152600460205260409020546001600160a01b031690565b6000610756826109d6565b9050806001600160a01b0316836001600160a01b031614156107c45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161041d565b336001600160a01b03821614806107e057506107e08133610362565b6108525760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161041d565b61085c8383611c38565b505050565b61086b3382611ca6565b6108875760405162461bcd60e51b815260040161041d9061349e565b61085c838383611d9d565b600061089d83610a4d565b82106108ff5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161041d565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61085c83838360405180602001604052806000815250610cd1565b600061094e60085490565b82106109b15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161041d565b600882815481106109c4576109c461382a565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806103c85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161041d565b60006001600160a01b038216610ab85760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161041d565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b03163314610afe5760405162461bcd60e51b815260040161041d90613469565b610b086000611f48565b565b600d6020526000908152604090208054600182018054919291610b2c9061373a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b589061373a565b8015610ba55780601f10610b7a57610100808354040283529160200191610ba5565b820191906000526020600020905b815481529060010190602001808311610b8857829003601f168201915b5050506002909301549192505060ff8082169161010090041684565b600f8260118110610bd157600080fd5b018160088110610be057600080fd5b602081049091015460ff601f9092166101000a9004169150829050565b6060600180546106339061373a565b6001600160a01b038216331415610c655760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161041d565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cdb3383611ca6565b610cf75760405162461bcd60e51b815260040161041d9061349e565b610d0384848484611f9a565b50505050565b6002600a541415610d5c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161041d565b6002600a5560018210801590610d745750611f408211155b610dc05760405162461bcd60e51b815260206004820152601a60248201527f4c4f4f545f544f4b454e5f49445f4f55545f4f465f52414e4745000000000000604482015260640161041d565b60018160ff1610158015610dd8575060088160ff1611155b610e205760405162461bcd60e51b8152602060048201526019602482015278494e56454e544f52595f49445f4f55545f4f465f52414e474560381b604482015260640161041d565b80610e2a8161371d565b600c546040516331a9108f60e11b8152600481018690529193506001600160a01b03169150636352211e9060240160206040518083038186803b158015610e7057600080fd5b505afa158015610e84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea89190612d3e565b6001600160a01b0316336001600160a01b031614610efc5760405162461bcd60e51b8152602060048201526011602482015270135554d517d3d5d397d513d2d15397d251607a1b604482015260640161041d565b6000828152604b6020908152604080832060ff80861685529252909120541615610f605760405162461bcd60e51b815260206004820152601560248201527411d350539057d053149150511657d0d31052535151605a1b604482015260640161041d565b610f6d828260003361172f565b50506001600a55565b6000818152600d6020526040902054606090158015610fa757506000828152600d602052604090206002015460ff16155b8015610fca57506000828152600d6020526040902060020154610100900460ff16155b801561108557506000828152600d6020526040902060010180546110859190610ff29061373a565b80601f016020809104026020016040519081016040528092919081815260200182805461101e9061373a565b801561106b5780601f106110405761010080835404028352916020019161106b565b820191906000526020600020905b81548152906001019060200180831161104e57829003601f168201915b505050505060405180602001604052806000815250611fcd565b156110c85760405162461bcd60e51b81526020600482015260136024820152721513d2d15397d25117d393d517d35253951151606a1b604482015260640161041d565b6110d0612c43565b60006110db84612026565b6040516020016110eb9190613235565b60408051601f19818403018152610120830190915260fc8083529092506138ba602083013982526000848152600d602052604090206002015460299060ff166011811061113a5761113a61382a565b60020201600101805461114c9061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546111789061373a565b80156111c55780601f1061119a576101008083540402835291602001916111c5565b820191906000526020600020905b8154815290600101906020018083116111a857829003601f168201915b5050505050826001600b81106111dd576111dd61382a565b60200201819052506040518060600160405280602c81526020016139e6602c91396040808401919091526000858152600d602052206002015460299060ff166011811061122c5761122c61382a565b60020201805461123b9061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546112679061373a565b80156112b45780601f10611289576101008083540402835291602001916112b4565b820191906000526020600020905b81548152906001019060200180831161129757829003601f168201915b5050505050826003600b81106112cc576112cc61382a565b60200201819052506040518060600160405280603881526020016138826038913960808301526000848152600d6020526040902060020154602190610100900460ff166008811061131f5761131f61382a565b01805461132b9061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546113579061373a565b80156113a45780601f10611379576101008083540402835291602001916113a4565b820191906000526020600020905b81548152906001019060200180831161138757829003601f168201915b5050505050826005600b81106113bc576113bc61382a565b60200201819052506040518060600160405280603f8152602001613a52603f913960c08301526000848152600d602052604090205461140e5760408051602081019091526000815260e083015261144c565b6000848152600d602052604090205461142690612026565b6040516020016114369190613395565b60408051808303601f1901815291905260e08301525b6040518060600160405280603081526020016139b6603091396101008301526000848152600d6020526040902060010180546114879061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546114b39061373a565b80156115005780601f106114d557610100808354040283529160200191611500565b820191906000526020600020905b8154815290600101906020018083116114e357829003601f168201915b5050505050826009600b81106115185761151861382a565b60200201819052506040518060400160405280600d81526020016c1e17ba32bc3a1f1e17b9bb339f60991b81525082600a600b81106115595761155961382a565b6020908102919091019190915282518382015160408086015160608701516080880151925160009661158e9695949101613107565b60408051808303601f190181529082905260a085015160c086015160e08701516101008801516101208901516101408a01519597506115d296889690602001613172565b60405160208183030381529060405290506000611617836115f284612124565b60405160200161160392919061326b565b604051602081830303815290604052612124565b90508060405160200161162a9190613350565b60408051601f198184030181529190529695505050505050565b600b546001600160a01b0316331461166e5760405162461bcd60e51b815260040161041d90613469565b6001600160a01b0381166116d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b6116dc81611f48565b50565b60006001600160e01b031982166380ac58cd60e01b148061171057506001600160e01b03198216635b5e139f60e01b145b806103c857506301ffc9a760e01b6001600160e01b03198316146103c8565b60608415611b425760ff84166117c757600c54604051639e41b73f60e01b8152600481018790526001600160a01b0390911690639e41b73f906024015b60006040518083038186803b15801561178457600080fd5b505afa158015611798573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117c09190810190612f1d565b90506119c4565b8360ff166001141561180457600c546040516377b403ad60e11b8152600481018790526001600160a01b039091169063ef68075a9060240161176c565b8360ff166002141561184157600c54604051639720c96960e01b8152600481018790526001600160a01b0390911690639720c9699060240161176c565b8360ff166003141561187e57600c54604051639bdc1b6960e01b8152600481018790526001600160a01b0390911690639bdc1b699060240161176c565b8360ff16600414156118bb57600c54604051630e99990d60e01b8152600481018790526001600160a01b0390911690630e99990d9060240161176c565b8360ff16600514156118f857600c54604051636a3f934f60e11b8152600481018790526001600160a01b039091169063d47f269e9060240161176c565b8360ff166006141561193557600c54604051630ce4135560e31b8152600481018790526001600160a01b03909116906367209aa89060240161176c565b8360ff16600714156119c457600c5460405163c08a5dd560e01b8152600481018790526001600160a01b039091169063c08a5dd59060240160006040518083038186803b15801561198557600080fd5b505afa158015611999573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119c19190810190612f1d565b90505b6119e86040518060400160405280600281526020016137b360f11b8152508261228a565b611a2d5760405162461bcd60e51b81526020600482015260166024820152754d5553545f42455f415f47454e455349535f4954454d60501b604482015260640161041d565b6000611a608260408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6040805180820182526003815262202b3160e81b602080830191825283518085018552600080825290820152835180850190945282518452830152919250611aaa905b839061234d565b6040805180820182526003815262037b3160ed1b602080830191825283518085018552600080825290820152835180850190945282518452830152919350909150611af490611aa3565b50604080518082018252600080825260209182015281518083019092528251825280830190820152611b3990611b3490611b2f90859061234d565b612373565b6123dc565b94505050611b99565b60218460ff1660088110611b5857611b5861382a565b0160298460ff1660118110611b6f57611b6f61382a565b60020201600001604051602001611b87929190613204565b60405160208183030381529060405290505b6000858152604b6020908152604080832060ff881684529091528120805460ff19166001179055611bc86124be565b6000818152600d602090815260409091208881558451929350611bf392600190910191850190612c6b565b506000818152600d60205260409020600201805460ff8781166101000261ffff1990921690871617179055611c2883826124e0565b611c306124fe565b505050505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c6d826109d6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611d1f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161041d565b6000611d2a836109d6565b9050806001600160a01b0316846001600160a01b03161480611d655750836001600160a01b0316611d5a846106b6565b6001600160a01b0316145b80611d9557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611db0826109d6565b6001600160a01b031614611e185760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161041d565b6001600160a01b038216611e7a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041d565b611e85838383612535565b611e90600082611c38565b6001600160a01b0383166000908152600360205260408120805460019290611eb99084906136da565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ee790849061357c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611fa5848484611d9d565b611fb1848484846125ed565b610d035760405162461bcd60e51b815260040161041d90613417565b600081604051602001611fe091906130eb565b604051602081830303815290604052805190602001208360405160200161200791906130eb565b6040516020818303038152906040528051906020012014905092915050565b60608161204a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612074578061205e81613775565b915061206d9050600a836135bc565b915061204e565b60008167ffffffffffffffff81111561208f5761208f613840565b6040519080825280601f01601f1916602001820160405280156120b9576020820181803683370190505b5090505b8415611d95576120ce6001836136da565b91506120db600a866137d4565b6120e690603061357c565b60f81b8183815181106120fb576120fb61382a565b60200101906001600160f81b031916908160001a90535061211d600a866135bc565b94506120bd565b805160609080612144575050604080516020810190915260008152919050565b6000600361215383600261357c565b61215d91906135bc565b6121689060046136bb565b9050600061217782602061357c565b67ffffffffffffffff81111561218f5761218f613840565b6040519080825280601f01601f1916602001820160405280156121b9576020820181803683370190505b5090506000604051806060016040528060408152602001613a12604091399050600181016020830160005b86811015612245576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b8352600490920191016121e4565b50600386066001811461225f57600281146122705761227c565b613d3d60f01b60011983015261227c565b603d60f81b6000198301525b505050918152949350505050565b6000828282805b8351835161229f91906136da565b81101561234357600160005b855181101561231f578581815181106122c6576122c661382a565b01602001516001600160f81b031916856122e0838661357c565b815181106122f0576122f061382a565b01602001516001600160f81b0319161461230d576000915061231f565b8061231781613775565b9150506122ab565b508015612330576001925050612343565b508061233b81613775565b915050612291565b5095945050505050565b604080518082019091526000808252602082015261236c8383836126fa565b5092915050565b60606000826000015167ffffffffffffffff81111561239457612394613840565b6040519080825280601f01601f1916602001820160405280156123be576020820181803683370190505b509050600060208201905061236c81856020015186600001516127a6565b600060015b60118160ff16116124b55761249860298260ff16601181106124055761240561382a565b6002020180546124149061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546124409061373a565b801561248d5780601f106124625761010080835404028352916020019161248d565b820191906000526020600020905b81548152906001019060200180831161247057829003601f168201915b505050505084611fcd565b156124a35792915050565b806124ad816137b4565b9150506123e1565b50600092915050565b600e546000906124d59063ffffffff166001613594565b63ffffffff16905090565b6124fa828260405180602001604052806000815250612817565b5050565b600e805463ffffffff1690600061251483613790565b91906101000a81548163ffffffff021916908363ffffffff16021790555050565b6001600160a01b0383166125905761258b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6125b3565b816001600160a01b0316836001600160a01b0316146125b3576125b3838261284a565b6001600160a01b0382166125ca5761085c816128e7565b826001600160a01b0316826001600160a01b03161461085c5761085c8282612996565b60006001600160a01b0384163b156126ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126319033908990889088906004016133c7565b602060405180830381600087803b15801561264b57600080fd5b505af192505050801561267b575060408051601f3d908101601f1916820190925261267891810190612f00565b60015b6126d5573d8080156126a9576040519150601f19603f3d011682016040523d82523d6000602084013e6126ae565b606091505b5080516126cd5760405162461bcd60e51b815260040161041d90613417565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d95565b506001949350505050565b6040805180820190915260008082526020820152600061272c85600001518660200151866000015187602001516129da565b60208087018051918601919091525190915061274890826136da565b83528451602086015161275b919061357c565b81141561276b576000855261279d565b83518351612779919061357c565b855186906127889083906136da565b9052508351612797908261357c565b60208601525b50909392505050565b602081106127de57815183526127bd60208461357c565b92506127ca60208361357c565b91506127d76020826136da565b90506127a6565b600060016127ed8360206136da565b6127f990610100613613565b61280391906136da565b925184518416931916929092179092525050565b6128218383612af5565b61282e60008484846125ed565b61085c5760405162461bcd60e51b815260040161041d90613417565b6000600161285784610a4d565b61286191906136da565b6000838152600760205260409020549091508082146128b4576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906128f9906001906136da565b600083815260096020526040812054600880549394509092849081106129215761292161382a565b9060005260206000200154905080600883815481106129425761294261382a565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061297a5761297a613814565b6001900381819060005260206000200160009055905550505050565b60006129a183610a4d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008381868511612ae05760208511612a8e57600060016129fc8760206136da565b612a079060086136bb565b612a12906002613613565b612a1c91906136da565b8551901991508116600087612a318b8b61357c565b612a3b91906136da565b855190915083165b828114612a8057818610612a6857612a5b8b8b61357c565b9650505050505050611d95565b85612a7281613775565b965050838651169050612a43565b859650505050505050611d95565b508383206000905b612aa086896136da565b8211612ade5785832081811415612abd5783945050505050611d95565b612ac860018561357c565b9350508180612ad690613775565b925050612a96565b505b612aea878761357c565b979650505050505050565b6001600160a01b038216612b4b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161041d565b6000818152600260205260409020546001600160a01b031615612bb05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161041d565b612bbc60008383612535565b6001600160a01b0382166000908152600360205260408120805460019290612be590849061357c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b604051806101600160405280600b905b6060815260200190600190039081612c535790505090565b828054612c779061373a565b90600052602060002090601f016020900481019282612c995760008555612cdf565b82601f10612cb257805160ff1916838001178555612cdf565b82800160010185558215612cdf579182015b82811115612cdf578251825591602001919060010190612cc4565b50612ceb929150612cef565b5090565b5b80821115612ceb5760008155600101612cf0565b803560ff81168114612d1557600080fd5b919050565b600060208284031215612d2c57600080fd5b8135612d3781613856565b9392505050565b600060208284031215612d5057600080fd5b8151612d3781613856565b60008060408385031215612d6e57600080fd5b8235612d7981613856565b91506020830135612d8981613856565b809150509250929050565b600080600060608486031215612da957600080fd5b8335612db481613856565b92506020840135612dc481613856565b929592945050506040919091013590565b60008060008060808587031215612deb57600080fd5b8435612df681613856565b93506020850135612e0681613856565b925060408501359150606085013567ffffffffffffffff811115612e2957600080fd5b8501601f81018713612e3a57600080fd5b8035612e4d612e4882613554565b613523565b818152886020838501011115612e6257600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612e9757600080fd5b8235612ea281613856565b915060208301358015158114612d8957600080fd5b60008060408385031215612eca57600080fd5b8235612ed581613856565b946020939093013593505050565b600060208284031215612ef557600080fd5b8135612d378161386b565b600060208284031215612f1257600080fd5b8151612d378161386b565b600060208284031215612f2f57600080fd5b815167ffffffffffffffff811115612f4657600080fd5b8201601f81018413612f5757600080fd5b8051612f65612e4882613554565b818152856020838501011115612f7a57600080fd5b612f8b8260208301602086016136f1565b95945050505050565b600060208284031215612fa657600080fd5b5035919050565b60008060408385031215612fc057600080fd5b50508035926020909101359150565b60008060408385031215612fe257600080fd5b82359150612ff260208401612d04565b90509250929050565b6000806040838503121561300e57600080fd5b61301783612d04565b9150612ff260208401612d04565b6000815180845261303d8160208601602086016136f1565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061306b57607f831692505b602080841082141561308d57634e487b7160e01b600052602260045260246000fd5b8180156130a157600181146130b2576130df565b60ff198616895284890196506130df565b60008881526020902060005b868110156130d75781548b8201529085019083016130be565b505084890196505b50505050505092915050565b600082516130fd8184602087016136f1565b9190910192915050565b60008651613119818460208b016136f1565b86519083019061312d818360208b016136f1565b8651910190613140818360208a016136f1565b85519101906131538183602089016136f1565b84519101906131668183602088016136f1565b01979650505050505050565b6000885160206131858285838e016136f1565b8951918401916131988184848e016136f1565b89519201916131aa8184848d016136f1565b88519201916131bc8184848c016136f1565b87519201916131ce8184848b016136f1565b86519201916131e08184848a016136f1565b85519201916131f281848489016136f1565b919091019a9950505050505050505050565b6402637b9ba160dd1b8152600061321e6005830185613051565b6301037b3160e51b8152612f8b6004820185613051565b6d47656e65736973204d616e61202360901b81526000825161325e81600e8501602087016136f1565b91909101600e0192915050565b693d913730b6b2911d101160b11b8152825160009061329181600a8501602088016136f1565b7f222c20226465736372697074696f6e223a202254686973206974656d20697320600a918401918201527f47656e65736973204d616e61207573656420696e204c6f6f742028666f722041602a8201527f6476656e74757265727329222c2022696d616765223a2022646174613a696d61604a8201527119d94bdcdd99cade1b5b0ed8985cd94d8d0b60721b606a820152835161333581607c8401602088016136f1565b61227d60f01b607c9290910191820152607e01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161338881601d8501602087016136f1565b91909101601d0192915050565b694c6f6f7420426167202360b01b8152600082516133ba81600a8501602087016136f1565b91909101600a0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906133fa90830184613025565b9695505050505050565b602081526000612d376020830184613025565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8481526080602082015260006135086080830186613025565b60ff9485166040840152929093166060909101529392505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561354c5761354c613840565b604052919050565b600067ffffffffffffffff82111561356e5761356e613840565b50601f01601f191660200190565b6000821982111561358f5761358f6137e8565b500190565b600063ffffffff8083168185168083038211156135b3576135b36137e8565b01949350505050565b6000826135cb576135cb6137fe565b500490565b600181815b8085111561360b5781600019048211156135f1576135f16137e8565b808516156135fe57918102915b93841c93908002906135d5565b509250929050565b6000612d378383600082613629575060016103c8565b81613636575060006103c8565b816001811461364c576002811461365657613672565b60019150506103c8565b60ff841115613667576136676137e8565b50506001821b6103c8565b5060208310610133831016604e8410600b8410161715613695575081810a6103c8565b61369f83836135d0565b80600019048211156136b3576136b36137e8565b029392505050565b60008160001904831182151516156136d5576136d56137e8565b500290565b6000828210156136ec576136ec6137e8565b500390565b60005b8381101561370c5781810151838201526020016136f4565b83811115610d035750506000910152565b600060ff821680613730576137306137e8565b6000190192915050565b600181811c9082168061374e57607f821691505b6020821081141561376f57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613789576137896137e8565b5060010190565b600063ffffffff808316818114156137aa576137aa6137e8565b6001019392505050565b600060ff821660ff8114156137cb576137cb6137e8565b60010192915050565b6000826137e3576137e36137fe565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146116dc57600080fd5b6001600160e01b0319811681146116dc57600080fdfe3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223e45717569706d656e7420547970653a203c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b2077696468743a2033353070787d202e6974616c6963207b666f6e742d7374796c653a206974616c69637d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d223c2f746578743e3c7465787420783d2231302220793d223334302220636c6173733d2262617365206974616c6963223e22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4f726465723a204142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d223332302220636c6173733d2262617365206974616c6963223e44697374696c6c65642066726f6d20a26469706673582212202cb5b4c911f3b88879d57cc66a730d04c085dc73370e2b226962308b0a628a2664736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c806370a08231116100c3578063a22cb4651161007c578063a22cb46514610308578063b88d4fde1461031b578063c46ac3891461032e578063c87b56dd14610341578063e985e9c514610354578063f2fde38b1461039057600080fd5b806370a082311461028c578063715018a61461029f57806374735365146102a75780638da5cb5b146102ca5780638dda72f1146102db57806395d89b411461030057600080fd5b806323b872dd1161011557806323b872dd146101ff5780632f745c591461021257806340c3c4161461022557806342842e0e146102535780634f6ccce7146102665780636352211e1461027957600080fd5b806301ffc9a71461015d578063044202e01461018557806306fdde031461019a578063081812fc146101af578063095ea7b3146101da57806318160ddd146101ed575b600080fd5b61017061016b366004612ee3565b6103a3565b60405190151581526020015b60405180910390f35b610198610193366004612ffb565b6103ce565b005b6101a2610624565b60405161017c9190613404565b6101c26101bd366004612f94565b6106b6565b6040516001600160a01b03909116815260200161017c565b6101986101e8366004612eb7565b61074b565b6008545b60405190815260200161017c565b61019861020d366004612d94565b610861565b6101f1610220366004612eb7565b610892565b610170610233366004612fcf565b604b60209081526000928352604080842090915290825290205460ff1681565b610198610261366004612d94565b610928565b6101f1610274366004612f94565b610943565b6101c2610287366004612f94565b6109d6565b6101f161029a366004612d1a565b610a4d565b610198610ad4565b6102ba6102b5366004612f94565b610b0a565b60405161017c94939291906134ef565b600b546001600160a01b03166101c2565b6102ee6102e9366004612fad565b610bc1565b60405160ff909116815260200161017c565b6101a2610bfd565b610198610316366004612e84565b610c0c565b610198610329366004612dd5565b610cd1565b61019861033c366004612fcf565b610d09565b6101a261034f366004612f94565b610f76565b610170610362366004612d5b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61019861039e366004612d1a565b611644565b60006001600160e01b0319821663780e9d6360e01b14806103c857506103c8826116df565b92915050565b6002600a5414156104265760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b6002600a55600b546001600160a01b031633146104555760405162461bcd60e51b815260040161041d90613469565b60018260ff161015801561046d575060088260ff1611155b6104b55760405162461bcd60e51b8152602060048201526019602482015278494e56454e544f52595f49445f4f55545f4f465f52414e474560381b604482015260640161041d565b816104bf8161371d565b92505060018160ff16101580156104da575060108160ff1611155b61051f5760405162461bcd60e51b81526020600482015260166024820152755355464649585f49445f4f55545f4f465f52414e474560501b604482015260640161041d565b600f8160ff16601181106105355761053561382a565b018260ff166008811061054a5761054a61382a565b60208082049092015460ff8481166000908152848052604080822088841683529095529390932054601f9092166101000a900482169116106105c45760405162461bcd60e51b81526020600482015260136024820152724e4f5f474d5f4c4546545f464f525f5459504560681b604482015260640161041d565b6105d1600083833361172f565b60ff80821660009081526020808052604080832086851684529091528120805490921691906105ff836137b4565b91906101000a81548160ff021916908360ff160217905550506001600a819055505050565b6060600080546106339061373a565b80601f016020809104026020016040519081016040528092919081815260200182805461065f9061373a565b80156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661072f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161041d565b506000908152600460205260409020546001600160a01b031690565b6000610756826109d6565b9050806001600160a01b0316836001600160a01b031614156107c45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161041d565b336001600160a01b03821614806107e057506107e08133610362565b6108525760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606482015260840161041d565b61085c8383611c38565b505050565b61086b3382611ca6565b6108875760405162461bcd60e51b815260040161041d9061349e565b61085c838383611d9d565b600061089d83610a4d565b82106108ff5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161041d565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61085c83838360405180602001604052806000815250610cd1565b600061094e60085490565b82106109b15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161041d565b600882815481106109c4576109c461382a565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806103c85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161041d565b60006001600160a01b038216610ab85760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161041d565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b03163314610afe5760405162461bcd60e51b815260040161041d90613469565b610b086000611f48565b565b600d6020526000908152604090208054600182018054919291610b2c9061373a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b589061373a565b8015610ba55780601f10610b7a57610100808354040283529160200191610ba5565b820191906000526020600020905b815481529060010190602001808311610b8857829003601f168201915b5050506002909301549192505060ff8082169161010090041684565b600f8260118110610bd157600080fd5b018160088110610be057600080fd5b602081049091015460ff601f9092166101000a9004169150829050565b6060600180546106339061373a565b6001600160a01b038216331415610c655760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161041d565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cdb3383611ca6565b610cf75760405162461bcd60e51b815260040161041d9061349e565b610d0384848484611f9a565b50505050565b6002600a541415610d5c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161041d565b6002600a5560018210801590610d745750611f408211155b610dc05760405162461bcd60e51b815260206004820152601a60248201527f4c4f4f545f544f4b454e5f49445f4f55545f4f465f52414e4745000000000000604482015260640161041d565b60018160ff1610158015610dd8575060088160ff1611155b610e205760405162461bcd60e51b8152602060048201526019602482015278494e56454e544f52595f49445f4f55545f4f465f52414e474560381b604482015260640161041d565b80610e2a8161371d565b600c546040516331a9108f60e11b8152600481018690529193506001600160a01b03169150636352211e9060240160206040518083038186803b158015610e7057600080fd5b505afa158015610e84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea89190612d3e565b6001600160a01b0316336001600160a01b031614610efc5760405162461bcd60e51b8152602060048201526011602482015270135554d517d3d5d397d513d2d15397d251607a1b604482015260640161041d565b6000828152604b6020908152604080832060ff80861685529252909120541615610f605760405162461bcd60e51b815260206004820152601560248201527411d350539057d053149150511657d0d31052535151605a1b604482015260640161041d565b610f6d828260003361172f565b50506001600a55565b6000818152600d6020526040902054606090158015610fa757506000828152600d602052604090206002015460ff16155b8015610fca57506000828152600d6020526040902060020154610100900460ff16155b801561108557506000828152600d6020526040902060010180546110859190610ff29061373a565b80601f016020809104026020016040519081016040528092919081815260200182805461101e9061373a565b801561106b5780601f106110405761010080835404028352916020019161106b565b820191906000526020600020905b81548152906001019060200180831161104e57829003601f168201915b505050505060405180602001604052806000815250611fcd565b156110c85760405162461bcd60e51b81526020600482015260136024820152721513d2d15397d25117d393d517d35253951151606a1b604482015260640161041d565b6110d0612c43565b60006110db84612026565b6040516020016110eb9190613235565b60408051601f19818403018152610120830190915260fc8083529092506138ba602083013982526000848152600d602052604090206002015460299060ff166011811061113a5761113a61382a565b60020201600101805461114c9061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546111789061373a565b80156111c55780601f1061119a576101008083540402835291602001916111c5565b820191906000526020600020905b8154815290600101906020018083116111a857829003601f168201915b5050505050826001600b81106111dd576111dd61382a565b60200201819052506040518060600160405280602c81526020016139e6602c91396040808401919091526000858152600d602052206002015460299060ff166011811061122c5761122c61382a565b60020201805461123b9061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546112679061373a565b80156112b45780601f10611289576101008083540402835291602001916112b4565b820191906000526020600020905b81548152906001019060200180831161129757829003601f168201915b5050505050826003600b81106112cc576112cc61382a565b60200201819052506040518060600160405280603881526020016138826038913960808301526000848152600d6020526040902060020154602190610100900460ff166008811061131f5761131f61382a565b01805461132b9061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546113579061373a565b80156113a45780601f10611379576101008083540402835291602001916113a4565b820191906000526020600020905b81548152906001019060200180831161138757829003601f168201915b5050505050826005600b81106113bc576113bc61382a565b60200201819052506040518060600160405280603f8152602001613a52603f913960c08301526000848152600d602052604090205461140e5760408051602081019091526000815260e083015261144c565b6000848152600d602052604090205461142690612026565b6040516020016114369190613395565b60408051808303601f1901815291905260e08301525b6040518060600160405280603081526020016139b6603091396101008301526000848152600d6020526040902060010180546114879061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546114b39061373a565b80156115005780601f106114d557610100808354040283529160200191611500565b820191906000526020600020905b8154815290600101906020018083116114e357829003601f168201915b5050505050826009600b81106115185761151861382a565b60200201819052506040518060400160405280600d81526020016c1e17ba32bc3a1f1e17b9bb339f60991b81525082600a600b81106115595761155961382a565b6020908102919091019190915282518382015160408086015160608701516080880151925160009661158e9695949101613107565b60408051808303601f190181529082905260a085015160c086015160e08701516101008801516101208901516101408a01519597506115d296889690602001613172565b60405160208183030381529060405290506000611617836115f284612124565b60405160200161160392919061326b565b604051602081830303815290604052612124565b90508060405160200161162a9190613350565b60408051601f198184030181529190529695505050505050565b600b546001600160a01b0316331461166e5760405162461bcd60e51b815260040161041d90613469565b6001600160a01b0381166116d35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b6116dc81611f48565b50565b60006001600160e01b031982166380ac58cd60e01b148061171057506001600160e01b03198216635b5e139f60e01b145b806103c857506301ffc9a760e01b6001600160e01b03198316146103c8565b60608415611b425760ff84166117c757600c54604051639e41b73f60e01b8152600481018790526001600160a01b0390911690639e41b73f906024015b60006040518083038186803b15801561178457600080fd5b505afa158015611798573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117c09190810190612f1d565b90506119c4565b8360ff166001141561180457600c546040516377b403ad60e11b8152600481018790526001600160a01b039091169063ef68075a9060240161176c565b8360ff166002141561184157600c54604051639720c96960e01b8152600481018790526001600160a01b0390911690639720c9699060240161176c565b8360ff166003141561187e57600c54604051639bdc1b6960e01b8152600481018790526001600160a01b0390911690639bdc1b699060240161176c565b8360ff16600414156118bb57600c54604051630e99990d60e01b8152600481018790526001600160a01b0390911690630e99990d9060240161176c565b8360ff16600514156118f857600c54604051636a3f934f60e11b8152600481018790526001600160a01b039091169063d47f269e9060240161176c565b8360ff166006141561193557600c54604051630ce4135560e31b8152600481018790526001600160a01b03909116906367209aa89060240161176c565b8360ff16600714156119c457600c5460405163c08a5dd560e01b8152600481018790526001600160a01b039091169063c08a5dd59060240160006040518083038186803b15801561198557600080fd5b505afa158015611999573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119c19190810190612f1d565b90505b6119e86040518060400160405280600281526020016137b360f11b8152508261228a565b611a2d5760405162461bcd60e51b81526020600482015260166024820152754d5553545f42455f415f47454e455349535f4954454d60501b604482015260640161041d565b6000611a608260408051808201825260008082526020918201528151808301909252825182529182019181019190915290565b6040805180820182526003815262202b3160e81b602080830191825283518085018552600080825290820152835180850190945282518452830152919250611aaa905b839061234d565b6040805180820182526003815262037b3160ed1b602080830191825283518085018552600080825290820152835180850190945282518452830152919350909150611af490611aa3565b50604080518082018252600080825260209182015281518083019092528251825280830190820152611b3990611b3490611b2f90859061234d565b612373565b6123dc565b94505050611b99565b60218460ff1660088110611b5857611b5861382a565b0160298460ff1660118110611b6f57611b6f61382a565b60020201600001604051602001611b87929190613204565b60405160208183030381529060405290505b6000858152604b6020908152604080832060ff881684529091528120805460ff19166001179055611bc86124be565b6000818152600d602090815260409091208881558451929350611bf392600190910191850190612c6b565b506000818152600d60205260409020600201805460ff8781166101000261ffff1990921690871617179055611c2883826124e0565b611c306124fe565b505050505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611c6d826109d6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611d1f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161041d565b6000611d2a836109d6565b9050806001600160a01b0316846001600160a01b03161480611d655750836001600160a01b0316611d5a846106b6565b6001600160a01b0316145b80611d9557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611db0826109d6565b6001600160a01b031614611e185760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161041d565b6001600160a01b038216611e7a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161041d565b611e85838383612535565b611e90600082611c38565b6001600160a01b0383166000908152600360205260408120805460019290611eb99084906136da565b90915550506001600160a01b0382166000908152600360205260408120805460019290611ee790849061357c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611fa5848484611d9d565b611fb1848484846125ed565b610d035760405162461bcd60e51b815260040161041d90613417565b600081604051602001611fe091906130eb565b604051602081830303815290604052805190602001208360405160200161200791906130eb565b6040516020818303038152906040528051906020012014905092915050565b60608161204a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612074578061205e81613775565b915061206d9050600a836135bc565b915061204e565b60008167ffffffffffffffff81111561208f5761208f613840565b6040519080825280601f01601f1916602001820160405280156120b9576020820181803683370190505b5090505b8415611d95576120ce6001836136da565b91506120db600a866137d4565b6120e690603061357c565b60f81b8183815181106120fb576120fb61382a565b60200101906001600160f81b031916908160001a90535061211d600a866135bc565b94506120bd565b805160609080612144575050604080516020810190915260008152919050565b6000600361215383600261357c565b61215d91906135bc565b6121689060046136bb565b9050600061217782602061357c565b67ffffffffffffffff81111561218f5761218f613840565b6040519080825280601f01601f1916602001820160405280156121b9576020820181803683370190505b5090506000604051806060016040528060408152602001613a12604091399050600181016020830160005b86811015612245576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b8352600490920191016121e4565b50600386066001811461225f57600281146122705761227c565b613d3d60f01b60011983015261227c565b603d60f81b6000198301525b505050918152949350505050565b6000828282805b8351835161229f91906136da565b81101561234357600160005b855181101561231f578581815181106122c6576122c661382a565b01602001516001600160f81b031916856122e0838661357c565b815181106122f0576122f061382a565b01602001516001600160f81b0319161461230d576000915061231f565b8061231781613775565b9150506122ab565b508015612330576001925050612343565b508061233b81613775565b915050612291565b5095945050505050565b604080518082019091526000808252602082015261236c8383836126fa565b5092915050565b60606000826000015167ffffffffffffffff81111561239457612394613840565b6040519080825280601f01601f1916602001820160405280156123be576020820181803683370190505b509050600060208201905061236c81856020015186600001516127a6565b600060015b60118160ff16116124b55761249860298260ff16601181106124055761240561382a565b6002020180546124149061373a565b80601f01602080910402602001604051908101604052809291908181526020018280546124409061373a565b801561248d5780601f106124625761010080835404028352916020019161248d565b820191906000526020600020905b81548152906001019060200180831161247057829003601f168201915b505050505084611fcd565b156124a35792915050565b806124ad816137b4565b9150506123e1565b50600092915050565b600e546000906124d59063ffffffff166001613594565b63ffffffff16905090565b6124fa828260405180602001604052806000815250612817565b5050565b600e805463ffffffff1690600061251483613790565b91906101000a81548163ffffffff021916908363ffffffff16021790555050565b6001600160a01b0383166125905761258b81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6125b3565b816001600160a01b0316836001600160a01b0316146125b3576125b3838261284a565b6001600160a01b0382166125ca5761085c816128e7565b826001600160a01b0316826001600160a01b03161461085c5761085c8282612996565b60006001600160a01b0384163b156126ef57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906126319033908990889088906004016133c7565b602060405180830381600087803b15801561264b57600080fd5b505af192505050801561267b575060408051601f3d908101601f1916820190925261267891810190612f00565b60015b6126d5573d8080156126a9576040519150601f19603f3d011682016040523d82523d6000602084013e6126ae565b606091505b5080516126cd5760405162461bcd60e51b815260040161041d90613417565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d95565b506001949350505050565b6040805180820190915260008082526020820152600061272c85600001518660200151866000015187602001516129da565b60208087018051918601919091525190915061274890826136da565b83528451602086015161275b919061357c565b81141561276b576000855261279d565b83518351612779919061357c565b855186906127889083906136da565b9052508351612797908261357c565b60208601525b50909392505050565b602081106127de57815183526127bd60208461357c565b92506127ca60208361357c565b91506127d76020826136da565b90506127a6565b600060016127ed8360206136da565b6127f990610100613613565b61280391906136da565b925184518416931916929092179092525050565b6128218383612af5565b61282e60008484846125ed565b61085c5760405162461bcd60e51b815260040161041d90613417565b6000600161285784610a4d565b61286191906136da565b6000838152600760205260409020549091508082146128b4576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906128f9906001906136da565b600083815260096020526040812054600880549394509092849081106129215761292161382a565b9060005260206000200154905080600883815481106129425761294261382a565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061297a5761297a613814565b6001900381819060005260206000200160009055905550505050565b60006129a183610a4d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60008381868511612ae05760208511612a8e57600060016129fc8760206136da565b612a079060086136bb565b612a12906002613613565b612a1c91906136da565b8551901991508116600087612a318b8b61357c565b612a3b91906136da565b855190915083165b828114612a8057818610612a6857612a5b8b8b61357c565b9650505050505050611d95565b85612a7281613775565b965050838651169050612a43565b859650505050505050611d95565b508383206000905b612aa086896136da565b8211612ade5785832081811415612abd5783945050505050611d95565b612ac860018561357c565b9350508180612ad690613775565b925050612a96565b505b612aea878761357c565b979650505050505050565b6001600160a01b038216612b4b5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161041d565b6000818152600260205260409020546001600160a01b031615612bb05760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161041d565b612bbc60008383612535565b6001600160a01b0382166000908152600360205260408120805460019290612be590849061357c565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b604051806101600160405280600b905b6060815260200190600190039081612c535790505090565b828054612c779061373a565b90600052602060002090601f016020900481019282612c995760008555612cdf565b82601f10612cb257805160ff1916838001178555612cdf565b82800160010185558215612cdf579182015b82811115612cdf578251825591602001919060010190612cc4565b50612ceb929150612cef565b5090565b5b80821115612ceb5760008155600101612cf0565b803560ff81168114612d1557600080fd5b919050565b600060208284031215612d2c57600080fd5b8135612d3781613856565b9392505050565b600060208284031215612d5057600080fd5b8151612d3781613856565b60008060408385031215612d6e57600080fd5b8235612d7981613856565b91506020830135612d8981613856565b809150509250929050565b600080600060608486031215612da957600080fd5b8335612db481613856565b92506020840135612dc481613856565b929592945050506040919091013590565b60008060008060808587031215612deb57600080fd5b8435612df681613856565b93506020850135612e0681613856565b925060408501359150606085013567ffffffffffffffff811115612e2957600080fd5b8501601f81018713612e3a57600080fd5b8035612e4d612e4882613554565b613523565b818152886020838501011115612e6257600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b60008060408385031215612e9757600080fd5b8235612ea281613856565b915060208301358015158114612d8957600080fd5b60008060408385031215612eca57600080fd5b8235612ed581613856565b946020939093013593505050565b600060208284031215612ef557600080fd5b8135612d378161386b565b600060208284031215612f1257600080fd5b8151612d378161386b565b600060208284031215612f2f57600080fd5b815167ffffffffffffffff811115612f4657600080fd5b8201601f81018413612f5757600080fd5b8051612f65612e4882613554565b818152856020838501011115612f7a57600080fd5b612f8b8260208301602086016136f1565b95945050505050565b600060208284031215612fa657600080fd5b5035919050565b60008060408385031215612fc057600080fd5b50508035926020909101359150565b60008060408385031215612fe257600080fd5b82359150612ff260208401612d04565b90509250929050565b6000806040838503121561300e57600080fd5b61301783612d04565b9150612ff260208401612d04565b6000815180845261303d8160208601602086016136f1565b601f01601f19169290920160200192915050565b8054600090600181811c908083168061306b57607f831692505b602080841082141561308d57634e487b7160e01b600052602260045260246000fd5b8180156130a157600181146130b2576130df565b60ff198616895284890196506130df565b60008881526020902060005b868110156130d75781548b8201529085019083016130be565b505084890196505b50505050505092915050565b600082516130fd8184602087016136f1565b9190910192915050565b60008651613119818460208b016136f1565b86519083019061312d818360208b016136f1565b8651910190613140818360208a016136f1565b85519101906131538183602089016136f1565b84519101906131668183602088016136f1565b01979650505050505050565b6000885160206131858285838e016136f1565b8951918401916131988184848e016136f1565b89519201916131aa8184848d016136f1565b88519201916131bc8184848c016136f1565b87519201916131ce8184848b016136f1565b86519201916131e08184848a016136f1565b85519201916131f281848489016136f1565b919091019a9950505050505050505050565b6402637b9ba160dd1b8152600061321e6005830185613051565b6301037b3160e51b8152612f8b6004820185613051565b6d47656e65736973204d616e61202360901b81526000825161325e81600e8501602087016136f1565b91909101600e0192915050565b693d913730b6b2911d101160b11b8152825160009061329181600a8501602088016136f1565b7f222c20226465736372697074696f6e223a202254686973206974656d20697320600a918401918201527f47656e65736973204d616e61207573656420696e204c6f6f742028666f722041602a8201527f6476656e74757265727329222c2022696d616765223a2022646174613a696d61604a8201527119d94bdcdd99cade1b5b0ed8985cd94d8d0b60721b606a820152835161333581607c8401602088016136f1565b61227d60f01b607c9290910191820152607e01949350505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161338881601d8501602087016136f1565b91909101601d0192915050565b694c6f6f7420426167202360b01b8152600082516133ba81600a8501602087016136f1565b91909101600a0192915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906133fa90830184613025565b9695505050505050565b602081526000612d376020830184613025565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b8481526080602082015260006135086080830186613025565b60ff9485166040840152929093166060909101529392505050565b604051601f8201601f1916810167ffffffffffffffff8111828210171561354c5761354c613840565b604052919050565b600067ffffffffffffffff82111561356e5761356e613840565b50601f01601f191660200190565b6000821982111561358f5761358f6137e8565b500190565b600063ffffffff8083168185168083038211156135b3576135b36137e8565b01949350505050565b6000826135cb576135cb6137fe565b500490565b600181815b8085111561360b5781600019048211156135f1576135f16137e8565b808516156135fe57918102915b93841c93908002906135d5565b509250929050565b6000612d378383600082613629575060016103c8565b81613636575060006103c8565b816001811461364c576002811461365657613672565b60019150506103c8565b60ff841115613667576136676137e8565b50506001821b6103c8565b5060208310610133831016604e8410600b8410161715613695575081810a6103c8565b61369f83836135d0565b80600019048211156136b3576136b36137e8565b029392505050565b60008160001904831182151516156136d5576136d56137e8565b500290565b6000828210156136ec576136ec6137e8565b500390565b60005b8381101561370c5781810151838201526020016136f4565b83811115610d035750506000910152565b600060ff821680613730576137306137e8565b6000190192915050565b600181811c9082168061374e57607f821691505b6020821081141561376f57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613789576137896137e8565b5060010190565b600063ffffffff808316818114156137aa576137aa6137e8565b6001019392505050565b600060ff821660ff8114156137cb576137cb6137e8565b60010192915050565b6000826137e3576137e36137fe565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146116dc57600080fd5b6001600160e01b0319811681146116dc57600080fdfe3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223e45717569706d656e7420547970653a203c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b2077696468743a2033353070787d202e6974616c6963207b666f6e742d7374796c653a206974616c69637d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d223c2f746578743e3c7465787420783d2231302220793d223334302220636c6173733d2262617365206974616c6963223e22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e4f726465723a204142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d223332302220636c6173733d2262617365206974616c6963223e44697374696c6c65642066726f6d20a26469706673582212202cb5b4c911f3b88879d57cc66a730d04c085dc73370e2b226962308b0a628a2664736f6c63430008070033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.