Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BrawlerBearzShop
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import {IERC165Upgradeable, ERC1155Upgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import {AccessControlUpgradeable} from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol"; import {ERC1155BurnableUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155BurnableUpgradeable.sol"; import {ERC1155SupplyUpgradeable} from "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./interfaces/IBrawlerBearzDynamicItems.sol"; /******************************************************************************* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|(@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|,|@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&&@@@@@@@@@@@|,*|&@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%,**%@@@@@@@@%|******%&@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&##*****|||**,(%%%%%**|%@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@***,#%%%%**#&@@@@@#**,|@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@*,(@@@@@@@@@@**,(&@@@@#**%@@@@@@||(%@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@%|,****&@((@&***&@@@@@@%||||||||#%&@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@&%#*****||||||**#%&@%%||||||||#@&%#(@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@&**,(&@@@@@%|||||*##&&&&##|||||(%@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@**,%@@@@@@@(|*|#%@@@@@@@@#||#%%@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@#||||#@@@@||*|%@@@@@@@@&|||%%&@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@#,,,,,,*|**||%|||||||###&@@@@@@@#|||#%@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@&#||*|||||%%%@%%%#|||%@@@@@@@@&(|(%&@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@&&%%(||||@@@@@@&|||||(%&((||(#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@%%(||||||||||#%#(|||||%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@&%#######%%@@**||(#%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%##%%&@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ ********************************************************************************/ /************************************************** * @title BrawlerBearzShop * @author @scottybmitch **************************************************/ contract BrawlerBearzShop is Initializable, IBrawlerBearzDynamicItems, AccessControlUpgradeable, ERC1155Upgradeable, ERC1155BurnableUpgradeable, ERC1155SupplyUpgradeable { using Strings for uint256; bytes32 public constant URI_SETTER_ROLE = keccak256("URI_SETTER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant EXTERNAL_CONTRACT_ROLE = keccak256("EXTERNAL_CONTRACT_ROLE"); /// @notice nonce for claim requests uint256 private requestNonce; /// @notice map from token id to custom metadata mapping(uint256 => CustomMetadata) internal metadata; // @dev An array of shop drop item ids ordered by most rare to least uint256[] public shopDropItemIds; // @dev An array of rarities ordered by most rare to least uint256[] public rarities; event ShopDrop(address to, uint256[] ids, uint256[] amounts); event ItemsDrop(address to, uint256[] ids, uint256[] amounts); function initialize() public initializer { __ERC1155_init(""); __AccessControl_init(); __ERC1155Burnable_init(); __ERC1155Supply_init(); _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); _grantRole(URI_SETTER_ROLE, msg.sender); _grantRole(MINTER_ROLE, msg.sender); requestNonce = 1; shopDropItemIds = [0, 0, 0, 0, 0, 0, 0]; rarities = [200, 700, 1800, 3000, 5000, 7500, 10001]; } function name() external pure returns (string memory) { return "Brawler Bearz Shop"; } function symbol() external pure returns (string memory) { return "BBSHOP"; } function setURI(string memory newuri) public onlyRole(URI_SETTER_ROLE) { _setURI(newuri); } function setItemMetadata( uint256 tokenId, string calldata _typeOf, string calldata _name, uint256 _xp ) public onlyRole(MINTER_ROLE) { metadata[tokenId].typeOf = _typeOf; metadata[tokenId].name = _name; metadata[tokenId].xp = _xp; } function setItemMetadataStruct( uint256 tokenId, CustomMetadata memory newMetadata ) public onlyRole(MINTER_ROLE) { metadata[tokenId] = newMetadata; } function getMetadata(uint256 tokenId) external view override returns (CustomMetadata memory) { return metadata[tokenId]; } function getMetadataBatch(uint256[] calldata tokenIds) external view override returns (CustomMetadata[] memory) { require(tokenIds.length > 0, "0"); CustomMetadata[] memory metadataBatch = new CustomMetadata[]( tokenIds.length ); for (uint256 i = 0; i < tokenIds.length; ++i) { metadataBatch[i] = metadata[tokenIds[i]]; } return metadataBatch; } function getItemXPReq(uint256 tokenId) public view override returns (uint256) { return metadata[tokenId].xp; } function getItemType(uint256 tokenId) public view override returns (string memory) { return metadata[tokenId].typeOf; } function getItemName(uint256 tokenId) public view override returns (string memory) { return metadata[tokenId].name; } function mint( address account, uint256 id, uint256 amount, bytes memory data ) public onlyRole(MINTER_ROLE) { _mint(account, id, amount, data); } function mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public onlyRole(MINTER_ROLE) { _mintBatch(to, ids, amounts, data); } /** * @notice Mints an amount of shop items * @param _amount of mints */ function shopDrop(address _toAddress, uint256 _amount) external onlyRole(EXTERNAL_CONTRACT_ROLE) { uint256[] memory ids = new uint256[](_amount); uint256[] memory amounts = new uint256[](_amount); requestNonce++; uint256 baseRandomness = pseudorandom(_toAddress); for (uint256 i = 0; i < _amount; i++) { uint256 randomness = (baseRandomness / ((i + 1) * 10)); uint256 chance = (randomness % 10000) + 1; // 1 - 10000 for (uint256 j = 0; j < rarities.length; j++) { if (chance < rarities[j]) { ids[i] = shopDropItemIds[j]; break; } } amounts[i] = 1; } _mintBatch(_toAddress, ids, amounts, ""); emit ShopDrop(_toAddress, ids, amounts); } /** * @notice Sets shop item ids to airdrop, ordered rare -> least rare * @param _shopDropItemIds An array of shop drop item ids */ function setShopDropItemIds(uint256[] calldata _shopDropItemIds) external onlyRole(MINTER_ROLE) { shopDropItemIds = _shopDropItemIds; } /** * @notice Sets shop item rarities for drop * @param _rarities An array of rarities */ function setShopDropRarities(uint256[] calldata _rarities) external onlyRole(MINTER_ROLE) { rarities = _rarities; } /// @dev Bastardized "randomness" just for shop drop function pseudorandom(address to) private view returns (uint256) { return uint256( keccak256( abi.encodePacked( block.difficulty, block.timestamp, to, Strings.toString(requestNonce) ) ) ); } /** * @notice Mints tokens to a particular address * @param itemIds of mints */ function dropItems(address _toAddress, uint256[] calldata itemIds) external onlyRole(EXTERNAL_CONTRACT_ROLE) { uint256 amount = itemIds.length; uint256[] memory ids = new uint256[](amount); uint256[] memory amounts = new uint256[](amount); for (uint256 i = 0; i < amount; i++) { ids[i] = itemIds[i]; amounts[i] = 1; } _mintBatch(_toAddress, ids, amounts, ""); emit ItemsDrop(_toAddress, ids, amounts); } /// @dev Allows an external contract w/ role to burn an item function burnItemForOwnerAddress( uint256 _typeId, uint256 _quantity, address _itemOwnerAddress ) external onlyRole(EXTERNAL_CONTRACT_ROLE) { _burn(_itemOwnerAddress, _typeId, _quantity); } /// @dev Allows an external contract w/ role to burn in batch function burnItemsForOwnerAddress( uint256[] memory _typeIds, uint256[] memory _quantities, address _toAddress ) external onlyRole(EXTERNAL_CONTRACT_ROLE) { _burnBatch(_toAddress, _typeIds, _quantities); } /// @dev Allows an external contract w/ role to mint an item function mintItemToAddress( uint256 _typeId, uint256 _quantity, address _toAddress ) external onlyRole(EXTERNAL_CONTRACT_ROLE) { _mint(_toAddress, _typeId, _quantity, ""); } /// @dev Allows an external contract w/ role to mint a batch of items to the same address function mintBatchItemsToAddress( uint256[] memory _typeIds, uint256[] memory _quantities, address _toAddress ) external onlyRole(EXTERNAL_CONTRACT_ROLE) { _mintBatch(_toAddress, _typeIds, _quantities, ""); } /// @dev Allows a bulk transfer function bulkSafeTransfer( uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients ) external { for (uint256 i = 0; i < recipients.length; i++) { safeTransferFrom( _msgSender(), recipients[i], _typeId, _quantityPerRecipient, "" ); } } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override(ERC1155Upgradeable, ERC1155SupplyUpgradeable) { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function supportsInterface(bytes4 interfaceId) public view override( IERC165Upgradeable, ERC1155Upgradeable, AccessControlUpgradeable ) returns (bool) { return interfaceId == type(IBrawlerBearzDynamicItems).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal onlyInitializing { __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal onlyInitializing { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[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 xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @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 IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable.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 IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable.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; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[47] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControlUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../utils/StringsUpgradeable.sol"; import "../utils/introspection/ERC165Upgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable, IAccessControlUpgradeable, ERC165Upgradeable { function __AccessControl_init() internal onlyInitializing { } function __AccessControl_init_unchained() internal onlyInitializing { } struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", StringsUpgradeable.toHexString(uint160(account), 20), " is missing role ", StringsUpgradeable.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155BurnableUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Burnable_init() internal onlyInitializing { } function __ERC1155Burnable_init_unchained() internal onlyInitializing { } function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); _burnBatch(account, ids, values); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable { function __ERC1155Supply_init() internal onlyInitializing { } function __ERC1155Supply_init_unchained() internal onlyInitializing { } mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155SupplyUpgradeable.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 supply = _totalSupply[id]; require(supply >= amount, "ERC1155: burn amount exceeds totalSupply"); unchecked { _totalSupply[id] = supply - amount; } } } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC1155/IERC1155Upgradeable.sol"; interface IBrawlerBearzDynamicItems is IERC1155Upgradeable { struct CustomMetadata { string typeOf; string name; uint256 xp; // Min XP required to equip string rarity; // LEGENDARY, SUPER_RARE, RARE, UNCOMMON, COMMON uint256 atk; // Correlated to Strength uint256 def; // Correlated to Endurance uint256 usageChance; // Duration string usageDuration; // Persistent / Consumable string description; uint256 intel; // Correlated to intelligence uint256 luck; // Correlated to luck } function getMetadata(uint256 tokenId) external view returns (CustomMetadata memory); function getMetadataBatch(uint256[] calldata tokenIds) external view returns (CustomMetadata[] memory); function getItemType(uint256 tokenId) external view returns (string memory); function getItemName(uint256 tokenId) external view returns (string memory); function getItemXPReq(uint256 tokenId) external view returns (uint256); function setItemMetadata( uint256 tokenId, string calldata typeOf, string calldata name, uint256 xp ) external; function setItemMetadataStruct( uint256 tokenId, CustomMetadata memory metadata ) external; function shopDrop(address _toAddress, uint256 _amount) external; function dropItems(address _toAddress, uint256[] calldata itemIds) external; function burnItemForOwnerAddress( uint256 _typeId, uint256 _quantity, address _materialOwnerAddress ) external; function burnItemsForOwnerAddress( uint256[] memory _typeIds, uint256[] memory _quantities, address _materialOwnerAddress ) external; function mintItemToAddress( uint256 _typeId, uint256 _quantity, address _toAddress ) external; function mintBatchItemsToAddress( uint256[] memory _typeIds, uint256[] memory _quantities, address _toAddress ) external; function bulkSafeTransfer( uint256 _typeId, uint256 _quantityPerRecipient, address[] calldata recipients ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.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 IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155Upgradeable.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 IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.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 ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
{ "optimizer": { "enabled": true, "runs": 500, "details": { "yul": false } }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ItemsDrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"ShopDrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EXTERNAL_CONTRACT_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"URI_SETTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_typeId","type":"uint256"},{"internalType":"uint256","name":"_quantityPerRecipient","type":"uint256"},{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"bulkSafeTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_typeId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_itemOwnerAddress","type":"address"}],"name":"burnItemForOwnerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_typeIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"address","name":"_toAddress","type":"address"}],"name":"burnItemsForOwnerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint256[]","name":"itemIds","type":"uint256[]"}],"name":"dropItems","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getItemName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getItemType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getItemXPReq","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMetadata","outputs":[{"components":[{"internalType":"string","name":"typeOf","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"xp","type":"uint256"},{"internalType":"string","name":"rarity","type":"string"},{"internalType":"uint256","name":"atk","type":"uint256"},{"internalType":"uint256","name":"def","type":"uint256"},{"internalType":"uint256","name":"usageChance","type":"uint256"},{"internalType":"string","name":"usageDuration","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"uint256","name":"intel","type":"uint256"},{"internalType":"uint256","name":"luck","type":"uint256"}],"internalType":"struct IBrawlerBearzDynamicItems.CustomMetadata","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getMetadataBatch","outputs":[{"components":[{"internalType":"string","name":"typeOf","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"xp","type":"uint256"},{"internalType":"string","name":"rarity","type":"string"},{"internalType":"uint256","name":"atk","type":"uint256"},{"internalType":"uint256","name":"def","type":"uint256"},{"internalType":"uint256","name":"usageChance","type":"uint256"},{"internalType":"string","name":"usageDuration","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"uint256","name":"intel","type":"uint256"},{"internalType":"uint256","name":"luck","type":"uint256"}],"internalType":"struct IBrawlerBearzDynamicItems.CustomMetadata[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"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":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_typeIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_quantities","type":"uint256[]"},{"internalType":"address","name":"_toAddress","type":"address"}],"name":"mintBatchItemsToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_typeId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_toAddress","type":"address"}],"name":"mintItemToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rarities","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_typeOf","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_xp","type":"uint256"}],"name":"setItemMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"string","name":"typeOf","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"xp","type":"uint256"},{"internalType":"string","name":"rarity","type":"string"},{"internalType":"uint256","name":"atk","type":"uint256"},{"internalType":"uint256","name":"def","type":"uint256"},{"internalType":"uint256","name":"usageChance","type":"uint256"},{"internalType":"string","name":"usageDuration","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"uint256","name":"intel","type":"uint256"},{"internalType":"uint256","name":"luck","type":"uint256"}],"internalType":"struct IBrawlerBearzDynamicItems.CustomMetadata","name":"newMetadata","type":"tuple"}],"name":"setItemMetadataStruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_shopDropItemIds","type":"uint256[]"}],"name":"setShopDropItemIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_rarities","type":"uint256[]"}],"name":"setShopDropRarities","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_toAddress","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"shopDrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"shopDropItemIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614948806100206000396000f3fe608060405234801561001057600080fd5b50600436106102ce5760003560e01c80636fad1e041161018c578063a574cea4116100ee578063d547741f11610097578063f242432a11610071578063f242432a14610709578063f5298aca1461071c578063ff7ebe0f1461072f57600080fd5b8063d547741f146106a7578063d9561a91146106ba578063e985e9c5146106cd57600080fd5b8063c19a4ef5116100c8578063c19a4ef51461066a578063c50b0d631461067d578063d53913931461069257600080fd5b8063a574cea414610606578063adc0f74514610626578063bd85b0391461064a57600080fd5b8063907a3e56116101505780639eef4aa61161012a5780639eef4aa6146105d8578063a217fddf146105eb578063a22cb465146105f357600080fd5b8063907a3e561461056a57806391d148541461057d57806395d89b41146105b657600080fd5b80636fad1e0414610502578063731133e9146105155780637f345710146105285780638129fc1c1461054f5780638d908e081461055757600080fd5b806336568abe116102355780634e1273f4116101f95780636b20c454116101d35780636b20c454146104c95780636c481bc6146104dc5780636cad7afe146104ef57600080fd5b80634e1273f4146104745780634f558e79146104945780635d4e898e146104b657600080fd5b806336568abe146104085780633cbf48e91461041b57806343a9c03c1461042e578063466e79eb1461044e5780634a1e31e81461046157600080fd5b806317b8e1cf116102975780632eb2c2d6116102715780632eb2c2d6146103cf5780632f2ff15d146103e2578063357260f4146103f557600080fd5b806317b8e1cf146103865780631f7fdffa14610399578063248a9ca3146103ac57600080fd5b8062fdd58e146102d357806301ffc9a7146102fc57806302fe53051461031c57806306fdde03146103315780630e89341c14610373575b600080fd5b6102e66102e1366004612fe6565b610742565b6040516102f3919061302b565b60405180910390f35b61030f61030a366004613054565b61079e565b6040516102f3919061307d565b61032f61032a366004613177565b6107c3565b005b60408051808201909152601281527f427261776c657220426561727a2053686f70000000000000000000000000000060208201525b6040516102f3919061320f565b610366610381366004613220565b6107fa565b6102e6610394366004613220565b61088e565b61032f6103a73660046132e3565b6108b0565b6102e66103ba366004613220565b60009081526065602052604090206001015490565b61032f6103dd366004613395565b6108db565b61032f6103f036600461345b565b610920565b61032f6104033660046134df565b61094a565b61032f61041636600461345b565b610975565b61032f610429366004612fe6565b6109a7565b61044161043c3660046134df565b610bd5565b6040516102f39190613693565b61032f61045c3660046136a4565b61102e565b61032f61046f3660046136f4565b611061565b6104876104823660046137d6565b6110c0565b6040516102f39190613899565b61030f6104a2366004613220565b600090815260fb6020526040902054151590565b61032f6104c43660046138f4565b61119f565b61032f6104d7366004613994565b61120e565b61032f6104ea366004613a0e565b611251565b61032f6104fd366004613a0e565b611284565b61032f610510366004613bfd565b6112a7565b61032f610523366004613c4a565b611399565b6102e67f7804d923f43a17d325d77e781528e0793b2edd9890ab45fc64efd7b4b427744c81565b61032f6113bd565b61032f610565366004613c91565b61154b565b6102e6610578366004613220565b6116c3565b61030f61058b36600461345b565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040805180820190915260068152650424253484f560d41b6020820152610366565b61032f6105e63660046136a4565b6116d4565b6102e6600081565b61032f610601366004613cff565b6116f7565b610619610614366004613220565b611702565b6040516102f39190613d32565b6102e6610634366004613220565b600090815261012e602052604090206002015490565b6102e6610658366004613220565b600090815260fb602052604090205490565b610366610678366004613220565b611a96565b6102e66000805160206148d383398151915281565b6102e66000805160206148f383398151915281565b61032f6106b536600461345b565b611ab4565b6103666106c8366004613220565b611ad9565b61030f6106db366004613d43565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b61032f610717366004613d65565b611afa565b61032f61072a366004613dbf565b611b3f565b61032f61073d3660046134df565b611b82565b60006001600160a01b0383166107735760405162461bcd60e51b815260040161076a90613e50565b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b031982166342679f4f60e01b1480610798575061079882611ba7565b7f7804d923f43a17d325d77e781528e0793b2edd9890ab45fc64efd7b4b427744c6107ed81611be7565b6107f682611bf1565b5050565b60606099805461080990613e76565b80601f016020809104026020016040519081016040528092919081815260200182805461083590613e76565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b50505050509050919050565b610130818154811061089f57600080fd5b600091825260209091200154905081565b6000805160206148f38339815191526108c881611be7565b6108d485858585611c04565b5050505050565b6001600160a01b0385163314806108f757506108f785336106db565b6109135760405162461bcd60e51b815260040161076a90613efd565b6108d48585858585611d5f565b60008281526065602052604090206001015461093b81611be7565b6109458383611f0c565b505050565b6000805160206148f383398151915261096281611be7565b61096f61012f8484612ddd565b50505050565b6001600160a01b038116331461099d5760405162461bcd60e51b815260040161076a90613f67565b6107f68282611fae565b6000805160206148d38339815191526109bf81611be7565b6000826001600160401b038111156109d9576109d961308b565b604051908082528060200260200182016040528015610a02578160200160208202803683370190505b5090506000836001600160401b03811115610a1f57610a1f61308b565b604051908082528060200260200182016040528015610a48578160200160208202803683370190505b5061012d80549192506000610a5c83613f8d565b91905055506000610a6c86612031565b905060005b85811015610b76576000610a86826001613fa8565b610a9190600a613fc0565b610a9b9084613ff5565b90506000610aab61271083614009565b610ab6906001613fa8565b905060005b61013054811015610b40576101308181548110610ada57610ada61401d565b9060005260206000200154821015610b2e5761012f8181548110610b0057610b0061401d565b9060005260206000200154878581518110610b1d57610b1d61401d565b602002602001018181525050610b40565b80610b3881613f8d565b915050610abb565b506001858481518110610b5557610b5561401d565b60200260200101818152505050508080610b6e90613f8d565b915050610a71565b50610b9286848460405180602001604052806000815250611c04565b7f48f20fe641d10aa63754e3f66854491a1fc44cd6bde7d44cc41c00268ffedf35868484604051610bc59392919061403c565b60405180910390a1505050505050565b606081610bf45760405162461bcd60e51b815260040161076a90614094565b6000826001600160401b03811115610c0e57610c0e61308b565b604051908082528060200260200182016040528015610c9c57816020015b610c8960405180610160016040528060608152602001606081526020016000815260200160608152602001600081526020016000815260200160008152602001606081526020016060815260200160008152602001600081525090565b815260200190600190039081610c2c5790505b50905060005b838110156110265761012e6000868684818110610cc157610cc161401d565b90506020020135815260200190815260200160002060405180610160016040529081600082018054610cf290613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1e90613e76565b8015610d6b5780601f10610d4057610100808354040283529160200191610d6b565b820191906000526020600020905b815481529060010190602001808311610d4e57829003601f168201915b50505050508152602001600182018054610d8490613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610db090613e76565b8015610dfd5780601f10610dd257610100808354040283529160200191610dfd565b820191906000526020600020905b815481529060010190602001808311610de057829003601f168201915b5050505050815260200160028201548152602001600382018054610e2090613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4c90613e76565b8015610e995780601f10610e6e57610100808354040283529160200191610e99565b820191906000526020600020905b815481529060010190602001808311610e7c57829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782018054610ed090613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610efc90613e76565b8015610f495780601f10610f1e57610100808354040283529160200191610f49565b820191906000526020600020905b815481529060010190602001808311610f2c57829003601f168201915b50505050508152602001600882018054610f6290613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8e90613e76565b8015610fdb5780601f10610fb057610100808354040283529160200191610fdb565b820191906000526020600020905b815481529060010190602001808311610fbe57829003601f168201915b5050505050815260200160098201548152602001600a8201548152505082828151811061100a5761100a61401d565b60200260200101819052508061101f90613f8d565b9050610ca2565b509392505050565b6000805160206148d383398151915261104681611be7565b61096f82858560405180602001604052806000815250612073565b60005b818110156108d4576110ae338484848181106110825761108261401d565b905060200201602081019061109791906140a4565b878760405180602001604052806000815250611afa565b806110b881613f8d565b915050611064565b606081518351146110e35760405162461bcd60e51b815260040161076a9061410b565b600083516001600160401b038111156110fe576110fe61308b565b604051908082528060200260200182016040528015611127578160200160208202803683370190505b50905060005b84518110156110265761117285828151811061114b5761114b61401d565b60200260200101518583815181106111655761116561401d565b6020026020010151610742565b8282815181106111845761118461401d565b602090810291909101015261119881613f8d565b905061112d565b6000805160206148f38339815191526111b781611be7565b600087815261012e602052604090206111d1908787612e28565b50600087815261012e602052604090206111ef906001018585612e28565b5050600095865261012e60205260409095206002019490945550505050565b6001600160a01b03831633148061122a575061122a83336106db565b6112465760405162461bcd60e51b815260040161076a90614161565b61094583838361216c565b6000805160206148d383398151915261126981611be7565b61096f82858560405180602001604052806000815250611c04565b6000805160206148d383398151915261129c81611be7565b61096f82858561216c565b6000805160206148f38339815191526112bf81611be7565b600083815261012e602090815260409091208351805185936112e5928492910190612e9b565b5060208281015180516112fe9260018501920190612e9b565b506040820151600282015560608201518051611324916003840191602090910190612e9b565b506080820151600482015560a0820151600582015560c0820151600682015560e0820151805161135e916007840191602090910190612e9b565b50610100820151805161137b916008840191602090910190612e9b565b50610120820151600982015561014090910151600a90910155505050565b6000805160206148f38339815191526113b181611be7565b6108d485858585612073565b60006113c9600161230b565b905080156113e1576000805461ff0019166101001790555b6113f960405180602001604052806000815250612398565b6114016123c8565b6114096123c8565b6114116123c8565b61141c600033611f0c565b6114467f7804d923f43a17d325d77e781528e0793b2edd9890ab45fc64efd7b4b427744c33611f0c565b61145e6000805160206148f383398151915233611f0c565b600161012d556040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091526114ac9061012f906007612f0f565b506040805160e08101825260c881526102bc602082015261070891810191909152610bb860608201526113886080820152611d4c60a082015261271160c08201526114fc90610130906007612f4f565b508015611548576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989061153f9060019061418e565b60405180910390a15b50565b6000805160206148d383398151915261156381611be7565b816000816001600160401b0381111561157e5761157e61308b565b6040519080825280602002602001820160405280156115a7578160200160208202803683370190505b5090506000826001600160401b038111156115c4576115c461308b565b6040519080825280602002602001820160405280156115ed578160200160208202803683370190505b50905060005b838110156116635786868281811061160d5761160d61401d565b905060200201358382815181106116265761162661401d565b60200260200101818152505060018282815181106116465761164661401d565b60209081029190910101528061165b81613f8d565b9150506115f3565b5061167f87838360405180602001604052806000815250611c04565b7f0e3f63bcba9bd4df52aac7f27a0d430cf0a3c06963b7dfaa6c5d8641434b1c298783836040516116b29392919061403c565b60405180910390a150505050505050565b61012f818154811061089f57600080fd5b6000805160206148d38339815191526116ec81611be7565b61096f8285856123f1565b6107f6338383612510565b61175f60405180610160016040528060608152602001606081526020016000815260200160608152602001600081526020016000815260200160008152602001606081526020016060815260200160008152602001600081525090565b600082815261012e6020526040908190208151610160810190925280548290829061178990613e76565b80601f01602080910402602001604051908101604052809291908181526020018280546117b590613e76565b80156118025780601f106117d757610100808354040283529160200191611802565b820191906000526020600020905b8154815290600101906020018083116117e557829003601f168201915b5050505050815260200160018201805461181b90613e76565b80601f016020809104026020016040519081016040528092919081815260200182805461184790613e76565b80156118945780601f1061186957610100808354040283529160200191611894565b820191906000526020600020905b81548152906001019060200180831161187757829003601f168201915b50505050508152602001600282015481526020016003820180546118b790613e76565b80601f01602080910402602001604051908101604052809291908181526020018280546118e390613e76565b80156119305780601f1061190557610100808354040283529160200191611930565b820191906000526020600020905b81548152906001019060200180831161191357829003601f168201915b5050505050815260200160048201548152602001600582015481526020016006820154815260200160078201805461196790613e76565b80601f016020809104026020016040519081016040528092919081815260200182805461199390613e76565b80156119e05780601f106119b5576101008083540402835291602001916119e0565b820191906000526020600020905b8154815290600101906020018083116119c357829003601f168201915b505050505081526020016008820180546119f990613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054611a2590613e76565b8015611a725780601f10611a4757610100808354040283529160200191611a72565b820191906000526020600020905b815481529060010190602001808311611a5557829003601f168201915b5050505050815260200160098201548152602001600a820154815250509050919050565b600081815261012e6020526040902080546060919061080990613e76565b600082815260656020526040902060010154611acf81611be7565b6109458383611fae565b600081815261012e6020526040902060010180546060919061080990613e76565b6001600160a01b038516331480611b165750611b1685336106db565b611b325760405162461bcd60e51b815260040161076a90614161565b6108d485858585856125b3565b6001600160a01b038316331480611b5b5750611b5b83336106db565b611b775760405162461bcd60e51b815260040161076a90614161565b6109458383836123f1565b6000805160206148f3833981519152611b9a81611be7565b61096f6101308484612ddd565b60006001600160e01b03198216636cdb3d1360e11b1480611bd857506001600160e01b031982166303a24d0760e21b145b806107985750610798826126fb565b6115488133612730565b80516107f6906099906020840190612e9b565b6001600160a01b038416611c2a5760405162461bcd60e51b815260040161076a906141da565b8151835114611c4b5760405162461bcd60e51b815260040161076a9061422f565b33611c5b816000878787876127b0565b60005b8451811015611cf757838181518110611c7957611c7961401d565b602002602001015160976000878481518110611c9757611c9761401d565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611cdf9190613fa8565b90915550819050611cef81613f8d565b915050611c5e565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d4892919061423f565b60405180910390a46108d4816000878787876127be565b8151835114611d805760405162461bcd60e51b815260040161076a9061422f565b6001600160a01b038416611da65760405162461bcd60e51b815260040161076a906142a6565b33611db58187878787876127b0565b60005b8451811015611e9e576000858281518110611dd557611dd561401d565b602002602001015190506000858381518110611df357611df361401d565b60209081029190910181015160008481526097835260408082206001600160a01b038e168352909352919091205490915081811015611e445760405162461bcd60e51b815260040161076a906142fd565b60008381526097602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e83908490613fa8565b9250508190555050505080611e9790613f8d565b9050611db8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611eee92919061423f565b60405180910390a4611f048187878787876127be565b505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166107f65760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611f6a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156107f65760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600044428361204261012d546128dc565b604051602001612055949392919061435d565b60408051601f19818403018152919052805160209091012092915050565b6001600160a01b0384166120995760405162461bcd60e51b815260040161076a906141da565b3360006120a5856129e1565b905060006120b2856129e1565b90506120c3836000898585896127b0565b60008681526097602090815260408083206001600160a01b038b168452909152812080548792906120f5908490613fa8565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62898960405161214c9291906143a3565b60405180910390a461216383600089898989612a2c565b50505050505050565b6001600160a01b0383166121925760405162461bcd60e51b815260040161076a906143fe565b80518251146121b35760405162461bcd60e51b815260040161076a9061422f565b60003390506121d6818560008686604051806020016040528060008152506127b0565b60005b835181101561229e5760008482815181106121f6576121f661401d565b6020026020010151905060008483815181106122145761221461401d565b60209081029190910181015160008481526097835260408082206001600160a01b038c1683529093529190912054909150818110156122655760405162461bcd60e51b815260040161076a9061444f565b60009283526097602090815260408085206001600160a01b038b168652909152909220910390558061229681613f8d565b9150506121d9565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516122ef92919061423f565b60405180910390a460408051602081019091526000905261096f565b60008054610100900460ff1615612352578160ff16600114801561232e5750303b155b61234a5760405162461bcd60e51b815260040161076a906144b9565b506000919050565b60005460ff8084169116106123795760405162461bcd60e51b815260040161076a906144b9565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166123bf5760405162461bcd60e51b815260040161076a90614511565b61154881612af6565b600054610100900460ff166123ef5760405162461bcd60e51b815260040161076a90614511565b565b6001600160a01b0383166124175760405162461bcd60e51b815260040161076a906143fe565b336000612423846129e1565b90506000612430846129e1565b9050612450838760008585604051806020016040528060008152506127b0565b60008581526097602090815260408083206001600160a01b038a168452909152902054848110156124935760405162461bcd60e51b815260040161076a9061444f565b60008681526097602090815260408083206001600160a01b03808c16808652919093528184208986039055905190918716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62906124f4908b908b906143a3565b60405180910390a4604080516020810190915260009052612163565b816001600160a01b0316836001600160a01b031614156125425760405162461bcd60e51b815260040161076a90614567565b6001600160a01b0383811660008181526098602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906125a690859061307d565b60405180910390a3505050565b6001600160a01b0384166125d95760405162461bcd60e51b815260040161076a906142a6565b3360006125e5856129e1565b905060006125f2856129e1565b90506126028389898585896127b0565b60008681526097602090815260408083206001600160a01b038c168452909152902054858110156126455760405162461bcd60e51b815260040161076a906142fd565b60008781526097602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612684908490613fa8565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516126da9291906143a3565b60405180910390a46126f0848a8a8a8a8a612a2c565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b148061079857506301ffc9a760e01b6001600160e01b0319831614610798565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166107f65761276e816001600160a01b03166014612b26565b612779836020612b26565b60405160200161278a929190614577565b60408051601f198184030181529082905262461bcd60e51b825261076a9160040161320f565b611f04868686868686612ca5565b6001600160a01b0384163b15611f045760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061280290899089908890889088906004016145db565b602060405180830381600087803b15801561281c57600080fd5b505af192505050801561284c575060408051601f3d908101601f1916820190925261284991810190614646565b60015b6128ac57612858614667565b806308c379a01415612892575061286d614682565b806128785750612894565b8060405162461bcd60e51b815260040161076a919061320f565b505b60405162461bcd60e51b815260040161076a90614761565b6001600160e01b0319811663bc197c8160e01b146121635760405162461bcd60e51b815260040161076a906147b6565b6060816129005750506040805180820190915260018152600360fc1b602082015290565b8160005b811561292a578061291481613f8d565b91506129239050600a83613ff5565b9150612904565b6000816001600160401b038111156129445761294461308b565b6040519080825280601f01601f19166020018201604052801561296e576020820181803683370190505b5090505b84156129d9576129836001836147c6565b9150612990600a86614009565b61299b906030613fa8565b60f81b8183815181106129b0576129b061401d565b60200101906001600160f81b031916908160001a9053506129d2600a86613ff5565b9450612972565b949350505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612a1b57612a1b61401d565b602090810291909101015292915050565b6001600160a01b0384163b15611f045760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612a7090899089908890889088906004016147dd565b602060405180830381600087803b158015612a8a57600080fd5b505af1925050508015612aba575060408051601f3d908101601f19168201909252612ab791810190614646565b60015b612ac657612858614667565b6001600160e01b0319811663f23a6e6160e01b146121635760405162461bcd60e51b815260040161076a906147b6565b600054610100900460ff16612b1d5760405162461bcd60e51b815260040161076a90614511565b61154881611bf1565b60606000612b35836002613fc0565b612b40906002613fa8565b6001600160401b03811115612b5757612b5761308b565b6040519080825280601f01601f191660200182016040528015612b81576020820181803683370190505b509050600360fc1b81600081518110612b9c57612b9c61401d565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612bcb57612bcb61401d565b60200101906001600160f81b031916908160001a9053506000612bef846002613fc0565b612bfa906001613fa8565b90505b6001811115612c7f577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612c3b57612c3b61401d565b1a60f81b828281518110612c5157612c5161401d565b60200101906001600160f81b031916908160001a90535060049490941c93612c7881614824565b9050612bfd565b508315612c9e5760405162461bcd60e51b815260040161076a9061486d565b9392505050565b6001600160a01b038516612d2c5760005b8351811015612d2a57828181518110612cd157612cd161401d565b602002602001015160fb6000868481518110612cef57612cef61401d565b602002602001015181526020019081526020016000206000828254612d149190613fa8565b90915550612d23905081613f8d565b9050612cb6565b505b6001600160a01b038416611f045760005b8351811015612163576000848281518110612d5a57612d5a61401d565b602002602001015190506000848381518110612d7857612d7861401d565b60200260200101519050600060fb600084815260200190815260200160002054905081811015612dba5760405162461bcd60e51b815260040161076a906148c2565b600092835260fb602052604090922091039055612dd681613f8d565b9050612d3d565b828054828255906000526020600020908101928215612e18579160200282015b82811115612e18578235825591602001919060010190612dfd565b50612e24929150612f90565b5090565b828054612e3490613e76565b90600052602060002090601f016020900481019282612e565760008555612e18565b82601f10612e6f5782800160ff19823516178555612e18565b82800160010185558215612e185791820182811115612e18578235825591602001919060010190612dfd565b828054612ea790613e76565b90600052602060002090601f016020900481019282612ec95760008555612e18565b82601f10612ee257805160ff1916838001178555612e18565b82800160010185558215612e18579182015b82811115612e18578251825591602001919060010190612ef4565b828054828255906000526020600020908101928215612e18579160200282015b82811115612e18578251829060ff16905591602001919060010190612f2f565b828054828255906000526020600020908101928215612e18579160200282015b82811115612e18578251829061ffff16905591602001919060010190612f6f565b5b80821115612e245760008155600101612f91565b60006001600160a01b038216610798565b612fbf81612fa5565b811461154857600080fd5b803561079881612fb6565b80612fbf565b803561079881612fd5565b60008060408385031215612ffc57612ffc600080fd5b60006130088585612fca565b925050602061301985828601612fdb565b9150509250929050565b805b82525050565b602081016107988284613023565b6001600160e01b03198116612fbf565b803561079881613039565b60006020828403121561306957613069600080fd5b60006129d98484613049565b801515613025565b602081016107988284613075565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b03821117156130c6576130c661308b565b6040525050565b60006130d860405190565b905061239382826130a1565b60006001600160401b038211156130fd576130fd61308b565b601f19601f83011660200192915050565b82818337506000910152565b600061312d613128846130e4565b6130cd565b90508281526020810184848401111561314857613148600080fd5b61102684828561310e565b600082601f83011261316757613167600080fd5b81356129d984826020860161311a565b60006020828403121561318c5761318c600080fd5b81356001600160401b038111156131a5576131a5600080fd5b6129d984828501613153565b60005b838110156131cc5781810151838201526020016131b4565b8381111561096f5750506000910152565b60006131e7825190565b8084526020840193506131fe8185602086016131b1565b601f01601f19169290920192915050565b60208082528101612c9e81846131dd565b60006020828403121561323557613235600080fd5b60006129d98484612fdb565b60006001600160401b0382111561325a5761325a61308b565b5060209081020190565b600061327261312884613241565b8381529050602080820190840283018581111561329157613291600080fd5b835b818110156132b557806132a68882612fdb565b84525060209283019201613293565b5050509392505050565b600082601f8301126132d3576132d3600080fd5b81356129d9848260208601613264565b600080600080608085870312156132fc576132fc600080fd5b60006133088787612fca565b94505060208501356001600160401b0381111561332757613327600080fd5b613333878288016132bf565b93505060408501356001600160401b0381111561335257613352600080fd5b61335e878288016132bf565b92505060608501356001600160401b0381111561337d5761337d600080fd5b61338987828801613153565b91505092959194509250565b600080600080600060a086880312156133b0576133b0600080fd5b60006133bc8888612fca565b95505060206133cd88828901612fca565b94505060408601356001600160401b038111156133ec576133ec600080fd5b6133f8888289016132bf565b93505060608601356001600160401b0381111561341757613417600080fd5b613423888289016132bf565b92505060808601356001600160401b0381111561344257613442600080fd5b61344e88828901613153565b9150509295509295909350565b6000806040838503121561347157613471600080fd5b600061347d8585612fdb565b925050602061301985828601612fca565b60008083601f8401126134a3576134a3600080fd5b5081356001600160401b038111156134bd576134bd600080fd5b6020830191508360208202830111156134d8576134d8600080fd5b9250929050565b600080602083850312156134f5576134f5600080fd5b82356001600160401b0381111561350e5761350e600080fd5b61351a8582860161348e565b92509250509250929050565b80516101608084526000919084019061353f82826131dd565b9150506020830151848203602086015261355982826131dd565b915050604083015161356e6040860182613023565b506060830151848203606086015261358682826131dd565b915050608083015161359b6080860182613023565b5060a08301516135ae60a0860182613023565b5060c08301516135c160c0860182613023565b5060e083015184820360e08601526135d982826131dd565b9150506101008301518482036101008601526135f582826131dd565b91505061012083015161360c610120860182613023565b50610140830151611026610140860182613023565b6000612c9e8383613526565b6000613637825190565b808452602084019350836020820285016136518560200190565b8060005b85811015613686578484038952815161366e8582613621565b94506020830160209a909a0199925050600101613655565b5091979650505050505050565b60208082528101612c9e818461362d565b6000806000606084860312156136bc576136bc600080fd5b60006136c88686612fdb565b93505060206136d986828701612fdb565b92505060406136ea86828701612fca565b9150509250925092565b6000806000806060858703121561370d5761370d600080fd5b60006137198787612fdb565b945050602061372a87828801612fdb565b93505060408501356001600160401b0381111561374957613749600080fd5b6137558782880161348e565b95989497509550505050565b600061376f61312884613241565b8381529050602080820190840283018581111561378e5761378e600080fd5b835b818110156132b557806137a38882612fca565b84525060209283019201613790565b600082601f8301126137c6576137c6600080fd5b81356129d9848260208601613761565b600080604083850312156137ec576137ec600080fd5b82356001600160401b0381111561380557613805600080fd5b613811858286016137b2565b92505060208301356001600160401b0381111561383057613830600080fd5b613019858286016132bf565b60006138488383613023565b505060200190565b600061385a825190565b80845260209384019383018060005b8381101561388e57815161387d888261383c565b975060208301925050600101613869565b509495945050505050565b60208082528101612c9e8184613850565b60008083601f8401126138bf576138bf600080fd5b5081356001600160401b038111156138d9576138d9600080fd5b6020830191508360018202830111156134d8576134d8600080fd5b6000806000806000806080878903121561391057613910600080fd5b600061391c8989612fdb565b96505060208701356001600160401b0381111561393b5761393b600080fd5b61394789828a016138aa565b955095505060408701356001600160401b0381111561396857613968600080fd5b61397489828a016138aa565b9350935050606061398789828a01612fdb565b9150509295509295509295565b6000806000606084860312156139ac576139ac600080fd5b60006139b88686612fca565b93505060208401356001600160401b038111156139d7576139d7600080fd5b6139e3868287016132bf565b92505060408401356001600160401b03811115613a0257613a02600080fd5b6136ea868287016132bf565b600080600060608486031215613a2657613a26600080fd5b83356001600160401b03811115613a3f57613a3f600080fd5b613a4b868287016132bf565b93505060208401356001600160401b03811115613a6a57613a6a600080fd5b6136d9868287016132bf565b60006101608284031215613a8c57613a8c600080fd5b613a976101606130cd565b905081356001600160401b03811115613ab257613ab2600080fd5b613abe84828501613153565b82525060208201356001600160401b03811115613add57613add600080fd5b613ae984828501613153565b6020830152506040613afd84828501612fdb565b60408301525060608201356001600160401b03811115613b1f57613b1f600080fd5b613b2b84828501613153565b6060830152506080613b3f84828501612fdb565b60808301525060a0613b5384828501612fdb565b60a08301525060c0613b6784828501612fdb565b60c08301525060e08201356001600160401b03811115613b8957613b89600080fd5b613b9584828501613153565b60e0830152506101008201356001600160401b03811115613bb857613bb8600080fd5b613bc484828501613153565b61010083015250610120613bda84828501612fdb565b61012083015250610140613bf084828501612fdb565b6101408301525092915050565b60008060408385031215613c1357613c13600080fd5b6000613c1f8585612fdb565b92505060208301356001600160401b03811115613c3e57613c3e600080fd5b61301985828601613a76565b60008060008060808587031215613c6357613c63600080fd5b6000613c6f8787612fca565b9450506020613c8087828801612fdb565b935050604061335e87828801612fdb565b600080600060408486031215613ca957613ca9600080fd5b6000613cb58686612fca565b93505060208401356001600160401b03811115613cd457613cd4600080fd5b613ce08682870161348e565b92509250509250925092565b801515612fbf565b803561079881613cec565b60008060408385031215613d1557613d15600080fd5b6000613d218585612fca565b925050602061301985828601613cf4565b60208082528101612c9e8184613526565b60008060408385031215613d5957613d59600080fd5b600061347d8585612fca565b600080600080600060a08688031215613d8057613d80600080fd5b6000613d8c8888612fca565b9550506020613d9d88828901612fca565b9450506040613dae88828901612fdb565b935050606061342388828901612fdb565b600080600060608486031215613dd757613dd7600080fd5b6000613de38686612fca565b9350506020613df486828701612fdb565b92505060406136ea86828701612fdb565b602b81526000602082017f455243313135353a2062616c616e636520717565727920666f7220746865207a81526a65726f206164647265737360a81b602082015291505b5060400190565b6020808252810161079881613e05565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613e8a57607f821691505b60208210811415613e9d57613e9d613e60565b50919050565b603281526000602082017f455243313135353a207472616e736665722063616c6c6572206973206e6f742081527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060208201529150613e49565b6020808252810161079881613ea3565b602f81526000602082017f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581527f20726f6c657320666f722073656c66000000000000000000000000000000000060208201529150613e49565b6020808252810161079881613f0d565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fa157613fa1613f77565b5060010190565b60008219821115613fbb57613fbb613f77565b500190565b6000816000190483118215151615613fda57613fda613f77565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261400457614004613fdf565b500490565b60008261401857614018613fdf565b500690565b634e487b7160e01b600052603260045260246000fd5b61302581612fa5565b6060810161404a8286614033565b818103602083015261405c8185613850565b905081810360408301526140708184613850565b95945050505050565b60018152600060208201600360fc1b815291505b5060200190565b6020808252810161079881614079565b6000602082840312156140b9576140b9600080fd5b60006129d98484612fca565b602981526000602082017f455243313135353a206163636f756e747320616e6420696473206c656e677468815268040dad2e6dac2e8c6d60bb1b60208201529150613e49565b60208082528101610798816140c5565b602981526000602082017f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7281526808185c1c1c9bdd995960ba1b60208201529150613e49565b602080825281016107988161411b565b60006107988261417f565b90565b60ff1690565b61302581614171565b602081016107988284614185565b602181526000602082017f455243313135353a206d696e7420746f20746865207a65726f206164647265738152607360f81b60208201529150613e49565b602080825281016107988161419c565b602881526000602082017f455243313135353a2069647320616e6420616d6f756e7473206c656e677468208152670dad2e6dac2e8c6d60c31b60208201529150613e49565b60208082528101610798816141ea565b604080825281016142508185613850565b905081810360208301526129d98184613850565b602581526000602082017f455243313135353a207472616e7366657220746f20746865207a65726f206164815264647265737360d81b60208201529150613e49565b6020808252810161079881614264565b602a81526000602082017f455243313135353a20696e73756666696369656e742062616c616e636520666f81526939103a3930b739b332b960b11b60208201529150613e49565b60208082528101610798816142b6565b80613025565b60006107988260601b90565b600061079882614313565b61302561433682612fa5565b61431f565b6000614345825190565b6143538185602086016131b1565b9290920192915050565b6000614369828761430d565b602082019150614379828661430d565b602082019150614389828561432a565b601482019150614399828461433b565b9695505050505050565b604081016143b18285613023565b612c9e6020830184613023565b602381526000602082017f455243313135353a206275726e2066726f6d20746865207a65726f206164647281526265737360e81b60208201529150613e49565b60208082528101610798816143be565b602481526000602082017f455243313135353a206275726e20616d6f756e7420657863656564732062616c815263616e636560e01b60208201529150613e49565b602080825281016107988161440e565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181527f647920696e697469616c697a656400000000000000000000000000000000000060208201529150613e49565b602080825281016107988161445f565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b60208201529150613e49565b60208082528101610798816144c9565b602981526000602082017f455243313135353a2073657474696e6720617070726f76616c20737461747573815268103337b91039b2b63360b91b60208201529150613e49565b6020808252810161079881614521565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260170160006145a9828561433b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000815260110191506129d9828461433b565b60a081016145e98288614033565b6145f66020830187614033565b81810360408301526146088186613850565b9050818103606083015261461c8185613850565b9050818103608083015261463081846131dd565b979650505050505050565b805161079881613039565b60006020828403121561465b5761465b600080fd5b60006129d9848461463b565b600060033d111561417c5760046000803e5060005160e01c90565b600060443d10156146905790565b60405160043d036004823e80513d60248201116001600160401b03821117156146b857505090565b80820180516001600160401b038111156146d3575050505090565b80602083010160043d0385018111156146ee57505050505090565b6146fd826020018501866130a1565b5090949350505050565b603481526000602082017f455243313135353a207472616e7366657220746f206e6f6e204552433131353581527f526563656976657220696d706c656d656e74657200000000000000000000000060208201529150613e49565b6020808252810161079881614707565b602881526000602082017f455243313135353a204552433131353552656365697665722072656a656374658152676420746f6b656e7360c01b60208201529150613e49565b6020808252810161079881614771565b6000828210156147d8576147d8613f77565b500390565b60a081016147eb8288614033565b6147f86020830187614033565b6148056040830186613023565b6148126060830185613023565b818103608083015261463081846131dd565b60008161483357614833613f77565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e749101908152600061408d565b602080825281016107988161483b565b602881526000602082017f455243313135353a206275726e20616d6f756e74206578636565647320746f74815267616c537570706c7960c01b60208201529150613e49565b602080825281016107988161487d56fefc774c32e29e21e9ba21cd756bf11bad138fd7eb34eb4d84154c03fe1e0ce8609f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212203e5819fa88af4fb9ceae3339875670aa857f7bd38ef385e3594a5bcc465b23e364736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ce5760003560e01c80636fad1e041161018c578063a574cea4116100ee578063d547741f11610097578063f242432a11610071578063f242432a14610709578063f5298aca1461071c578063ff7ebe0f1461072f57600080fd5b8063d547741f146106a7578063d9561a91146106ba578063e985e9c5146106cd57600080fd5b8063c19a4ef5116100c8578063c19a4ef51461066a578063c50b0d631461067d578063d53913931461069257600080fd5b8063a574cea414610606578063adc0f74514610626578063bd85b0391461064a57600080fd5b8063907a3e56116101505780639eef4aa61161012a5780639eef4aa6146105d8578063a217fddf146105eb578063a22cb465146105f357600080fd5b8063907a3e561461056a57806391d148541461057d57806395d89b41146105b657600080fd5b80636fad1e0414610502578063731133e9146105155780637f345710146105285780638129fc1c1461054f5780638d908e081461055757600080fd5b806336568abe116102355780634e1273f4116101f95780636b20c454116101d35780636b20c454146104c95780636c481bc6146104dc5780636cad7afe146104ef57600080fd5b80634e1273f4146104745780634f558e79146104945780635d4e898e146104b657600080fd5b806336568abe146104085780633cbf48e91461041b57806343a9c03c1461042e578063466e79eb1461044e5780634a1e31e81461046157600080fd5b806317b8e1cf116102975780632eb2c2d6116102715780632eb2c2d6146103cf5780632f2ff15d146103e2578063357260f4146103f557600080fd5b806317b8e1cf146103865780631f7fdffa14610399578063248a9ca3146103ac57600080fd5b8062fdd58e146102d357806301ffc9a7146102fc57806302fe53051461031c57806306fdde03146103315780630e89341c14610373575b600080fd5b6102e66102e1366004612fe6565b610742565b6040516102f3919061302b565b60405180910390f35b61030f61030a366004613054565b61079e565b6040516102f3919061307d565b61032f61032a366004613177565b6107c3565b005b60408051808201909152601281527f427261776c657220426561727a2053686f70000000000000000000000000000060208201525b6040516102f3919061320f565b610366610381366004613220565b6107fa565b6102e6610394366004613220565b61088e565b61032f6103a73660046132e3565b6108b0565b6102e66103ba366004613220565b60009081526065602052604090206001015490565b61032f6103dd366004613395565b6108db565b61032f6103f036600461345b565b610920565b61032f6104033660046134df565b61094a565b61032f61041636600461345b565b610975565b61032f610429366004612fe6565b6109a7565b61044161043c3660046134df565b610bd5565b6040516102f39190613693565b61032f61045c3660046136a4565b61102e565b61032f61046f3660046136f4565b611061565b6104876104823660046137d6565b6110c0565b6040516102f39190613899565b61030f6104a2366004613220565b600090815260fb6020526040902054151590565b61032f6104c43660046138f4565b61119f565b61032f6104d7366004613994565b61120e565b61032f6104ea366004613a0e565b611251565b61032f6104fd366004613a0e565b611284565b61032f610510366004613bfd565b6112a7565b61032f610523366004613c4a565b611399565b6102e67f7804d923f43a17d325d77e781528e0793b2edd9890ab45fc64efd7b4b427744c81565b61032f6113bd565b61032f610565366004613c91565b61154b565b6102e6610578366004613220565b6116c3565b61030f61058b36600461345b565b60009182526065602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6040805180820190915260068152650424253484f560d41b6020820152610366565b61032f6105e63660046136a4565b6116d4565b6102e6600081565b61032f610601366004613cff565b6116f7565b610619610614366004613220565b611702565b6040516102f39190613d32565b6102e6610634366004613220565b600090815261012e602052604090206002015490565b6102e6610658366004613220565b600090815260fb602052604090205490565b610366610678366004613220565b611a96565b6102e66000805160206148d383398151915281565b6102e66000805160206148f383398151915281565b61032f6106b536600461345b565b611ab4565b6103666106c8366004613220565b611ad9565b61030f6106db366004613d43565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205460ff1690565b61032f610717366004613d65565b611afa565b61032f61072a366004613dbf565b611b3f565b61032f61073d3660046134df565b611b82565b60006001600160a01b0383166107735760405162461bcd60e51b815260040161076a90613e50565b60405180910390fd5b5060008181526097602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b031982166342679f4f60e01b1480610798575061079882611ba7565b7f7804d923f43a17d325d77e781528e0793b2edd9890ab45fc64efd7b4b427744c6107ed81611be7565b6107f682611bf1565b5050565b60606099805461080990613e76565b80601f016020809104026020016040519081016040528092919081815260200182805461083590613e76565b80156108825780601f1061085757610100808354040283529160200191610882565b820191906000526020600020905b81548152906001019060200180831161086557829003601f168201915b50505050509050919050565b610130818154811061089f57600080fd5b600091825260209091200154905081565b6000805160206148f38339815191526108c881611be7565b6108d485858585611c04565b5050505050565b6001600160a01b0385163314806108f757506108f785336106db565b6109135760405162461bcd60e51b815260040161076a90613efd565b6108d48585858585611d5f565b60008281526065602052604090206001015461093b81611be7565b6109458383611f0c565b505050565b6000805160206148f383398151915261096281611be7565b61096f61012f8484612ddd565b50505050565b6001600160a01b038116331461099d5760405162461bcd60e51b815260040161076a90613f67565b6107f68282611fae565b6000805160206148d38339815191526109bf81611be7565b6000826001600160401b038111156109d9576109d961308b565b604051908082528060200260200182016040528015610a02578160200160208202803683370190505b5090506000836001600160401b03811115610a1f57610a1f61308b565b604051908082528060200260200182016040528015610a48578160200160208202803683370190505b5061012d80549192506000610a5c83613f8d565b91905055506000610a6c86612031565b905060005b85811015610b76576000610a86826001613fa8565b610a9190600a613fc0565b610a9b9084613ff5565b90506000610aab61271083614009565b610ab6906001613fa8565b905060005b61013054811015610b40576101308181548110610ada57610ada61401d565b9060005260206000200154821015610b2e5761012f8181548110610b0057610b0061401d565b9060005260206000200154878581518110610b1d57610b1d61401d565b602002602001018181525050610b40565b80610b3881613f8d565b915050610abb565b506001858481518110610b5557610b5561401d565b60200260200101818152505050508080610b6e90613f8d565b915050610a71565b50610b9286848460405180602001604052806000815250611c04565b7f48f20fe641d10aa63754e3f66854491a1fc44cd6bde7d44cc41c00268ffedf35868484604051610bc59392919061403c565b60405180910390a1505050505050565b606081610bf45760405162461bcd60e51b815260040161076a90614094565b6000826001600160401b03811115610c0e57610c0e61308b565b604051908082528060200260200182016040528015610c9c57816020015b610c8960405180610160016040528060608152602001606081526020016000815260200160608152602001600081526020016000815260200160008152602001606081526020016060815260200160008152602001600081525090565b815260200190600190039081610c2c5790505b50905060005b838110156110265761012e6000868684818110610cc157610cc161401d565b90506020020135815260200190815260200160002060405180610160016040529081600082018054610cf290613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610d1e90613e76565b8015610d6b5780601f10610d4057610100808354040283529160200191610d6b565b820191906000526020600020905b815481529060010190602001808311610d4e57829003601f168201915b50505050508152602001600182018054610d8490613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610db090613e76565b8015610dfd5780601f10610dd257610100808354040283529160200191610dfd565b820191906000526020600020905b815481529060010190602001808311610de057829003601f168201915b5050505050815260200160028201548152602001600382018054610e2090613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4c90613e76565b8015610e995780601f10610e6e57610100808354040283529160200191610e99565b820191906000526020600020905b815481529060010190602001808311610e7c57829003601f168201915b50505050508152602001600482015481526020016005820154815260200160068201548152602001600782018054610ed090613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610efc90613e76565b8015610f495780601f10610f1e57610100808354040283529160200191610f49565b820191906000526020600020905b815481529060010190602001808311610f2c57829003601f168201915b50505050508152602001600882018054610f6290613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054610f8e90613e76565b8015610fdb5780601f10610fb057610100808354040283529160200191610fdb565b820191906000526020600020905b815481529060010190602001808311610fbe57829003601f168201915b5050505050815260200160098201548152602001600a8201548152505082828151811061100a5761100a61401d565b60200260200101819052508061101f90613f8d565b9050610ca2565b509392505050565b6000805160206148d383398151915261104681611be7565b61096f82858560405180602001604052806000815250612073565b60005b818110156108d4576110ae338484848181106110825761108261401d565b905060200201602081019061109791906140a4565b878760405180602001604052806000815250611afa565b806110b881613f8d565b915050611064565b606081518351146110e35760405162461bcd60e51b815260040161076a9061410b565b600083516001600160401b038111156110fe576110fe61308b565b604051908082528060200260200182016040528015611127578160200160208202803683370190505b50905060005b84518110156110265761117285828151811061114b5761114b61401d565b60200260200101518583815181106111655761116561401d565b6020026020010151610742565b8282815181106111845761118461401d565b602090810291909101015261119881613f8d565b905061112d565b6000805160206148f38339815191526111b781611be7565b600087815261012e602052604090206111d1908787612e28565b50600087815261012e602052604090206111ef906001018585612e28565b5050600095865261012e60205260409095206002019490945550505050565b6001600160a01b03831633148061122a575061122a83336106db565b6112465760405162461bcd60e51b815260040161076a90614161565b61094583838361216c565b6000805160206148d383398151915261126981611be7565b61096f82858560405180602001604052806000815250611c04565b6000805160206148d383398151915261129c81611be7565b61096f82858561216c565b6000805160206148f38339815191526112bf81611be7565b600083815261012e602090815260409091208351805185936112e5928492910190612e9b565b5060208281015180516112fe9260018501920190612e9b565b506040820151600282015560608201518051611324916003840191602090910190612e9b565b506080820151600482015560a0820151600582015560c0820151600682015560e0820151805161135e916007840191602090910190612e9b565b50610100820151805161137b916008840191602090910190612e9b565b50610120820151600982015561014090910151600a90910155505050565b6000805160206148f38339815191526113b181611be7565b6108d485858585612073565b60006113c9600161230b565b905080156113e1576000805461ff0019166101001790555b6113f960405180602001604052806000815250612398565b6114016123c8565b6114096123c8565b6114116123c8565b61141c600033611f0c565b6114467f7804d923f43a17d325d77e781528e0793b2edd9890ab45fc64efd7b4b427744c33611f0c565b61145e6000805160206148f383398151915233611f0c565b600161012d556040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c08101919091526114ac9061012f906007612f0f565b506040805160e08101825260c881526102bc602082015261070891810191909152610bb860608201526113886080820152611d4c60a082015261271160c08201526114fc90610130906007612f4f565b508015611548576000805461ff00191690556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989061153f9060019061418e565b60405180910390a15b50565b6000805160206148d383398151915261156381611be7565b816000816001600160401b0381111561157e5761157e61308b565b6040519080825280602002602001820160405280156115a7578160200160208202803683370190505b5090506000826001600160401b038111156115c4576115c461308b565b6040519080825280602002602001820160405280156115ed578160200160208202803683370190505b50905060005b838110156116635786868281811061160d5761160d61401d565b905060200201358382815181106116265761162661401d565b60200260200101818152505060018282815181106116465761164661401d565b60209081029190910101528061165b81613f8d565b9150506115f3565b5061167f87838360405180602001604052806000815250611c04565b7f0e3f63bcba9bd4df52aac7f27a0d430cf0a3c06963b7dfaa6c5d8641434b1c298783836040516116b29392919061403c565b60405180910390a150505050505050565b61012f818154811061089f57600080fd5b6000805160206148d38339815191526116ec81611be7565b61096f8285856123f1565b6107f6338383612510565b61175f60405180610160016040528060608152602001606081526020016000815260200160608152602001600081526020016000815260200160008152602001606081526020016060815260200160008152602001600081525090565b600082815261012e6020526040908190208151610160810190925280548290829061178990613e76565b80601f01602080910402602001604051908101604052809291908181526020018280546117b590613e76565b80156118025780601f106117d757610100808354040283529160200191611802565b820191906000526020600020905b8154815290600101906020018083116117e557829003601f168201915b5050505050815260200160018201805461181b90613e76565b80601f016020809104026020016040519081016040528092919081815260200182805461184790613e76565b80156118945780601f1061186957610100808354040283529160200191611894565b820191906000526020600020905b81548152906001019060200180831161187757829003601f168201915b50505050508152602001600282015481526020016003820180546118b790613e76565b80601f01602080910402602001604051908101604052809291908181526020018280546118e390613e76565b80156119305780601f1061190557610100808354040283529160200191611930565b820191906000526020600020905b81548152906001019060200180831161191357829003601f168201915b5050505050815260200160048201548152602001600582015481526020016006820154815260200160078201805461196790613e76565b80601f016020809104026020016040519081016040528092919081815260200182805461199390613e76565b80156119e05780601f106119b5576101008083540402835291602001916119e0565b820191906000526020600020905b8154815290600101906020018083116119c357829003601f168201915b505050505081526020016008820180546119f990613e76565b80601f0160208091040260200160405190810160405280929190818152602001828054611a2590613e76565b8015611a725780601f10611a4757610100808354040283529160200191611a72565b820191906000526020600020905b815481529060010190602001808311611a5557829003601f168201915b5050505050815260200160098201548152602001600a820154815250509050919050565b600081815261012e6020526040902080546060919061080990613e76565b600082815260656020526040902060010154611acf81611be7565b6109458383611fae565b600081815261012e6020526040902060010180546060919061080990613e76565b6001600160a01b038516331480611b165750611b1685336106db565b611b325760405162461bcd60e51b815260040161076a90614161565b6108d485858585856125b3565b6001600160a01b038316331480611b5b5750611b5b83336106db565b611b775760405162461bcd60e51b815260040161076a90614161565b6109458383836123f1565b6000805160206148f3833981519152611b9a81611be7565b61096f6101308484612ddd565b60006001600160e01b03198216636cdb3d1360e11b1480611bd857506001600160e01b031982166303a24d0760e21b145b806107985750610798826126fb565b6115488133612730565b80516107f6906099906020840190612e9b565b6001600160a01b038416611c2a5760405162461bcd60e51b815260040161076a906141da565b8151835114611c4b5760405162461bcd60e51b815260040161076a9061422f565b33611c5b816000878787876127b0565b60005b8451811015611cf757838181518110611c7957611c7961401d565b602002602001015160976000878481518110611c9757611c9761401d565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611cdf9190613fa8565b90915550819050611cef81613f8d565b915050611c5e565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611d4892919061423f565b60405180910390a46108d4816000878787876127be565b8151835114611d805760405162461bcd60e51b815260040161076a9061422f565b6001600160a01b038416611da65760405162461bcd60e51b815260040161076a906142a6565b33611db58187878787876127b0565b60005b8451811015611e9e576000858281518110611dd557611dd561401d565b602002602001015190506000858381518110611df357611df361401d565b60209081029190910181015160008481526097835260408082206001600160a01b038e168352909352919091205490915081811015611e445760405162461bcd60e51b815260040161076a906142fd565b60008381526097602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611e83908490613fa8565b9250508190555050505080611e9790613f8d565b9050611db8565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611eee92919061423f565b60405180910390a4611f048187878787876127be565b505050505050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166107f65760008281526065602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611f6a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff16156107f65760008281526065602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600044428361204261012d546128dc565b604051602001612055949392919061435d565b60408051601f19818403018152919052805160209091012092915050565b6001600160a01b0384166120995760405162461bcd60e51b815260040161076a906141da565b3360006120a5856129e1565b905060006120b2856129e1565b90506120c3836000898585896127b0565b60008681526097602090815260408083206001600160a01b038b168452909152812080548792906120f5908490613fa8565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62898960405161214c9291906143a3565b60405180910390a461216383600089898989612a2c565b50505050505050565b6001600160a01b0383166121925760405162461bcd60e51b815260040161076a906143fe565b80518251146121b35760405162461bcd60e51b815260040161076a9061422f565b60003390506121d6818560008686604051806020016040528060008152506127b0565b60005b835181101561229e5760008482815181106121f6576121f661401d565b6020026020010151905060008483815181106122145761221461401d565b60209081029190910181015160008481526097835260408082206001600160a01b038c1683529093529190912054909150818110156122655760405162461bcd60e51b815260040161076a9061444f565b60009283526097602090815260408085206001600160a01b038b168652909152909220910390558061229681613f8d565b9150506121d9565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516122ef92919061423f565b60405180910390a460408051602081019091526000905261096f565b60008054610100900460ff1615612352578160ff16600114801561232e5750303b155b61234a5760405162461bcd60e51b815260040161076a906144b9565b506000919050565b60005460ff8084169116106123795760405162461bcd60e51b815260040161076a906144b9565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff166123bf5760405162461bcd60e51b815260040161076a90614511565b61154881612af6565b600054610100900460ff166123ef5760405162461bcd60e51b815260040161076a90614511565b565b6001600160a01b0383166124175760405162461bcd60e51b815260040161076a906143fe565b336000612423846129e1565b90506000612430846129e1565b9050612450838760008585604051806020016040528060008152506127b0565b60008581526097602090815260408083206001600160a01b038a168452909152902054848110156124935760405162461bcd60e51b815260040161076a9061444f565b60008681526097602090815260408083206001600160a01b03808c16808652919093528184208986039055905190918716907fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62906124f4908b908b906143a3565b60405180910390a4604080516020810190915260009052612163565b816001600160a01b0316836001600160a01b031614156125425760405162461bcd60e51b815260040161076a90614567565b6001600160a01b0383811660008181526098602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906125a690859061307d565b60405180910390a3505050565b6001600160a01b0384166125d95760405162461bcd60e51b815260040161076a906142a6565b3360006125e5856129e1565b905060006125f2856129e1565b90506126028389898585896127b0565b60008681526097602090815260408083206001600160a01b038c168452909152902054858110156126455760405162461bcd60e51b815260040161076a906142fd565b60008781526097602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612684908490613fa8565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516126da9291906143a3565b60405180910390a46126f0848a8a8a8a8a612a2c565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b148061079857506301ffc9a760e01b6001600160e01b0319831614610798565b60008281526065602090815260408083206001600160a01b038516845290915290205460ff166107f65761276e816001600160a01b03166014612b26565b612779836020612b26565b60405160200161278a929190614577565b60408051601f198184030181529082905262461bcd60e51b825261076a9160040161320f565b611f04868686868686612ca5565b6001600160a01b0384163b15611f045760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061280290899089908890889088906004016145db565b602060405180830381600087803b15801561281c57600080fd5b505af192505050801561284c575060408051601f3d908101601f1916820190925261284991810190614646565b60015b6128ac57612858614667565b806308c379a01415612892575061286d614682565b806128785750612894565b8060405162461bcd60e51b815260040161076a919061320f565b505b60405162461bcd60e51b815260040161076a90614761565b6001600160e01b0319811663bc197c8160e01b146121635760405162461bcd60e51b815260040161076a906147b6565b6060816129005750506040805180820190915260018152600360fc1b602082015290565b8160005b811561292a578061291481613f8d565b91506129239050600a83613ff5565b9150612904565b6000816001600160401b038111156129445761294461308b565b6040519080825280601f01601f19166020018201604052801561296e576020820181803683370190505b5090505b84156129d9576129836001836147c6565b9150612990600a86614009565b61299b906030613fa8565b60f81b8183815181106129b0576129b061401d565b60200101906001600160f81b031916908160001a9053506129d2600a86613ff5565b9450612972565b949350505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612a1b57612a1b61401d565b602090810291909101015292915050565b6001600160a01b0384163b15611f045760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612a7090899089908890889088906004016147dd565b602060405180830381600087803b158015612a8a57600080fd5b505af1925050508015612aba575060408051601f3d908101601f19168201909252612ab791810190614646565b60015b612ac657612858614667565b6001600160e01b0319811663f23a6e6160e01b146121635760405162461bcd60e51b815260040161076a906147b6565b600054610100900460ff16612b1d5760405162461bcd60e51b815260040161076a90614511565b61154881611bf1565b60606000612b35836002613fc0565b612b40906002613fa8565b6001600160401b03811115612b5757612b5761308b565b6040519080825280601f01601f191660200182016040528015612b81576020820181803683370190505b509050600360fc1b81600081518110612b9c57612b9c61401d565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612bcb57612bcb61401d565b60200101906001600160f81b031916908160001a9053506000612bef846002613fc0565b612bfa906001613fa8565b90505b6001811115612c7f577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110612c3b57612c3b61401d565b1a60f81b828281518110612c5157612c5161401d565b60200101906001600160f81b031916908160001a90535060049490941c93612c7881614824565b9050612bfd565b508315612c9e5760405162461bcd60e51b815260040161076a9061486d565b9392505050565b6001600160a01b038516612d2c5760005b8351811015612d2a57828181518110612cd157612cd161401d565b602002602001015160fb6000868481518110612cef57612cef61401d565b602002602001015181526020019081526020016000206000828254612d149190613fa8565b90915550612d23905081613f8d565b9050612cb6565b505b6001600160a01b038416611f045760005b8351811015612163576000848281518110612d5a57612d5a61401d565b602002602001015190506000848381518110612d7857612d7861401d565b60200260200101519050600060fb600084815260200190815260200160002054905081811015612dba5760405162461bcd60e51b815260040161076a906148c2565b600092835260fb602052604090922091039055612dd681613f8d565b9050612d3d565b828054828255906000526020600020908101928215612e18579160200282015b82811115612e18578235825591602001919060010190612dfd565b50612e24929150612f90565b5090565b828054612e3490613e76565b90600052602060002090601f016020900481019282612e565760008555612e18565b82601f10612e6f5782800160ff19823516178555612e18565b82800160010185558215612e185791820182811115612e18578235825591602001919060010190612dfd565b828054612ea790613e76565b90600052602060002090601f016020900481019282612ec95760008555612e18565b82601f10612ee257805160ff1916838001178555612e18565b82800160010185558215612e18579182015b82811115612e18578251825591602001919060010190612ef4565b828054828255906000526020600020908101928215612e18579160200282015b82811115612e18578251829060ff16905591602001919060010190612f2f565b828054828255906000526020600020908101928215612e18579160200282015b82811115612e18578251829061ffff16905591602001919060010190612f6f565b5b80821115612e245760008155600101612f91565b60006001600160a01b038216610798565b612fbf81612fa5565b811461154857600080fd5b803561079881612fb6565b80612fbf565b803561079881612fd5565b60008060408385031215612ffc57612ffc600080fd5b60006130088585612fca565b925050602061301985828601612fdb565b9150509250929050565b805b82525050565b602081016107988284613023565b6001600160e01b03198116612fbf565b803561079881613039565b60006020828403121561306957613069600080fd5b60006129d98484613049565b801515613025565b602081016107988284613075565b634e487b7160e01b600052604160045260246000fd5b601f19601f83011681018181106001600160401b03821117156130c6576130c661308b565b6040525050565b60006130d860405190565b905061239382826130a1565b60006001600160401b038211156130fd576130fd61308b565b601f19601f83011660200192915050565b82818337506000910152565b600061312d613128846130e4565b6130cd565b90508281526020810184848401111561314857613148600080fd5b61102684828561310e565b600082601f83011261316757613167600080fd5b81356129d984826020860161311a565b60006020828403121561318c5761318c600080fd5b81356001600160401b038111156131a5576131a5600080fd5b6129d984828501613153565b60005b838110156131cc5781810151838201526020016131b4565b8381111561096f5750506000910152565b60006131e7825190565b8084526020840193506131fe8185602086016131b1565b601f01601f19169290920192915050565b60208082528101612c9e81846131dd565b60006020828403121561323557613235600080fd5b60006129d98484612fdb565b60006001600160401b0382111561325a5761325a61308b565b5060209081020190565b600061327261312884613241565b8381529050602080820190840283018581111561329157613291600080fd5b835b818110156132b557806132a68882612fdb565b84525060209283019201613293565b5050509392505050565b600082601f8301126132d3576132d3600080fd5b81356129d9848260208601613264565b600080600080608085870312156132fc576132fc600080fd5b60006133088787612fca565b94505060208501356001600160401b0381111561332757613327600080fd5b613333878288016132bf565b93505060408501356001600160401b0381111561335257613352600080fd5b61335e878288016132bf565b92505060608501356001600160401b0381111561337d5761337d600080fd5b61338987828801613153565b91505092959194509250565b600080600080600060a086880312156133b0576133b0600080fd5b60006133bc8888612fca565b95505060206133cd88828901612fca565b94505060408601356001600160401b038111156133ec576133ec600080fd5b6133f8888289016132bf565b93505060608601356001600160401b0381111561341757613417600080fd5b613423888289016132bf565b92505060808601356001600160401b0381111561344257613442600080fd5b61344e88828901613153565b9150509295509295909350565b6000806040838503121561347157613471600080fd5b600061347d8585612fdb565b925050602061301985828601612fca565b60008083601f8401126134a3576134a3600080fd5b5081356001600160401b038111156134bd576134bd600080fd5b6020830191508360208202830111156134d8576134d8600080fd5b9250929050565b600080602083850312156134f5576134f5600080fd5b82356001600160401b0381111561350e5761350e600080fd5b61351a8582860161348e565b92509250509250929050565b80516101608084526000919084019061353f82826131dd565b9150506020830151848203602086015261355982826131dd565b915050604083015161356e6040860182613023565b506060830151848203606086015261358682826131dd565b915050608083015161359b6080860182613023565b5060a08301516135ae60a0860182613023565b5060c08301516135c160c0860182613023565b5060e083015184820360e08601526135d982826131dd565b9150506101008301518482036101008601526135f582826131dd565b91505061012083015161360c610120860182613023565b50610140830151611026610140860182613023565b6000612c9e8383613526565b6000613637825190565b808452602084019350836020820285016136518560200190565b8060005b85811015613686578484038952815161366e8582613621565b94506020830160209a909a0199925050600101613655565b5091979650505050505050565b60208082528101612c9e818461362d565b6000806000606084860312156136bc576136bc600080fd5b60006136c88686612fdb565b93505060206136d986828701612fdb565b92505060406136ea86828701612fca565b9150509250925092565b6000806000806060858703121561370d5761370d600080fd5b60006137198787612fdb565b945050602061372a87828801612fdb565b93505060408501356001600160401b0381111561374957613749600080fd5b6137558782880161348e565b95989497509550505050565b600061376f61312884613241565b8381529050602080820190840283018581111561378e5761378e600080fd5b835b818110156132b557806137a38882612fca565b84525060209283019201613790565b600082601f8301126137c6576137c6600080fd5b81356129d9848260208601613761565b600080604083850312156137ec576137ec600080fd5b82356001600160401b0381111561380557613805600080fd5b613811858286016137b2565b92505060208301356001600160401b0381111561383057613830600080fd5b613019858286016132bf565b60006138488383613023565b505060200190565b600061385a825190565b80845260209384019383018060005b8381101561388e57815161387d888261383c565b975060208301925050600101613869565b509495945050505050565b60208082528101612c9e8184613850565b60008083601f8401126138bf576138bf600080fd5b5081356001600160401b038111156138d9576138d9600080fd5b6020830191508360018202830111156134d8576134d8600080fd5b6000806000806000806080878903121561391057613910600080fd5b600061391c8989612fdb565b96505060208701356001600160401b0381111561393b5761393b600080fd5b61394789828a016138aa565b955095505060408701356001600160401b0381111561396857613968600080fd5b61397489828a016138aa565b9350935050606061398789828a01612fdb565b9150509295509295509295565b6000806000606084860312156139ac576139ac600080fd5b60006139b88686612fca565b93505060208401356001600160401b038111156139d7576139d7600080fd5b6139e3868287016132bf565b92505060408401356001600160401b03811115613a0257613a02600080fd5b6136ea868287016132bf565b600080600060608486031215613a2657613a26600080fd5b83356001600160401b03811115613a3f57613a3f600080fd5b613a4b868287016132bf565b93505060208401356001600160401b03811115613a6a57613a6a600080fd5b6136d9868287016132bf565b60006101608284031215613a8c57613a8c600080fd5b613a976101606130cd565b905081356001600160401b03811115613ab257613ab2600080fd5b613abe84828501613153565b82525060208201356001600160401b03811115613add57613add600080fd5b613ae984828501613153565b6020830152506040613afd84828501612fdb565b60408301525060608201356001600160401b03811115613b1f57613b1f600080fd5b613b2b84828501613153565b6060830152506080613b3f84828501612fdb565b60808301525060a0613b5384828501612fdb565b60a08301525060c0613b6784828501612fdb565b60c08301525060e08201356001600160401b03811115613b8957613b89600080fd5b613b9584828501613153565b60e0830152506101008201356001600160401b03811115613bb857613bb8600080fd5b613bc484828501613153565b61010083015250610120613bda84828501612fdb565b61012083015250610140613bf084828501612fdb565b6101408301525092915050565b60008060408385031215613c1357613c13600080fd5b6000613c1f8585612fdb565b92505060208301356001600160401b03811115613c3e57613c3e600080fd5b61301985828601613a76565b60008060008060808587031215613c6357613c63600080fd5b6000613c6f8787612fca565b9450506020613c8087828801612fdb565b935050604061335e87828801612fdb565b600080600060408486031215613ca957613ca9600080fd5b6000613cb58686612fca565b93505060208401356001600160401b03811115613cd457613cd4600080fd5b613ce08682870161348e565b92509250509250925092565b801515612fbf565b803561079881613cec565b60008060408385031215613d1557613d15600080fd5b6000613d218585612fca565b925050602061301985828601613cf4565b60208082528101612c9e8184613526565b60008060408385031215613d5957613d59600080fd5b600061347d8585612fca565b600080600080600060a08688031215613d8057613d80600080fd5b6000613d8c8888612fca565b9550506020613d9d88828901612fca565b9450506040613dae88828901612fdb565b935050606061342388828901612fdb565b600080600060608486031215613dd757613dd7600080fd5b6000613de38686612fca565b9350506020613df486828701612fdb565b92505060406136ea86828701612fdb565b602b81526000602082017f455243313135353a2062616c616e636520717565727920666f7220746865207a81526a65726f206164647265737360a81b602082015291505b5060400190565b6020808252810161079881613e05565b634e487b7160e01b600052602260045260246000fd5b600281046001821680613e8a57607f821691505b60208210811415613e9d57613e9d613e60565b50919050565b603281526000602082017f455243313135353a207472616e736665722063616c6c6572206973206e6f742081527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060208201529150613e49565b6020808252810161079881613ea3565b602f81526000602082017f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636581527f20726f6c657320666f722073656c66000000000000000000000000000000000060208201529150613e49565b6020808252810161079881613f0d565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fa157613fa1613f77565b5060010190565b60008219821115613fbb57613fbb613f77565b500190565b6000816000190483118215151615613fda57613fda613f77565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261400457614004613fdf565b500490565b60008261401857614018613fdf565b500690565b634e487b7160e01b600052603260045260246000fd5b61302581612fa5565b6060810161404a8286614033565b818103602083015261405c8185613850565b905081810360408301526140708184613850565b95945050505050565b60018152600060208201600360fc1b815291505b5060200190565b6020808252810161079881614079565b6000602082840312156140b9576140b9600080fd5b60006129d98484612fca565b602981526000602082017f455243313135353a206163636f756e747320616e6420696473206c656e677468815268040dad2e6dac2e8c6d60bb1b60208201529150613e49565b60208082528101610798816140c5565b602981526000602082017f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7281526808185c1c1c9bdd995960ba1b60208201529150613e49565b602080825281016107988161411b565b60006107988261417f565b90565b60ff1690565b61302581614171565b602081016107988284614185565b602181526000602082017f455243313135353a206d696e7420746f20746865207a65726f206164647265738152607360f81b60208201529150613e49565b602080825281016107988161419c565b602881526000602082017f455243313135353a2069647320616e6420616d6f756e7473206c656e677468208152670dad2e6dac2e8c6d60c31b60208201529150613e49565b60208082528101610798816141ea565b604080825281016142508185613850565b905081810360208301526129d98184613850565b602581526000602082017f455243313135353a207472616e7366657220746f20746865207a65726f206164815264647265737360d81b60208201529150613e49565b6020808252810161079881614264565b602a81526000602082017f455243313135353a20696e73756666696369656e742062616c616e636520666f81526939103a3930b739b332b960b11b60208201529150613e49565b60208082528101610798816142b6565b80613025565b60006107988260601b90565b600061079882614313565b61302561433682612fa5565b61431f565b6000614345825190565b6143538185602086016131b1565b9290920192915050565b6000614369828761430d565b602082019150614379828661430d565b602082019150614389828561432a565b601482019150614399828461433b565b9695505050505050565b604081016143b18285613023565b612c9e6020830184613023565b602381526000602082017f455243313135353a206275726e2066726f6d20746865207a65726f206164647281526265737360e81b60208201529150613e49565b60208082528101610798816143be565b602481526000602082017f455243313135353a206275726e20616d6f756e7420657863656564732062616c815263616e636560e01b60208201529150613e49565b602080825281016107988161440e565b602e81526000602082017f496e697469616c697a61626c653a20636f6e747261637420697320616c72656181527f647920696e697469616c697a656400000000000000000000000000000000000060208201529150613e49565b602080825281016107988161445f565b602b81526000602082017f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206981526a6e697469616c697a696e6760a81b60208201529150613e49565b60208082528101610798816144c9565b602981526000602082017f455243313135353a2073657474696e6720617070726f76616c20737461747573815268103337b91039b2b63360b91b60208201529150613e49565b6020808252810161079881614521565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260170160006145a9828561433b565b7f206973206d697373696e6720726f6c6520000000000000000000000000000000815260110191506129d9828461433b565b60a081016145e98288614033565b6145f66020830187614033565b81810360408301526146088186613850565b9050818103606083015261461c8185613850565b9050818103608083015261463081846131dd565b979650505050505050565b805161079881613039565b60006020828403121561465b5761465b600080fd5b60006129d9848461463b565b600060033d111561417c5760046000803e5060005160e01c90565b600060443d10156146905790565b60405160043d036004823e80513d60248201116001600160401b03821117156146b857505090565b80820180516001600160401b038111156146d3575050505090565b80602083010160043d0385018111156146ee57505050505090565b6146fd826020018501866130a1565b5090949350505050565b603481526000602082017f455243313135353a207472616e7366657220746f206e6f6e204552433131353581527f526563656976657220696d706c656d656e74657200000000000000000000000060208201529150613e49565b6020808252810161079881614707565b602881526000602082017f455243313135353a204552433131353552656365697665722072656a656374658152676420746f6b656e7360c01b60208201529150613e49565b6020808252810161079881614771565b6000828210156147d8576147d8613f77565b500390565b60a081016147eb8288614033565b6147f86020830187614033565b6148056040830186613023565b6148126060830185613023565b818103608083015261463081846131dd565b60008161483357614833613f77565b506000190190565b60208082527f537472696e67733a20686578206c656e67746820696e73756666696369656e749101908152600061408d565b602080825281016107988161483b565b602881526000602082017f455243313135353a206275726e20616d6f756e74206578636565647320746f74815267616c537570706c7960c01b60208201529150613e49565b602080825281016107988161487d56fefc774c32e29e21e9ba21cd756bf11bad138fd7eb34eb4d84154c03fe1e0ce8609f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6a26469706673582212203e5819fa88af4fb9ceae3339875670aa857f7bd38ef385e3594a5bcc465b23e364736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.