Overview
ETH Balance
0.009 ETH
Eth Value
$21.79 (@ $2,421.43/ETH)More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 6 from a total of 6 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 19905671 | 139 days ago | IN | 0 ETH | 0.00013733 | ||||
Set Approval For... | 18547645 | 329 days ago | IN | 0 ETH | 0.00123092 | ||||
Set Approval For... | 18497487 | 336 days ago | IN | 0 ETH | 0.00150091 | ||||
Grant Role | 18481369 | 338 days ago | IN | 0 ETH | 0.00298501 | ||||
Mint | 18473706 | 340 days ago | IN | 0.009 ETH | 0.00973245 | ||||
0x60806040 | 18430585 | 346 days ago | IN | 0 ETH | 0.23729031 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SkullNBananasGadgets
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; import "@minteeble/smart-contracts/contracts/token/ERC1155/MinteebleGadgetsCollection.sol"; import {DefaultOperatorFilterer} from "./OperatorFilter/DefaultOperatorFilterer.sol"; contract SkullNBananasGadgets is MinteebleGadgetsCollection, DefaultOperatorFilterer { address public withdrawAccount; constructor() MinteebleGadgetsCollection("SkullNBananasGadgets", "SNBG", "") { _grantRole(MINTER_ROLE, msg.sender); setPaused(false); setFreeItemsBuyable(false); setWithdrawAccount(msg.sender); addGadgetGroup(); for (uint256 i = 0; i < 6; i++) { idsInfo.push(IdInfo(gadgetVariations[0], 0, 0)); gadgetVariations[0]++; } addGadgetGroup(); for (uint256 i = 0; i < 6; i++) { idsInfo.push(IdInfo(1 * 256 + gadgetVariations[1], 0, 0)); gadgetVariations[1]++; } addGadgetGroup(); for (uint256 i = 0; i < 4; i++) { idsInfo.push(IdInfo(2 * 256 + gadgetVariations[2], 0, 0)); gadgetVariations[2]++; } addGadgetGroup(); for (uint256 i = 0; i < 1; i++) { idsInfo.push(IdInfo(3 * 256 + gadgetVariations[3], 0, 0)); gadgetVariations[3]++; } addGadgetGroup(); for (uint256 i = 0; i < 128; i++) { idsInfo.push(IdInfo(4 * 256 + gadgetVariations[4], 0, 0)); gadgetVariations[4]++; } uint256[] memory prices = new uint256[](9); prices[0] = 60000000000000000; // $100 prices[1] = 12000000000000000; // $20 prices[2] = 9000000000000000; // $15 prices[3] = 7200000000000000; // $12 prices[4] = 6000000000000000; // $10 prices[5] = 6000000000000000; // $10 prices[6] = 6000000000000000; // $10 prices[7] = 3000000000000000; // $5 prices[8] = 3000000000000000; // $5 idsInfo[0].price = prices[1]; idsInfo[1].price = prices[0]; idsInfo[2].price = prices[2]; idsInfo[3].price = prices[2]; idsInfo[4].price = prices[3]; idsInfo[5].price = prices[1]; idsInfo[6].price = prices[0]; idsInfo[7].price = prices[0]; idsInfo[8].price = prices[4]; idsInfo[9].price = prices[2]; idsInfo[10].price = prices[3]; idsInfo[11].price = prices[1]; idsInfo[12].price = prices[0]; idsInfo[13].price = prices[2]; idsInfo[14].price = prices[3]; idsInfo[15].price = prices[1]; idsInfo[16].price = prices[0]; idsInfo[17].price = prices[7]; idsInfo[18].price = prices[4]; idsInfo[19].price = prices[2]; idsInfo[20].price = prices[5]; idsInfo[21].price = prices[5]; idsInfo[22].price = prices[5]; idsInfo[23].price = prices[5]; idsInfo[24].price = prices[6]; idsInfo[25].price = prices[7]; idsInfo[26].price = prices[4]; idsInfo[27].price = prices[3]; idsInfo[28].price = prices[5]; idsInfo[29].price = prices[5]; idsInfo[30].price = prices[5]; idsInfo[31].price = prices[5]; idsInfo[32].price = prices[6]; idsInfo[33].price = prices[3]; idsInfo[34].price = prices[3]; idsInfo[35].price = prices[0]; idsInfo[36].price = prices[0]; idsInfo[37].price = prices[0]; idsInfo[38].price = prices[4]; idsInfo[39].price = prices[2]; idsInfo[40].price = prices[4]; idsInfo[41].price = 0; // Airdrop gadgets idsInfo[42].price = prices[4]; idsInfo[43].price = prices[2]; idsInfo[44].price = prices[6]; idsInfo[45].price = prices[5]; idsInfo[46].price = prices[4]; idsInfo[47].price = prices[2]; idsInfo[48].price = prices[2]; idsInfo[49].price = prices[1]; idsInfo[50].price = prices[2]; idsInfo[51].price = prices[3]; idsInfo[52].price = prices[5]; idsInfo[53].price = prices[5]; idsInfo[54].price = prices[5]; idsInfo[55].price = prices[5]; idsInfo[56].price = prices[5]; idsInfo[57].price = prices[3]; idsInfo[58].price = prices[2]; idsInfo[59].price = prices[3]; idsInfo[60].price = prices[6]; idsInfo[61].price = prices[3]; idsInfo[62].price = prices[2]; idsInfo[63].price = prices[4]; idsInfo[64].price = prices[5]; idsInfo[65].price = prices[4]; idsInfo[66].price = prices[3]; idsInfo[67].price = prices[3]; idsInfo[68].price = prices[4]; idsInfo[69].price = prices[6]; idsInfo[70].price = prices[3]; idsInfo[71].price = prices[8]; idsInfo[72].price = prices[2]; idsInfo[73].price = prices[4]; idsInfo[74].price = prices[4]; idsInfo[75].price = prices[3]; idsInfo[76].price = prices[3]; idsInfo[77].price = prices[3]; idsInfo[78].price = prices[4]; idsInfo[79].price = prices[4]; idsInfo[80].price = prices[4]; idsInfo[81].price = prices[4]; idsInfo[82].price = prices[4]; idsInfo[83].price = prices[4]; idsInfo[84].price = prices[4]; idsInfo[85].price = prices[4]; idsInfo[86].price = prices[4]; idsInfo[87].price = prices[3]; idsInfo[88].price = prices[3]; idsInfo[89].price = prices[2]; idsInfo[90].price = prices[1]; idsInfo[91].price = prices[2]; idsInfo[92].price = prices[1]; idsInfo[93].price = prices[3]; idsInfo[94].price = prices[0]; idsInfo[95].price = prices[2]; idsInfo[96].price = prices[1]; idsInfo[97].price = prices[1]; idsInfo[98].price = prices[2]; idsInfo[99].price = prices[1]; idsInfo[100].price = prices[2]; idsInfo[101].price = prices[2]; idsInfo[102].price = prices[3]; idsInfo[103].price = prices[3]; idsInfo[104].price = prices[3]; idsInfo[105].price = prices[3]; idsInfo[106].price = prices[2]; idsInfo[107].price = prices[2]; idsInfo[108].price = prices[1]; idsInfo[109].price = prices[1]; idsInfo[110].price = prices[2]; idsInfo[111].price = prices[2]; idsInfo[112].price = prices[0]; idsInfo[113].price = prices[1]; idsInfo[114].price = prices[2]; idsInfo[115].price = prices[3]; idsInfo[116].price = prices[5]; idsInfo[117].price = prices[1]; idsInfo[118].price = prices[3]; idsInfo[119].price = prices[3]; idsInfo[120].price = prices[8]; idsInfo[121].price = prices[2]; idsInfo[122].price = prices[2]; idsInfo[123].price = prices[2]; idsInfo[124].price = prices[1]; idsInfo[125].price = prices[1]; idsInfo[126].price = prices[3]; idsInfo[127].price = prices[4]; idsInfo[128].price = prices[4]; idsInfo[129].price = prices[2]; idsInfo[130].price = prices[2]; idsInfo[131].price = prices[2]; idsInfo[132].price = prices[2]; idsInfo[133].price = prices[1]; idsInfo[134].price = prices[0]; idsInfo[135].price = prices[2]; idsInfo[136].price = prices[1]; idsInfo[137].price = prices[3]; idsInfo[138].price = prices[2]; idsInfo[139].price = prices[4]; idsInfo[140].price = prices[6]; idsInfo[141].price = prices[3]; idsInfo[142].price = prices[3]; idsInfo[143].price = prices[5]; idsInfo[144].price = prices[3]; } function setWithdrawAccount( address _withdrawAccount ) public requireAdmin(msg.sender) { withdrawAccount = _withdrawAccount; } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, amount, data); } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { super.safeBatchTransferFrom(from, to, ids, amounts, data); } function withdrawBalance() public override requireAdmin(msg.sender) nonReentrant { uint256 totBalance = address(this).balance; (bool hs1, ) = payable(withdrawAccount).call{value: (totBalance)}(""); require(hs1); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; // ============================================= // _ _ _ _ _ ___ ___ ___ ___ _ ___ // | \_/ || || \| ||_ _|| __|| __|| o ) | | __| // | \_/ || || \\ | | | | _| | _| | o \ |_ | _| // |_| |_||_||_|\_| |_| |___||___||___/___||___| // // Website: https://minteeble.com // Email: [email protected] // // ============================================= import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IMinteebleERC1155 is IERC1155 { function addId(uint256 _id) external; function removeId(uint256 _id) external; function getIds() external view returns (uint256[] memory); function setURI(string memory _newUri) external; function ownerMintForAddress( address _recipientAccount, uint256 _id, uint256 _amount ) external; function mintForAddress( address _recipientAccount, uint256 _id, uint256 _amount ) external payable; function airdrop(uint256 _id, address[] memory _accounts) external; function setMintPrice(uint256 _id, uint256 _price) external; function setMaxSupply(uint256 _id, uint256 _maxSupply) external; function mintPrice(uint256 _id) external view returns (uint256); function maxSupply(uint256 _id) external view returns (uint256); function mint(uint256 _id, uint256 _amount) external payable; function setPaused(bool _paused) external; function withdrawBalance() external; } contract MinteebleERC1155 is ERC1155Supply, AccessControlEnumerable, ReentrancyGuard { bool public paused; string public name; string public symbol; bool freeItemsBuyable; bytes4 public constant IMINTEEBLE_ERC1155_INTERFACE_ID = type(IMinteebleERC1155).interfaceId; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); struct IdInfo { uint256 id; uint256 price; uint256 maxSupply; } IdInfo[] public idsInfo; constructor( string memory _name, string memory _symbol, string memory _uri ) ERC1155(_uri) { _grantRole(DEFAULT_ADMIN_ROLE, msg.sender); name = _name; symbol = _symbol; paused = true; freeItemsBuyable = true; } modifier requireAdmin(address _account) { require(hasRole(DEFAULT_ADMIN_ROLE, _account), "Unauthorized"); _; } modifier idExists(uint256 _id) { bool idFound = false; for (uint256 i = 0; i < idsInfo.length; i++) { if (idsInfo[i].id == _id) idFound = true; } require(idFound, "Id not found"); _; } modifier active() { require(!paused, "Contract is paused."); _; } function _getIdIndex(uint256 _id) internal view returns (uint256 index) { for (uint256 i = 0; i < idsInfo.length; ++i) { if (idsInfo[i].id == _id) return i; } require(false, "Id not found"); } function _addId(uint256 _id) internal { for (uint256 i = 0; i < idsInfo.length; i++) { require(idsInfo[i].id != _id, "Id already exists"); } IdInfo memory newId = IdInfo(_id, 0, 0); idsInfo.push(newId); } function _removeId(uint256 _id) internal { bool idFound = false; for (uint256 i = 0; i < idsInfo.length; i++) { if (idsInfo[i].id == _id) { require(totalSupply(_id) == 0, "Cannot delete id with supply"); idsInfo[i] = idsInfo[idsInfo.length - 1]; delete idsInfo[idsInfo.length - 1]; idsInfo.pop(); idFound = true; } } require(idFound, "Id not found"); } function addId(uint256 _id) public requireAdmin(msg.sender) { _addId(_id); } function removeId(uint256 _id) public requireAdmin(msg.sender) { _removeId(_id); } function getIds() public view returns (IdInfo[] memory) { return idsInfo; } function setURI(string memory _newUri) public requireAdmin(msg.sender) { _setURI(_newUri); } function setFreeItemsBuyable( bool _freeItemsBuyable ) public requireAdmin(msg.sender) { freeItemsBuyable = _freeItemsBuyable; } function ownerMintForAddress( address _recipientAccount, uint256 _id, uint256 _amount ) public idExists(_id) nonReentrant { require(hasRole(MINTER_ROLE, msg.sender), "Minter role required."); _mint(_recipientAccount, _id, _amount, ""); } function ownerMintBatchForAddress( address _recipientAccount, uint256[] memory _ids, uint256[] memory _amounts ) public nonReentrant { require(hasRole(MINTER_ROLE, msg.sender), "Minter role required."); _mintBatch(_recipientAccount, _ids, _amounts, ""); } function mintForAddress( address _recipientAccount, uint256 _id, uint256 _amount ) public payable idExists(_id) active nonReentrant { for (uint256 i = 0; i < idsInfo.length; i++) { if (idsInfo[i].id == _id) { if (idsInfo[i].maxSupply != 0) { require( totalSupply(_id) + _amount <= idsInfo[i].maxSupply, "Max supply reached" ); } require( idsInfo[i].price != 0 || freeItemsBuyable, "Not for sale" ); require( msg.value >= idsInfo[i].price * _amount, "Insufficient funds" ); _mint(_recipientAccount, _id, _amount, ""); } } } function mintBatchForAddress( address _recipientAccount, uint256[] memory _ids, uint256[] memory _amounts ) public payable active nonReentrant { require(_ids.length == _amounts.length, "Invalid input"); uint256 totalCost; for (uint256 i = 0; i < _ids.length; i++) { for (uint256 j = 0; j < idsInfo.length; j++) { if (idsInfo[j].id == _ids[i]) { if (idsInfo[j].maxSupply != 0) { require( totalSupply(_ids[i]) + _amounts[i] <= idsInfo[j].maxSupply, "Max supply reached" ); } require( idsInfo[j].price != 0 || freeItemsBuyable, "Not for sale" ); totalCost += idsInfo[j].price * _amounts[i]; } } } require(msg.value >= totalCost, "Insufficient funds"); _mintBatch(_recipientAccount, _ids, _amounts, ""); } function airdrop( uint256 _id, address[] memory _accounts ) public requireAdmin(msg.sender) idExists(_id) nonReentrant { for (uint256 i; i < _accounts.length; i++) { _mint(_accounts[i], _id, 1, ""); } } function setMintPrice( uint256 _id, uint256 _price ) public requireAdmin(msg.sender) { idsInfo[_getIdIndex(_id)].price = _price; } function setMaxSupply( uint256 _id, uint256 _maxSupply ) public requireAdmin(msg.sender) { require( _maxSupply > totalSupply(_id), "Max supply can not be less than total supply." ); idsInfo[_getIdIndex(_id)].maxSupply = _maxSupply; } function mintPrice(uint256 _id) public view returns (uint256) { return idsInfo[_getIdIndex(_id)].price; } function batchMintPrice( uint256[] memory _ids ) public view returns (uint256[] memory) { uint256[] memory prices = new uint256[](_ids.length); for (uint256 i = 0; i < _ids.length; i++) { prices[i] = idsInfo[_getIdIndex(_ids[i])].price; } return prices; } function batchSetMintPrice( uint256[] memory _ids, uint256[] memory _prices ) public requireAdmin(msg.sender) { require(_ids.length == _prices.length, "Invalid input"); for (uint256 i = 0; i < _ids.length; i++) { setMintPrice(_ids[i], _prices[i]); } } function maxSupply(uint256 _id) public view returns (uint256) { return idsInfo[_getIdIndex(_id)].maxSupply; } function batchMaxSupply( uint256[] memory _ids ) public view returns (uint256[] memory) { uint256[] memory maxSupplies = new uint256[](_ids.length); for (uint256 i = 0; i < _ids.length; i++) { maxSupplies[i] = idsInfo[_getIdIndex(_ids[i])].maxSupply; } return maxSupplies; } function batchSetMaxSupply( uint256[] memory _ids, uint256[] memory _maxSupplies ) public requireAdmin(msg.sender) { require(_ids.length == _maxSupplies.length, "Invalid input"); for (uint256 i = 0; i < _ids.length; i++) { setMaxSupply(_ids[i], _maxSupplies[i]); } } function mint(uint256 _id, uint256 _amount) public payable { mintForAddress(msg.sender, _id, _amount); } function setPaused(bool _paused) public requireAdmin(msg.sender) { paused = _paused; } function withdrawBalance() public virtual requireAdmin(msg.sender) nonReentrant { (bool success, ) = payable(msg.sender).call{ value: address(this).balance }(""); require(success); } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC1155, AccessControlEnumerable) returns (bool) { return interfaceId == type(IMinteebleERC1155).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; // ============================================= // _ _ _ _ _ ___ ___ ___ ___ _ ___ // | \_/ || || \| ||_ _|| __|| __|| o ) | | __| // | \_/ || || \\ | | | | _| | _| | o \ |_ | _| // |_| |_||_||_|\_| |_| |___||___||___/___||___| // // Website: https://minteeble.com // Email: [email protected] // // ============================================= import "./MinteebleERC1155.sol"; interface IMinteebleGadgetsCollection is IMinteebleERC1155 { function getGadgetGroups() external view returns (uint256); function getVariationsPerGroup() external view returns (uint256); function tokenIdToGroupId( uint256 _id ) external view returns (uint256, uint256); function groupIdToTokenId( uint256 _groupId, uint256 _variationId ) external view returns (uint256); function getGadgetGroupVariations( uint256 _groupId ) external view returns (uint256); } contract MinteebleGadgetsCollection is MinteebleERC1155 { uint256 internal gadgetGroups; uint256 internal variationsPerGroup; mapping(uint256 => uint256) public gadgetVariations; bytes4 public constant IMINTEEBLE_GADGETS_INTERFACE_ID = type(IMinteebleGadgetsCollection).interfaceId; constructor( string memory _tokenName, string memory _tokenSymbol, string memory _uri ) MinteebleERC1155(_tokenName, _tokenSymbol, _uri) { gadgetGroups = 0; variationsPerGroup = 256; } function getGadgetGroups() public view returns (uint256) { return gadgetGroups; } function getVariationsPerGroup() public view returns (uint256) { return variationsPerGroup; } function _addGadgetGroup() internal { gadgetGroups++; } function _removeGadgetGroup() internal { require(gadgetGroups > 0, "No available groups to remove"); require( gadgetVariations[gadgetGroups - 1] == 0, "Remove all variations first" ); gadgetGroups--; } function removeGadgetGroup() public requireAdmin(msg.sender) { _removeGadgetGroup(); } function addGadgetGroup() public requireAdmin(msg.sender) { _addGadgetGroup(); } function tokenIdToGroupId( uint256 _id ) public view returns (uint256, uint256) { return (_id / variationsPerGroup, _id % variationsPerGroup); } function groupIdToTokenId( uint256 _groupId, uint256 _variationId ) public view returns (uint256) { return _groupId * variationsPerGroup + _variationId; } function _addVariation(uint256 _groupId) internal { require(_groupId < gadgetGroups, "Invalid gadget Id"); require( gadgetVariations[_groupId] < variationsPerGroup, "No available variations" ); _addId(_groupId * variationsPerGroup + gadgetVariations[_groupId]); gadgetVariations[_groupId]++; } function addVariation(uint256 _groupId) public requireAdmin(msg.sender) { _addVariation(_groupId); } function addVariations( uint256 _groupId, uint256 _amount ) public requireAdmin(msg.sender) { for (uint256 i = 0; i < _amount; i++) { _addVariation(_groupId); } } function removeVariation(uint256 _groupId) public requireAdmin(msg.sender) { require(_groupId < gadgetGroups, "Invalid gadget Id"); require( gadgetVariations[_groupId] > 0, "No available variations to remove" ); gadgetVariations[_groupId]--; _removeId(_groupId * variationsPerGroup + gadgetVariations[_groupId]); } function getGadgetGroupVariations( uint256 _groupId ) public view returns (uint256) { require(_groupId >= 0 && _groupId < gadgetGroups, "Invalid group ID"); return gadgetVariations[_groupId]; } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { return interfaceId == type(IMinteebleGadgetsCollection).interfaceId || super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view 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 ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view 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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ 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`. * * May emit a {RoleRevoked} event. */ 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. * * May emit a {RoleGranted} event. * * [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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); 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 token owner or approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner or approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _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}. * * 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 _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` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _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}. * * Emits a {TransferBatch} event. * * 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 an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non-ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of ERC1155 that adds tracking of total supply per id. * * Useful for scenarios where Fungible and Non-fungible tokens have to be * clearly identified. Note: While a totalSupply of 1 might mean the * corresponding is an NFT, there is no guarantees that no other token with the * same id are not going to be minted. */ abstract contract ERC1155Supply is ERC1155 { mapping(uint256 => uint256) private _totalSupply; /** * @dev Total amount of tokens in with a given id. */ function totalSupply(uint256 id) public view virtual returns (uint256) { return _totalSupply[id]; } /** * @dev Indicates whether any token exist with a given id, or not. */ function exists(uint256 id) public view virtual returns (bool) { return ERC1155Supply.totalSupply(id) > 0; } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { _totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { 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; } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [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 functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe( address(this), subscriptionOrRegistrantToCopy ); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries( address(this), subscriptionOrRegistrantToCopy ); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from == msg.sender) { _; return; } if ( !OPERATOR_FILTER_REGISTRY.isOperatorAllowed( address(this), msg.sender ) ) { revert OperatorNotAllowed(msg.sender); } } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if ( !OPERATOR_FILTER_REGISTRY.isOperatorAllowed( address(this), operator ) ) { revert OperatorNotAllowed(operator); } } _; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IMINTEEBLE_ERC1155_INTERFACE_ID","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IMINTEEBLE_GADGETS_INTERFACE_ID","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"addGadgetGroup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"addId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_groupId","type":"uint256"}],"name":"addVariation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_groupId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addVariations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address[]","name":"_accounts","type":"address[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"batchMaxSupply","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"}],"name":"batchMintPrice","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_maxSupplies","type":"uint256[]"}],"name":"batchSetMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"batchSetMintPrice","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":"","type":"uint256"}],"name":"gadgetVariations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_groupId","type":"uint256"}],"name":"getGadgetGroupVariations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGadgetGroups","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIds","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"internalType":"struct MinteebleERC1155.IdInfo[]","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":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getVariationsPerGroup","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"_groupId","type":"uint256"},{"internalType":"uint256","name":"_variationId","type":"uint256"}],"name":"groupIdToTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idsInfo","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipientAccount","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"mintBatchForAddress","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipientAccount","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mintForAddress","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipientAccount","type":"address"},{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"ownerMintBatchForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_recipientAccount","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ownerMintForAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"removeGadgetGroup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"removeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_groupId","type":"uint256"}],"name":"removeVariation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"bool","name":"_freeItemsBuyable","type":"bool"}],"name":"setFreeItemsBuyable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newUri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_withdrawAccount","type":"address"}],"name":"setWithdrawAccount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"tokenIdToGroupId","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052348015630000001257600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280601481526020017f536b756c6c4e42616e616e61734761646765747300000000000000000000000081525060405180604001604052806004815260200163534e424760e01b815250604051806020016040528060008152508282828063000000a481630000365d60201b60201c565b50600160065563000000b96000336300003678565b825163000000d090600890602086019063000039da565b50815163000000e890600990602085019063000039da565b505060078054600160ff199182168117909255600a8054909116909117905550506000600c555050610100600d55506daaeb6d7670e522a718067333cd4e3b15630000026557801563000001af57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b158015630000018e57600080fd5b505af115801563000001a4573d6000803e3d6000fd5b505050506300000265565b6001600160a01b0382161563000002025760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016300000172565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015630000024a57600080fd5b505af11580156300000260573d6000803e3d6000fd5b505050505b50630000029690507f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6336300003678565b63000002a4600063000036c1565b63000002b260006300003739565b63000002bf3363000037ae565b63000002cb6300003832565b60005b600681101563000003d85760408051606081018252600e60208181527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881c805484526000828501818152958501818152600b805460018101825590835295517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db960039097029687015595517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba86015594517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbb909401939093558380525280549163000003ba836300003aa3565b9190505550808063000003ce906300003aa3565b91505063000002ce565b5063000003e56300003832565b60005b600681101563000004bb5760408051606081019091526001600052600e602052600080516020630000835c83398151915254600b919081906300000430906101006300003ac2565b8152600060208083018290526040928301829052845460018181018755958352818320855160039092020190815584820151818701559390920151600290930192909255918152600e909152600080516020630000835c833981519152805491630000049d836300003aa3565b9190505550808063000004b1906300003aa3565b91505063000003e8565b5063000004c86300003832565b60005b6004811015630000059d5760408051606081019091526002600052600e602052600080516020630000839c83398151915254600b919081906300000513906102006300003ac2565b8152600060208083018290526040928301829052845460018181018755958352818320855160039092020190815584820151958101959095559290910151600293840155918252600e9052600080516020630000839c833981519152805491630000057f836300003aa3565b919050555080806300000593906300003aa3565b91505063000004cb565b5063000005aa6300003832565b60005b600181101563000006845760408051606081019091526003600052600e602052600080516020630000833c83398151915254600b9190819063000005f5906103006300003ac2565b81526000602080830182905260409283018290528454600181810187559583528183208551600392830290910190815585830151968101969096559390920151600290940193909355908252600e9052600080516020630000833c8339815191528054916300000666836300003aa3565b91905055508080630000067a906300003aa3565b91505063000005ad565b5063000006916300003832565b60005b6080811015630000076a5760408051606081019091526004600052600e60205260008051602063000083bc83398151915254600b9190819063000006dc906104006300003ac2565b815260006020808301829052604092830182905284546001818101875595835281832085516003909202019081558482015195810195909555929091015160029093019290925560048252600e905260008051602063000083bc833981519152805491630000074c836300003aa3565b919050555080806300000760906300003aa3565b9150506300000694565b506040805160098082526101408201909252600091602082016101208036833701905050905066d529ae9e8600008160008151811063000007b15763000007b16300003ae0565b602002602001018181525050662aa1efb94e00008160018151811063000007de5763000007de6300003ae0565b602002602001018181525050661ff973cafa800081600281518110630000080b57630000080b6300003ae0565b6020026020010181815250506619945ca26200008160038151811063000008385763000008386300003ae0565b602002602001018181525050661550f7dca700008160048151811063000008655763000008656300003ae0565b602002602001018181525050661550f7dca700008160058151811063000008925763000008926300003ae0565b602002602001018181525050661550f7dca700008160068151811063000008bf5763000008bf6300003ae0565b602002602001018181525050660aa87bee5380008160078151811063000008ec5763000008ec6300003ae0565b602002602001018181525050660aa87bee5380008160088151811063000009195763000009196300003ae0565b60200260200101818152505080600181518110630000093e57630000093e6300003ae0565b6020026020010151600b60008154811063000009605763000009606300003ae0565b90600052602060002090600302016001018190555080600081518110630000098e57630000098e6300003ae0565b6020026020010151600b60018154811063000009b05763000009b06300003ae0565b9060005260206000209060030201600101819055508060028151811063000009de5763000009de6300003ae0565b6020026020010151600b6002815481106300000a00576300000a006300003ae0565b906000526020600020906003020160010181905550806002815181106300000a2e576300000a2e6300003ae0565b6020026020010151600b6003815481106300000a50576300000a506300003ae0565b906000526020600020906003020160010181905550806003815181106300000a7e576300000a7e6300003ae0565b6020026020010151600b6004815481106300000aa0576300000aa06300003ae0565b906000526020600020906003020160010181905550806001815181106300000ace576300000ace6300003ae0565b6020026020010151600b6005815481106300000af0576300000af06300003ae0565b906000526020600020906003020160010181905550806000815181106300000b1e576300000b1e6300003ae0565b6020026020010151600b6006815481106300000b40576300000b406300003ae0565b906000526020600020906003020160010181905550806000815181106300000b6e576300000b6e6300003ae0565b6020026020010151600b6007815481106300000b90576300000b906300003ae0565b906000526020600020906003020160010181905550806004815181106300000bbe576300000bbe6300003ae0565b6020026020010151600b6008815481106300000be0576300000be06300003ae0565b906000526020600020906003020160010181905550806002815181106300000c0e576300000c0e6300003ae0565b6020026020010151600b6009815481106300000c30576300000c306300003ae0565b906000526020600020906003020160010181905550806003815181106300000c5e576300000c5e6300003ae0565b6020026020010151600b600a815481106300000c80576300000c806300003ae0565b906000526020600020906003020160010181905550806001815181106300000cae576300000cae6300003ae0565b6020026020010151600b80815481106300000ccf576300000ccf6300003ae0565b906000526020600020906003020160010181905550806000815181106300000cfd576300000cfd6300003ae0565b6020026020010151600b600c815481106300000d1f576300000d1f6300003ae0565b906000526020600020906003020160010181905550806002815181106300000d4d576300000d4d6300003ae0565b6020026020010151600b600d815481106300000d6f576300000d6f6300003ae0565b906000526020600020906003020160010181905550806003815181106300000d9d576300000d9d6300003ae0565b6020026020010151600b600e815481106300000dbf576300000dbf6300003ae0565b906000526020600020906003020160010181905550806001815181106300000ded576300000ded6300003ae0565b6020026020010151600b600f815481106300000e0f576300000e0f6300003ae0565b906000526020600020906003020160010181905550806000815181106300000e3d576300000e3d6300003ae0565b6020026020010151600b6010815481106300000e5f576300000e5f6300003ae0565b906000526020600020906003020160010181905550806007815181106300000e8d576300000e8d6300003ae0565b6020026020010151600b6011815481106300000eaf576300000eaf6300003ae0565b906000526020600020906003020160010181905550806004815181106300000edd576300000edd6300003ae0565b6020026020010151600b6012815481106300000eff576300000eff6300003ae0565b906000526020600020906003020160010181905550806002815181106300000f2d576300000f2d6300003ae0565b6020026020010151600b6013815481106300000f4f576300000f4f6300003ae0565b906000526020600020906003020160010181905550806005815181106300000f7d576300000f7d6300003ae0565b6020026020010151600b6014815481106300000f9f576300000f9f6300003ae0565b906000526020600020906003020160010181905550806005815181106300000fcd576300000fcd6300003ae0565b6020026020010151600b6015815481106300000fef576300000fef6300003ae0565b90600052602060002090600302016001018190555080600581518110630000101d57630000101d6300003ae0565b6020026020010151600b601681548110630000103f57630000103f6300003ae0565b90600052602060002090600302016001018190555080600581518110630000106d57630000106d6300003ae0565b6020026020010151600b601781548110630000108f57630000108f6300003ae0565b9060005260206000209060030201600101819055508060068151811063000010bd5763000010bd6300003ae0565b6020026020010151600b60188154811063000010df5763000010df6300003ae0565b90600052602060002090600302016001018190555080600781518110630000110d57630000110d6300003ae0565b6020026020010151600b601981548110630000112f57630000112f6300003ae0565b90600052602060002090600302016001018190555080600481518110630000115d57630000115d6300003ae0565b6020026020010151600b601a81548110630000117f57630000117f6300003ae0565b9060005260206000209060030201600101819055508060038151811063000011ad5763000011ad6300003ae0565b6020026020010151600b601b8154811063000011cf5763000011cf6300003ae0565b9060005260206000209060030201600101819055508060058151811063000011fd5763000011fd6300003ae0565b6020026020010151600b601c81548110630000121f57630000121f6300003ae0565b90600052602060002090600302016001018190555080600581518110630000124d57630000124d6300003ae0565b6020026020010151600b601d81548110630000126f57630000126f6300003ae0565b90600052602060002090600302016001018190555080600581518110630000129d57630000129d6300003ae0565b6020026020010151600b601e8154811063000012bf5763000012bf6300003ae0565b9060005260206000209060030201600101819055508060058151811063000012ed5763000012ed6300003ae0565b6020026020010151600b601f81548110630000130f57630000130f6300003ae0565b90600052602060002090600302016001018190555080600681518110630000133d57630000133d6300003ae0565b6020026020010151600b602081548110630000135f57630000135f6300003ae0565b90600052602060002090600302016001018190555080600381518110630000138d57630000138d6300003ae0565b6020026020010151600b60218154811063000013af5763000013af6300003ae0565b9060005260206000209060030201600101819055508060038151811063000013dd5763000013dd6300003ae0565b6020026020010151600b60228154811063000013ff5763000013ff6300003ae0565b90600052602060002090600302016001018190555080600081518110630000142d57630000142d6300003ae0565b6020026020010151600b602381548110630000144f57630000144f6300003ae0565b90600052602060002090600302016001018190555080600081518110630000147d57630000147d6300003ae0565b6020026020010151600b602481548110630000149f57630000149f6300003ae0565b9060005260206000209060030201600101819055508060008151811063000014cd5763000014cd6300003ae0565b6020026020010151600b60258154811063000014ef5763000014ef6300003ae0565b90600052602060002090600302016001018190555080600481518110630000151d57630000151d6300003ae0565b6020026020010151600b602681548110630000153f57630000153f6300003ae0565b90600052602060002090600302016001018190555080600281518110630000156d57630000156d6300003ae0565b6020026020010151600b602781548110630000158f57630000158f6300003ae0565b9060005260206000209060030201600101819055508060048151811063000015bd5763000015bd6300003ae0565b6020026020010151600b60288154811063000015df5763000015df6300003ae0565b9060005260206000209060030201600101819055506000600b60298154811063000016105763000016106300003ae0565b90600052602060002090600302016001018190555080600481518110630000163e57630000163e6300003ae0565b6020026020010151600b602a8154811063000016605763000016606300003ae0565b90600052602060002090600302016001018190555080600281518110630000168e57630000168e6300003ae0565b6020026020010151600b602b8154811063000016b05763000016b06300003ae0565b9060005260206000209060030201600101819055508060068151811063000016de5763000016de6300003ae0565b6020026020010151600b602c8154811063000017005763000017006300003ae0565b90600052602060002090600302016001018190555080600581518110630000172e57630000172e6300003ae0565b6020026020010151600b602d8154811063000017505763000017506300003ae0565b90600052602060002090600302016001018190555080600481518110630000177e57630000177e6300003ae0565b6020026020010151600b602e8154811063000017a05763000017a06300003ae0565b9060005260206000209060030201600101819055508060028151811063000017ce5763000017ce6300003ae0565b6020026020010151600b602f8154811063000017f05763000017f06300003ae0565b90600052602060002090600302016001018190555080600281518110630000181e57630000181e6300003ae0565b6020026020010151600b60308154811063000018405763000018406300003ae0565b90600052602060002090600302016001018190555080600181518110630000186e57630000186e6300003ae0565b6020026020010151600b60318154811063000018905763000018906300003ae0565b9060005260206000209060030201600101819055508060028151811063000018be5763000018be6300003ae0565b6020026020010151600b60328154811063000018e05763000018e06300003ae0565b90600052602060002090600302016001018190555080600381518110630000190e57630000190e6300003ae0565b6020026020010151600b60338154811063000019305763000019306300003ae0565b90600052602060002090600302016001018190555080600581518110630000195e57630000195e6300003ae0565b6020026020010151600b60348154811063000019805763000019806300003ae0565b9060005260206000209060030201600101819055508060058151811063000019ae5763000019ae6300003ae0565b6020026020010151600b60358154811063000019d05763000019d06300003ae0565b9060005260206000209060030201600101819055508060058151811063000019fe5763000019fe6300003ae0565b6020026020010151600b6036815481106300001a20576300001a206300003ae0565b906000526020600020906003020160010181905550806005815181106300001a4e576300001a4e6300003ae0565b6020026020010151600b6037815481106300001a70576300001a706300003ae0565b906000526020600020906003020160010181905550806005815181106300001a9e576300001a9e6300003ae0565b6020026020010151600b6038815481106300001ac0576300001ac06300003ae0565b906000526020600020906003020160010181905550806003815181106300001aee576300001aee6300003ae0565b6020026020010151600b6039815481106300001b10576300001b106300003ae0565b906000526020600020906003020160010181905550806002815181106300001b3e576300001b3e6300003ae0565b6020026020010151600b603a815481106300001b60576300001b606300003ae0565b906000526020600020906003020160010181905550806003815181106300001b8e576300001b8e6300003ae0565b6020026020010151600b603b815481106300001bb0576300001bb06300003ae0565b906000526020600020906003020160010181905550806006815181106300001bde576300001bde6300003ae0565b6020026020010151600b603c815481106300001c00576300001c006300003ae0565b906000526020600020906003020160010181905550806003815181106300001c2e576300001c2e6300003ae0565b6020026020010151600b603d815481106300001c50576300001c506300003ae0565b906000526020600020906003020160010181905550806002815181106300001c7e576300001c7e6300003ae0565b6020026020010151600b603e815481106300001ca0576300001ca06300003ae0565b906000526020600020906003020160010181905550806004815181106300001cce576300001cce6300003ae0565b6020026020010151600b603f815481106300001cf0576300001cf06300003ae0565b906000526020600020906003020160010181905550806005815181106300001d1e576300001d1e6300003ae0565b6020026020010151600b6040815481106300001d40576300001d406300003ae0565b906000526020600020906003020160010181905550806004815181106300001d6e576300001d6e6300003ae0565b6020026020010151600b6041815481106300001d90576300001d906300003ae0565b906000526020600020906003020160010181905550806003815181106300001dbe576300001dbe6300003ae0565b6020026020010151600b6042815481106300001de0576300001de06300003ae0565b906000526020600020906003020160010181905550806003815181106300001e0e576300001e0e6300003ae0565b6020026020010151600b6043815481106300001e30576300001e306300003ae0565b906000526020600020906003020160010181905550806004815181106300001e5e576300001e5e6300003ae0565b6020026020010151600b6044815481106300001e80576300001e806300003ae0565b906000526020600020906003020160010181905550806006815181106300001eae576300001eae6300003ae0565b6020026020010151600b6045815481106300001ed0576300001ed06300003ae0565b906000526020600020906003020160010181905550806003815181106300001efe576300001efe6300003ae0565b6020026020010151600b6046815481106300001f20576300001f206300003ae0565b906000526020600020906003020160010181905550806008815181106300001f4e576300001f4e6300003ae0565b6020026020010151600b6047815481106300001f70576300001f706300003ae0565b906000526020600020906003020160010181905550806002815181106300001f9e576300001f9e6300003ae0565b6020026020010151600b6048815481106300001fc0576300001fc06300003ae0565b906000526020600020906003020160010181905550806004815181106300001fee576300001fee6300003ae0565b6020026020010151600b60498154811063000020105763000020106300003ae0565b90600052602060002090600302016001018190555080600481518110630000203e57630000203e6300003ae0565b6020026020010151600b604a8154811063000020605763000020606300003ae0565b90600052602060002090600302016001018190555080600381518110630000208e57630000208e6300003ae0565b6020026020010151600b604b8154811063000020b05763000020b06300003ae0565b9060005260206000209060030201600101819055508060038151811063000020de5763000020de6300003ae0565b6020026020010151600b604c8154811063000021005763000021006300003ae0565b90600052602060002090600302016001018190555080600381518110630000212e57630000212e6300003ae0565b6020026020010151600b604d8154811063000021505763000021506300003ae0565b90600052602060002090600302016001018190555080600481518110630000217e57630000217e6300003ae0565b6020026020010151600b604e8154811063000021a05763000021a06300003ae0565b9060005260206000209060030201600101819055508060048151811063000021ce5763000021ce6300003ae0565b6020026020010151600b604f8154811063000021f05763000021f06300003ae0565b90600052602060002090600302016001018190555080600481518110630000221e57630000221e6300003ae0565b6020026020010151600b60508154811063000022405763000022406300003ae0565b90600052602060002090600302016001018190555080600481518110630000226e57630000226e6300003ae0565b6020026020010151600b60518154811063000022905763000022906300003ae0565b9060005260206000209060030201600101819055508060048151811063000022be5763000022be6300003ae0565b6020026020010151600b60528154811063000022e05763000022e06300003ae0565b90600052602060002090600302016001018190555080600481518110630000230e57630000230e6300003ae0565b6020026020010151600b60538154811063000023305763000023306300003ae0565b90600052602060002090600302016001018190555080600481518110630000235e57630000235e6300003ae0565b6020026020010151600b60548154811063000023805763000023806300003ae0565b9060005260206000209060030201600101819055508060048151811063000023ae5763000023ae6300003ae0565b6020026020010151600b60558154811063000023d05763000023d06300003ae0565b9060005260206000209060030201600101819055508060048151811063000023fe5763000023fe6300003ae0565b6020026020010151600b60568154811063000024205763000024206300003ae0565b90600052602060002090600302016001018190555080600381518110630000244e57630000244e6300003ae0565b6020026020010151600b60578154811063000024705763000024706300003ae0565b90600052602060002090600302016001018190555080600381518110630000249e57630000249e6300003ae0565b6020026020010151600b60588154811063000024c05763000024c06300003ae0565b9060005260206000209060030201600101819055508060028151811063000024ee5763000024ee6300003ae0565b6020026020010151600b60598154811063000025105763000025106300003ae0565b90600052602060002090600302016001018190555080600181518110630000253e57630000253e6300003ae0565b6020026020010151600b605a8154811063000025605763000025606300003ae0565b90600052602060002090600302016001018190555080600281518110630000258e57630000258e6300003ae0565b6020026020010151600b605b8154811063000025b05763000025b06300003ae0565b9060005260206000209060030201600101819055508060018151811063000025de5763000025de6300003ae0565b6020026020010151600b605c8154811063000026005763000026006300003ae0565b90600052602060002090600302016001018190555080600381518110630000262e57630000262e6300003ae0565b6020026020010151600b605d8154811063000026505763000026506300003ae0565b90600052602060002090600302016001018190555080600081518110630000267e57630000267e6300003ae0565b6020026020010151600b605e8154811063000026a05763000026a06300003ae0565b9060005260206000209060030201600101819055508060028151811063000026ce5763000026ce6300003ae0565b6020026020010151600b605f8154811063000026f05763000026f06300003ae0565b90600052602060002090600302016001018190555080600181518110630000271e57630000271e6300003ae0565b6020026020010151600b60608154811063000027405763000027406300003ae0565b90600052602060002090600302016001018190555080600181518110630000276e57630000276e6300003ae0565b6020026020010151600b60618154811063000027905763000027906300003ae0565b9060005260206000209060030201600101819055508060028151811063000027be5763000027be6300003ae0565b6020026020010151600b60628154811063000027e05763000027e06300003ae0565b90600052602060002090600302016001018190555080600181518110630000280e57630000280e6300003ae0565b6020026020010151600b60638154811063000028305763000028306300003ae0565b90600052602060002090600302016001018190555080600281518110630000285e57630000285e6300003ae0565b6020026020010151600b60648154811063000028805763000028806300003ae0565b9060005260206000209060030201600101819055508060028151811063000028ae5763000028ae6300003ae0565b6020026020010151600b60658154811063000028d05763000028d06300003ae0565b9060005260206000209060030201600101819055508060038151811063000028fe5763000028fe6300003ae0565b6020026020010151600b60668154811063000029205763000029206300003ae0565b90600052602060002090600302016001018190555080600381518110630000294e57630000294e6300003ae0565b6020026020010151600b60678154811063000029705763000029706300003ae0565b90600052602060002090600302016001018190555080600381518110630000299e57630000299e6300003ae0565b6020026020010151600b60688154811063000029c05763000029c06300003ae0565b9060005260206000209060030201600101819055508060038151811063000029ee5763000029ee6300003ae0565b6020026020010151600b6069815481106300002a10576300002a106300003ae0565b906000526020600020906003020160010181905550806002815181106300002a3e576300002a3e6300003ae0565b6020026020010151600b606a815481106300002a60576300002a606300003ae0565b906000526020600020906003020160010181905550806002815181106300002a8e576300002a8e6300003ae0565b6020026020010151600b606b815481106300002ab0576300002ab06300003ae0565b906000526020600020906003020160010181905550806001815181106300002ade576300002ade6300003ae0565b6020026020010151600b606c815481106300002b00576300002b006300003ae0565b906000526020600020906003020160010181905550806001815181106300002b2e576300002b2e6300003ae0565b6020026020010151600b606d815481106300002b50576300002b506300003ae0565b906000526020600020906003020160010181905550806002815181106300002b7e576300002b7e6300003ae0565b6020026020010151600b606e815481106300002ba0576300002ba06300003ae0565b906000526020600020906003020160010181905550806002815181106300002bce576300002bce6300003ae0565b6020026020010151600b606f815481106300002bf0576300002bf06300003ae0565b906000526020600020906003020160010181905550806000815181106300002c1e576300002c1e6300003ae0565b6020026020010151600b6070815481106300002c40576300002c406300003ae0565b906000526020600020906003020160010181905550806001815181106300002c6e576300002c6e6300003ae0565b6020026020010151600b6071815481106300002c90576300002c906300003ae0565b906000526020600020906003020160010181905550806002815181106300002cbe576300002cbe6300003ae0565b6020026020010151600b6072815481106300002ce0576300002ce06300003ae0565b906000526020600020906003020160010181905550806003815181106300002d0e576300002d0e6300003ae0565b6020026020010151600b6073815481106300002d30576300002d306300003ae0565b906000526020600020906003020160010181905550806005815181106300002d5e576300002d5e6300003ae0565b6020026020010151600b6074815481106300002d80576300002d806300003ae0565b906000526020600020906003020160010181905550806001815181106300002dae576300002dae6300003ae0565b6020026020010151600b6075815481106300002dd0576300002dd06300003ae0565b906000526020600020906003020160010181905550806003815181106300002dfe576300002dfe6300003ae0565b6020026020010151600b6076815481106300002e20576300002e206300003ae0565b906000526020600020906003020160010181905550806003815181106300002e4e576300002e4e6300003ae0565b6020026020010151600b6077815481106300002e70576300002e706300003ae0565b906000526020600020906003020160010181905550806008815181106300002e9e576300002e9e6300003ae0565b6020026020010151600b6078815481106300002ec0576300002ec06300003ae0565b906000526020600020906003020160010181905550806002815181106300002eee576300002eee6300003ae0565b6020026020010151600b6079815481106300002f10576300002f106300003ae0565b906000526020600020906003020160010181905550806002815181106300002f3e576300002f3e6300003ae0565b6020026020010151600b607a815481106300002f60576300002f606300003ae0565b906000526020600020906003020160010181905550806002815181106300002f8e576300002f8e6300003ae0565b6020026020010151600b607b815481106300002fb0576300002fb06300003ae0565b906000526020600020906003020160010181905550806001815181106300002fde576300002fde6300003ae0565b6020026020010151600b607c8154811063000030005763000030006300003ae0565b90600052602060002090600302016001018190555080600181518110630000302e57630000302e6300003ae0565b6020026020010151600b607d8154811063000030505763000030506300003ae0565b90600052602060002090600302016001018190555080600381518110630000307e57630000307e6300003ae0565b6020026020010151600b607e8154811063000030a05763000030a06300003ae0565b9060005260206000209060030201600101819055508060048151811063000030ce5763000030ce6300003ae0565b6020026020010151600b607f8154811063000030f05763000030f06300003ae0565b90600052602060002090600302016001018190555080600481518110630000311e57630000311e6300003ae0565b6020026020010151600b60808154811063000031405763000031406300003ae0565b90600052602060002090600302016001018190555080600281518110630000316e57630000316e6300003ae0565b6020026020010151600b60818154811063000031905763000031906300003ae0565b9060005260206000209060030201600101819055508060028151811063000031be5763000031be6300003ae0565b6020026020010151600b60828154811063000031e05763000031e06300003ae0565b90600052602060002090600302016001018190555080600281518110630000320e57630000320e6300003ae0565b6020026020010151600b60838154811063000032305763000032306300003ae0565b90600052602060002090600302016001018190555080600281518110630000325e57630000325e6300003ae0565b6020026020010151600b60848154811063000032805763000032806300003ae0565b9060005260206000209060030201600101819055508060018151811063000032ae5763000032ae6300003ae0565b6020026020010151600b60858154811063000032d05763000032d06300003ae0565b9060005260206000209060030201600101819055508060008151811063000032fe5763000032fe6300003ae0565b6020026020010151600b60868154811063000033205763000033206300003ae0565b90600052602060002090600302016001018190555080600281518110630000334e57630000334e6300003ae0565b6020026020010151600b60878154811063000033705763000033706300003ae0565b90600052602060002090600302016001018190555080600181518110630000339e57630000339e6300003ae0565b6020026020010151600b60888154811063000033c05763000033c06300003ae0565b9060005260206000209060030201600101819055508060038151811063000033ee5763000033ee6300003ae0565b6020026020010151600b60898154811063000034105763000034106300003ae0565b90600052602060002090600302016001018190555080600281518110630000343e57630000343e6300003ae0565b6020026020010151600b608a8154811063000034605763000034606300003ae0565b90600052602060002090600302016001018190555080600481518110630000348e57630000348e6300003ae0565b6020026020010151600b608b8154811063000034b05763000034b06300003ae0565b9060005260206000209060030201600101819055508060068151811063000034de5763000034de6300003ae0565b6020026020010151600b608c8154811063000035005763000035006300003ae0565b90600052602060002090600302016001018190555080600381518110630000352e57630000352e6300003ae0565b6020026020010151600b608d8154811063000035505763000035506300003ae0565b90600052602060002090600302016001018190555080600381518110630000357e57630000357e6300003ae0565b6020026020010151600b608e8154811063000035a05763000035a06300003ae0565b9060005260206000209060030201600101819055508060058151811063000035ce5763000035ce6300003ae0565b6020026020010151600b608f8154811063000035f05763000035f06300003ae0565b90600052602060002090600302016001018190555080600381518110630000361e57630000361e6300003ae0565b6020026020010151600b60908154811063000036405763000036406300003ae0565b906000526020600020906003020160010181905550506300003b34565b8051630000367490600290602084019063000039da565b5050565b6300003692828263000038a260201b630000249a1760201c565b600082815260056020908152604090912063000036bc91839063000025206300003948821b17901c565b505050565b336000818152600080516020630000837c833981519152602052604090205460ff1663000037255760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b60448201526064015b60405180910390fd5b506007805460ff1916911515919091179055565b336000818152600080516020630000837c833981519152602052604090205460ff16630000379a5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401630000371c565b50600a805460ff1916911515919091179055565b336000818152600080516020630000837c833981519152602052604090205460ff16630000380f5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401630000371c565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b336000818152600080516020630000837c833981519152602052604090205460ff1663000038935760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401630000371c565b630000389f630000396a565b50565b60008281526004602090815260408083206001600160a01b038516845290915290205460ff1663000036745760008281526004602090815260408083206001600160a01b03851684529091529020805460ff1916600117905563000039043390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60006300003961836001600160a01b0384166300003985565b90505b92915050565b600c8054906000630000397e836300003aa3565b9190505550565b600081815260018301602052604081205463000039d0575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556300003964565b5060006300003964565b82805463000039ea906300003af6565b90600052602060002090601f0160209004810192826300003a1057600085556300003a60565b82601f106300003a2d57805160ff19168380011785556300003a60565b828001600101855582156300003a60579182015b828111156300003a605782518255916020019190600101906300003a41565b506300003a709291506300003a74565b5090565b5b808211156300003a7057600081556001016300003a75565b634e487b7160e01b600052601160045260246000fd5b6000600182016300003abb576300003abb6300003a8d565b5060010190565b600082198211156300003adb576300003adb6300003a8d565b500190565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806300003b0c57607f821691505b6020821081036300003b2e57634e487b7160e01b600052602260045260246000fd5b50919050565b6147f7806300003b456000396000f3fe6080604052600436106103965760003560e01c80635c975abb116101dc578063bdf7a8e611610102578063d547741f116100a0578063e985e9c51161006f578063e985e9c514610b0d578063ec69ddc714610b56578063f08da1dd14610b71578063f242432a14610b8657600080fd5b8063d547741f14610a8d578063db9df0a514610aad578063dded709d14610acd578063e6a72acf14610aed57600080fd5b8063c9027373116100dc578063c902737314610a04578063ca15c87314610a19578063d0e90e9514610a39578063d539139314610a5957600080fd5b8063bdf7a8e6146109a4578063c232c493146109c4578063c80e1af7146109e457600080fd5b806391d148541161017a578063a94303f611610149578063a94303f614610907578063aa66715d14610927578063b483cec31461093c578063bd85b0391461097757600080fd5b806391d148541461089d57806395d89b41146108bd578063a217fddf146108d2578063a22cb465146108e757600080fd5b806381f6277d116101b657806381f6277d1461081d578063869f75941461083d5780638706dc2a1461085d5780639010d07c1461087d57600080fd5b80635c975abb146107ce5780635fd8c710146107e8578063709df9a3146107fd57600080fd5b80632b105663116102c157806336568abe1161025f57806347d5aadd1161022e57806347d5aadd1461074a5780634c61d4831461075f5780634e1273f41461077f5780634f558e791461079f57600080fd5b806336568abe1461069c57806337da577c146106bc57806341f43434146106dc57806347ab0e961461071657600080fd5b80632f2ff15d1161029b5780632f2ff15d1461062957806331d84a1c1461064957806334ea3c721461065c57806335a9a5c71461067c57600080fd5b80632b105663146105c75780632c3d7540146105e95780632eb2c2d61461060957600080fd5b80630f044bba116103395780631e3cc9aa116103085780631e3cc9aa1461053757806320c6a60a14610564578063248a9ca31461058457806328b83066146105b457600080fd5b80630f044bba146104b75780631169e6a2146104e457806316c38b3c146105045780631b2ef1ca1461052457600080fd5b806302fe53051161037557806302fe5305146104335780630442bfa81461045557806306fdde03146104755780630e89341c1461049757600080fd5b8062fdd58e1461039b578063011eb44d146103ce57806301ffc9a714610403575b600080fd5b3480156103a757600080fd5b506103bb6103b6366004613afa565b610ba6565b6040519081526020015b60405180910390f35b3480156103da57600080fd5b506103ee6103e9366004613b24565b610c3f565b604080519283526020830191909152016103c5565b34801561040f57600080fd5b5061042361041e366004613b53565b610c66565b60405190151581526020016103c5565b34801561043f57600080fd5b5061045361044e366004613c0f565b610c8b565b005b34801561046157600080fd5b50610453610470366004613c5f565b610cc0565b34801561048157600080fd5b5061048a610d1e565b6040516103c59190613cd9565b3480156104a357600080fd5b5061048a6104b2366004613b24565b610dac565b3480156104c357600080fd5b506103bb6104d2366004613b24565b600e6020526000908152604090205481565b3480156104f057600080fd5b506104536104ff366004613d80565b610e40565b34801561051057600080fd5b5061045361051f366004613df1565b610ee9565b610453610532366004613c5f565b610f25565b34801561054357600080fd5b50610557610552366004613e0e565b610f30565b6040516103c59190613e7d565b34801561057057600080fd5b5061055761057f366004613e0e565b611001565b34801561059057600080fd5b506103bb61059f366004613b24565b60009081526004602052604090206001015490565b6104536105c2366004613e90565b6110be565b3480156105d357600080fd5b506105dc6113d2565b6040516103c59190613f03565b3480156105f557600080fd5b50610453610604366004613b24565b61144f565b34801561061557600080fd5b50610453610624366004613f7c565b611570565b34801561063557600080fd5b50610453610644366004614025565b61164f565b610453610657366004614051565b611674565b34801561066857600080fd5b50610453610677366004613c5f565b611945565b34801561068857600080fd5b50610453610697366004614084565b611993565b3480156106a857600080fd5b506104536106b7366004614025565b6119de565b3480156106c857600080fd5b506104536106d7366004613c5f565b611a58565b3480156106e857600080fd5b506106fe6daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b0390911681526020016103c5565b34801561072257600080fd5b506107316327ca1b5360e01b81565b6040516001600160e01b031990911681526020016103c5565b34801561075657600080fd5b50600c546103bb565b34801561076b57600080fd5b506103bb61077a366004613c5f565b611b29565b34801561078b57600080fd5b5061055761079a36600461410c565b611b4b565b3480156107ab57600080fd5b506104236107ba366004613b24565b600090815260036020526040902054151590565b3480156107da57600080fd5b506007546104239060ff1681565b3480156107f457600080fd5b50610453611c74565b34801561080957600080fd5b50610453610818366004613b24565b611d17565b34801561082957600080fd5b50600f546106fe906001600160a01b031681565b34801561084957600080fd5b506103bb610858366004613b24565b611d48565b34801561086957600080fd5b50610453610878366004613d80565b611d7e565b34801561088957600080fd5b506106fe610898366004613c5f565b611e21565b3480156108a957600080fd5b506104236108b8366004614025565b611e39565b3480156108c957600080fd5b5061048a611e64565b3480156108de57600080fd5b506103bb600081565b3480156108f357600080fd5b50610453610902366004614142565b611e71565b34801561091357600080fd5b50610453610922366004614051565b611f35565b34801561093357600080fd5b5061045361203f565b34801561094857600080fd5b5061095c610957366004613b24565b61206f565b604080519384526020840192909252908201526060016103c5565b34801561098357600080fd5b506103bb610992366004613b24565b60009081526003602052604090205490565b3480156109b057600080fd5b506104536109bf366004614179565b6120a2565b3480156109d057600080fd5b506104536109df366004613b24565b612194565b3480156109f057600080fd5b506104536109ff366004613e90565b6121c5565b348015610a1057600080fd5b50610453612260565b348015610a2557600080fd5b506103bb610a34366004613b24565b612290565b348015610a4557600080fd5b50610453610a54366004613b24565b6122a7565b348015610a6557600080fd5b506103bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610a9957600080fd5b50610453610aa8366004614025565b6122d8565b348015610ab957600080fd5b50610453610ac8366004613df1565b6122fd565b348015610ad957600080fd5b506103bb610ae8366004613b24565b612339565b348015610af957600080fd5b506103bb610b08366004613b24565b612392565b348015610b1957600080fd5b50610423610b283660046141b5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610b6257600080fd5b5061073163ad63193560e01b81565b348015610b7d57600080fd5b50600d546103bb565b348015610b9257600080fd5b50610453610ba13660046141df565b6123c8565b60006001600160a01b038316610c165760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600080600d5483610c50919061426f565b600d54610c5d9085614283565b91509150915091565b60006001600160e01b031982166327ca1b5360e01b1480610c395750610c3982612535565b33610c97600082611e39565b610cb35760405162461bcd60e51b8152600401610c0d90614297565b610cbc8261255a565b5050565b33610ccc600082611e39565b610ce85760405162461bcd60e51b8152600401610c0d90614297565b81600b610cf48561256d565b81548110610d0457610d046142bd565b906000526020600020906003020160010181905550505050565b60088054610d2b906142d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610d57906142d3565b8015610da45780601f10610d7957610100808354040283529160200191610da4565b820191906000526020600020905b815481529060010190602001808311610d8757829003601f168201915b505050505081565b606060028054610dbb906142d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610de7906142d3565b8015610e345780601f10610e0957610100808354040283529160200191610e34565b820191906000526020600020905b815481529060010190602001808311610e1757829003601f168201915b50505050509050919050565b33610e4c600082611e39565b610e685760405162461bcd60e51b8152600401610c0d90614297565b8151835114610e895760405162461bcd60e51b8152600401610c0d9061430d565b60005b8351811015610ee357610ed1848281518110610eaa57610eaa6142bd565b6020026020010151848381518110610ec457610ec46142bd565b6020026020010151611a58565b80610edb81614334565b915050610e8c565b50505050565b33610ef5600082611e39565b610f115760405162461bcd60e51b8152600401610c0d90614297565b506007805460ff1916911515919091179055565b610cbc338383611674565b6060600082516001600160401b03811115610f4d57610f4d613b70565b604051908082528060200260200182016040528015610f76578160200160208202803683370190505b50905060005b8351811015610ffa57600b610fa9858381518110610f9c57610f9c6142bd565b602002602001015161256d565b81548110610fb957610fb96142bd565b906000526020600020906003020160010154828281518110610fdd57610fdd6142bd565b602090810291909101015280610ff281614334565b915050610f7c565b5092915050565b6060600082516001600160401b0381111561101e5761101e613b70565b604051908082528060200260200182016040528015611047578160200160208202803683370190505b50905060005b8351811015610ffa57600b61106d858381518110610f9c57610f9c6142bd565b8154811061107d5761107d6142bd565b9060005260206000209060030201600201548282815181106110a1576110a16142bd565b6020908102919091010152806110b681614334565b91505061104d565b60075460ff16156111075760405162461bcd60e51b815260206004820152601360248201527221b7b73a3930b1ba1034b9903830bab9b2b21760691b6044820152606401610c0d565b61110f6125da565b80518251146111305760405162461bcd60e51b8152600401610c0d9061430d565b6000805b83518110156113615760005b600b5481101561134e5784828151811061115c5761115c6142bd565b6020026020010151600b8281548110611177576111776142bd565b9060005260206000209060030201600001540361133c57600b81815481106111a1576111a16142bd565b90600052602060002090600302016002015460001461127557600b81815481106111cd576111cd6142bd565b9060005260206000209060030201600201548483815181106111f1576111f16142bd565b602002602001015161122887858151811061120e5761120e6142bd565b602002602001015160009081526003602052604090205490565b611232919061434d565b11156112755760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610c0d565b600b8181548110611288576112886142bd565b90600052602060002090600302016001015460001415806112ab5750600a5460ff165b6112e65760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b6044820152606401610c0d565b8382815181106112f8576112f86142bd565b6020026020010151600b8281548110611313576113136142bd565b90600052602060002090600302016001015461132f9190614365565b611339908461434d565b92505b8061134681614334565b915050611140565b508061135981614334565b915050611134565b50803410156113a75760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610c0d565b6113c284848460405180602001604052806000815250612633565b506113cd6001600655565b505050565b6060600b805480602002602001604051908101604052809291908181526020016000905b8282101561144657838290600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050815260200190600101906113f6565b50505050905090565b3361145b600082611e39565b6114775760405162461bcd60e51b8152600401610c0d90614297565b600c5482106114bc5760405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a590819d85919d95d081259607a1b6044820152606401610c0d565b6000828152600e60205260409020546115215760405162461bcd60e51b815260206004820152602160248201527f4e6f20617661696c61626c6520766172696174696f6e7320746f2072656d6f766044820152606560f81b6064820152608401610c0d565b6000828152600e6020526040812080549161153b83614384565b90915550506000828152600e6020526040902054600d54610cbc91906115619085614365565b61156b919061434d565b61278d565b846daaeb6d7670e522a718067333cd4e3b1561163a57336001600160a01b038216036115a8576115a38686868686612942565b611647565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156115f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161b919061439b565b61163a57604051633b79c77360e21b8152336004820152602401610c0d565b6116478686868686612942565b505050505050565b60008281526004602052604090206001015461166a81612987565b6113cd8383612991565b816000805b600b548110156116c55782600b8281548110611697576116976142bd565b906000526020600020906003020160000154036116b357600191505b806116bd81614334565b915050611679565b50806116e35760405162461bcd60e51b8152600401610c0d906143b8565b60075460ff161561172c5760405162461bcd60e51b815260206004820152601360248201527221b7b73a3930b1ba1034b9903830bab9b2b21760691b6044820152606401610c0d565b6117346125da565b60005b600b548110156119335784600b8281548110611755576117556142bd565b9060005260206000209060030201600001540361192157600b818154811061177f5761177f6142bd565b90600052602060002090600302016002015460001461182157600b81815481106117ab576117ab6142bd565b906000526020600020906003020160020154846117d48760009081526003602052604090205490565b6117de919061434d565b11156118215760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610c0d565b600b8181548110611834576118346142bd565b90600052602060002090600302016001015460001415806118575750600a5460ff165b6118925760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b6044820152606401610c0d565b83600b82815481106118a6576118a66142bd565b9060005260206000209060030201600101546118c29190614365565b3410156119065760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610c0d565b611921868686604051806020016040528060008152506129b3565b8061192b81614334565b915050611737565b5061193e6001600655565b5050505050565b33611951600082611e39565b61196d5760405162461bcd60e51b8152600401610c0d90614297565b60005b82811015610ee35761198184612a9c565b8061198b81614334565b915050611970565b3361199f600082611e39565b6119bb5760405162461bcd60e51b8152600401610c0d90614297565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381163314611a4e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c0d565b610cbc8282612b92565b33611a64600082611e39565b611a805760405162461bcd60e51b8152600401610c0d90614297565b6000838152600360205260409020548211611af35760405162461bcd60e51b815260206004820152602d60248201527f4d617820737570706c792063616e206e6f74206265206c657373207468616e2060448201526c3a37ba30b61039bab838363c9760991b6064820152608401610c0d565b81600b611aff8561256d565b81548110611b0f57611b0f6142bd565b906000526020600020906003020160020181905550505050565b600081600d5484611b3a9190614365565b611b44919061434d565b9392505050565b60608151835114611bb05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610c0d565b600083516001600160401b03811115611bcb57611bcb613b70565b604051908082528060200260200182016040528015611bf4578160200160208202803683370190505b50905060005b8451811015611c6c57611c3f858281518110611c1857611c186142bd565b6020026020010151858381518110611c3257611c326142bd565b6020026020010151610ba6565b828281518110611c5157611c516142bd565b6020908102919091010152611c6581614334565b9050611bfa565b509392505050565b33611c80600082611e39565b611c9c5760405162461bcd60e51b8152600401610c0d90614297565b611ca46125da565b600f5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114611cf5576040519150601f19603f3d011682016040523d82523d6000602084013e611cfa565b606091505b5050905080611d0857600080fd5b5050611d146001600655565b50565b33611d23600082611e39565b611d3f5760405162461bcd60e51b8152600401610c0d90614297565b610cbc8261278d565b6000600b611d558361256d565b81548110611d6557611d656142bd565b9060005260206000209060030201600201549050919050565b33611d8a600082611e39565b611da65760405162461bcd60e51b8152600401610c0d90614297565b8151835114611dc75760405162461bcd60e51b8152600401610c0d9061430d565b60005b8351811015610ee357611e0f848281518110611de857611de86142bd565b6020026020010151848381518110611e0257611e026142bd565b6020026020010151610cc0565b80611e1981614334565b915050611dca565b6000828152600560205260408120611b449083612bb4565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60098054610d2b906142d3565b816daaeb6d7670e522a718067333cd4e3b15611f2b57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611edf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f03919061439b565b611f2b57604051633b79c77360e21b81526001600160a01b0382166004820152602401610c0d565b6113cd8383612bc0565b816000805b600b54811015611f865782600b8281548110611f5857611f586142bd565b90600052602060002090600302016000015403611f7457600191505b80611f7e81614334565b915050611f3a565b5080611fa45760405162461bcd60e51b8152600401610c0d906143b8565b611fac6125da565b611fd67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611e39565b61201a5760405162461bcd60e51b815260206004820152601560248201527426b4b73a32b9103937b632903932b8bab4b932b21760591b6044820152606401610c0d565b612035858585604051806020016040528060008152506129b3565b61193e6001600655565b3361204b600082611e39565b6120675760405162461bcd60e51b8152600401610c0d90614297565b611d14612bcb565b600b818154811061207f57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b336120ae600082611e39565b6120ca5760405162461bcd60e51b8152600401610c0d90614297565b826000805b600b5481101561211b5782600b82815481106120ed576120ed6142bd565b9060005260206000209060030201600001540361210957600191505b8061211381614334565b9150506120cf565b50806121395760405162461bcd60e51b8152600401610c0d906143b8565b6121416125da565b60005b845181101561193357612182858281518110612162576121626142bd565b6020026020010151876001604051806020016040528060008152506129b3565b8061218c81614334565b915050612144565b336121a0600082611e39565b6121bc5760405162461bcd60e51b8152600401610c0d90614297565b610cbc82612a9c565b6121cd6125da565b6121f77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611e39565b61223b5760405162461bcd60e51b815260206004820152601560248201527426b4b73a32b9103937b632903932b8bab4b932b21760591b6044820152606401610c0d565b61225683838360405180602001604052806000815250612633565b6113cd6001600655565b3361226c600082611e39565b6122885760405162461bcd60e51b8152600401610c0d90614297565b611d14612ca5565b6000818152600560205260408120610c3990612cb5565b336122b3600082611e39565b6122cf5760405162461bcd60e51b8152600401610c0d90614297565b610cbc82612cbf565b6000828152600460205260409020600101546122f381612987565b6113cd8383612b92565b33612309600082611e39565b6123255760405162461bcd60e51b8152600401610c0d90614297565b50600a805460ff1916911515919091179055565b6000600c54821061237f5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590819dc9bdd5c08125160821b6044820152606401610c0d565b506000908152600e602052604090205490565b6000600b61239f8361256d565b815481106123af576123af6142bd565b9060005260206000209060030201600101549050919050565b846daaeb6d7670e522a718067333cd4e3b1561248d57336001600160a01b038216036123fb576115a38686868686612de9565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561244a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246e919061439b565b61248d57604051633b79c77360e21b8152336004820152602401610c0d565b6116478686868686612de9565b6124a48282611e39565b610cbc5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556124dc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611b44836001600160a01b038416612e2e565b60006001600160e01b0319821663ad63193560e01b1480610c395750610c3982612e7d565b8051610cbc906002906020840190613a4a565b6000805b600b548110156125bc5782600b828154811061258f5761258f6142bd565b906000526020600020906003020160000154036125ac5792915050565b6125b581614334565b9050612571565b5060405162461bcd60e51b8152600401610c0d906143b8565b919050565b60026006540361262c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c0d565b6002600655565b6001600160a01b0384166126595760405162461bcd60e51b8152600401610c0d906143de565b815183511461267a5760405162461bcd60e51b8152600401610c0d9061441f565b3361268a81600087878787612ea2565b60005b8451811015612725578381815181106126a8576126a86142bd565b60200260200101516000808784815181106126c5576126c56142bd565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461270d919061434d565b9091555081905061271d81614334565b91505061268d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612776929190614467565b60405180910390a461193e8160008787878761301b565b6000805b600b548110156129245782600b82815481106127af576127af6142bd565b9060005260206000209060030201600001540361291257600083815260036020526040902054156128225760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742064656c657465206964207769746820737570706c79000000006044820152606401610c0d565b600b805461283290600190614495565b81548110612842576128426142bd565b9060005260206000209060030201600b8281548110612863576128636142bd565b9060005260206000209060030201600082015481600001556001820154816001015560028201548160020155905050600b6001600b805490506128a69190614495565b815481106128b6576128b66142bd565b6000918252602082206003909102018181556001810182905560020155600b8054806128e4576128e46144ac565b6000828152602081206003600019909301928302018181556001818101839055600290910191909155915591505b8061291c81614334565b915050612791565b5080610cbc5760405162461bcd60e51b8152600401610c0d906143b8565b6001600160a01b03851633148061295e575061295e8533610b28565b61297a5760405162461bcd60e51b8152600401610c0d906144c2565b61193e8585858585613176565b611d148133613318565b61299b828261249a565b60008281526005602052604090206113cd9082612520565b6001600160a01b0384166129d95760405162461bcd60e51b8152600401610c0d906143de565b3360006129e585613371565b905060006129f285613371565b9050612a0383600089858589612ea2565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290612a3390849061434d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612a93836000898989896133bc565b50505050505050565b600c548110612ae15760405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a590819d85919d95d081259607a1b6044820152606401610c0d565b600d546000828152600e602052604090205410612b405760405162461bcd60e51b815260206004820152601760248201527f4e6f20617661696c61626c6520766172696174696f6e730000000000000000006044820152606401610c0d565b6000818152600e6020526040902054600d54612b709190612b619084614365565b612b6b919061434d565b612cbf565b6000818152600e60205260408120805491612b8a83614334565b919050555050565b612b9c8282613477565b60008281526005602052604090206113cd90826134de565b6000611b4483836134f3565b610cbc33838361351d565b6000600c5411612c1d5760405162461bcd60e51b815260206004820152601d60248201527f4e6f20617661696c61626c652067726f75707320746f2072656d6f76650000006044820152606401610c0d565b600e60006001600c54612c309190614495565b815260200190815260200160002054600014612c8e5760405162461bcd60e51b815260206004820152601b60248201527f52656d6f766520616c6c20766172696174696f6e7320666972737400000000006044820152606401610c0d565b600c8054906000612c9e83614384565b9190505550565b600c8054906000612c9e83614334565b6000610c39825490565b60005b600b54811015612d455781600b8281548110612ce057612ce06142bd565b90600052602060002090600302016000015403612d335760405162461bcd60e51b8152602060048201526011602482015270496420616c72656164792065786973747360781b6044820152606401610c0d565b80612d3d81614334565b915050612cc2565b5060408051606081018252918252600060208301818152918301818152600b8054600181018255925292517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db960039092029182015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba82015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbb90910155565b6001600160a01b038516331480612e055750612e058533610b28565b612e215760405162461bcd60e51b8152600401610c0d906144c2565b61193e85858585856135fd565b6000818152600183016020526040812054612e7557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c39565b506000610c39565b60006001600160e01b03198216635a05180f60e01b1480610c395750610c3982613735565b6001600160a01b038516612f295760005b8351811015612f2757828181518110612ece57612ece6142bd565b602002602001015160036000868481518110612eec57612eec6142bd565b602002602001015181526020019081526020016000206000828254612f11919061434d565b90915550612f20905081614334565b9050612eb3565b505b6001600160a01b0384166116475760005b8351811015612a93576000848281518110612f5757612f576142bd565b602002602001015190506000848381518110612f7557612f756142bd565b6020026020010151905060006003600084815260200190815260200160002054905081811015612ff85760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610c0d565b6000928352600360205260409092209103905561301481614334565b9050612f3a565b6001600160a01b0384163b156116475760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061305f9089908990889088908890600401614510565b6020604051808303816000875af192505050801561309a575060408051601f3d908101601f191682019092526130979181019061456e565b60015b613146576130a661458b565b806308c379a0036130df57506130ba6145a7565b806130c557506130e1565b8060405162461bcd60e51b8152600401610c0d9190613cd9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610c0d565b6001600160e01b0319811663bc197c8160e01b14612a935760405162461bcd60e51b8152600401610c0d90614630565b81518351146131975760405162461bcd60e51b8152600401610c0d9061441f565b6001600160a01b0384166131bd5760405162461bcd60e51b8152600401610c0d90614678565b336131cc818787878787612ea2565b60005b84518110156132b25760008582815181106131ec576131ec6142bd565b60200260200101519050600085838151811061320a5761320a6142bd565b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561325a5760405162461bcd60e51b8152600401610c0d906146bd565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061329790849061434d565b92505081905550505050806132ab90614334565b90506131cf565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613302929190614467565b60405180910390a461164781878787878761301b565b6133228282611e39565b610cbc5761332f8161375a565b61333a83602061376c565b60405160200161334b929190614707565b60408051601f198184030181529082905262461bcd60e51b8252610c0d91600401613cd9565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106133ab576133ab6142bd565b602090810291909101015292915050565b6001600160a01b0384163b156116475760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613400908990899088908890889060040161477c565b6020604051808303816000875af192505050801561343b575060408051601f3d908101601f191682019092526134389181019061456e565b60015b613447576130a661458b565b6001600160e01b0319811663f23a6e6160e01b14612a935760405162461bcd60e51b8152600401610c0d90614630565b6134818282611e39565b15610cbc5760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611b44836001600160a01b038416613907565b600082600001828154811061350a5761350a6142bd565b9060005260206000200154905092915050565b816001600160a01b0316836001600160a01b0316036135905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610c0d565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166136235760405162461bcd60e51b8152600401610c0d90614678565b33600061362f85613371565b9050600061363c85613371565b905061364c838989858589612ea2565b6000868152602081815260408083206001600160a01b038c1684529091529020548581101561368d5760405162461bcd60e51b8152600401610c0d906146bd565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906136ca90849061434d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461372a848a8a8a8a8a6133bc565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b1480610c395750610c39826139fa565b6060610c396001600160a01b03831660145b6060600061377b836002614365565b61378690600261434d565b6001600160401b0381111561379d5761379d613b70565b6040519080825280601f01601f1916602001820160405280156137c7576020820181803683370190505b509050600360fc1b816000815181106137e2576137e26142bd565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613811576138116142bd565b60200101906001600160f81b031916908160001a9053506000613835846002614365565b61384090600161434d565b90505b60018111156138b8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613874576138746142bd565b1a60f81b82828151811061388a5761388a6142bd565b60200101906001600160f81b031916908160001a90535060049490941c936138b181614384565b9050613843565b508315611b445760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c0d565b600081815260018301602052604081205480156139f057600061392b600183614495565b855490915060009061393f90600190614495565b90508181146139a457600086600001828154811061395f5761395f6142bd565b9060005260206000200154905080876000018481548110613982576139826142bd565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806139b5576139b56144ac565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c39565b6000915050610c39565b60006001600160e01b03198216636cdb3d1360e11b1480613a2b57506001600160e01b031982166303a24d0760e21b145b80610c3957506301ffc9a760e01b6001600160e01b0319831614610c39565b828054613a56906142d3565b90600052602060002090601f016020900481019282613a785760008555613abe565b82601f10613a9157805160ff1916838001178555613abe565b82800160010185558215613abe579182015b82811115613abe578251825591602001919060010190613aa3565b50613aca929150613ace565b5090565b5b80821115613aca5760008155600101613acf565b80356001600160a01b03811681146125d557600080fd5b60008060408385031215613b0d57600080fd5b613b1683613ae3565b946020939093013593505050565b600060208284031215613b3657600080fd5b5035919050565b6001600160e01b031981168114611d1457600080fd5b600060208284031215613b6557600080fd5b8135611b4481613b3d565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613bab57613bab613b70565b6040525050565b60006001600160401b03831115613bcb57613bcb613b70565b604051613be2601f8501601f191660200182613b86565b809150838152848484011115613bf757600080fd5b83836020830137600060208583010152509392505050565b600060208284031215613c2157600080fd5b81356001600160401b03811115613c3757600080fd5b8201601f81018413613c4857600080fd5b613c5784823560208401613bb2565b949350505050565b60008060408385031215613c7257600080fd5b50508035926020909101359150565b60005b83811015613c9c578181015183820152602001613c84565b83811115610ee35750506000910152565b60008151808452613cc5816020860160208601613c81565b601f01601f19169290920160200192915050565b602081526000611b446020830184613cad565b60006001600160401b03821115613d0557613d05613b70565b5060051b60200190565b600082601f830112613d2057600080fd5b81356020613d2d82613cec565b604051613d3a8282613b86565b83815260059390931b8501820192828101915086841115613d5a57600080fd5b8286015b84811015613d755780358352918301918301613d5e565b509695505050505050565b60008060408385031215613d9357600080fd5b82356001600160401b0380821115613daa57600080fd5b613db686838701613d0f565b93506020850135915080821115613dcc57600080fd5b50613dd985828601613d0f565b9150509250929050565b8015158114611d1457600080fd5b600060208284031215613e0357600080fd5b8135611b4481613de3565b600060208284031215613e2057600080fd5b81356001600160401b03811115613e3657600080fd5b613c5784828501613d0f565b600081518084526020808501945080840160005b83811015613e7257815187529582019590820190600101613e56565b509495945050505050565b602081526000611b446020830184613e42565b600080600060608486031215613ea557600080fd5b613eae84613ae3565b925060208401356001600160401b0380821115613eca57600080fd5b613ed687838801613d0f565b93506040860135915080821115613eec57600080fd5b50613ef986828701613d0f565b9150509250925092565b602080825282518282018190526000919060409081850190868401855b82811015613f4f5781518051855286810151878601528501518585015260609093019290850190600101613f20565b5091979650505050505050565b600082601f830112613f6d57600080fd5b611b4483833560208501613bb2565b600080600080600060a08688031215613f9457600080fd5b613f9d86613ae3565b9450613fab60208701613ae3565b935060408601356001600160401b0380821115613fc757600080fd5b613fd389838a01613d0f565b94506060880135915080821115613fe957600080fd5b613ff589838a01613d0f565b9350608088013591508082111561400b57600080fd5b5061401888828901613f5c565b9150509295509295909350565b6000806040838503121561403857600080fd5b8235915061404860208401613ae3565b90509250929050565b60008060006060848603121561406657600080fd5b61406f84613ae3565b95602085013595506040909401359392505050565b60006020828403121561409657600080fd5b611b4482613ae3565b600082601f8301126140b057600080fd5b813560206140bd82613cec565b6040516140ca8282613b86565b83815260059390931b85018201928281019150868411156140ea57600080fd5b8286015b84811015613d75576140ff81613ae3565b83529183019183016140ee565b6000806040838503121561411f57600080fd5b82356001600160401b038082111561413657600080fd5b613db68683870161409f565b6000806040838503121561415557600080fd5b61415e83613ae3565b9150602083013561416e81613de3565b809150509250929050565b6000806040838503121561418c57600080fd5b8235915060208301356001600160401b038111156141a957600080fd5b613dd98582860161409f565b600080604083850312156141c857600080fd5b6141d183613ae3565b915061404860208401613ae3565b600080600080600060a086880312156141f757600080fd5b61420086613ae3565b945061420e60208701613ae3565b9350604086013592506060860135915060808601356001600160401b0381111561423757600080fd5b61401888828901613f5c565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261427e5761427e614243565b500490565b60008261429257614292614243565b500690565b6020808252600c908201526b155b985d5d1a1bdc9a5e995960a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806142e757607f821691505b60208210810361430757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b60006001820161434657614346614259565b5060010190565b6000821982111561436057614360614259565b500190565b600081600019048311821515161561437f5761437f614259565b500290565b60008161439357614393614259565b506000190190565b6000602082840312156143ad57600080fd5b8151611b4481613de3565b6020808252600c908201526b1259081b9bdd08199bdd5b9960a21b604082015260600190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60408152600061447a6040830185613e42565b828103602084015261448c8185613e42565b95945050505050565b6000828210156144a7576144a7614259565b500390565b634e487b7160e01b600052603160045260246000fd5b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061453c90830186613e42565b828103606084015261454e8186613e42565b905082810360808401526145628185613cad565b98975050505050505050565b60006020828403121561458057600080fd5b8151611b4481613b3d565b600060033d11156145a45760046000803e5060005160e01c5b90565b600060443d10156145b55790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156145e457505050505090565b82850191508151818111156145fc5750505050505090565b843d87010160208285010111156146165750505050505090565b61462560208286010187613b86565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161473f816017850160208801613c81565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614770816028840160208801613c81565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906147b690830184613cad565b97965050505050505056fea26469706673582212205f9c18841f6bc2895e2e063a18e2682a9c7b96c27292156e3de1eba54f6b465e64736f6c634300080e0033e0283e559c29e31ee7f56467acc9dd307779c843a883aeeb3bf5c6128c908144a7c5ba7114a813b50159add3a36832908dc83db71d0b9a24c2ad0f83be95820717ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec9adb202b1492743bc00c81d33cdc6423fa8c79109027eb6a845391e8fc1f0481a1d6913cd9e08c872be3e7525cca82e4fc0fc298a783f19022be725b19be685a
Deployed Bytecode
0x6080604052600436106103965760003560e01c80635c975abb116101dc578063bdf7a8e611610102578063d547741f116100a0578063e985e9c51161006f578063e985e9c514610b0d578063ec69ddc714610b56578063f08da1dd14610b71578063f242432a14610b8657600080fd5b8063d547741f14610a8d578063db9df0a514610aad578063dded709d14610acd578063e6a72acf14610aed57600080fd5b8063c9027373116100dc578063c902737314610a04578063ca15c87314610a19578063d0e90e9514610a39578063d539139314610a5957600080fd5b8063bdf7a8e6146109a4578063c232c493146109c4578063c80e1af7146109e457600080fd5b806391d148541161017a578063a94303f611610149578063a94303f614610907578063aa66715d14610927578063b483cec31461093c578063bd85b0391461097757600080fd5b806391d148541461089d57806395d89b41146108bd578063a217fddf146108d2578063a22cb465146108e757600080fd5b806381f6277d116101b657806381f6277d1461081d578063869f75941461083d5780638706dc2a1461085d5780639010d07c1461087d57600080fd5b80635c975abb146107ce5780635fd8c710146107e8578063709df9a3146107fd57600080fd5b80632b105663116102c157806336568abe1161025f57806347d5aadd1161022e57806347d5aadd1461074a5780634c61d4831461075f5780634e1273f41461077f5780634f558e791461079f57600080fd5b806336568abe1461069c57806337da577c146106bc57806341f43434146106dc57806347ab0e961461071657600080fd5b80632f2ff15d1161029b5780632f2ff15d1461062957806331d84a1c1461064957806334ea3c721461065c57806335a9a5c71461067c57600080fd5b80632b105663146105c75780632c3d7540146105e95780632eb2c2d61461060957600080fd5b80630f044bba116103395780631e3cc9aa116103085780631e3cc9aa1461053757806320c6a60a14610564578063248a9ca31461058457806328b83066146105b457600080fd5b80630f044bba146104b75780631169e6a2146104e457806316c38b3c146105045780631b2ef1ca1461052457600080fd5b806302fe53051161037557806302fe5305146104335780630442bfa81461045557806306fdde03146104755780630e89341c1461049757600080fd5b8062fdd58e1461039b578063011eb44d146103ce57806301ffc9a714610403575b600080fd5b3480156103a757600080fd5b506103bb6103b6366004613afa565b610ba6565b6040519081526020015b60405180910390f35b3480156103da57600080fd5b506103ee6103e9366004613b24565b610c3f565b604080519283526020830191909152016103c5565b34801561040f57600080fd5b5061042361041e366004613b53565b610c66565b60405190151581526020016103c5565b34801561043f57600080fd5b5061045361044e366004613c0f565b610c8b565b005b34801561046157600080fd5b50610453610470366004613c5f565b610cc0565b34801561048157600080fd5b5061048a610d1e565b6040516103c59190613cd9565b3480156104a357600080fd5b5061048a6104b2366004613b24565b610dac565b3480156104c357600080fd5b506103bb6104d2366004613b24565b600e6020526000908152604090205481565b3480156104f057600080fd5b506104536104ff366004613d80565b610e40565b34801561051057600080fd5b5061045361051f366004613df1565b610ee9565b610453610532366004613c5f565b610f25565b34801561054357600080fd5b50610557610552366004613e0e565b610f30565b6040516103c59190613e7d565b34801561057057600080fd5b5061055761057f366004613e0e565b611001565b34801561059057600080fd5b506103bb61059f366004613b24565b60009081526004602052604090206001015490565b6104536105c2366004613e90565b6110be565b3480156105d357600080fd5b506105dc6113d2565b6040516103c59190613f03565b3480156105f557600080fd5b50610453610604366004613b24565b61144f565b34801561061557600080fd5b50610453610624366004613f7c565b611570565b34801561063557600080fd5b50610453610644366004614025565b61164f565b610453610657366004614051565b611674565b34801561066857600080fd5b50610453610677366004613c5f565b611945565b34801561068857600080fd5b50610453610697366004614084565b611993565b3480156106a857600080fd5b506104536106b7366004614025565b6119de565b3480156106c857600080fd5b506104536106d7366004613c5f565b611a58565b3480156106e857600080fd5b506106fe6daaeb6d7670e522a718067333cd4e81565b6040516001600160a01b0390911681526020016103c5565b34801561072257600080fd5b506107316327ca1b5360e01b81565b6040516001600160e01b031990911681526020016103c5565b34801561075657600080fd5b50600c546103bb565b34801561076b57600080fd5b506103bb61077a366004613c5f565b611b29565b34801561078b57600080fd5b5061055761079a36600461410c565b611b4b565b3480156107ab57600080fd5b506104236107ba366004613b24565b600090815260036020526040902054151590565b3480156107da57600080fd5b506007546104239060ff1681565b3480156107f457600080fd5b50610453611c74565b34801561080957600080fd5b50610453610818366004613b24565b611d17565b34801561082957600080fd5b50600f546106fe906001600160a01b031681565b34801561084957600080fd5b506103bb610858366004613b24565b611d48565b34801561086957600080fd5b50610453610878366004613d80565b611d7e565b34801561088957600080fd5b506106fe610898366004613c5f565b611e21565b3480156108a957600080fd5b506104236108b8366004614025565b611e39565b3480156108c957600080fd5b5061048a611e64565b3480156108de57600080fd5b506103bb600081565b3480156108f357600080fd5b50610453610902366004614142565b611e71565b34801561091357600080fd5b50610453610922366004614051565b611f35565b34801561093357600080fd5b5061045361203f565b34801561094857600080fd5b5061095c610957366004613b24565b61206f565b604080519384526020840192909252908201526060016103c5565b34801561098357600080fd5b506103bb610992366004613b24565b60009081526003602052604090205490565b3480156109b057600080fd5b506104536109bf366004614179565b6120a2565b3480156109d057600080fd5b506104536109df366004613b24565b612194565b3480156109f057600080fd5b506104536109ff366004613e90565b6121c5565b348015610a1057600080fd5b50610453612260565b348015610a2557600080fd5b506103bb610a34366004613b24565b612290565b348015610a4557600080fd5b50610453610a54366004613b24565b6122a7565b348015610a6557600080fd5b506103bb7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610a9957600080fd5b50610453610aa8366004614025565b6122d8565b348015610ab957600080fd5b50610453610ac8366004613df1565b6122fd565b348015610ad957600080fd5b506103bb610ae8366004613b24565b612339565b348015610af957600080fd5b506103bb610b08366004613b24565b612392565b348015610b1957600080fd5b50610423610b283660046141b5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b348015610b6257600080fd5b5061073163ad63193560e01b81565b348015610b7d57600080fd5b50600d546103bb565b348015610b9257600080fd5b50610453610ba13660046141df565b6123c8565b60006001600160a01b038316610c165760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660448201526930b634b21037bbb732b960b11b60648201526084015b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600080600d5483610c50919061426f565b600d54610c5d9085614283565b91509150915091565b60006001600160e01b031982166327ca1b5360e01b1480610c395750610c3982612535565b33610c97600082611e39565b610cb35760405162461bcd60e51b8152600401610c0d90614297565b610cbc8261255a565b5050565b33610ccc600082611e39565b610ce85760405162461bcd60e51b8152600401610c0d90614297565b81600b610cf48561256d565b81548110610d0457610d046142bd565b906000526020600020906003020160010181905550505050565b60088054610d2b906142d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610d57906142d3565b8015610da45780601f10610d7957610100808354040283529160200191610da4565b820191906000526020600020905b815481529060010190602001808311610d8757829003601f168201915b505050505081565b606060028054610dbb906142d3565b80601f0160208091040260200160405190810160405280929190818152602001828054610de7906142d3565b8015610e345780601f10610e0957610100808354040283529160200191610e34565b820191906000526020600020905b815481529060010190602001808311610e1757829003601f168201915b50505050509050919050565b33610e4c600082611e39565b610e685760405162461bcd60e51b8152600401610c0d90614297565b8151835114610e895760405162461bcd60e51b8152600401610c0d9061430d565b60005b8351811015610ee357610ed1848281518110610eaa57610eaa6142bd565b6020026020010151848381518110610ec457610ec46142bd565b6020026020010151611a58565b80610edb81614334565b915050610e8c565b50505050565b33610ef5600082611e39565b610f115760405162461bcd60e51b8152600401610c0d90614297565b506007805460ff1916911515919091179055565b610cbc338383611674565b6060600082516001600160401b03811115610f4d57610f4d613b70565b604051908082528060200260200182016040528015610f76578160200160208202803683370190505b50905060005b8351811015610ffa57600b610fa9858381518110610f9c57610f9c6142bd565b602002602001015161256d565b81548110610fb957610fb96142bd565b906000526020600020906003020160010154828281518110610fdd57610fdd6142bd565b602090810291909101015280610ff281614334565b915050610f7c565b5092915050565b6060600082516001600160401b0381111561101e5761101e613b70565b604051908082528060200260200182016040528015611047578160200160208202803683370190505b50905060005b8351811015610ffa57600b61106d858381518110610f9c57610f9c6142bd565b8154811061107d5761107d6142bd565b9060005260206000209060030201600201548282815181106110a1576110a16142bd565b6020908102919091010152806110b681614334565b91505061104d565b60075460ff16156111075760405162461bcd60e51b815260206004820152601360248201527221b7b73a3930b1ba1034b9903830bab9b2b21760691b6044820152606401610c0d565b61110f6125da565b80518251146111305760405162461bcd60e51b8152600401610c0d9061430d565b6000805b83518110156113615760005b600b5481101561134e5784828151811061115c5761115c6142bd565b6020026020010151600b8281548110611177576111776142bd565b9060005260206000209060030201600001540361133c57600b81815481106111a1576111a16142bd565b90600052602060002090600302016002015460001461127557600b81815481106111cd576111cd6142bd565b9060005260206000209060030201600201548483815181106111f1576111f16142bd565b602002602001015161122887858151811061120e5761120e6142bd565b602002602001015160009081526003602052604090205490565b611232919061434d565b11156112755760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610c0d565b600b8181548110611288576112886142bd565b90600052602060002090600302016001015460001415806112ab5750600a5460ff165b6112e65760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b6044820152606401610c0d565b8382815181106112f8576112f86142bd565b6020026020010151600b8281548110611313576113136142bd565b90600052602060002090600302016001015461132f9190614365565b611339908461434d565b92505b8061134681614334565b915050611140565b508061135981614334565b915050611134565b50803410156113a75760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610c0d565b6113c284848460405180602001604052806000815250612633565b506113cd6001600655565b505050565b6060600b805480602002602001604051908101604052809291908181526020016000905b8282101561144657838290600052602060002090600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050815260200190600101906113f6565b50505050905090565b3361145b600082611e39565b6114775760405162461bcd60e51b8152600401610c0d90614297565b600c5482106114bc5760405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a590819d85919d95d081259607a1b6044820152606401610c0d565b6000828152600e60205260409020546115215760405162461bcd60e51b815260206004820152602160248201527f4e6f20617661696c61626c6520766172696174696f6e7320746f2072656d6f766044820152606560f81b6064820152608401610c0d565b6000828152600e6020526040812080549161153b83614384565b90915550506000828152600e6020526040902054600d54610cbc91906115619085614365565b61156b919061434d565b61278d565b846daaeb6d7670e522a718067333cd4e3b1561163a57336001600160a01b038216036115a8576115a38686868686612942565b611647565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156115f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061161b919061439b565b61163a57604051633b79c77360e21b8152336004820152602401610c0d565b6116478686868686612942565b505050505050565b60008281526004602052604090206001015461166a81612987565b6113cd8383612991565b816000805b600b548110156116c55782600b8281548110611697576116976142bd565b906000526020600020906003020160000154036116b357600191505b806116bd81614334565b915050611679565b50806116e35760405162461bcd60e51b8152600401610c0d906143b8565b60075460ff161561172c5760405162461bcd60e51b815260206004820152601360248201527221b7b73a3930b1ba1034b9903830bab9b2b21760691b6044820152606401610c0d565b6117346125da565b60005b600b548110156119335784600b8281548110611755576117556142bd565b9060005260206000209060030201600001540361192157600b818154811061177f5761177f6142bd565b90600052602060002090600302016002015460001461182157600b81815481106117ab576117ab6142bd565b906000526020600020906003020160020154846117d48760009081526003602052604090205490565b6117de919061434d565b11156118215760405162461bcd60e51b815260206004820152601260248201527113585e081cdd5c1c1b1e481c995858da195960721b6044820152606401610c0d565b600b8181548110611834576118346142bd565b90600052602060002090600302016001015460001415806118575750600a5460ff165b6118925760405162461bcd60e51b815260206004820152600c60248201526b4e6f7420666f722073616c6560a01b6044820152606401610c0d565b83600b82815481106118a6576118a66142bd565b9060005260206000209060030201600101546118c29190614365565b3410156119065760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742066756e647360701b6044820152606401610c0d565b611921868686604051806020016040528060008152506129b3565b8061192b81614334565b915050611737565b5061193e6001600655565b5050505050565b33611951600082611e39565b61196d5760405162461bcd60e51b8152600401610c0d90614297565b60005b82811015610ee35761198184612a9c565b8061198b81614334565b915050611970565b3361199f600082611e39565b6119bb5760405162461bcd60e51b8152600401610c0d90614297565b50600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381163314611a4e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610c0d565b610cbc8282612b92565b33611a64600082611e39565b611a805760405162461bcd60e51b8152600401610c0d90614297565b6000838152600360205260409020548211611af35760405162461bcd60e51b815260206004820152602d60248201527f4d617820737570706c792063616e206e6f74206265206c657373207468616e2060448201526c3a37ba30b61039bab838363c9760991b6064820152608401610c0d565b81600b611aff8561256d565b81548110611b0f57611b0f6142bd565b906000526020600020906003020160020181905550505050565b600081600d5484611b3a9190614365565b611b44919061434d565b9392505050565b60608151835114611bb05760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610c0d565b600083516001600160401b03811115611bcb57611bcb613b70565b604051908082528060200260200182016040528015611bf4578160200160208202803683370190505b50905060005b8451811015611c6c57611c3f858281518110611c1857611c186142bd565b6020026020010151858381518110611c3257611c326142bd565b6020026020010151610ba6565b828281518110611c5157611c516142bd565b6020908102919091010152611c6581614334565b9050611bfa565b509392505050565b33611c80600082611e39565b611c9c5760405162461bcd60e51b8152600401610c0d90614297565b611ca46125da565b600f5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114611cf5576040519150601f19603f3d011682016040523d82523d6000602084013e611cfa565b606091505b5050905080611d0857600080fd5b5050611d146001600655565b50565b33611d23600082611e39565b611d3f5760405162461bcd60e51b8152600401610c0d90614297565b610cbc8261278d565b6000600b611d558361256d565b81548110611d6557611d656142bd565b9060005260206000209060030201600201549050919050565b33611d8a600082611e39565b611da65760405162461bcd60e51b8152600401610c0d90614297565b8151835114611dc75760405162461bcd60e51b8152600401610c0d9061430d565b60005b8351811015610ee357611e0f848281518110611de857611de86142bd565b6020026020010151848381518110611e0257611e026142bd565b6020026020010151610cc0565b80611e1981614334565b915050611dca565b6000828152600560205260408120611b449083612bb4565b60009182526004602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60098054610d2b906142d3565b816daaeb6d7670e522a718067333cd4e3b15611f2b57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611edf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f03919061439b565b611f2b57604051633b79c77360e21b81526001600160a01b0382166004820152602401610c0d565b6113cd8383612bc0565b816000805b600b54811015611f865782600b8281548110611f5857611f586142bd565b90600052602060002090600302016000015403611f7457600191505b80611f7e81614334565b915050611f3a565b5080611fa45760405162461bcd60e51b8152600401610c0d906143b8565b611fac6125da565b611fd67f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611e39565b61201a5760405162461bcd60e51b815260206004820152601560248201527426b4b73a32b9103937b632903932b8bab4b932b21760591b6044820152606401610c0d565b612035858585604051806020016040528060008152506129b3565b61193e6001600655565b3361204b600082611e39565b6120675760405162461bcd60e51b8152600401610c0d90614297565b611d14612bcb565b600b818154811061207f57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b336120ae600082611e39565b6120ca5760405162461bcd60e51b8152600401610c0d90614297565b826000805b600b5481101561211b5782600b82815481106120ed576120ed6142bd565b9060005260206000209060030201600001540361210957600191505b8061211381614334565b9150506120cf565b50806121395760405162461bcd60e51b8152600401610c0d906143b8565b6121416125da565b60005b845181101561193357612182858281518110612162576121626142bd565b6020026020010151876001604051806020016040528060008152506129b3565b8061218c81614334565b915050612144565b336121a0600082611e39565b6121bc5760405162461bcd60e51b8152600401610c0d90614297565b610cbc82612a9c565b6121cd6125da565b6121f77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611e39565b61223b5760405162461bcd60e51b815260206004820152601560248201527426b4b73a32b9103937b632903932b8bab4b932b21760591b6044820152606401610c0d565b61225683838360405180602001604052806000815250612633565b6113cd6001600655565b3361226c600082611e39565b6122885760405162461bcd60e51b8152600401610c0d90614297565b611d14612ca5565b6000818152600560205260408120610c3990612cb5565b336122b3600082611e39565b6122cf5760405162461bcd60e51b8152600401610c0d90614297565b610cbc82612cbf565b6000828152600460205260409020600101546122f381612987565b6113cd8383612b92565b33612309600082611e39565b6123255760405162461bcd60e51b8152600401610c0d90614297565b50600a805460ff1916911515919091179055565b6000600c54821061237f5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a590819dc9bdd5c08125160821b6044820152606401610c0d565b506000908152600e602052604090205490565b6000600b61239f8361256d565b815481106123af576123af6142bd565b9060005260206000209060030201600101549050919050565b846daaeb6d7670e522a718067333cd4e3b1561248d57336001600160a01b038216036123fb576115a38686868686612de9565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561244a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061246e919061439b565b61248d57604051633b79c77360e21b8152336004820152602401610c0d565b6116478686868686612de9565b6124a48282611e39565b610cbc5760008281526004602090815260408083206001600160a01b03851684529091529020805460ff191660011790556124dc3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611b44836001600160a01b038416612e2e565b60006001600160e01b0319821663ad63193560e01b1480610c395750610c3982612e7d565b8051610cbc906002906020840190613a4a565b6000805b600b548110156125bc5782600b828154811061258f5761258f6142bd565b906000526020600020906003020160000154036125ac5792915050565b6125b581614334565b9050612571565b5060405162461bcd60e51b8152600401610c0d906143b8565b919050565b60026006540361262c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c0d565b6002600655565b6001600160a01b0384166126595760405162461bcd60e51b8152600401610c0d906143de565b815183511461267a5760405162461bcd60e51b8152600401610c0d9061441f565b3361268a81600087878787612ea2565b60005b8451811015612725578381815181106126a8576126a86142bd565b60200260200101516000808784815181106126c5576126c56142bd565b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b03168152602001908152602001600020600082825461270d919061434d565b9091555081905061271d81614334565b91505061268d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612776929190614467565b60405180910390a461193e8160008787878761301b565b6000805b600b548110156129245782600b82815481106127af576127af6142bd565b9060005260206000209060030201600001540361291257600083815260036020526040902054156128225760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f742064656c657465206964207769746820737570706c79000000006044820152606401610c0d565b600b805461283290600190614495565b81548110612842576128426142bd565b9060005260206000209060030201600b8281548110612863576128636142bd565b9060005260206000209060030201600082015481600001556001820154816001015560028201548160020155905050600b6001600b805490506128a69190614495565b815481106128b6576128b66142bd565b6000918252602082206003909102018181556001810182905560020155600b8054806128e4576128e46144ac565b6000828152602081206003600019909301928302018181556001818101839055600290910191909155915591505b8061291c81614334565b915050612791565b5080610cbc5760405162461bcd60e51b8152600401610c0d906143b8565b6001600160a01b03851633148061295e575061295e8533610b28565b61297a5760405162461bcd60e51b8152600401610c0d906144c2565b61193e8585858585613176565b611d148133613318565b61299b828261249a565b60008281526005602052604090206113cd9082612520565b6001600160a01b0384166129d95760405162461bcd60e51b8152600401610c0d906143de565b3360006129e585613371565b905060006129f285613371565b9050612a0383600089858589612ea2565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290612a3390849061434d565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612a93836000898989896133bc565b50505050505050565b600c548110612ae15760405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a590819d85919d95d081259607a1b6044820152606401610c0d565b600d546000828152600e602052604090205410612b405760405162461bcd60e51b815260206004820152601760248201527f4e6f20617661696c61626c6520766172696174696f6e730000000000000000006044820152606401610c0d565b6000818152600e6020526040902054600d54612b709190612b619084614365565b612b6b919061434d565b612cbf565b6000818152600e60205260408120805491612b8a83614334565b919050555050565b612b9c8282613477565b60008281526005602052604090206113cd90826134de565b6000611b4483836134f3565b610cbc33838361351d565b6000600c5411612c1d5760405162461bcd60e51b815260206004820152601d60248201527f4e6f20617661696c61626c652067726f75707320746f2072656d6f76650000006044820152606401610c0d565b600e60006001600c54612c309190614495565b815260200190815260200160002054600014612c8e5760405162461bcd60e51b815260206004820152601b60248201527f52656d6f766520616c6c20766172696174696f6e7320666972737400000000006044820152606401610c0d565b600c8054906000612c9e83614384565b9190505550565b600c8054906000612c9e83614334565b6000610c39825490565b60005b600b54811015612d455781600b8281548110612ce057612ce06142bd565b90600052602060002090600302016000015403612d335760405162461bcd60e51b8152602060048201526011602482015270496420616c72656164792065786973747360781b6044820152606401610c0d565b80612d3d81614334565b915050612cc2565b5060408051606081018252918252600060208301818152918301818152600b8054600181018255925292517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db960039092029182015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dba82015590517f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01dbb90910155565b6001600160a01b038516331480612e055750612e058533610b28565b612e215760405162461bcd60e51b8152600401610c0d906144c2565b61193e85858585856135fd565b6000818152600183016020526040812054612e7557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610c39565b506000610c39565b60006001600160e01b03198216635a05180f60e01b1480610c395750610c3982613735565b6001600160a01b038516612f295760005b8351811015612f2757828181518110612ece57612ece6142bd565b602002602001015160036000868481518110612eec57612eec6142bd565b602002602001015181526020019081526020016000206000828254612f11919061434d565b90915550612f20905081614334565b9050612eb3565b505b6001600160a01b0384166116475760005b8351811015612a93576000848281518110612f5757612f576142bd565b602002602001015190506000848381518110612f7557612f756142bd565b6020026020010151905060006003600084815260200190815260200160002054905081811015612ff85760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f74604482015267616c537570706c7960c01b6064820152608401610c0d565b6000928352600360205260409092209103905561301481614334565b9050612f3a565b6001600160a01b0384163b156116475760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061305f9089908990889088908890600401614510565b6020604051808303816000875af192505050801561309a575060408051601f3d908101601f191682019092526130979181019061456e565b60015b613146576130a661458b565b806308c379a0036130df57506130ba6145a7565b806130c557506130e1565b8060405162461bcd60e51b8152600401610c0d9190613cd9565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e2d455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610c0d565b6001600160e01b0319811663bc197c8160e01b14612a935760405162461bcd60e51b8152600401610c0d90614630565b81518351146131975760405162461bcd60e51b8152600401610c0d9061441f565b6001600160a01b0384166131bd5760405162461bcd60e51b8152600401610c0d90614678565b336131cc818787878787612ea2565b60005b84518110156132b25760008582815181106131ec576131ec6142bd565b60200260200101519050600085838151811061320a5761320a6142bd565b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561325a5760405162461bcd60e51b8152600401610c0d906146bd565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b1682528120805484929061329790849061434d565b92505081905550505050806132ab90614334565b90506131cf565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051613302929190614467565b60405180910390a461164781878787878761301b565b6133228282611e39565b610cbc5761332f8161375a565b61333a83602061376c565b60405160200161334b929190614707565b60408051601f198184030181529082905262461bcd60e51b8252610c0d91600401613cd9565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106133ab576133ab6142bd565b602090810291909101015292915050565b6001600160a01b0384163b156116475760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190613400908990899088908890889060040161477c565b6020604051808303816000875af192505050801561343b575060408051601f3d908101601f191682019092526134389181019061456e565b60015b613447576130a661458b565b6001600160e01b0319811663f23a6e6160e01b14612a935760405162461bcd60e51b8152600401610c0d90614630565b6134818282611e39565b15610cbc5760008281526004602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611b44836001600160a01b038416613907565b600082600001828154811061350a5761350a6142bd565b9060005260206000200154905092915050565b816001600160a01b0316836001600160a01b0316036135905760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610c0d565b6001600160a01b03838116600081815260016020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166136235760405162461bcd60e51b8152600401610c0d90614678565b33600061362f85613371565b9050600061363c85613371565b905061364c838989858589612ea2565b6000868152602081815260408083206001600160a01b038c1684529091529020548581101561368d5760405162461bcd60e51b8152600401610c0d906146bd565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906136ca90849061434d565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461372a848a8a8a8a8a6133bc565b505050505050505050565b60006001600160e01b03198216637965db0b60e01b1480610c395750610c39826139fa565b6060610c396001600160a01b03831660145b6060600061377b836002614365565b61378690600261434d565b6001600160401b0381111561379d5761379d613b70565b6040519080825280601f01601f1916602001820160405280156137c7576020820181803683370190505b509050600360fc1b816000815181106137e2576137e26142bd565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110613811576138116142bd565b60200101906001600160f81b031916908160001a9053506000613835846002614365565b61384090600161434d565b90505b60018111156138b8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110613874576138746142bd565b1a60f81b82828151811061388a5761388a6142bd565b60200101906001600160f81b031916908160001a90535060049490941c936138b181614384565b9050613843565b508315611b445760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610c0d565b600081815260018301602052604081205480156139f057600061392b600183614495565b855490915060009061393f90600190614495565b90508181146139a457600086600001828154811061395f5761395f6142bd565b9060005260206000200154905080876000018481548110613982576139826142bd565b6000918252602080832090910192909255918252600188019052604090208390555b85548690806139b5576139b56144ac565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610c39565b6000915050610c39565b60006001600160e01b03198216636cdb3d1360e11b1480613a2b57506001600160e01b031982166303a24d0760e21b145b80610c3957506301ffc9a760e01b6001600160e01b0319831614610c39565b828054613a56906142d3565b90600052602060002090601f016020900481019282613a785760008555613abe565b82601f10613a9157805160ff1916838001178555613abe565b82800160010185558215613abe579182015b82811115613abe578251825591602001919060010190613aa3565b50613aca929150613ace565b5090565b5b80821115613aca5760008155600101613acf565b80356001600160a01b03811681146125d557600080fd5b60008060408385031215613b0d57600080fd5b613b1683613ae3565b946020939093013593505050565b600060208284031215613b3657600080fd5b5035919050565b6001600160e01b031981168114611d1457600080fd5b600060208284031215613b6557600080fd5b8135611b4481613b3d565b634e487b7160e01b600052604160045260246000fd5b601f8201601f191681016001600160401b0381118282101715613bab57613bab613b70565b6040525050565b60006001600160401b03831115613bcb57613bcb613b70565b604051613be2601f8501601f191660200182613b86565b809150838152848484011115613bf757600080fd5b83836020830137600060208583010152509392505050565b600060208284031215613c2157600080fd5b81356001600160401b03811115613c3757600080fd5b8201601f81018413613c4857600080fd5b613c5784823560208401613bb2565b949350505050565b60008060408385031215613c7257600080fd5b50508035926020909101359150565b60005b83811015613c9c578181015183820152602001613c84565b83811115610ee35750506000910152565b60008151808452613cc5816020860160208601613c81565b601f01601f19169290920160200192915050565b602081526000611b446020830184613cad565b60006001600160401b03821115613d0557613d05613b70565b5060051b60200190565b600082601f830112613d2057600080fd5b81356020613d2d82613cec565b604051613d3a8282613b86565b83815260059390931b8501820192828101915086841115613d5a57600080fd5b8286015b84811015613d755780358352918301918301613d5e565b509695505050505050565b60008060408385031215613d9357600080fd5b82356001600160401b0380821115613daa57600080fd5b613db686838701613d0f565b93506020850135915080821115613dcc57600080fd5b50613dd985828601613d0f565b9150509250929050565b8015158114611d1457600080fd5b600060208284031215613e0357600080fd5b8135611b4481613de3565b600060208284031215613e2057600080fd5b81356001600160401b03811115613e3657600080fd5b613c5784828501613d0f565b600081518084526020808501945080840160005b83811015613e7257815187529582019590820190600101613e56565b509495945050505050565b602081526000611b446020830184613e42565b600080600060608486031215613ea557600080fd5b613eae84613ae3565b925060208401356001600160401b0380821115613eca57600080fd5b613ed687838801613d0f565b93506040860135915080821115613eec57600080fd5b50613ef986828701613d0f565b9150509250925092565b602080825282518282018190526000919060409081850190868401855b82811015613f4f5781518051855286810151878601528501518585015260609093019290850190600101613f20565b5091979650505050505050565b600082601f830112613f6d57600080fd5b611b4483833560208501613bb2565b600080600080600060a08688031215613f9457600080fd5b613f9d86613ae3565b9450613fab60208701613ae3565b935060408601356001600160401b0380821115613fc757600080fd5b613fd389838a01613d0f565b94506060880135915080821115613fe957600080fd5b613ff589838a01613d0f565b9350608088013591508082111561400b57600080fd5b5061401888828901613f5c565b9150509295509295909350565b6000806040838503121561403857600080fd5b8235915061404860208401613ae3565b90509250929050565b60008060006060848603121561406657600080fd5b61406f84613ae3565b95602085013595506040909401359392505050565b60006020828403121561409657600080fd5b611b4482613ae3565b600082601f8301126140b057600080fd5b813560206140bd82613cec565b6040516140ca8282613b86565b83815260059390931b85018201928281019150868411156140ea57600080fd5b8286015b84811015613d75576140ff81613ae3565b83529183019183016140ee565b6000806040838503121561411f57600080fd5b82356001600160401b038082111561413657600080fd5b613db68683870161409f565b6000806040838503121561415557600080fd5b61415e83613ae3565b9150602083013561416e81613de3565b809150509250929050565b6000806040838503121561418c57600080fd5b8235915060208301356001600160401b038111156141a957600080fd5b613dd98582860161409f565b600080604083850312156141c857600080fd5b6141d183613ae3565b915061404860208401613ae3565b600080600080600060a086880312156141f757600080fd5b61420086613ae3565b945061420e60208701613ae3565b9350604086013592506060860135915060808601356001600160401b0381111561423757600080fd5b61401888828901613f5c565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008261427e5761427e614243565b500490565b60008261429257614292614243565b500690565b6020808252600c908201526b155b985d5d1a1bdc9a5e995960a21b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806142e757607f821691505b60208210810361430757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c125b9d985b1a59081a5b9c1d5d609a1b604082015260600190565b60006001820161434657614346614259565b5060010190565b6000821982111561436057614360614259565b500190565b600081600019048311821515161561437f5761437f614259565b500290565b60008161439357614393614259565b506000190190565b6000602082840312156143ad57600080fd5b8151611b4481613de3565b6020808252600c908201526b1259081b9bdd08199bdd5b9960a21b604082015260600190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60408152600061447a6040830185613e42565b828103602084015261448c8185613e42565b95945050505050565b6000828210156144a7576144a7614259565b500390565b634e487b7160e01b600052603160045260246000fd5b6020808252602e908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526d195c881bdc88185c1c1c9bdd995960921b606082015260800190565b6001600160a01b0386811682528516602082015260a06040820181905260009061453c90830186613e42565b828103606084015261454e8186613e42565b905082810360808401526145628185613cad565b98975050505050505050565b60006020828403121561458057600080fd5b8151611b4481613b3d565b600060033d11156145a45760046000803e5060005160e01c5b90565b600060443d10156145b55790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156145e457505050505090565b82850191508151818111156145fc5750505050505090565b843d87010160208285010111156146165750505050505090565b61462560208286010187613b86565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161473f816017850160208801613c81565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614770816028840160208801613c81565b01602801949350505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906147b690830184613cad565b97965050505050505056fea26469706673582212205f9c18841f6bc2895e2e063a18e2682a9c7b96c27292156e3de1eba54f6b465e64736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $2,420.06 | 0.009 | $21.78 |
Loading...
Loading
[ Download: CSV Export ]
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.