Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
5
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ByteHelix
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./abstract/ERC1175.sol"; contract ByteHelix is ERC1175 { // 60% public sale // 10% uniswap v2 // 20% kol or vote? // 10% team using Strings for uint256; uint256 initTotal = 1_000_000_000; uint256 private maxUint256 = type(uint256).max; uint256 public MAX_QUANTITY =10; uint256 public PER_BALANCE = 0.1 ether; uint256 public PER_REWARD = 1_000_000 ether; mapping(address => uint256) public contributors; string baseURI; address public router = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); struct SocialLink { string x; string github; string website; } SocialLink public socialLink; constructor() ERC1175("ByteHelix 1175", "BHX", 18, initTotal, "ipfs://QmcWpx8eKB6T3KUAEJZrwAFq5th2cYA85YhNDSX4UtNgjr/") { _balances[msg.sender] = initTotal * 10 ** 18 * 4/10; _balances[address(this)] = initTotal * 10 ** 18 * 6/10; whitelist[address(this)] = true; whitelist[msg.sender] = true; whitelist[router] = true; _allowances[msg.sender][router] = maxUint256; baseURI = "ipfs://QmcWpx8eKB6T3KUAEJZrwAFq5th2cYA85YhNDSX4UtNgjr/"; socialLink.x ="https://twitter.com/ERC1175"; socialLink.website ="https://www.bytehelix.org"; socialLink.github ="https://github.com/bytehelix"; } function setBaseURI(string memory uri_) public onlyOwner { baseURI = uri_; } function setSocialLink(string memory x,string memory github,string memory website) public onlyOwner{ socialLink.x = x; socialLink.github = github; socialLink.website = website; } function uri(uint256 id) public view override returns (string memory) { return bytes(baseURI).length > 0 ? string.concat(baseURI, id.toString(), ".json") : ""; } function buy(uint256 quantity) public payable { // The Lucky One to Discover a New World require(quantity <= MAX_QUANTITY,"quantify overflow"); require(contributors[msg.sender] + quantity <= MAX_QUANTITY,"max quantify overflow"); uint256 cost = quantity * PER_BALANCE; require(msg.value >= cost,"balance too small"); if (msg.value >cost) { uint256 refund = msg.value -cost; payable(msg.sender).transfer(refund); } contributors[msg.sender] += quantity; uint256 reward = PER_REWARD * quantity; this.transfer(msg.sender, reward); } function withdraw(address token_,uint256 amount) public onlyOwner { if (token_ == address(0)) { require(address(this).balance >0, "Error: insufficient balance"); uint256 fee =address(this).balance; payable(msg.sender).transfer(fee); }else{ uint256 fee = IERC20(token_).balanceOf(address(this)); require(amount <= fee, "Error: owerflow fee"); IERC20(token_).transfer(msg.sender, amount); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, 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) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // 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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../lib/NumberCalculator.sol"; abstract contract ERC1175 is Context, IERC20, IERC20Metadata, ERC165, IERC1155, IERC1155MetadataURI,Ownable,ReentrancyGuard { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; using Address for address; using NumberCalculator for uint256; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _erc1155Balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; string private _uri; uint256 public totalIds; bytes emptyData; /// @dev Addresses whitelisted from minting / burning for gas savings (pairs, routers, etc) mapping(address => bool) public whitelist; constructor(string memory name_, string memory symbol_,uint8 decimals_,uint256 totalUnitSupply_,string memory uri_) { _name = name_; _symbol = symbol_; _setURI(uri_); _decimals = decimals_; _totalSupply = totalUnitSupply_ * (10 ** decimals_); totalIds = totalUnitSupply_.calculateNumberLength(); } function setWhitelist(address target, bool state) public onlyOwner { whitelist[target] = state; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 unit = _getUnit(); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); if (!whitelist[from]) { uint256 beforeTokenUnit = fromBalance / unit; uint8 beforeTokenId2AmountLength = beforeTokenUnit.calculateNumberLength(); uint256 tokenUnit = _balances[from] / unit; uint8[] memory tokenId2Amount = tokenUnit.splitNumberWithPadding(beforeTokenId2AmountLength); for (uint256 i = 0; i < tokenId2Amount.length; i++) { uint256 tokenId = i+1; uint256 nowAmount = tokenId2Amount[i]; uint256 beforeAmount = _erc1155Balances[tokenId][from]; if (nowAmount > beforeAmount) { _mint(from,tokenId,nowAmount-beforeAmount,emptyData); }else if (nowAmount < beforeAmount){ _burn(from,tokenId,beforeAmount-nowAmount); } } } if (!whitelist[to]) { uint256 tokenUnit= _balances[to] / unit; uint8[] memory tokenId2Amount = tokenUnit.splitNumber(); for (uint256 i = 0; i < tokenId2Amount.length; i++) { uint256 tokenId = i+1; uint256 nowAmount = tokenId2Amount[i]; uint256 beforeAmount = _erc1155Balances[tokenId][to]; if (nowAmount > beforeAmount) { _mint(to,tokenId,nowAmount-beforeAmount,emptyData); }else if (nowAmount < beforeAmount){ _burn(to,tokenId,beforeAmount-nowAmount); } } } } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens 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 amount) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } function uri(uint256) public view virtual override returns (string memory) { return _uri; } function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _erc1155Balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _erc1155Balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { if (!whitelist[from]) { _erc1155Balances[id][from] = fromBalance - amount; } } if (!whitelist[to]){ _erc1155Balances[id][to] += amount; } emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); uint256 fromERC20Balance = _balances[from]; uint256 erc20TransferBalance = ( _getUnitByTokenId(id) * amount); require(fromERC20Balance >= erc20TransferBalance); _balances[from] = fromERC20Balance - erc20TransferBalance; _balances[to] += erc20TransferBalance; emit Transfer(from, to, erc20TransferBalance); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromERC20Balance = _balances[from]; uint256 erc20TransferBalance; for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _erc1155Balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); uint256 unit = _getUnitByTokenId(id); erc20TransferBalance += (unit * amount); unchecked { if (!whitelist[from]) { _erc1155Balances[id][from] = fromBalance - amount; } } if (!whitelist[to]) { _erc1155Balances[id][to] += amount; } } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); require(fromERC20Balance >= erc20TransferBalance); _balances[from] = fromERC20Balance - erc20TransferBalance; _balances[to] += erc20TransferBalance; emit Transfer(from, to, erc20TransferBalance); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _erc1155Balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn(address from, uint256 id, uint256 amount) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _erc1155Balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _erc1155Balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } function _getUnit() internal view returns (uint256) { return 10 ** _decimals; } function _getUnitByTokenId(uint256 tokenId) internal view returns (uint256) { require(tokenId>0 && tokenId <= totalIds,"tokenId error"); return (10 ** _decimals) * (10 ** (tokenId-1)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library NumberCalculator { function calculateNumberLength(uint256 number) public pure returns (uint8) { uint8 length = 0; while (number > 0) { length++; number /= 10; } return length; } function splitNumber(uint256 number) public pure returns (uint8[] memory) { uint256 temp = number; uint8 length = calculateNumberLength(number); uint8[] memory digits = new uint8[](length); for (uint8 i = 0; i < length; i++) { digits[i] = uint8(temp % 10); temp /= 10; } return digits; } function splitNumberWithPadding(uint256 number, uint8 arrayLength) public pure returns (uint8[] memory) { uint256 temp = number; uint8 length = calculateNumberLength(number); require (arrayLength >= length,"arrayLength lt numberLength"); uint8[] memory digits = new uint8[](arrayLength); for (uint8 i = 0; i < length; i++) { digits[i] = uint8(temp % 10); temp /= 10; } if (arrayLength > length){ for (uint8 i = length; i < arrayLength; i++) { digits[i] = 0; } } return digits; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": { "contracts/lib/NumberCalculator.sol": { "NumberCalculator": "0x856b1ab9774630a24201582db969bea4392ec9b2" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"MAX_QUANTITY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PER_BALANCE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PER_REWARD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"contributors","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"x","type":"string"},{"internalType":"string","name":"github","type":"string"},{"internalType":"string","name":"website","type":"string"}],"name":"setSocialLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"socialLink","outputs":[{"internalType":"string","name":"x","type":"string"},{"internalType":"string","name":"github","type":"string"},{"internalType":"string","name":"website","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052633b9aca00600e55600019600f55600a60105567016345785d8a000060115569d3c21bcecceda1000000601255601580546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d1790553480156200006457600080fd5b506040518060400160405280600e81526020016d4279746548656c6978203131373560901b8152506040518060400160405280600381526020016208490b60eb1b8152506012600e5460405180606001604052806036815260200162003c0860369139620000d23362000395565b600180556005620000e486826200049c565b506006620000f385826200049c565b50620000ff81620003e5565b6007805460ff191660ff85161790556200011b83600a6200067d565b62000127908362000695565b6004908155604051630e9a76d360e21b815290810183905273856b1ab9774630a24201582db969bea4392ec9b290633a69db4c90602401602060405180830381865af41580156200017c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001a29190620006af565b60ff16600b555050600e54600a9350620001c892509050670de0b6b3a764000062000695565b620001d590600462000695565b620001e19190620006d4565b33600090815260026020526040902055600e54600a906200020b90670de0b6b3a764000062000695565b6200021890600662000695565b620002249190620006d4565b30600090815260026020908152604080832093909355600d81528282208054600160ff199182168117909255338085528585208054831684179055601580546001600160a01b0390811687528787208054909416909417909255600f5490855260038452858520915490921684528252918390209190915581516060810190925260368083529062003c0890830139601490620002c290826200049c565b5060408051808201909152601b81527f68747470733a2f2f747769747465722e636f6d2f45524331313735000000000060208201526016906200030690826200049c565b5060408051808201909152601981527f68747470733a2f2f7777772e6279746568656c69782e6f72670000000000000060208201526018906200034a90826200049c565b5060408051808201909152601c81527f68747470733a2f2f6769746875622e636f6d2f6279746568656c69780000000060208201526017906200038e90826200049c565b50620006f7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600a620003f382826200049c565b5050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200042257607f821691505b6020821081036200044357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200049757600081815260208120601f850160051c81016020861015620004725750805b601f850160051c820191505b8181101562000493578281556001016200047e565b5050505b505050565b81516001600160401b03811115620004b857620004b8620003f7565b620004d081620004c984546200040d565b8462000449565b602080601f831160018114620005085760008415620004ef5750858301515b600019600386901b1c1916600185901b17855562000493565b600085815260208120601f198616915b82811015620005395788860151825594840194600190910190840162000518565b5085821015620005585787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620005bf578160001904821115620005a357620005a362000568565b80851615620005b157918102915b93841c939080029062000583565b509250929050565b600082620005d85750600162000677565b81620005e75750600062000677565b81600181146200060057600281146200060b576200062b565b600191505062000677565b60ff8411156200061f576200061f62000568565b50506001821b62000677565b5060208310610133831016604e8410600b841016171562000650575081810a62000677565b6200065c83836200057e565b806000190482111562000673576200067362000568565b0290505b92915050565b60006200068e60ff841683620005c7565b9392505050565b808202811582820484141762000677576200067762000568565b600060208284031215620006c257600080fd5b815160ff811681146200068e57600080fd5b600082620006f257634e487b7160e01b600052601260045260246000fd5b500490565b61350180620007076000396000f3fe6080604052600436106102035760003560e01c8063715018a611610118578063ca8b1363116100a0578063e985e9c51161006f578063e985e9c5146105f1578063f242432a1461063a578063f2fde38b1461065a578063f3fef3a31461067a578063f887ea401461069a57600080fd5b8063ca8b136314610588578063d96a094a146105a8578063dd62ed3e146105bb578063e41ee46a146105db57600080fd5b8063a22cb465116100e7578063a22cb465146104fc578063a25159811461051c578063a457c2d714610532578063a9059cbb14610552578063bfed683c1461057257600080fd5b8063715018a6146104705780638da5cb5b1461048557806395d89b41146104b75780639b19251a146104cc57600080fd5b806323b872dd1161019b578063395093511161016a57806339509351146103ad5780634e1273f4146103cd57806353d6fd59146103fa57806355f804b31461041a57806370a082311461043a57600080fd5b806323b872dd146103335780632eb2c2d614610353578063313ce56714610375578063390a5ba51461039757600080fd5b8063095ea7b3116101d7578063095ea7b3146102b15780630e89341c146102d157806318160ddd146102f15780631f6d49421461030657600080fd5b8062fdd58e1461020857806301ffc9a71461023b578063039cf7861461026b57806306fdde031461028f575b600080fd5b34801561021457600080fd5b5061022861022336600461277e565b6106ba565b6040519081526020015b60405180910390f35b34801561024757600080fd5b5061025b6102563660046127be565b610755565b6040519015158152602001610232565b34801561027757600080fd5b506102806107a5565b60405161023293929190612832565b34801561029b57600080fd5b506102a4610953565b6040516102329190612875565b3480156102bd57600080fd5b5061025b6102cc36600461277e565b6109e5565b3480156102dd57600080fd5b506102a46102ec366004612888565b6109fd565b3480156102fd57600080fd5b50600454610228565b34801561031257600080fd5b506102286103213660046128a1565b60136020526000908152604090205481565b34801561033f57600080fd5b5061025b61034e3660046128bc565b610a5b565b34801561035f57600080fd5b5061037361036e366004612a41565b610a7f565b005b34801561038157600080fd5b5060075460405160ff9091168152602001610232565b3480156103a357600080fd5b50610228600b5481565b3480156103b957600080fd5b5061025b6103c836600461277e565b610acb565b3480156103d957600080fd5b506103ed6103e8366004612aea565b610aed565b6040516102329190612bef565b34801561040657600080fd5b50610373610415366004612c10565b610c16565b34801561042657600080fd5b50610373610435366004612c47565b610c49565b34801561044657600080fd5b506102286104553660046128a1565b6001600160a01b031660009081526002602052604090205490565b34801561047c57600080fd5b50610373610c61565b34801561049157600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610232565b3480156104c357600080fd5b506102a4610c75565b3480156104d857600080fd5b5061025b6104e73660046128a1565b600d6020526000908152604090205460ff1681565b34801561050857600080fd5b50610373610517366004612c10565b610c84565b34801561052857600080fd5b5061022860115481565b34801561053e57600080fd5b5061025b61054d36600461277e565b610c8f565b34801561055e57600080fd5b5061025b61056d36600461277e565b610d0a565b34801561057e57600080fd5b5061022860125481565b34801561059457600080fd5b506103736105a3366004612c83565b610d18565b6103736105b6366004612888565b610d4c565b3480156105c757600080fd5b506102286105d6366004612d0a565b610f34565b3480156105e757600080fd5b5061022860105481565b3480156105fd57600080fd5b5061025b61060c366004612d0a565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b34801561064657600080fd5b50610373610655366004612d3d565b610f5f565b34801561066657600080fd5b506103736106753660046128a1565b610fa4565b34801561068657600080fd5b5061037361069536600461277e565b61101d565b3480156106a657600080fd5b5060155461049f906001600160a01b031681565b60006001600160a01b03831661072a5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526008602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061078657506001600160e01b031982166303a24d0760e21b145b8061074f57506301ffc9a760e01b6001600160e01b031983161461074f565b6016805481906107b490612da1565b80601f01602080910402602001604051908101604052809291908181526020018280546107e090612da1565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b50505050509080600101805461084290612da1565b80601f016020809104026020016040519081016040528092919081815260200182805461086e90612da1565b80156108bb5780601f10610890576101008083540402835291602001916108bb565b820191906000526020600020905b81548152906001019060200180831161089e57829003601f168201915b5050505050908060020180546108d090612da1565b80601f01602080910402602001604051908101604052809291908181526020018280546108fc90612da1565b80156109495780601f1061091e57610100808354040283529160200191610949565b820191906000526020600020905b81548152906001019060200180831161092c57829003601f168201915b5050505050905083565b60606005805461096290612da1565b80601f016020809104026020016040519081016040528092919081815260200182805461098e90612da1565b80156109db5780601f106109b0576101008083540402835291602001916109db565b820191906000526020600020905b8154815290600101906020018083116109be57829003601f168201915b5050505050905090565b6000336109f3818585611198565b5060019392505050565b6060600060148054610a0e90612da1565b905011610a2a576040518060200160405280600081525061074f565b6014610a35836112bd565b604051602001610a46929190612ddb565b60405160208183030381529060405292915050565b600033610a6985828561134f565b610a748585856113c3565b506001949350505050565b6001600160a01b038516331480610a9b5750610a9b853361060c565b610ab75760405162461bcd60e51b815260040161072190612e72565b610ac485858585856119a3565b5050505050565b6000336109f3818585610ade8383610f34565b610ae89190612ed6565b611198565b60608151835114610b525760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610721565b600083516001600160401b03811115610b6d57610b6d6128f8565b604051908082528060200260200182016040528015610b96578160200160208202803683370190505b50905060005b8451811015610c0e57610be1858281518110610bba57610bba612ee9565b6020026020010151858381518110610bd457610bd4612ee9565b60200260200101516106ba565b828281518110610bf357610bf3612ee9565b6020908102919091010152610c0781612eff565b9050610b9c565b509392505050565b610c1e611cfc565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b610c51611cfc565b6014610c5d8282612f5e565b5050565b610c69611cfc565b610c736000611d56565b565b60606006805461096290612da1565b610c5d338383611da6565b60003381610c9d8286610f34565b905083811015610cfd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610721565b610a748286868403611198565b6000336109f38185856113c3565b610d20611cfc565b6016610d2c8482612f5e565b506017610d398382612f5e565b506018610d468282612f5e565b50505050565b601054811115610d925760405162461bcd60e51b81526020600482015260116024820152707175616e74696679206f766572666c6f7760781b6044820152606401610721565b60105433600090815260136020526040902054610db0908390612ed6565b1115610df65760405162461bcd60e51b81526020600482015260156024820152746d6178207175616e74696679206f766572666c6f7760581b6044820152606401610721565b600060115482610e06919061301d565b905080341015610e4c5760405162461bcd60e51b815260206004820152601160248201527018985b185b98d9481d1bdbc81cdb585b1b607a1b6044820152606401610721565b80341115610e93576000610e608234613034565b604051909150339082156108fc029083906000818181858888f19350505050158015610e90573d6000803e3d6000fd5b50505b3360009081526013602052604081208054849290610eb2908490612ed6565b9091555050601254600090610ec890849061301d565b60405163a9059cbb60e01b815233600482015260248101829052909150309063a9059cbb906044015b6020604051808303816000875af1158015610f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d469190613047565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6001600160a01b038516331480610f7b5750610f7b853361060c565b610f975760405162461bcd60e51b815260040161072190612e72565b610ac48585858585611e7e565b610fac611cfc565b6001600160a01b0381166110115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610721565b61101a81611d56565b50565b611025611cfc565b6001600160a01b0382166110b257600047116110835760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a20696e73756666696369656e742062616c616e636500000000006044820152606401610721565b6040514790339082156108fc029083906000818181858888f19350505050158015610d46573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156110f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111d9190613064565b9050808211156111655760405162461bcd60e51b81526020600482015260136024820152724572726f723a206f776572666c6f772066656560681b6044820152606401610721565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb90604401610ef1565b6001600160a01b0383166111fa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610721565b6001600160a01b03821661125b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610721565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b606060006112ca836120ee565b60010190506000816001600160401b038111156112e9576112e96128f8565b6040519080825280601f01601f191660200182016040528015611313576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461131d57509392505050565b600061135b8484610f34565b90506000198114610d4657818110156113b65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610721565b610d468484848403611198565b6001600160a01b0383166114275760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610721565b6001600160a01b0382166114895760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610721565b60006114936121cb565b6001600160a01b0385166000908152600260205260409020549091508281101561150e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610721565b6001600160a01b0380861660008181526002602052604080822087860390559287168082529083902080548701905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061156e9087815260200190565b60405180910390a36001600160a01b0385166000908152600d602052604090205460ff166118285760006115a2838361307d565b604051630e9a76d360e21b81526004810182905290915060009073856b1ab9774630a24201582db969bea4392ec9b290633a69db4c90602401602060405180830381865af41580156115f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161c91906130b0565b6001600160a01b0388166000908152600260205260408120549192509061164490869061307d565b604051632d64f6f360e01b81526004810182905260ff8416602482015290915060009073856b1ab9774630a24201582db969bea4392ec9b290632d64f6f390604401600060405180830381865af41580156116a3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116cb91908101906130cb565b905060005b81518110156118225760006116e6826001612ed6565b905060008383815181106116fc576116fc612ee9565b602002602001015160ff16905060006008600084815260200190815260200160002060008e6001600160a01b03166001600160a01b03168152602001908152602001600020549050808211156117f0576117eb8d8461175b8486613034565b600c805461176890612da1565b80601f016020809104026020016040519081016040528092919081815260200182805461179490612da1565b80156117e15780601f106117b6576101008083540402835291602001916117e1565b820191906000526020600020905b8154815290600101906020018083116117c457829003601f168201915b50505050506121e4565b61180c565b8082101561180c5761180c8d846118078585613034565b6122fa565b505050808061181a90612eff565b9150506116d0565b50505050505b6001600160a01b0384166000908152600d602052604090205460ff16610ac4576001600160a01b03841660009081526002602052604081205461186c90849061307d565b604051631a5d193d60e01b81526004810182905290915060009073856b1ab9774630a24201582db969bea4392ec9b290631a5d193d90602401600060405180830381865af41580156118c2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118ea91908101906130cb565b905060005b8151811015611999576000611905826001612ed6565b9050600083838151811061191b5761191b612ee9565b60209081029190910181015160008481526008835260408082206001600160a01b038e168352909352919091205460ff90911691508082111561196c576119678a8461175b8486613034565b611983565b80821015611983576119838a846118078585613034565b505050808061199190612eff565b9150506118ef565b5050505050505050565b8151835114611a055760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610721565b6001600160a01b038416611a2b5760405162461bcd60e51b81526004016107219061316d565b6001600160a01b0385166000908152600260205260408120543391805b8651811015611beb576000878281518110611a6557611a65612ee9565b602002602001015190506000878381518110611a8357611a83612ee9565b6020026020010151905060006008600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054905081811015611ae85760405162461bcd60e51b8152600401610721906131b2565b6000611af384612481565b9050611aff838261301d565b611b099087612ed6565b6001600160a01b038e166000908152600d602052604090205490965060ff16611b6a578282036008600086815260200190815260200160002060008f6001600160a01b03166001600160a01b03168152602001908152602001600020819055505b6001600160a01b038c166000908152600d602052604090205460ff16611bd657826008600086815260200190815260200160002060008e6001600160a01b03166001600160a01b031681526020019081526020016000206000828254611bd09190612ed6565b90915550505b5050505080611be490612eff565b9050611a48565b50866001600160a01b0316886001600160a01b0316846001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8989604051611c3b9291906131fc565b60405180910390a4611c51838989898989612501565b80821015611c5e57600080fd5b611c688183613034565b6001600160a01b03808a166000908152600260205260408082209390935590891681529081208054839290611c9e908490612ed6565b92505081905550866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611cea91815260200190565b60405180910390a35050505050505050565b6000546001600160a01b03163314610c735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610721565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b031603611e195760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610721565b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016112b0565b6001600160a01b038416611ea45760405162461bcd60e51b81526004016107219061316d565b336000611eb08561265c565b90506000611ebd8561265c565b905060008681526008602090815260408083206001600160a01b038c16845290915290205485811015611f025760405162461bcd60e51b8152600401610721906131b2565b6001600160a01b0389166000908152600d602052604090205460ff16611f4a5760008781526008602090815260408083206001600160a01b038d168452909152902086820390555b6001600160a01b0388166000908152600d602052604090205460ff16611fa25760008781526008602090815260408083206001600160a01b038c16845290915281208054889290611f9c908490612ed6565b90915550505b876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611ffa929190918252602082015260400190565b60405180910390a4612010848a8a8a8a8a6126a7565b6001600160a01b03891660009081526002602052604081205490876120348a612481565b61203e919061301d565b90508082101561204d57600080fd5b6120578183613034565b6001600160a01b03808d1660009081526002602052604080822093909355908c168152908120805483929061208d908490612ed6565b92505081905550896001600160a01b03168b6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516120d991815260200190565b60405180910390a35050505050505050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061212d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612159576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061217757662386f26fc10000830492506010015b6305f5e100831061218f576305f5e100830492506008015b61271083106121a357612710830492506004015b606483106121b5576064830492506002015b600a831061074f5760010192915050565b505050565b6007546000906121df9060ff16600a61330e565b905090565b6001600160a01b0384166122445760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610721565b3360006122508561265c565b9050600061225d8561265c565b905060008681526008602090815260408083206001600160a01b038b16845290915281208054879290612291908490612ed6565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46122f1836000898989896126a7565b50505050505050565b6001600160a01b03831661235c5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610721565b3360006123688461265c565b905060006123758461265c565b6040805160208082018352600091829052888252600881528282206001600160a01b038b16835290522054909150848110156123ff5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610721565b60008681526008602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526122f1565b505050505050565b600080821180156124945750600b548211155b6124d05760405162461bcd60e51b815260206004820152600d60248201526c3a37b5b2b724b21032b93937b960991b6044820152606401610721565b6124db600183613034565b6124e690600a61331d565b6007546124f79060ff16600a61330e565b61074f919061301d565b6001600160a01b0384163b156124795760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906125459089908990889088908890600401613329565b6020604051808303816000875af1925050508015612580575060408051601f3d908101601f1916820190925261257d91810190613387565b60015b61262c5761258c6133a4565b806308c379a0036125c557506125a06133c0565b806125ab57506125c7565b8060405162461bcd60e51b81526004016107219190612875565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610721565b6001600160e01b0319811663bc197c8160e01b146122f15760405162461bcd60e51b815260040161072190613449565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061269657612696612ee9565b602090810291909101015292915050565b6001600160a01b0384163b156124795760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126eb9089908990889088908890600401613491565b6020604051808303816000875af1925050508015612726575060408051601f3d908101601f1916820190925261272391810190613387565b60015b6127325761258c6133a4565b6001600160e01b0319811663f23a6e6160e01b146122f15760405162461bcd60e51b815260040161072190613449565b80356001600160a01b038116811461277957600080fd5b919050565b6000806040838503121561279157600080fd5b61279a83612762565b946020939093013593505050565b6001600160e01b03198116811461101a57600080fd5b6000602082840312156127d057600080fd5b81356127db816127a8565b9392505050565b60005b838110156127fd5781810151838201526020016127e5565b50506000910152565b6000815180845261281e8160208601602086016127e2565b601f01601f19169290920160200192915050565b6060815260006128456060830186612806565b82810360208401526128578186612806565b9050828103604084015261286b8185612806565b9695505050505050565b6020815260006127db6020830184612806565b60006020828403121561289a57600080fd5b5035919050565b6000602082840312156128b357600080fd5b6127db82612762565b6000806000606084860312156128d157600080fd5b6128da84612762565b92506128e860208501612762565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612933576129336128f8565b6040525050565b60006001600160401b03821115612953576129536128f8565b5060051b60200190565b600082601f83011261296e57600080fd5b8135602061297b8261293a565b604051612988828261290e565b83815260059390931b85018201928281019150868411156129a857600080fd5b8286015b848110156129c357803583529183019183016129ac565b509695505050505050565b600082601f8301126129df57600080fd5b81356001600160401b038111156129f8576129f86128f8565b604051612a0f601f8301601f19166020018261290e565b818152846020838601011115612a2457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215612a5957600080fd5b612a6286612762565b9450612a7060208701612762565b935060408601356001600160401b0380821115612a8c57600080fd5b612a9889838a0161295d565b94506060880135915080821115612aae57600080fd5b612aba89838a0161295d565b93506080880135915080821115612ad057600080fd5b50612add888289016129ce565b9150509295509295909350565b60008060408385031215612afd57600080fd5b82356001600160401b0380821115612b1457600080fd5b818501915085601f830112612b2857600080fd5b81356020612b358261293a565b604051612b42828261290e565b83815260059390931b8501820192828101915089841115612b6257600080fd5b948201945b83861015612b8757612b7886612762565b82529482019490820190612b67565b96505086013592505080821115612b9d57600080fd5b50612baa8582860161295d565b9150509250929050565b600081518084526020808501945080840160005b83811015612be457815187529582019590820190600101612bc8565b509495945050505050565b6020815260006127db6020830184612bb4565b801515811461101a57600080fd5b60008060408385031215612c2357600080fd5b612c2c83612762565b91506020830135612c3c81612c02565b809150509250929050565b600060208284031215612c5957600080fd5b81356001600160401b03811115612c6f57600080fd5b612c7b848285016129ce565b949350505050565b600080600060608486031215612c9857600080fd5b83356001600160401b0380821115612caf57600080fd5b612cbb878388016129ce565b94506020860135915080821115612cd157600080fd5b612cdd878388016129ce565b93506040860135915080821115612cf357600080fd5b50612d00868287016129ce565b9150509250925092565b60008060408385031215612d1d57600080fd5b612d2683612762565b9150612d3460208401612762565b90509250929050565b600080600080600060a08688031215612d5557600080fd5b612d5e86612762565b9450612d6c60208701612762565b9350604086013592506060860135915060808601356001600160401b03811115612d9557600080fd5b612add888289016129ce565b600181811c90821680612db557607f821691505b602082108103612dd557634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454612de981612da1565b60018281168015612e015760018114612e1657612e45565b60ff1984168752821515830287019450612e45565b8860005260208060002060005b85811015612e3c5781548a820152908401908201612e23565b50505082870194505b505050508351612e598183602088016127e2565b64173539b7b760d91b9101908152600501949350505050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561074f5761074f612ec0565b634e487b7160e01b600052603260045260246000fd5b600060018201612f1157612f11612ec0565b5060010190565b601f8211156121c657600081815260208120601f850160051c81016020861015612f3f5750805b601f850160051c820191505b8181101561247957828155600101612f4b565b81516001600160401b03811115612f7757612f776128f8565b612f8b81612f858454612da1565b84612f18565b602080601f831160018114612fc05760008415612fa85750858301515b600019600386901b1c1916600185901b178555612479565b600085815260208120601f198616915b82811015612fef57888601518255948401946001909101908401612fd0565b508582101561300d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808202811582820484141761074f5761074f612ec0565b8181038181111561074f5761074f612ec0565b60006020828403121561305957600080fd5b81516127db81612c02565b60006020828403121561307657600080fd5b5051919050565b60008261309a57634e487b7160e01b600052601260045260246000fd5b500490565b805160ff8116811461277957600080fd5b6000602082840312156130c257600080fd5b6127db8261309f565b600060208083850312156130de57600080fd5b82516001600160401b038111156130f457600080fd5b8301601f8101851361310557600080fd5b80516131108161293a565b60405161311d828261290e565b82815260059290921b830184019184810191508783111561313d57600080fd5b928401925b82841015613162576131538461309f565b82529284019290840190613142565b979650505050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60408152600061320f6040830185612bb4565b82810360208401526132218185612bb4565b95945050505050565b600181815b8085111561326557816000190482111561324b5761324b612ec0565b8085161561325857918102915b93841c939080029061322f565b509250929050565b60008261327c5750600161074f565b816132895750600061074f565b816001811461329f57600281146132a9576132c5565b600191505061074f565b60ff8411156132ba576132ba612ec0565b50506001821b61074f565b5060208310610133831016604e8410600b84101617156132e8575081810a61074f565b6132f2838361322a565b806000190482111561330657613306612ec0565b029392505050565b60006127db60ff84168361326d565b60006127db838361326d565b6001600160a01b0386811682528516602082015260a06040820181905260009061335590830186612bb4565b82810360608401526133678186612bb4565b9050828103608084015261337b8185612806565b98975050505050505050565b60006020828403121561339957600080fd5b81516127db816127a8565b600060033d11156133bd5760046000803e5060005160e01c5b90565b600060443d10156133ce5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156133fd57505050505090565b82850191508151818111156134155750505050505090565b843d870101602082850101111561342f5750505050505090565b61343e6020828601018761290e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906131629083018461280656fea26469706673582212200936191ec4b4cf23fb38f69f593fbdffb0c56f21bdf3088457ddc156b2714fc264736f6c63430008110033697066733a2f2f516d6357707838654b423654334b5541454a5a727741467135746832635941383559684e4453583455744e676a722f
Deployed Bytecode
0x6080604052600436106102035760003560e01c8063715018a611610118578063ca8b1363116100a0578063e985e9c51161006f578063e985e9c5146105f1578063f242432a1461063a578063f2fde38b1461065a578063f3fef3a31461067a578063f887ea401461069a57600080fd5b8063ca8b136314610588578063d96a094a146105a8578063dd62ed3e146105bb578063e41ee46a146105db57600080fd5b8063a22cb465116100e7578063a22cb465146104fc578063a25159811461051c578063a457c2d714610532578063a9059cbb14610552578063bfed683c1461057257600080fd5b8063715018a6146104705780638da5cb5b1461048557806395d89b41146104b75780639b19251a146104cc57600080fd5b806323b872dd1161019b578063395093511161016a57806339509351146103ad5780634e1273f4146103cd57806353d6fd59146103fa57806355f804b31461041a57806370a082311461043a57600080fd5b806323b872dd146103335780632eb2c2d614610353578063313ce56714610375578063390a5ba51461039757600080fd5b8063095ea7b3116101d7578063095ea7b3146102b15780630e89341c146102d157806318160ddd146102f15780631f6d49421461030657600080fd5b8062fdd58e1461020857806301ffc9a71461023b578063039cf7861461026b57806306fdde031461028f575b600080fd5b34801561021457600080fd5b5061022861022336600461277e565b6106ba565b6040519081526020015b60405180910390f35b34801561024757600080fd5b5061025b6102563660046127be565b610755565b6040519015158152602001610232565b34801561027757600080fd5b506102806107a5565b60405161023293929190612832565b34801561029b57600080fd5b506102a4610953565b6040516102329190612875565b3480156102bd57600080fd5b5061025b6102cc36600461277e565b6109e5565b3480156102dd57600080fd5b506102a46102ec366004612888565b6109fd565b3480156102fd57600080fd5b50600454610228565b34801561031257600080fd5b506102286103213660046128a1565b60136020526000908152604090205481565b34801561033f57600080fd5b5061025b61034e3660046128bc565b610a5b565b34801561035f57600080fd5b5061037361036e366004612a41565b610a7f565b005b34801561038157600080fd5b5060075460405160ff9091168152602001610232565b3480156103a357600080fd5b50610228600b5481565b3480156103b957600080fd5b5061025b6103c836600461277e565b610acb565b3480156103d957600080fd5b506103ed6103e8366004612aea565b610aed565b6040516102329190612bef565b34801561040657600080fd5b50610373610415366004612c10565b610c16565b34801561042657600080fd5b50610373610435366004612c47565b610c49565b34801561044657600080fd5b506102286104553660046128a1565b6001600160a01b031660009081526002602052604090205490565b34801561047c57600080fd5b50610373610c61565b34801561049157600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610232565b3480156104c357600080fd5b506102a4610c75565b3480156104d857600080fd5b5061025b6104e73660046128a1565b600d6020526000908152604090205460ff1681565b34801561050857600080fd5b50610373610517366004612c10565b610c84565b34801561052857600080fd5b5061022860115481565b34801561053e57600080fd5b5061025b61054d36600461277e565b610c8f565b34801561055e57600080fd5b5061025b61056d36600461277e565b610d0a565b34801561057e57600080fd5b5061022860125481565b34801561059457600080fd5b506103736105a3366004612c83565b610d18565b6103736105b6366004612888565b610d4c565b3480156105c757600080fd5b506102286105d6366004612d0a565b610f34565b3480156105e757600080fd5b5061022860105481565b3480156105fd57600080fd5b5061025b61060c366004612d0a565b6001600160a01b03918216600090815260096020908152604080832093909416825291909152205460ff1690565b34801561064657600080fd5b50610373610655366004612d3d565b610f5f565b34801561066657600080fd5b506103736106753660046128a1565b610fa4565b34801561068657600080fd5b5061037361069536600461277e565b61101d565b3480156106a657600080fd5b5060155461049f906001600160a01b031681565b60006001600160a01b03831661072a5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b5060008181526008602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b148061078657506001600160e01b031982166303a24d0760e21b145b8061074f57506301ffc9a760e01b6001600160e01b031983161461074f565b6016805481906107b490612da1565b80601f01602080910402602001604051908101604052809291908181526020018280546107e090612da1565b801561082d5780601f106108025761010080835404028352916020019161082d565b820191906000526020600020905b81548152906001019060200180831161081057829003601f168201915b50505050509080600101805461084290612da1565b80601f016020809104026020016040519081016040528092919081815260200182805461086e90612da1565b80156108bb5780601f10610890576101008083540402835291602001916108bb565b820191906000526020600020905b81548152906001019060200180831161089e57829003601f168201915b5050505050908060020180546108d090612da1565b80601f01602080910402602001604051908101604052809291908181526020018280546108fc90612da1565b80156109495780601f1061091e57610100808354040283529160200191610949565b820191906000526020600020905b81548152906001019060200180831161092c57829003601f168201915b5050505050905083565b60606005805461096290612da1565b80601f016020809104026020016040519081016040528092919081815260200182805461098e90612da1565b80156109db5780601f106109b0576101008083540402835291602001916109db565b820191906000526020600020905b8154815290600101906020018083116109be57829003601f168201915b5050505050905090565b6000336109f3818585611198565b5060019392505050565b6060600060148054610a0e90612da1565b905011610a2a576040518060200160405280600081525061074f565b6014610a35836112bd565b604051602001610a46929190612ddb565b60405160208183030381529060405292915050565b600033610a6985828561134f565b610a748585856113c3565b506001949350505050565b6001600160a01b038516331480610a9b5750610a9b853361060c565b610ab75760405162461bcd60e51b815260040161072190612e72565b610ac485858585856119a3565b5050505050565b6000336109f3818585610ade8383610f34565b610ae89190612ed6565b611198565b60608151835114610b525760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610721565b600083516001600160401b03811115610b6d57610b6d6128f8565b604051908082528060200260200182016040528015610b96578160200160208202803683370190505b50905060005b8451811015610c0e57610be1858281518110610bba57610bba612ee9565b6020026020010151858381518110610bd457610bd4612ee9565b60200260200101516106ba565b828281518110610bf357610bf3612ee9565b6020908102919091010152610c0781612eff565b9050610b9c565b509392505050565b610c1e611cfc565b6001600160a01b03919091166000908152600d60205260409020805460ff1916911515919091179055565b610c51611cfc565b6014610c5d8282612f5e565b5050565b610c69611cfc565b610c736000611d56565b565b60606006805461096290612da1565b610c5d338383611da6565b60003381610c9d8286610f34565b905083811015610cfd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610721565b610a748286868403611198565b6000336109f38185856113c3565b610d20611cfc565b6016610d2c8482612f5e565b506017610d398382612f5e565b506018610d468282612f5e565b50505050565b601054811115610d925760405162461bcd60e51b81526020600482015260116024820152707175616e74696679206f766572666c6f7760781b6044820152606401610721565b60105433600090815260136020526040902054610db0908390612ed6565b1115610df65760405162461bcd60e51b81526020600482015260156024820152746d6178207175616e74696679206f766572666c6f7760581b6044820152606401610721565b600060115482610e06919061301d565b905080341015610e4c5760405162461bcd60e51b815260206004820152601160248201527018985b185b98d9481d1bdbc81cdb585b1b607a1b6044820152606401610721565b80341115610e93576000610e608234613034565b604051909150339082156108fc029083906000818181858888f19350505050158015610e90573d6000803e3d6000fd5b50505b3360009081526013602052604081208054849290610eb2908490612ed6565b9091555050601254600090610ec890849061301d565b60405163a9059cbb60e01b815233600482015260248101829052909150309063a9059cbb906044015b6020604051808303816000875af1158015610f10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d469190613047565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b6001600160a01b038516331480610f7b5750610f7b853361060c565b610f975760405162461bcd60e51b815260040161072190612e72565b610ac48585858585611e7e565b610fac611cfc565b6001600160a01b0381166110115760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610721565b61101a81611d56565b50565b611025611cfc565b6001600160a01b0382166110b257600047116110835760405162461bcd60e51b815260206004820152601b60248201527f4572726f723a20696e73756666696369656e742062616c616e636500000000006044820152606401610721565b6040514790339082156108fc029083906000818181858888f19350505050158015610d46573d6000803e3d6000fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156110f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111d9190613064565b9050808211156111655760405162461bcd60e51b81526020600482015260136024820152724572726f723a206f776572666c6f772066656560681b6044820152606401610721565b60405163a9059cbb60e01b8152336004820152602481018390526001600160a01b0384169063a9059cbb90604401610ef1565b6001600160a01b0383166111fa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610721565b6001600160a01b03821661125b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610721565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b606060006112ca836120ee565b60010190506000816001600160401b038111156112e9576112e96128f8565b6040519080825280601f01601f191660200182016040528015611313576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a850494508461131d57509392505050565b600061135b8484610f34565b90506000198114610d4657818110156113b65760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610721565b610d468484848403611198565b6001600160a01b0383166114275760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610721565b6001600160a01b0382166114895760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610721565b60006114936121cb565b6001600160a01b0385166000908152600260205260409020549091508281101561150e5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610721565b6001600160a01b0380861660008181526002602052604080822087860390559287168082529083902080548701905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061156e9087815260200190565b60405180910390a36001600160a01b0385166000908152600d602052604090205460ff166118285760006115a2838361307d565b604051630e9a76d360e21b81526004810182905290915060009073856b1ab9774630a24201582db969bea4392ec9b290633a69db4c90602401602060405180830381865af41580156115f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161c91906130b0565b6001600160a01b0388166000908152600260205260408120549192509061164490869061307d565b604051632d64f6f360e01b81526004810182905260ff8416602482015290915060009073856b1ab9774630a24201582db969bea4392ec9b290632d64f6f390604401600060405180830381865af41580156116a3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116cb91908101906130cb565b905060005b81518110156118225760006116e6826001612ed6565b905060008383815181106116fc576116fc612ee9565b602002602001015160ff16905060006008600084815260200190815260200160002060008e6001600160a01b03166001600160a01b03168152602001908152602001600020549050808211156117f0576117eb8d8461175b8486613034565b600c805461176890612da1565b80601f016020809104026020016040519081016040528092919081815260200182805461179490612da1565b80156117e15780601f106117b6576101008083540402835291602001916117e1565b820191906000526020600020905b8154815290600101906020018083116117c457829003601f168201915b50505050506121e4565b61180c565b8082101561180c5761180c8d846118078585613034565b6122fa565b505050808061181a90612eff565b9150506116d0565b50505050505b6001600160a01b0384166000908152600d602052604090205460ff16610ac4576001600160a01b03841660009081526002602052604081205461186c90849061307d565b604051631a5d193d60e01b81526004810182905290915060009073856b1ab9774630a24201582db969bea4392ec9b290631a5d193d90602401600060405180830381865af41580156118c2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118ea91908101906130cb565b905060005b8151811015611999576000611905826001612ed6565b9050600083838151811061191b5761191b612ee9565b60209081029190910181015160008481526008835260408082206001600160a01b038e168352909352919091205460ff90911691508082111561196c576119678a8461175b8486613034565b611983565b80821015611983576119838a846118078585613034565b505050808061199190612eff565b9150506118ef565b5050505050505050565b8151835114611a055760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b6064820152608401610721565b6001600160a01b038416611a2b5760405162461bcd60e51b81526004016107219061316d565b6001600160a01b0385166000908152600260205260408120543391805b8651811015611beb576000878281518110611a6557611a65612ee9565b602002602001015190506000878381518110611a8357611a83612ee9565b6020026020010151905060006008600084815260200190815260200160002060008d6001600160a01b03166001600160a01b0316815260200190815260200160002054905081811015611ae85760405162461bcd60e51b8152600401610721906131b2565b6000611af384612481565b9050611aff838261301d565b611b099087612ed6565b6001600160a01b038e166000908152600d602052604090205490965060ff16611b6a578282036008600086815260200190815260200160002060008f6001600160a01b03166001600160a01b03168152602001908152602001600020819055505b6001600160a01b038c166000908152600d602052604090205460ff16611bd657826008600086815260200190815260200160002060008e6001600160a01b03166001600160a01b031681526020019081526020016000206000828254611bd09190612ed6565b90915550505b5050505080611be490612eff565b9050611a48565b50866001600160a01b0316886001600160a01b0316846001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8989604051611c3b9291906131fc565b60405180910390a4611c51838989898989612501565b80821015611c5e57600080fd5b611c688183613034565b6001600160a01b03808a166000908152600260205260408082209390935590891681529081208054839290611c9e908490612ed6565b92505081905550866001600160a01b0316886001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611cea91815260200190565b60405180910390a35050505050505050565b6000546001600160a01b03163314610c735760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610721565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b031603611e195760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610721565b6001600160a01b03838116600081815260096020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3191016112b0565b6001600160a01b038416611ea45760405162461bcd60e51b81526004016107219061316d565b336000611eb08561265c565b90506000611ebd8561265c565b905060008681526008602090815260408083206001600160a01b038c16845290915290205485811015611f025760405162461bcd60e51b8152600401610721906131b2565b6001600160a01b0389166000908152600d602052604090205460ff16611f4a5760008781526008602090815260408083206001600160a01b038d168452909152902086820390555b6001600160a01b0388166000908152600d602052604090205460ff16611fa25760008781526008602090815260408083206001600160a01b038c16845290915281208054889290611f9c908490612ed6565b90915550505b876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611ffa929190918252602082015260400190565b60405180910390a4612010848a8a8a8a8a6126a7565b6001600160a01b03891660009081526002602052604081205490876120348a612481565b61203e919061301d565b90508082101561204d57600080fd5b6120578183613034565b6001600160a01b03808d1660009081526002602052604080822093909355908c168152908120805483929061208d908490612ed6565b92505081905550896001600160a01b03168b6001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516120d991815260200190565b60405180910390a35050505050505050505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061212d5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612159576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061217757662386f26fc10000830492506010015b6305f5e100831061218f576305f5e100830492506008015b61271083106121a357612710830492506004015b606483106121b5576064830492506002015b600a831061074f5760010192915050565b505050565b6007546000906121df9060ff16600a61330e565b905090565b6001600160a01b0384166122445760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610721565b3360006122508561265c565b9050600061225d8561265c565b905060008681526008602090815260408083206001600160a01b038b16845290915281208054879290612291908490612ed6565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46122f1836000898989896126a7565b50505050505050565b6001600160a01b03831661235c5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b6064820152608401610721565b3360006123688461265c565b905060006123758461265c565b6040805160208082018352600091829052888252600881528282206001600160a01b038b16835290522054909150848110156123ff5760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604482015263616e636560e01b6064820152608401610721565b60008681526008602090815260408083206001600160a01b038b81168086529184528285208a8703905582518b81529384018a90529092908816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46040805160208101909152600090526122f1565b505050505050565b600080821180156124945750600b548211155b6124d05760405162461bcd60e51b815260206004820152600d60248201526c3a37b5b2b724b21032b93937b960991b6044820152606401610721565b6124db600183613034565b6124e690600a61331d565b6007546124f79060ff16600a61330e565b61074f919061301d565b6001600160a01b0384163b156124795760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906125459089908990889088908890600401613329565b6020604051808303816000875af1925050508015612580575060408051601f3d908101601f1916820190925261257d91810190613387565b60015b61262c5761258c6133a4565b806308c379a0036125c557506125a06133c0565b806125ab57506125c7565b8060405162461bcd60e51b81526004016107219190612875565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610721565b6001600160e01b0319811663bc197c8160e01b146122f15760405162461bcd60e51b815260040161072190613449565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061269657612696612ee9565b602090810291909101015292915050565b6001600160a01b0384163b156124795760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906126eb9089908990889088908890600401613491565b6020604051808303816000875af1925050508015612726575060408051601f3d908101601f1916820190925261272391810190613387565b60015b6127325761258c6133a4565b6001600160e01b0319811663f23a6e6160e01b146122f15760405162461bcd60e51b815260040161072190613449565b80356001600160a01b038116811461277957600080fd5b919050565b6000806040838503121561279157600080fd5b61279a83612762565b946020939093013593505050565b6001600160e01b03198116811461101a57600080fd5b6000602082840312156127d057600080fd5b81356127db816127a8565b9392505050565b60005b838110156127fd5781810151838201526020016127e5565b50506000910152565b6000815180845261281e8160208601602086016127e2565b601f01601f19169290920160200192915050565b6060815260006128456060830186612806565b82810360208401526128578186612806565b9050828103604084015261286b8185612806565b9695505050505050565b6020815260006127db6020830184612806565b60006020828403121561289a57600080fd5b5035919050565b6000602082840312156128b357600080fd5b6127db82612762565b6000806000606084860312156128d157600080fd5b6128da84612762565b92506128e860208501612762565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715612933576129336128f8565b6040525050565b60006001600160401b03821115612953576129536128f8565b5060051b60200190565b600082601f83011261296e57600080fd5b8135602061297b8261293a565b604051612988828261290e565b83815260059390931b85018201928281019150868411156129a857600080fd5b8286015b848110156129c357803583529183019183016129ac565b509695505050505050565b600082601f8301126129df57600080fd5b81356001600160401b038111156129f8576129f86128f8565b604051612a0f601f8301601f19166020018261290e565b818152846020838601011115612a2457600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a08688031215612a5957600080fd5b612a6286612762565b9450612a7060208701612762565b935060408601356001600160401b0380821115612a8c57600080fd5b612a9889838a0161295d565b94506060880135915080821115612aae57600080fd5b612aba89838a0161295d565b93506080880135915080821115612ad057600080fd5b50612add888289016129ce565b9150509295509295909350565b60008060408385031215612afd57600080fd5b82356001600160401b0380821115612b1457600080fd5b818501915085601f830112612b2857600080fd5b81356020612b358261293a565b604051612b42828261290e565b83815260059390931b8501820192828101915089841115612b6257600080fd5b948201945b83861015612b8757612b7886612762565b82529482019490820190612b67565b96505086013592505080821115612b9d57600080fd5b50612baa8582860161295d565b9150509250929050565b600081518084526020808501945080840160005b83811015612be457815187529582019590820190600101612bc8565b509495945050505050565b6020815260006127db6020830184612bb4565b801515811461101a57600080fd5b60008060408385031215612c2357600080fd5b612c2c83612762565b91506020830135612c3c81612c02565b809150509250929050565b600060208284031215612c5957600080fd5b81356001600160401b03811115612c6f57600080fd5b612c7b848285016129ce565b949350505050565b600080600060608486031215612c9857600080fd5b83356001600160401b0380821115612caf57600080fd5b612cbb878388016129ce565b94506020860135915080821115612cd157600080fd5b612cdd878388016129ce565b93506040860135915080821115612cf357600080fd5b50612d00868287016129ce565b9150509250925092565b60008060408385031215612d1d57600080fd5b612d2683612762565b9150612d3460208401612762565b90509250929050565b600080600080600060a08688031215612d5557600080fd5b612d5e86612762565b9450612d6c60208701612762565b9350604086013592506060860135915060808601356001600160401b03811115612d9557600080fd5b612add888289016129ce565b600181811c90821680612db557607f821691505b602082108103612dd557634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454612de981612da1565b60018281168015612e015760018114612e1657612e45565b60ff1984168752821515830287019450612e45565b8860005260208060002060005b85811015612e3c5781548a820152908401908201612e23565b50505082870194505b505050508351612e598183602088016127e2565b64173539b7b760d91b9101908152600501949350505050565b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561074f5761074f612ec0565b634e487b7160e01b600052603260045260246000fd5b600060018201612f1157612f11612ec0565b5060010190565b601f8211156121c657600081815260208120601f850160051c81016020861015612f3f5750805b601f850160051c820191505b8181101561247957828155600101612f4b565b81516001600160401b03811115612f7757612f776128f8565b612f8b81612f858454612da1565b84612f18565b602080601f831160018114612fc05760008415612fa85750858301515b600019600386901b1c1916600185901b178555612479565b600085815260208120601f198616915b82811015612fef57888601518255948401946001909101908401612fd0565b508582101561300d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b808202811582820484141761074f5761074f612ec0565b8181038181111561074f5761074f612ec0565b60006020828403121561305957600080fd5b81516127db81612c02565b60006020828403121561307657600080fd5b5051919050565b60008261309a57634e487b7160e01b600052601260045260246000fd5b500490565b805160ff8116811461277957600080fd5b6000602082840312156130c257600080fd5b6127db8261309f565b600060208083850312156130de57600080fd5b82516001600160401b038111156130f457600080fd5b8301601f8101851361310557600080fd5b80516131108161293a565b60405161311d828261290e565b82815260059290921b830184019184810191508783111561313d57600080fd5b928401925b82841015613162576131538461309f565b82529284019290840190613142565b979650505050505050565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60408152600061320f6040830185612bb4565b82810360208401526132218185612bb4565b95945050505050565b600181815b8085111561326557816000190482111561324b5761324b612ec0565b8085161561325857918102915b93841c939080029061322f565b509250929050565b60008261327c5750600161074f565b816132895750600061074f565b816001811461329f57600281146132a9576132c5565b600191505061074f565b60ff8411156132ba576132ba612ec0565b50506001821b61074f565b5060208310610133831016604e8410600b84101617156132e8575081810a61074f565b6132f2838361322a565b806000190482111561330657613306612ec0565b029392505050565b60006127db60ff84168361326d565b60006127db838361326d565b6001600160a01b0386811682528516602082015260a06040820181905260009061335590830186612bb4565b82810360608401526133678186612bb4565b9050828103608084015261337b8185612806565b98975050505050505050565b60006020828403121561339957600080fd5b81516127db816127a8565b600060033d11156133bd5760046000803e5060005160e01c5b90565b600060443d10156133ce5790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156133fd57505050505090565b82850191508151818111156134155750505050505090565b843d870101602082850101111561342f5750505050505090565b61343e6020828601018761290e565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906131629083018461280656fea26469706673582212200936191ec4b4cf23fb38f69f593fbdffb0c56f21bdf3088457ddc156b2714fc264736f6c63430008110033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.