Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 18468510 | 392 days ago | IN | 0 ETH | 0.06076446 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ERC1155Upgradable
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.13; import "./SafeMath.sol"; import "./IERC1155.sol"; import "./ERC165.sol"; import "./IHandlerCallback.sol"; import "./IsSerializedUpgradable.sol"; import "./Clonable.sol"; // import "./Stream.sol"; // import "./EventableERC1155.sol"; import "./ERC2981Royalties.sol"; import "./UpgradableERC1155.sol"; import "operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol"; contract ERC1155Upgradable is ERC165, IERC1155MetadataURI, IsSerializedUpgradable, Clonable, ERC2981Royalties, UpgradableERC1155, OperatorFiltererUpgradeable { using SafeMath for uint256; address payable public streamAddress; mapping (uint256 => mapping(address => uint256)) private _balances; mapping (address => mapping(address => bool)) private _operatorApprovals; mapping (uint256 => bool) private usedTokenId; // uint256[] public tokenIds; string private name; string private symbol; string private _uri; mapping (address => mapping (uint => bool)) seenInBlock; mapping(uint256 => mapping(address => uint256[])) internal tokenIdToOwnerToSerialNumbers; address private serialManagerAddress; uint private managerUpgradeBlock; constructor () { // __Ownable_init(); } function initialize() public override initializer { __Ownable_init(); _registerInterface(0xd9b67a26); //_INTERFACE_ID_ERC1155 _registerInterface(0x0e89341c); //_INTERFACE_ID_ERC1155_METADATA_URI initializeERC165(); _registerInterface(0x2a55205a); // ERC2981 __OperatorFilterer_init(0x9dC5EE2D52d014f8b81D662FA8f4CA525F27cD6b, true); _uri = "https://api.emblemvault.io/s:evmetadata/meta/"; serialized = true; overloadSerial = true; isClaimable = true; } // function fireEvent( address _to, uint256 _tokenId, uint256 _amount) public onlyOwner { // emit TransferSingle(_msgSender(), address(0), _to, _tokenId, _amount); // } // function fireEvents(address[] memory _to, uint256[] memory _tokenIds, uint256[] memory _amounts) public onlyOwner { // for (uint i = 0; i < _tokenIds.length; i++) { // emit TransferSingle(_msgSender(), address(0), _to[i], _tokenIds[i], _amounts[i]); // } // } // function initSerialManager(address _address) public onlyOwner { // require(serialManagerAddress == address(0), "Already initialized"); // serialManagerAddress = _address; // managerUpgradeBlock = block.number; // } // function updateSerialManagerBlock(uint _block) public onlyOwner { // managerUpgradeBlock = _block; // } function version() public pure override returns(uint256) { return 14; } function changeName(string calldata _name, string calldata _symbol) public onlyOwner { name = _name; symbol = _symbol; } function mint(address _to, uint256 _tokenId, uint256 _amount) public onlyOwner { bytes memory empty = abi.encodePacked(uint256(0)); mintWithSerial(_to, _tokenId, _amount, empty); } function mintWithSerial(address _to, uint256 _tokenId, uint256 _amount, bytes memory serialNumber) public onlyOwner { _mint(_to, _tokenId, _amount, serialNumber); } function migrationMint(uint256 serialNumber, address account, uint256 tokenId) public onlyOwner { tokenIdToSerials[tokenId].push(serialNumber); serialToTokenId[serialNumber] = tokenId; serialToOwner[serialNumber] = account; tokenIdToOwnerToSerialNumbers[tokenId][account].push(serialNumber); // _balances[tokenId][account] = _balances[tokenId][account].add(1); emit TransferSingle(_msgSender(), address(0), account, tokenId, 1); } function migrationMintMany(uint256[] memory serialNumber, address[] memory account, uint256[] memory tokenId) public onlyOwner { for (uint i = 0; i < serialNumber.length; i++) { tokenIdToSerials[tokenId[i]].push(serialNumber[i]); serialToTokenId[serialNumber[i]] = tokenId[i]; serialToOwner[serialNumber[i]] = account[i]; tokenIdToOwnerToSerialNumbers[tokenId[i]][account[i]].push(serialNumber[i]); // _balances[tokenId[i]][account[i]] = _balances[tokenId[i]][account[i]].add(1); emit TransferSingle(_msgSender(), address(0), account[i], tokenId[i], 1); } } function mintBatch(address[] memory to, uint256[] memory ids, uint256[] memory amounts, bytes[] memory serialNumbers) public onlyOwner { _mintBatch(to, ids, amounts, serialNumbers); } function burn(address _from, uint256 _tokenId, uint256 _amount) public { require(_from == _msgSender() || isApprovedForAll(_from, _msgSender()) || canBypass(), 'Not Approved to burn'); _burn(_from, _tokenId, _amount); } function setURI(string memory newuri) public onlyOwner { _uri = newuri; } function uri(uint256 _tokenId) external view override returns (string memory) { return string(abi.encodePacked(_uri, toString(_tokenId))); } function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function balanceOf(address account, uint256 tokenId) public view returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return tokenIdToOwnerToSerialNumbers[tokenId][account].length; // return _balances[id][account]; } function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view 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) { require(accounts[i] != address(0), "ERC1155: batch balance query for the zero address"); // batchBalances[i] = _balances[ids[i]][accounts[i]]; batchBalances[i] = tokenIdToOwnerToSerialNumbers[ids[i]][accounts[i]].length; } return batchBalances; } function setApprovalForAll(address operator, bool approved) public virtual onlyAllowedOperatorApproval(operator) { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } function isApprovedForAll(address account, address operator) public view returns (bool) { return _operatorApprovals[account][operator]; } function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory) public virtual onlyAllowedOperatorApproval(from) { require(to != address(0), "ERC1155: transfer to the zero address"); require(from == _msgSender() || isApprovedForAll(from, _msgSender()) || canBypassForTokenId(id), "ERC1155: caller is not owner nor approved nor bypasser"); address operator = _msgSender(); // _balances[id][from] = _balances[id][from].sub(amount, "ERC1155: insufficient balance for transfer"); // _balances[id][to] = _balances[id][to].add(amount); if (isSerialized()) { for (uint i = 0; i < amount; i++) { uint256 serialNumber = getFirstSerialByOwner(from, id); if (serialNumber != 0 ) { transferSerial(serialNumber, from, to); } } } emit TransferSingle(operator, from, to, id, amount); if (registeredOfType[3].length > 0 && registeredOfType[3][0] != address(0)) { for (uint i = 0; i < amount; i++) { IHandlerCallback(registeredOfType[3][0]).executeCallbacks(from, to, id, IHandlerCallback.CallbackType.TRANSFER); } } } function safeBatchTransferIdFrom(address from, address[] calldata tos, uint256 id, uint256 amount, bytes memory data) public virtual onlyAllowedOperator(from) { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); for (uint256 i = 0; i < tos.length; ++i) { address to = tos[i]; require(to != address(0), "ERC1155: transfer to the zero address"); safeTransferFrom(from, to, id, amount, data); } } function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual onlyAllowedOperator(from) { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); address operator = _msgSender(); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; safeTransferFrom(from, to, id, amount, data); } emit TransferBatch(operator, from, to, ids, amounts); } function _mint(address account, uint256 id, uint256 amount, bytes memory serialNumber) internal virtual { address operator = _msgSender(); if (isSerialized()) { for (uint i = 0; i < amount; i++) { if (overloadSerial){ require(toUint256(serialNumber, 0) != 0, "Must provide serial number"); uint256 _serialNumber = amount > 1? decodeUintArray(abi.encodePacked(serialNumber))[i]: decodeSingle(abi.encodePacked(serialNumber)); mintSerial(_serialNumber, account, id); } else { mintSerial(id, account); } } } if (registeredOfType[3].length > 0 && registeredOfType[3][0] == _msgSender()) { for (uint i = 0; i < amount; i++) { IHandlerCallback(_msgSender()).executeCallbacks(address(0), account, id, IHandlerCallback.CallbackType.MINT); } } // _balances[id][account] = _balances[id][account].add(amount); emit TransferSingle(operator, address(0), account, id, amount); } function _mintBatch(address[] memory to, uint256[] memory ids, uint256[] memory amounts, bytes[] memory serialNumbers) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); for (uint i = 0; i < ids.length; i++) { // If a particular id entry has multiple amounts, pack the serial numbers into a byte array // If there is only one amount, use the serial number as is // Example using web3.js: // let serialNumbers = [123, 456, 789]; // let packedSerialNumbers = web3.eth.abi.encodeParameter('uint256[]', serialNumbers); bytes memory _serialNumber = amounts[i] > 1? abi.encode(decodeUintArray(serialNumbers[i])) : serialNumbers[i]; _mint(to[i], ids[i], amounts[i], _serialNumber); } } function _burn(address account, uint256 id, uint256 amount) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); // _balances[id][account] = _balances[id][account].sub( // amount, // "ERC1155: burn amount exceeds balance" // ); if (isSerialized()) { uint256 serialNumber = getFirstSerialByOwner(account, id); if (serialNumber != 0 ) { burnSerial(serialNumber); } } if (registeredOfType[3].length > 0 && registeredOfType[3][0] != address(0)) { IHandlerCallback(registeredOfType[3][0]).executeCallbacks(account, address(0), id, IHandlerCallback.CallbackType.BURN); } emit TransferSingle(operator, account, address(0), id, amount); } function isSerialized() public view returns (bool) { return serialized; } function isOverloadSerial() public view returns (bool) { return overloadSerial; } function toggleSerialization() public onlyOwner { require(!hasSerialized, "Already has serialized items"); serialized = !serialized; } function toggleOverloadSerial() public onlyOwner { overloadSerial = !overloadSerial; } function mintSerial(uint256 tokenId, address _owner) internal onlyOwner { uint256 serialNumber = uint256(keccak256(abi.encode(tokenId, _owner, serialCount))); _mintSerial(serialNumber, _owner, tokenId); } function mintSerial(uint256 serialNumber, address _owner, uint256 tokenId) internal onlyOwner { _mintSerial(serialNumber, _owner, tokenId); } function _mintSerial(uint256 serialNumber, address _owner, uint256 tokenId)internal onlyOwner { require(serialToTokenId[serialNumber] == 0 && serialToOwner[serialNumber] == address(0), "Serial number already used"); tokenIdToSerials[tokenId].push(serialNumber); serialToTokenId[serialNumber] = tokenId; serialToOwner[serialNumber] = _owner; tokenIdToOwnerToSerialNumbers[tokenId][_owner].push(serialNumber); if (!hasSerialized) { hasSerialized = true; } serialCount++; } function transferSerial(uint256 serialNumber, address from, address to) internal { require(serialToOwner[serialNumber] == from, 'Not correct owner of serialnumber'); uint256 tokenId = serialToTokenId[serialNumber]; serialToOwner[serialNumber] = to; uint256[] storage serialNumbersTo = tokenIdToOwnerToSerialNumbers[tokenId][to]; uint256[] storage serialNumbersFrom = tokenIdToOwnerToSerialNumbers[tokenId][from]; for(uint i=0; i<serialNumbersFrom.length; i++) { if (serialNumbersFrom[i] == serialNumber) { serialNumbersFrom[i] = serialNumbersFrom[serialNumbersFrom.length-1]; serialNumbersFrom.pop(); serialNumbersTo.push(serialNumber); break; } } } function burnSerial(uint256 serialNumber) internal { uint256[] storage serialNumbersFrom = tokenIdToOwnerToSerialNumbers[serialToTokenId[serialNumber]][serialToOwner[serialNumber]]; uint256 tokenId = serialToTokenId[serialNumber]; serialToOwner[serialNumber] = address(0); for(uint i=0; i<serialNumbersFrom.length; i++) { if (serialNumbersFrom[i] == serialNumber) { serialNumbersFrom[i] = serialNumbersFrom[serialNumbersFrom.length-1]; serialNumbersFrom.pop(); break; } } for(uint i=0; i<tokenIdToSerials[tokenId].length; i++) { if (tokenIdToSerials[tokenId][i] == serialNumber) { tokenIdToSerials[tokenId][i] = tokenIdToSerials[tokenId][tokenIdToSerials[tokenId].length - 1]; tokenIdToSerials[tokenId].pop(); break; } } } function getSerial(uint256 tokenId, uint256 index) public view returns (uint256) { return tokenIdToSerials[tokenId][index]; } function getFirstSerialByOwner(address _owner, uint256 tokenId) public view returns (uint256) { return tokenIdToOwnerToSerialNumbers[tokenId][_owner].length == 0? 0: tokenIdToOwnerToSerialNumbers[tokenId][_owner][0]; } function getSerialByOwnerAtIndex(address _owner, uint256 tokenId, uint256 index) public view returns (uint256) { return (tokenIdToOwnerToSerialNumbers[tokenId][_owner].length == 0 || index > tokenIdToOwnerToSerialNumbers[tokenId][_owner].length-1) ? 0: tokenIdToOwnerToSerialNumbers[tokenId][_owner][index]; } function getOwnerOfSerial(uint256 serialNumber) public view returns (address) { return serialToOwner[serialNumber]; } function getTokenIdForSerialNumber(uint256 serialNumber) public view returns (uint256) { return serialToTokenId[serialNumber]; } function decodeUintArray(bytes memory encoded) internal pure returns(uint256[] memory ids){ ids = abi.decode(encoded, (uint256[])); } // To pack the value using web3.js, you can use the following code: // let value = 123; // let packedValue = web3.eth.abi.encodeParameter('uint256', value); function decodeSingle(bytes memory encoded) internal pure returns(uint256 id) { id = abi.decode(encoded, (uint256)); } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } function toUint256(bytes memory _bytes, uint256 _start) private pure returns (uint256) { require(_bytes.length >= _start + 32, "toUint256_outOfBounds"); uint256 tempUint; assembly { tempUint := mload(add(add(_bytes, 0x20), _start)) } return tempUint; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Internal function that returns the initialized version. Returns `_initialized` */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Internal function that returns the initialized version. Returns `_initializing` */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// 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 AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return 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 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; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; interface IClonable { function initialize() external; function version() external returns(uint256); } abstract contract Clonable { function initialize() public virtual; function version() public pure virtual returns (uint256) { return 1; } }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; contract ERC165 { mapping(bytes4 => bool) private supportedInterfaces; function initializeERC165() internal { require(supportedInterfaces[0x01ffc9a7] == false, "Already Registered"); _registerInterface(0x01ffc9a7); } function supportsInterface(bytes4 interfaceId) public view returns (bool) { return supportedInterfaces[interfaceId]; } function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); supportedInterfaces[interfaceId] = true; } } // interface IERC1155Receiver { // function onERC1155Received(address operator, address from, uint256 id, uint256 value, bytes calldata data) external returns(bytes4); // function onERC1155BatchReceived(address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data) external returns(bytes4); // } // interface IERC1155MetadataURI { // function uri(uint256 id) external view returns (string memory); // }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './IERC2981Royalties.sol'; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 abstract contract ERC2981Base is IERC2981Royalties { struct RoyaltyInfo { address recipient; uint24 amount; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './ERC2981Base.sol'; import './OwnableUpgradeable.sol'; /// @dev This is a contract used to add ERC2981 support to ERC721 and 1155 /// @dev This implementation has the same royalties for each and every tokens abstract contract ERC2981Royalties is ERC2981Base { RoyaltyInfo private _contractRoyalties; mapping(uint256 => RoyaltyInfo) private _individualRoyalties; /// @dev Sets token royalties /// @param tokenId the token id fir which we register the royalties /// @param recipient recipient of the royalties /// @param value percentage (using 2 decimals - 10000 = 100, 0 = 0) function setTokenRoyalty(uint256 tokenId, address recipient, uint256 value) public override { require(msg.sender == OwnableUpgradeable(address(this)).owner(), "Not Owner"); require(value <= 10000, 'ERC2981Royalties: Too high'); if (tokenId == 0) { _contractRoyalties = RoyaltyInfo(recipient, uint24(value)); } else { _individualRoyalties[tokenId] = RoyaltyInfo(recipient, uint24(value)); } } function royaltyInfo(uint256 tokenId, uint256 value) public view override returns (address receiver, uint256 royaltyAmount) { RoyaltyInfo memory royalties = _individualRoyalties[tokenId].recipient != address(0)? _individualRoyalties[tokenId]: _contractRoyalties; receiver = royalties.recipient; royaltyAmount = (value * royalties.amount) / 10000; } }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; interface IEventableERC1155 { event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); event ApprovalForAll(address indexed account, address indexed operator, bool approved); event URI(string value, uint256 indexed id); // function makeEvents(address[] calldata operators, uint256[] calldata tokenIds, address[] calldata _from, address[] calldata _to, uint256[] calldata amounts) external; } abstract contract EventableERC1155 is IEventableERC1155 { // function makeEvents(address[] calldata operators, uint256[] calldata tokenIds, address[] calldata _from, address[] calldata _to, uint256[] calldata amounts) public virtual override { // _handleEventOperatorLoops(operators, tokenIds, _from, _to, amounts); // } // function _handleEventOperatorLoops(address[] calldata operators, uint256[] calldata tokenIds, address[] calldata _from, address[] calldata _to, uint256[] calldata amounts) internal { // for (uint i=0; i < operators.length; i++) { // if (amounts.length == operators.length && amounts.length == _from.length && amounts.length == _to.length && amounts.length == tokenIds.length) { // _handleEventEmits(operators[i], tokenIds[i], _from[i], _to[i], makeSingleArray(amounts, i)); // } else { // _handleEventTokenIdLoops(operators[i], tokenIds, _from, _to, amounts); // } // } // } // function _handleEventTokenIdLoops(address operator, uint256[] calldata tokenIds, address[] calldata _from, address[] calldata _to, uint256[] calldata amounts) internal { // for (uint i=0; i < tokenIds.length; i++) { // if (amounts.length == tokenIds.length && tokenIds.length == amounts.length && _from.length == amounts.length && _to.length == amounts.length) { // _handleEventEmits(operator, tokenIds[i], _from[i], _to[i], makeSingleArray(amounts, i)); // } else { // _handleEventFromLoops(operator, tokenIds[i], _from, _to, amounts); // } // } // } // function _handleEventFromLoops(address operator, uint256 tokenId, address[] calldata _from, address[] calldata _to, uint256[] calldata amounts) internal { // for (uint i=0; i < _from.length; i++) { // if (amounts.length == _from.length && amounts.length == _to.length) { // _handleEventEmits(operator, tokenId, _from[i], _to[i], makeSingleArray(amounts, i)); // } else if (amounts.length == _from.length && amounts.length != _to.length) { // _handleEventToLoops(operator, tokenId, _from[i], _to, makeSingleArray(amounts, i)); // } else { // _handleEventToLoops(operator, tokenId, _from[i], _to, amounts); // } // } // } // function _handleEventToLoops(address operator, uint256 tokenId, address _from, address[] calldata _to, uint256[] memory amounts) internal { // for (uint i=0; i < _to.length; i++) { // if (amounts.length == _to.length) { // _handleEventEmits(operator, tokenId, _from, _to[i], makeSingleArray(amounts, i)); // } else { // _handleEventEmits(operator, tokenId,_from, _to[i], amounts); // } // } // } // function _handleEventEmits(address operator, uint256 tokenId, address _from, address _to, uint256[] memory amounts) internal { // for (uint i=0; i < amounts.length; i++) { // emit TransferSingle(operator, _from, _to, tokenId, amounts[i]); // } // } // function makeSingleArray(uint256[] memory amount, uint index) internal pure returns (uint256[] memory) { // uint256[] memory arr = new uint256[](1); // arr[0] = amount[index]; // return arr; // } }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; import "./IsBypassable.sol"; contract HasRegistration is IsBypassable { mapping(address => uint256) public registeredContracts; // 0 EMPTY, 1 ERC1155, 2 ERC721, 3 HANDLER, 4 ERC20, 5 BALANCE, 6 CLAIM, 7 UNKNOWN, 8 FACTORY, 9 STAKING, 10 BYPASS mapping(uint256 => address[]) internal registeredOfType; modifier isRegisteredContract(address _contract) { require(registeredContracts[_contract] > 0, "Contract is not registered"); _; } modifier isRegisteredContractOrOwner(address _contract) { require(registeredContracts[_contract] > 0 || owner() == _msgSender(), "Contract is not registered nor Owner"); _; } function registerContract(address _contract, uint _type) public isRegisteredContractOrOwner(_msgSender()) { registeredContracts[_contract] = _type; registeredOfType[_type].push(_contract); } function unregisterContract(address _contract, uint256 index) public onlyOwner isRegisteredContract(_contract) { address[] storage arr = registeredOfType[registeredContracts[_contract]]; arr[index] = arr[arr.length - 1]; arr.pop(); delete registeredContracts[_contract]; } function isRegistered(address _contract, uint256 _type) public view returns (bool) { return registeredContracts[_contract] == _type; } function getAllRegisteredContractsOfType(uint256 _type) public view returns (address[] memory) { return registeredOfType[_type]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; interface IERC1155 { event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); event ApprovalForAll(address indexed account, address indexed operator, bool approved); event URI(string value, uint256 indexed id); function balanceOf(address account, uint256 id) external view returns (uint256); function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address account, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; function mint(address _to, uint256 _tokenId, uint256 _amount) external; function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes[] memory serialNumbers) external; function burn(address _from, uint256 _tokenId, uint256 _amount) external; function mintWithSerial(address _to, uint256 _tokenId, uint256 _amount, bytes memory serialNumber) external; } interface IERC1155Receiver { function onERC1155Received(address operator, address from, uint256 id, uint256 value, bytes calldata data) external returns(bytes4); function onERC1155BatchReceived(address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data) external returns(bytes4); } interface IERC1155MetadataURI { function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC2981Royalties { function setTokenRoyalty(uint256 tokenId, address recipient, uint256 value) external; function royaltyInfo(uint256 tokenId, uint256 value) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; interface IHandlerCallback { enum CallbackType { MINT, TRANSFER, CLAIM, BURN, FALLBACK } struct Callback { address vault; address registrant; address target; bytes4 targetFunction; bool canRevert; } function executeCallbacksInternal(address _from, address _to, uint256 tokenId, CallbackType _type) external; function executeCallbacks(address _from, address _to, uint256 tokenId, CallbackType _type) external; function executeStoredCallbacksInternal(address _nftAddress, address _from, address _to, uint256 tokenId, IHandlerCallback.CallbackType _type) external; }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; import "./IsClaimable.sol"; // import "operator-filter-registry/src/upgradeable/OperatorFiltererUpgradeable.sol"; abstract contract IsBypassable is IsClaimable { bool public byPassable; mapping(address => mapping(bytes4 => bool)) public byPassableFunction; mapping(address => mapping(uint256 => bool)) byPassableIds; modifier onlyOwner virtual override { bool _canBypass = byPassable && byPassableFunction[_msgSender()][msg.sig]; require(owner() == _msgSender() || _canBypass, "Not owner or able to bypass"); _; } modifier onlyOwnerOrBypassWithId(uint256 id) { require (owner() == _msgSender() || (id != 0 && byPassableIds[_msgSender()][id] ), "Invalid id"); _; } function canBypass() internal view returns(bool) { return (byPassable && byPassableFunction[_msgSender()][msg.sig]); } function canBypassForTokenId(uint256 id) internal view returns(bool) { return (byPassable && canBypass() && byPassableIds[_msgSender()][id]); } function toggleBypassability() public onlyOwner { byPassable = !byPassable; } function addBypassRule(address who, bytes4 functionSig, uint256 id) public onlyOwner { byPassableFunction[who][functionSig] = true; if (id != 0) { byPassableIds[who][id] = true; } } function removeBypassRule(address who, bytes4 functionSig, uint256 id) public onlyOwner { byPassableFunction[who][functionSig] = false; if (id !=0) { byPassableIds[who][id] = true; } } }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; import "./OwnableUpgradeable.sol"; abstract contract IsClaimable is OwnableUpgradeable { bool public isClaimable; function toggleClaimable() public onlyOwner { isClaimable = !isClaimable; } }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; import "./HasRegistration.sol"; contract IsSerializedUpgradable is HasRegistration { bool internal serialized; bool internal hasSerialized; bool internal overloadSerial; uint256 serialCount; mapping(uint256 => uint256[]) internal tokenIdToSerials; mapping(uint256 => uint256) internal serialToTokenId; mapping(uint256 => address) internal serialToOwner; event TransferSerial(address indexed from, address indexed to, uint256 serial); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } }
// SPDX-License-Identifier: CLOSED - Pending Licensing Audit pragma solidity ^0.8.4; import "./IERC1155.sol"; import "./SafeMath.sol"; import "./EventableERC1155.sol"; interface IUpgradableERC1155 { function upgradeFrom(address oldContract) external; } abstract contract UpgradableERC1155 is IUpgradableERC1155, EventableERC1155 { using SafeMath for uint256; bool internal _isUpgrade; address internal upgradedFrom; uint256 internal _totalMoved; mapping(address => uint256) internal _supplyMoved; mapping(address => bool) internal seen; function isUpgrade() internal view returns (bool) { return _isUpgrade; } function upgradeFrom(address oldContract) external virtual override { revert("Disabled"); // require(!_isUpgrade, "Contract already an upgrade"); // require(oldContract != address(0), "Invalid Upgrade"); // _isUpgrade = true; // upgradedFrom = oldContract; } function transferHook(address sender, address recipient, uint256 tokenId, mapping(uint256 => mapping(address => uint256)) storage _balances) internal returns (uint256, uint256) { uint256 pastSenderBalance = 0; uint256 pastRecipientBalance = 0; if (!seen[sender]) { seen[sender] = true; } if (!seen[recipient]) { seen[recipient] = true; } address seenSenderAddress = tokenIdToAddress(sender, tokenId); address seenRecipientAddress = tokenIdToAddress(recipient, tokenId); if (isUpgrade()) { if (!seen[seenSenderAddress]) { seen[seenSenderAddress] = true; pastSenderBalance = IERC1155(upgradedFrom).balanceOf(sender, tokenId); _supplyMoved[sender] = _supplyMoved[sender].add(pastSenderBalance); _balances[tokenId][sender] = _balances[tokenId][sender].add(pastSenderBalance); _totalMoved = _totalMoved.add(pastSenderBalance); } if (!seen[seenRecipientAddress]) { seen[seenRecipientAddress] = true; pastRecipientBalance = IERC1155(upgradedFrom).balanceOf(recipient, tokenId); _supplyMoved[sender] = _supplyMoved[sender].add(pastRecipientBalance); _balances[tokenId][recipient] = _balances[tokenId][recipient].add(pastRecipientBalance); } } else { if (!seen[seenSenderAddress]) { seen[seenSenderAddress] = true; } if (!seen[seenRecipientAddress]) { seen[seenRecipientAddress] = true; } } return (pastSenderBalance, pastRecipientBalance); } function transferEventHook(address operator, address sender, address recipient, uint256 tokenId, uint256 pastSenderBalance, uint256 pastRecipientBalance) internal { if (pastSenderBalance > 0) { emit TransferSingle(operator, address(0), sender, tokenId, pastSenderBalance); } if (pastRecipientBalance >0) { emit TransferSingle(operator, address(0), recipient, tokenId, pastRecipientBalance); } } function balanceOfHook(address account, uint256 tokenId, mapping(uint256 => mapping(address => uint256)) storage _balances) internal view returns(uint256) { uint256 oldBalance = 0; if (isUpgrade()) { oldBalance = IERC1155(upgradedFrom).balanceOf(account, tokenId); } return (isUpgrade() && !seen[account]) ? IERC1155(upgradedFrom).balanceOf(account, tokenId): _balances[tokenId][account]; } function mintHook(address account, uint256 tokenId, uint256 amount) internal returns (uint256) { if (!seen[account]) { seen[account] = true; } address seenAddress = tokenIdToAddress(account, tokenId); if (isUpgrade()) { if (!seen[seenAddress]) { seen[seenAddress] = true; uint256 pastBalance = IERC1155(upgradedFrom).balanceOf(account, tokenId); _supplyMoved[account] = _supplyMoved[account].add(pastBalance); amount = amount.add(pastBalance); _totalMoved = _totalMoved.add(pastBalance); } } else { if (!seen[account]) { seen[account] = true; } } return amount; } function tokenIdToAddress(address account, uint256 tokenId) internal pure returns (address) { bytes32 seenHash = keccak256(abi.encodePacked(account, tokenId)); return address(uint160(uint256(seenHash))); } }
// 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"; import {Initializable} from "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; abstract contract OperatorFiltererUpgradeable is Initializable { error OperatorNotAllowed(address operator); IOperatorFilterRegistry constant operatorFilterRegistry = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe) internal onlyInitializing { // 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(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isRegistered(address(this))) { if (subscribe) { operatorFilterRegistry.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { operatorFilterRegistry.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { operatorFilterRegistry.register(address(this)); } } } } } modifier onlyAllowedOperator(address from) virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(operatorFilterRegistry).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 (!operatorFilterRegistry.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(operatorFilterRegistry).code.length > 0) { if (!operatorFilterRegistry.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } _; } }
{ "optimizer": { "enabled": true, "runs": 1 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
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":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"serial","type":"uint256"}],"name":"TransferSerial","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":[{"internalType":"address","name":"who","type":"address"},{"internalType":"bytes4","name":"functionSig","type":"bytes4"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"addBypassRule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","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":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"byPassable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes4","name":"","type":"bytes4"}],"name":"byPassableFunction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"getAllRegisteredContractsOfType","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getFirstSerialByOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"serialNumber","type":"uint256"}],"name":"getOwnerOfSerial","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getSerial","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getSerialByOwnerAtIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"serialNumber","type":"uint256"}],"name":"getTokenIdForSerialNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isClaimable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOverloadSerial","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"isRegistered","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSerialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"serialNumber","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"migrationMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"serialNumber","type":"uint256[]"},{"internalType":"address[]","name":"account","type":"address[]"},{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"}],"name":"migrationMintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes[]","name":"serialNumbers","type":"bytes[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"serialNumber","type":"bytes"}],"name":"mintWithSerial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"_type","type":"uint256"}],"name":"registerContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"registeredContracts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"internalType":"bytes4","name":"functionSig","type":"bytes4"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"removeBypassRule","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferIdFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newuri","type":"string"}],"name":"setURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"streamAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleBypassability","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleClaimable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleOverloadSerial","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleSerialization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"unregisterContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"oldContract","type":"address"}],"name":"upgradeFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50614aa1806100206000396000f3fe608060405234801561001057600080fd5b50600436106102245760003560e01c8062fdd58e1461022957806301ffc9a71461024f57806302fe53051461028c5780630a033a2b146102a15780630b7ea4c2146102a95780630e89341c146102bc578063152f0eb5146102dc578063156e29f6146102ef5780631986166f146103025780631beab0f6146103155780632a55205a146103285780632adbc37d1461035a5780632b5173cd146103625780632c825c2f146103745780632cf1dacb146103875780632eb2c2d61461039a57806330477d36146103ad5780633d474b06146103cd57806340897bbe146103e05780634e1273f4146103e857806354fd4d501461040857806369d26b581461040f578063715018a61461042257806374478bb31461042a5780637b74297d146104375780638129fc1c1461045757806386575e401461045f5780638bcef78e146104725780638cc780de146104855780638da5cb5b1461049857806395db5a64146104a05780639713c807146104b15780639a7f1f7d146104c4578063a06617cd146104e4578063a0f174f614610504578063a22cb4651461050f578063a8f1602c14610522578063af7a52e31461054f578063b09a7b7414610562578063bbe215f31461056a578063cba8070314610593578063e985e9c5146105a6578063edf68280146105e2578063f0e0632714610610578063f242432a14610623578063f2fde38b14610636578063f5298aca14610649575b600080fd5b61023c610237366004613b0d565b61065c565b6040519081526020015b60405180910390f35b61027c61025d366004613b56565b6001600160e01b03191660009081526020819052604090205460ff1690565b6040519015158152602001610246565b61029f61029a366004613c0e565b6106f5565b005b61029f610785565b61029f6102b7366004613d68565b610869565b6102cf6102ca366004613e81565b6108f4565b6040516102469190613ec6565b61029f6102ea366004613b0d565b610928565b61029f6102fd366004613ef9565b6109fa565b61029f610310366004613f2e565b610aa4565b61029f610323366004613b0d565b610b8f565b61033b610336366004613f6c565b610d65565b604080516001600160a01b039093168352602083019190915201610246565b61029f610df0565b60665461027c90610100900460ff1681565b61029f610382366004613f8e565b610e86565b61029f610395366004613f2e565b611149565b61029f6103a8366004614015565b611230565b6076546103c0906001600160a01b031681565b60405161024691906140c2565b61029f6103db3660046140d6565b611555565b61029f611783565b6103fb6103f6366004614194565b611810565b6040516102469190614228565b600e61023c565b61029f61041d36600461423b565b6119fe565b61029f611b27565b60665461027c9060ff1681565b61044a610445366004613e81565b611bac565b6040516102469190614273565b61029f611c18565b61029f61046d366004614308565b611dc5565b61029f610480366004614373565b611e56565b61023c610493366004613b0d565b611eda565b6103c0611f4f565b606b5462010000900460ff1661027c565b61029f6104bf36600461423b565b611f5e565b61023c6104d2366004613e81565b6000908152606e602052604090205490565b61023c6104f23660046143d5565b60696020526000908152604090205481565b606b5460ff1661027c565b61029f61051d366004614400565b612105565b61027c610530366004613b0d565b6001600160a01b03919091166000908152606960205260409020541490565b61023c61055d366004613f6c565b612285565b61029f6122b8565b6103c0610578366004613e81565b6000908152606f60205260409020546001600160a01b031690565b61023c6105a1366004613ef9565b612350565b61027c6105b4366004614439565b6001600160a01b03918216600090815260786020908152604080832093909416825291909152205460ff1690565b61027c6105f0366004614467565b606760209081526000928352604080842090915290825290205460ff1681565b61029f61061e3660046143d5565b6123ff565b61029f61063136600461449c565b612432565b61029f6106443660046143d5565b61274f565b61029f610657366004613ef9565b612839565b60006001600160a01b0383166106cd5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152607e602090815260408083206001600160a01b03949094168352929052205490565b606654600090610100900460ff168015610734575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b90503361073f611f4f565b6001600160a01b031614806107515750805b61076d5760405162461bcd60e51b81526004016106c490614504565b815161078090607c9060208501906139eb565b505050565b606654600090610100900460ff1680156107c4575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336107cf611f4f565b6001600160a01b031614806107e15750805b6107fd5760405162461bcd60e51b81526004016106c490614504565b606b54610100900460ff16156108545760405162461bcd60e51b815260206004820152601c60248201527b416c7265616479206861732073657269616c697a6564206974656d7360201b60448201526064016106c4565b50606b805460ff19811660ff90911615179055565b606654600090610100900460ff1680156108a8575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336108b3611f4f565b6001600160a01b031614806108c55750805b6108e15760405162461bcd60e51b81526004016106c490614504565b6108ed858585856128b1565b5050505050565b6060607c610901836129ce565b60405160200161091292919061458f565b6040516020818303038152906040529050919050565b33600081815260696020526040902054151580610954575033610949611f4f565b6001600160a01b0316145b6109ac5760405162461bcd60e51b8152602060048201526024808201527f436f6e7472616374206973206e6f742072656769737465726564206e6f72204f6044820152633bb732b960e11b60648201526084016106c4565b506001600160a01b039091166000818152606960209081526040808320859055938252606a8152928120805460018101825590825292902090910180546001600160a01b0319169091179055565b606654600090610100900460ff168015610a39575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610a44611f4f565b6001600160a01b03161480610a565750805b610a725760405162461bcd60e51b81526004016106c490614504565b600080604051602001610a8791815260200190565b60405160208183030381529060405290506108ed85858584611e56565b606654600090610100900460ff168015610ae3575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610aee611f4f565b6001600160a01b03161480610b005750805b610b1c5760405162461bcd60e51b81526004016106c490614504565b6001600160a01b03841660009081526067602090815260408083206001600160e01b0319871684529091529020805460ff191660011790558115610b89576001600160a01b03841660009081526068602090815260408083208584529091529020805460ff191660011790555b50505050565b606654600090610100900460ff168015610bce575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610bd9611f4f565b6001600160a01b03161480610beb5750805b610c075760405162461bcd60e51b81526004016106c490614504565b6001600160a01b0383166000908152606960205260409020548390610c6b5760405162461bcd60e51b815260206004820152601a60248201527910dbdb9d1c9858dd081a5cc81b9bdd081c9959da5cdd195c995960321b60448201526064016106c4565b6001600160a01b0384166000908152606960209081526040808320548352606a909152902080548190610ca09060019061464b565b81548110610cb057610cb0614662565b9060005260206000200160009054906101000a90046001600160a01b0316818581548110610ce057610ce0614662565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080805480610d1e57610d1e614678565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b039690961681526069909552505060408320929092555050565b600082815260716020526040812054819081906001600160a01b0316610d8c576070610d9b565b60008581526071602052604090205b6040805180820190915290546001600160a01b038116808352600160a01b90910462ffffff166020830181905290945090915061271090610ddc908661468e565b610de691906146c3565b9150509250929050565b606654600090610100900460ff168015610e2f575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610e3a611f4f565b6001600160a01b03161480610e4c5750805b610e685760405162461bcd60e51b81526004016106c490614504565b506066805461ff001981166101009182900460ff1615909102179055565b606654600090610100900460ff168015610ec5575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610ed0611f4f565b6001600160a01b03161480610ee25750805b610efe5760405162461bcd60e51b81526004016106c490614504565b60005b84518110156108ed57606d6000848381518110610f2057610f20614662565b60200260200101518152602001908152602001600020858281518110610f4857610f48614662565b602090810291909101810151825460018101845560009384529190922001558251839082908110610f7b57610f7b614662565b6020026020010151606e6000878481518110610f9957610f99614662565b6020026020010151815260200190815260200160002081905550838181518110610fc557610fc5614662565b6020026020010151606f6000878481518110610fe357610fe3614662565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550607e600084838151811061103357611033614662565b60200260200101518152602001908152602001600020600085838151811061105d5761105d614662565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002085828151811061109757611097614662565b6020908102919091018101518254600181018455600093845291909220015583518490829081106110ca576110ca614662565b60200260200101516001600160a01b031660006001600160a01b03166110ed3390565b6001600160a01b03166000805160206149ff83398151915286858151811061111757611117614662565b6020026020010151600160405161112f9291906146d7565b60405180910390a480611141816146e5565b915050610f01565b606654600090610100900460ff168015611188575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611193611f4f565b6001600160a01b031614806111a55750805b6111c15760405162461bcd60e51b81526004016106c490614504565b6001600160a01b03841660009081526067602090815260408083206001600160e01b0319871684529091529020805460ff191690558115610b89576001600160a01b03841660009081526068602090815260408083208584529091529020805460ff1916600117905550505050565b846daaeb6d7670e522a718067333cd4e3b1561141d57336001600160a01b0382160361138a5782518451146112775760405162461bcd60e51b81526004016106c4906146fe565b6001600160a01b03851661129d5760405162461bcd60e51b81526004016106c490614746565b6001600160a01b0386163314806112b957506112b986336105b4565b6112d55760405162461bcd60e51b81526004016106c49061478b565b3360005b855181101561133e5760008682815181106112f6576112f6614662565b60200260200101519050600086838151811061131457611314614662565b6020026020010151905061132b8a8a84848a612432565b505080611337906146e5565b90506112d9565b50856001600160a01b0316876001600160a01b0316826001600160a01b03166000805160206149df833981519152888860405161137c9291906147dd565b60405180910390a45061154d565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906113bd9030903390600401614802565b602060405180830381865afa1580156113da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fe919061481c565b61141d5733604051633b79c77360e21b81526004016106c491906140c2565b825184511461143e5760405162461bcd60e51b81526004016106c4906146fe565b6001600160a01b0385166114645760405162461bcd60e51b81526004016106c490614746565b6001600160a01b038616331480611480575061148086336105b4565b61149c5760405162461bcd60e51b81526004016106c49061478b565b3360005b85518110156115055760008682815181106114bd576114bd614662565b6020026020010151905060008683815181106114db576114db614662565b602002602001015190506114f28a8a84848a612432565b5050806114fe906146e5565b90506114a0565b50856001600160a01b0316876001600160a01b0316826001600160a01b03166000805160206149df83398151915288886040516115439291906147dd565b60405180910390a4505b505050505050565b856daaeb6d7670e522a718067333cd4e3b156116c657336001600160a01b03821603611633576001600160a01b038716331480611597575061159787336105b4565b6115b35760405162461bcd60e51b81526004016106c49061478b565b60005b8581101561162d5760008787838181106115d2576115d2614662565b90506020020160208101906115e791906143d5565b90506001600160a01b03811661160f5760405162461bcd60e51b81526004016106c490614746565b61161c8982888888612432565b50611626816146e5565b90506115b6565b5061177a565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906116669030903390600401614802565b602060405180830381865afa158015611683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a7919061481c565b6116c65733604051633b79c77360e21b81526004016106c491906140c2565b6001600160a01b0387163314806116e257506116e287336105b4565b6116fe5760405162461bcd60e51b81526004016106c49061478b565b60005b8581101561177857600087878381811061171d5761171d614662565b905060200201602081019061173291906143d5565b90506001600160a01b03811661175a5760405162461bcd60e51b81526004016106c490614746565b6117678982888888612432565b50611771816146e5565b9050611701565b505b50505050505050565b606654600090610100900460ff1680156117c2575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336117cd611f4f565b6001600160a01b031614806117df5750805b6117fb5760405162461bcd60e51b81526004016106c490614504565b506066805460ff19811660ff90911615179055565b606081518351146118755760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016106c4565b600083516001600160401b0381111561189057611890613b71565b6040519080825280602002602001820160405280156118b9578160200160208202803683370190505b50905060005b84518110156119f65760006001600160a01b03168582815181106118e5576118e5614662565b60200260200101516001600160a01b03160361195d5760405162461bcd60e51b815260206004820152603160248201527f455243313135353a2062617463682062616c616e636520717565727920666f7260448201527020746865207a65726f206164647265737360781b60648201526084016106c4565b607e600085838151811061197357611973614662565b60200260200101518152602001908152602001600020600086838151811061199d5761199d614662565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020805490508282815181106119db576119db614662565b60209081029190910101526119ef816146e5565b90506118bf565b509392505050565b606654600090610100900460ff168015611a3d575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611a48611f4f565b6001600160a01b03161480611a5a5750805b611a765760405162461bcd60e51b81526004016106c490614504565b6000828152606d6020908152604080832080546001808201835591855283852001889055878452606e8352818420869055606f835281842080546001600160a01b0319166001600160a01b038916908117909155868552607e8452828520818652845291842080549182018155845291832090910186905590336001600160a01b03166000805160206149ff833981519152856001604051611b199291906146d7565b60405180910390a450505050565b606654600090610100900460ff168015611b66575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611b71611f4f565b6001600160a01b03161480611b835750805b611b9f5760405162461bcd60e51b81526004016106c490614504565b611ba96000612ace565b50565b6000818152606a6020908152604091829020805483518184028101840190945280845260609392830182828015611c0c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bee575b50505050509050919050565b600154610100900460ff1615808015611c3557506001805460ff16105b80611c4e5750303b158015611c4e57506001805460ff16145b611cb15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106c4565b6001805460ff1916811790558015611cd3576001805461ff0019166101001790555b611cdb612b20565b611ceb636cdb3d1360e11b612b51565b611cfb6303a24d0760e21b612b51565b611d03612bcf565b611d1363152a902d60e11b612b51565b611d32739dc5ee2d52d014f8b81d662fa8f4ca525f27cd6b6001612c56565b6040518060600160405280602d8152602001614a3f602d91398051611d5f91607c916020909101906139eb565b50606b805462ff00ff1916620100011790556066805460ff191660011790558015611ba9576001805461ff00191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b606654600090610100900460ff168015611e04575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611e0f611f4f565b6001600160a01b03161480611e215750805b611e3d5760405162461bcd60e51b81526004016106c490614504565b611e49607a8686613a6f565b5061154d607b8484613a6f565b606654600090610100900460ff168015611e95575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611ea0611f4f565b6001600160a01b03161480611eb25750805b611ece5760405162461bcd60e51b81526004016106c490614504565b6108ed85858585612de4565b6000818152607e602090815260408083206001600160a01b038616845290915281205415611f45576000828152607e602090815260408083206001600160a01b038716845290915281208054909190611f3557611f35614662565b9060005260206000200154611f48565b60005b9392505050565b6034546001600160a01b031690565b306001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc09190614839565b6001600160a01b0316336001600160a01b03161461200c5760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b60448201526064016106c4565b61271081111561205b5760405162461bcd60e51b815260206004820152601a60248201527908aa48664727062a4def2c2d8e8d2cae67440a8dede40d0d2ced60331b60448201526064016106c4565b826000036120ae57604080518082019091526001600160a01b03831680825262ffffff8316602090920182905260708054600160a01b9093026001600160b81b0319909316909117919091179055505050565b6040805180820182526001600160a01b03938416815262ffffff928316602080830191825260009687526071905291909420935184549151909216600160a01b026001600160b81b03199091169190921617179055565b816daaeb6d7670e522a718067333cd4e3b156121ae57604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061214e9030908590600401614802565b602060405180830381865afa15801561216b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218f919061481c565b6121ae5780604051633b79c77360e21b81526004016106c491906140c2565b6001600160a01b03831633036122185760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016106c4565b3360008181526078602090815260408083206001600160a01b03881680855290835292819020805460ff191687151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000828152606d602052604081208054839081106122a5576122a5614662565b9060005260206000200154905092915050565b606654600090610100900460ff1680156122f7575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033612302611f4f565b6001600160a01b031614806123145750805b6123305760405162461bcd60e51b81526004016106c490614504565b50606b805462ff0000198116620100009182900460ff1615909102179055565b6000828152607e602090815260408083206001600160a01b038716845290915281205415806123ac57506000838152607e602090815260408083206001600160a01b03881684529091529020546123a99060019061464b565b82115b6123f4576000838152607e602090815260408083206001600160a01b038816845290915290208054839081106123e4576123e4614662565b90600052602060002001546123f7565b60005b949350505050565b60405162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b60448201526064016106c4565b846daaeb6d7670e522a718067333cd4e3b156124db57604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061247b9030908590600401614802565b602060405180830381865afa158015612498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bc919061481c565b6124db5780604051633b79c77360e21b81526004016106c491906140c2565b6001600160a01b0385166125015760405162461bcd60e51b81526004016106c490614746565b6001600160a01b03861633148061251d575061251d86336105b4565b8061252c575061252c84613042565b6125975760405162461bcd60e51b815260206004820152603660248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f726044820152751030b8383937bb32b2103737b910313cb830b9b9b2b960511b60648201526084016106c4565b606b54339060ff16156125e35760005b848110156125e15760006125bb8988611eda565b905080156125ce576125ce818a8a61308b565b50806125d9816146e5565b9150506125a7565b505b856001600160a01b0316876001600160a01b0316826001600160a01b03166000805160206149ff83398151915288886040516126209291906146d7565b60405180910390a46003600052606a602052600080516020614a1f833981519152541580159061268e575060036000908152606a602052600080516020614a1f8339815191528054829061267657612676614662565b6000918252602090912001546001600160a01b031614155b1561177a5760005b848110156117785760036000908152606a602052600080516020614a1f83398151915280549091906126ca576126ca614662565b60009182526020909120015460405163b68c437960e01b81526001600160a01b039091169063b68c43799061270a908b908b908b90600190600401614856565b600060405180830381600087803b15801561272457600080fd5b505af1158015612738573d6000803e3d6000fd5b505050508080612747906146e5565b915050612696565b606654600090610100900460ff16801561278e575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033612799611f4f565b6001600160a01b031614806127ab5750805b6127c75760405162461bcd60e51b81526004016106c490614504565b6001600160a01b03821661282c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c4565b61283582612ace565b5050565b6001600160a01b038316331480612855575061285583336105b4565b80612863575061286361321c565b6128a65760405162461bcd60e51b81526020600482015260146024820152732737ba1020b8383937bb32b2103a3790313ab93760611b60448201526064016106c4565b610780838383613260565b81518351146128d25760405162461bcd60e51b81526004016106c4906146fe565b60005b83518110156108ed57600060018483815181106128f4576128f4614662565b6020026020010151116129205782828151811061291357612913614662565b6020026020010151612962565b61294283838151811061293557612935614662565b6020026020010151613433565b6040516020016129529190614228565b6040516020818303038152906040525b90506129bb86838151811061297957612979614662565b602002602001015186848151811061299357612993614662565b60200260200101518685815181106129ad576129ad614662565b602002602001015184612de4565b50806129c6816146e5565b9150506128d5565b6060816000036129f55750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a1f5780612a09816146e5565b9150612a189050600a836146c3565b91506129f9565b6000816001600160401b03811115612a3957612a39613b71565b6040519080825280601f01601f191660200182016040528015612a63576020820181803683370190505b5090505b84156123f757612a7860018361464b565b9150612a85600a866148a2565b612a909060306148b6565b60f81b818381518110612aa557612aa5614662565b60200101906001600160f81b031916908160001a905350612ac7600a866146c3565b9450612a67565b603480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154610100900460ff16612b475760405162461bcd60e51b81526004016106c4906148ce565b612b4f613449565b565b6001600160e01b03198082169003612baa5760405162461bcd60e51b815260206004820152601c60248201527b115490cc4d8d4e881a5b9d985b1a59081a5b9d195c999858d9481a5960221b60448201526064016106c4565b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b6301ffc9a760e01b60009081526020527f67be87c3ff9960ca1e9cfac5cab2ff4747269cf9ed20c9b7306235ac35a491c55460ff1615612c465760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e48149959da5cdd195c995960721b60448201526064016106c4565b612b4f6301ffc9a760e01b612b51565b600154610100900460ff16612c7d5760405162461bcd60e51b81526004016106c4906148ce565b6daaeb6d7670e522a718067333cd4e3b156128355760405163c3c5a54760e01b81526daaeb6d7670e522a718067333cd4e9063c3c5a54790612cc39030906004016140c2565b6020604051808303816000875af1158015612ce2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d06919061481c565b612835578015612d7157604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe90612d439030908690600401614802565b600060405180830381600087803b158015612d5d57600080fd5b505af115801561154d573d6000803e3d6000fd5b6001600160a01b03821615612db35760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af290390612d439030908690600401614802565b604051632210724360e11b81526daaeb6d7670e522a718067333cd4e90634420e48690612d439030906004016140c2565b606b54339060ff1615612f0e5760005b83811015612f0c57606b5462010000900460ff1615612ef057612e18836000613479565b600003612e645760405162461bcd60e51b815260206004820152601a60248201527926bab9ba10383937bb34b2329039b2b934b0b610373ab6b132b960311b60448201526064016106c4565b600060018511612e9b57612e9684604051602001612e829190614919565b6040516020818303038152906040526134d7565b612edd565b612ec384604051602001612eaf9190614919565b604051602081830303815290604052613433565b8281518110612ed457612ed4614662565b60200260200101515b9050612eea8188886134ed565b50612efa565b612efa8587613570565b80612f04816146e5565b915050612df4565b505b6003600052606a602052600080516020614a1f8339815191525415801590612f74575060036000908152606a602052600080516020614a1f8339815191528054339290612f5d57612f5d614662565b6000918252602090912001546001600160a01b0316145b15612ff55760005b83811015612ff35760405163b68c437960e01b8152339063b68c437990612fae906000908a908a908390600401614856565b600060405180830381600087803b158015612fc857600080fd5b505af1158015612fdc573d6000803e3d6000fd5b505050508080612feb906146e5565b915050612f7c565b505b846001600160a01b031660006001600160a01b0316826001600160a01b03166000805160206149ff83398151915287876040516130339291906146d7565b60405180910390a45050505050565b606654600090610100900460ff16801561305f575061305f61321c565b8015613085575033600090815260686020908152604080832085845290915290205460ff165b92915050565b6000838152606f60205260409020546001600160a01b038381169116146130fe5760405162461bcd60e51b815260206004820152602160248201527f4e6f7420636f7272656374206f776e6572206f662073657269616c6e756d62656044820152603960f91b60648201526084016106c4565b6000838152606e6020908152604080832054606f835281842080546001600160a01b0319166001600160a01b03878116918217909255828652607e8552838620908652909352818420928616845290832090925b815481101561177a578682828154811061316e5761316e614662565b90600052602060002001540361320a578154829061318e9060019061464b565b8154811061319e5761319e614662565b90600052602060002001548282815481106131bb576131bb614662565b9060005260206000200181905550818054806131d9576131d9614678565b600082815260208082208301600019908101839055909201909255845460018101865585835291200187905561177a565b80613214816146e5565b915050613152565b606654600090610100900460ff16801561325b575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905090565b6001600160a01b0383166132c25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016106c4565b606b54339060ff16156132ee5760006132db8585611eda565b905080156132ec576132ec81613641565b505b6003600052606a602052600080516020614a1f8339815191525415801590613354575060036000908152606a602052600080516020614a1f8339815191528054829061333c5761333c614662565b6000918252602090912001546001600160a01b031614155b156133f55760036000908152606a602052600080516020614a1f833981519152805490919061338557613385614662565b600091825260208220015460405163b68c437960e01b81526001600160a01b039091169163b68c4379916133c29188918890600390600401614856565b600060405180830381600087803b1580156133dc57600080fd5b505af11580156133f0573d6000803e3d6000fd5b505050505b60006001600160a01b0316846001600160a01b0316826001600160a01b03166000805160206149ff8339815191528686604051611b199291906146d7565b6060818060200190518101906130859190614935565b600154610100900460ff166134705760405162461bcd60e51b81526004016106c4906148ce565b612b4f33612ace565b60006134868260206148b6565b835110156134ce5760405162461bcd60e51b8152602060048201526015602482015274746f55696e743235365f6f75744f66426f756e647360581b60448201526064016106c4565b50016020015190565b60008180602001905181019061308591906149c5565b606654600090610100900460ff16801561352c575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033613537611f4f565b6001600160a01b031614806135495750805b6135655760405162461bcd60e51b81526004016106c490614504565b610b8984848461384a565b606654600090610100900460ff1680156135af575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336135ba611f4f565b6001600160a01b031614806135cc5750805b6135e85760405162461bcd60e51b81526004016106c490614504565b60008383606c5460405160200161361b939291909283526001600160a01b03919091166020830152604082015260600190565b6040516020818303038152906040528051906020012060001c9050610b8981848661384a565b6000818152606e6020908152604080832054808452607e8352818420858552606f80855283862080546001600160a01b038116885292865293862087875294526001600160a01b03191690915590915b825481101561374557838382815481106136ad576136ad614662565b90600052602060002001540361373357825483906136cd9060019061464b565b815481106136dd576136dd614662565b90600052602060002001548382815481106136fa576136fa614662565b90600052602060002001819055508280548061371857613718614678565b60019003818190600052602060002001600090559055613745565b8061373d816146e5565b915050613691565b5060005b6000828152606d6020526040902054811015610b89576000828152606d6020526040902080548591908390811061378257613782614662565b906000526020600020015403613838576000828152606d6020526040902080546137ae9060019061464b565b815481106137be576137be614662565b9060005260206000200154606d600084815260200190815260200160002082815481106137ed576137ed614662565b9060005260206000200181905550606d600083815260200190815260200160002080548061381d5761381d614678565b60019003818190600052602060002001600090559055610b89565b80613842816146e5565b915050613749565b606654600090610100900460ff168015613889575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033613894611f4f565b6001600160a01b031614806138a65750805b6138c25760405162461bcd60e51b81526004016106c490614504565b6000848152606e60205260409020541580156138f357506000848152606f60205260409020546001600160a01b0316155b61393c5760405162461bcd60e51b815260206004820152601a60248201527914d95c9a585b081b9d5b58995c88185b1c9958591e481d5cd95960321b60448201526064016106c4565b6000828152606d6020908152604080832080546001808201835591855283852001889055878452606e8352818420869055606f835281842080546001600160a01b0319166001600160a01b038916908117909155868552607e84528285209085528352908320805491820181558352912001849055606b54610100900460ff166139d057606b805461ff0019166101001790555b606c80549060006139e0836146e5565b919050555050505050565b8280546139f790614539565b90600052602060002090601f016020900481019282613a195760008555613a5f565b82601f10613a3257805160ff1916838001178555613a5f565b82800160010185558215613a5f579182015b82811115613a5f578251825591602001919060010190613a44565b50613a6b929150613ae3565b5090565b828054613a7b90614539565b90600052602060002090601f016020900481019282613a9d5760008555613a5f565b82601f10613ab65782800160ff19823516178555613a5f565b82800160010185558215613a5f579182015b82811115613a5f578235825591602001919060010190613ac8565b5b80821115613a6b5760008155600101613ae4565b6001600160a01b0381168114611ba957600080fd5b60008060408385031215613b2057600080fd5b8235613b2b81613af8565b946020939093013593505050565b80356001600160e01b031981168114613b5157600080fd5b919050565b600060208284031215613b6857600080fd5b611f4882613b39565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613baf57613baf613b71565b604052919050565b60006001600160401b03831115613bd057613bd0613b71565b613be3601f8401601f1916602001613b87565b9050828152838383011115613bf757600080fd5b828260208301376000602084830101529392505050565b600060208284031215613c2057600080fd5b81356001600160401b03811115613c3657600080fd5b8201601f81018413613c4757600080fd5b6123f784823560208401613bb7565b60006001600160401b03821115613c6f57613c6f613b71565b5060051b60200190565b600082601f830112613c8a57600080fd5b81356020613c9f613c9a83613c56565b613b87565b82815260059290921b84018101918181019086841115613cbe57600080fd5b8286015b84811015613ce2578035613cd581613af8565b8352918301918301613cc2565b509695505050505050565b600082601f830112613cfe57600080fd5b81356020613d0e613c9a83613c56565b82815260059290921b84018101918181019086841115613d2d57600080fd5b8286015b84811015613ce25780358352918301918301613d31565b600082601f830112613d5957600080fd5b611f4883833560208501613bb7565b60008060008060808587031215613d7e57600080fd5b84356001600160401b0380821115613d9557600080fd5b613da188838901613c79565b9550602091508187013581811115613db857600080fd5b613dc489828a01613ced565b955050604087013581811115613dd957600080fd5b613de589828a01613ced565b945050606087013581811115613dfa57600080fd5b8701601f81018913613e0b57600080fd5b8035613e19613c9a82613c56565b81815260059190911b8201840190848101908b831115613e3857600080fd5b8584015b83811015613e7057803586811115613e545760008081fd5b613e628e8983890101613d48565b845250918601918601613e3c565b50989b979a50959850505050505050565b600060208284031215613e9357600080fd5b5035919050565b60005b83811015613eb5578181015183820152602001613e9d565b83811115610b895750506000910152565b6020815260008251806020840152613ee5816040850160208701613e9a565b601f01601f19169190910160400192915050565b600080600060608486031215613f0e57600080fd5b8335613f1981613af8565b95602085013595506040909401359392505050565b600080600060608486031215613f4357600080fd5b8335613f4e81613af8565b9250613f5c60208501613b39565b9150604084013590509250925092565b60008060408385031215613f7f57600080fd5b50508035926020909101359150565b600080600060608486031215613fa357600080fd5b83356001600160401b0380821115613fba57600080fd5b613fc687838801613ced565b94506020860135915080821115613fdc57600080fd5b613fe887838801613c79565b93506040860135915080821115613ffe57600080fd5b5061400b86828701613ced565b9150509250925092565b600080600080600060a0868803121561402d57600080fd5b853561403881613af8565b9450602086013561404881613af8565b935060408601356001600160401b038082111561406457600080fd5b61407089838a01613ced565b9450606088013591508082111561408657600080fd5b61409289838a01613ced565b935060808801359150808211156140a857600080fd5b506140b588828901613d48565b9150509295509295909350565b6001600160a01b0391909116815260200190565b60008060008060008060a087890312156140ef57600080fd5b86356140fa81613af8565b955060208701356001600160401b038082111561411657600080fd5b818901915089601f83011261412a57600080fd5b81358181111561413957600080fd5b8a60208260051b850101111561414e57600080fd5b602083019750809650506040890135945060608901359350608089013591508082111561417a57600080fd5b5061418789828a01613d48565b9150509295509295509295565b600080604083850312156141a757600080fd5b82356001600160401b03808211156141be57600080fd5b6141ca86838701613c79565b935060208501359150808211156141e057600080fd5b50610de685828601613ced565b600081518084526020808501945080840160005b8381101561421d57815187529582019590820190600101614201565b509495945050505050565b602081526000611f4860208301846141ed565b60008060006060848603121561425057600080fd5b83359250602084013561426281613af8565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b818110156142b45783516001600160a01b03168352928401929184019160010161428f565b50909695505050505050565b60008083601f8401126142d257600080fd5b5081356001600160401b038111156142e957600080fd5b60208301915083602082850101111561430157600080fd5b9250929050565b6000806000806040858703121561431e57600080fd5b84356001600160401b038082111561433557600080fd5b614341888389016142c0565b9096509450602087013591508082111561435a57600080fd5b50614367878288016142c0565b95989497509550505050565b6000806000806080858703121561438957600080fd5b843561439481613af8565b9350602085013592506040850135915060608501356001600160401b038111156143bd57600080fd5b6143c987828801613d48565b91505092959194509250565b6000602082840312156143e757600080fd5b8135611f4881613af8565b8015158114611ba957600080fd5b6000806040838503121561441357600080fd5b823561441e81613af8565b9150602083013561442e816143f2565b809150509250929050565b6000806040838503121561444c57600080fd5b823561445781613af8565b9150602083013561442e81613af8565b6000806040838503121561447a57600080fd5b823561448581613af8565b915061449360208401613b39565b90509250929050565b600080600080600060a086880312156144b457600080fd5b85356144bf81613af8565b945060208601356144cf81613af8565b9350604086013592506060860135915060808601356001600160401b038111156144f857600080fd5b6140b588828901613d48565b6020808252601b908201527a4e6f74206f776e6572206f722061626c6520746f2062797061737360281b604082015260600190565b600181811c9082168061454d57607f821691505b60208210810361456d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008151614585818560208601613e9a565b9290920192915050565b600080845481600182811c9150808316806145ab57607f831692505b602080841082036145ca57634e487b7160e01b86526022600452602486fd5b8180156145de57600181146145ef5761461c565b60ff1986168952848901965061461c565b60008b81526020902060005b868110156146145781548b8201529085019083016145fb565b505084890196505b50505050505061462c8185614573565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561465d5761465d614635565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156146a8576146a8614635565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826146d2576146d26146ad565b500490565b918252602082015260400190565b6000600182016146f7576146f7614635565b5060010190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6040815260006147f060408301856141ed565b828103602084015261462c81856141ed565b6001600160a01b0392831681529116602082015260400190565b60006020828403121561482e57600080fd5b8151611f48816143f2565b60006020828403121561484b57600080fd5b8151611f4881613af8565b6001600160a01b0385811682528416602082015260408101839052608081016005831061489357634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b6000826148b1576148b16146ad565b500690565b600082198211156148c9576148c9614635565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000825161492b818460208701613e9a565b9190910192915050565b6000602080838503121561494857600080fd5b82516001600160401b0381111561495e57600080fd5b8301601f8101851361496f57600080fd5b805161497d613c9a82613c56565b81815260059190911b8201830190838101908783111561499c57600080fd5b928401925b828410156149ba578351825292840192908401906149a1565b979650505050505050565b6000602082840312156149d757600080fd5b505191905056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62165f0fc496c6f74e1376579ffc36bcfc90ef4779c44b9232cf0d606db3cc69d168747470733a2f2f6170692e656d626c656d7661756c742e696f2f733a65766d657461646174612f6d6574612fa2646970667358221220e7b332f8ff3c1e4979d0646e6c4a8f8bf0d9a2d5bc6b797034a0abd06181e1ab64736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102245760003560e01c8062fdd58e1461022957806301ffc9a71461024f57806302fe53051461028c5780630a033a2b146102a15780630b7ea4c2146102a95780630e89341c146102bc578063152f0eb5146102dc578063156e29f6146102ef5780631986166f146103025780631beab0f6146103155780632a55205a146103285780632adbc37d1461035a5780632b5173cd146103625780632c825c2f146103745780632cf1dacb146103875780632eb2c2d61461039a57806330477d36146103ad5780633d474b06146103cd57806340897bbe146103e05780634e1273f4146103e857806354fd4d501461040857806369d26b581461040f578063715018a61461042257806374478bb31461042a5780637b74297d146104375780638129fc1c1461045757806386575e401461045f5780638bcef78e146104725780638cc780de146104855780638da5cb5b1461049857806395db5a64146104a05780639713c807146104b15780639a7f1f7d146104c4578063a06617cd146104e4578063a0f174f614610504578063a22cb4651461050f578063a8f1602c14610522578063af7a52e31461054f578063b09a7b7414610562578063bbe215f31461056a578063cba8070314610593578063e985e9c5146105a6578063edf68280146105e2578063f0e0632714610610578063f242432a14610623578063f2fde38b14610636578063f5298aca14610649575b600080fd5b61023c610237366004613b0d565b61065c565b6040519081526020015b60405180910390f35b61027c61025d366004613b56565b6001600160e01b03191660009081526020819052604090205460ff1690565b6040519015158152602001610246565b61029f61029a366004613c0e565b6106f5565b005b61029f610785565b61029f6102b7366004613d68565b610869565b6102cf6102ca366004613e81565b6108f4565b6040516102469190613ec6565b61029f6102ea366004613b0d565b610928565b61029f6102fd366004613ef9565b6109fa565b61029f610310366004613f2e565b610aa4565b61029f610323366004613b0d565b610b8f565b61033b610336366004613f6c565b610d65565b604080516001600160a01b039093168352602083019190915201610246565b61029f610df0565b60665461027c90610100900460ff1681565b61029f610382366004613f8e565b610e86565b61029f610395366004613f2e565b611149565b61029f6103a8366004614015565b611230565b6076546103c0906001600160a01b031681565b60405161024691906140c2565b61029f6103db3660046140d6565b611555565b61029f611783565b6103fb6103f6366004614194565b611810565b6040516102469190614228565b600e61023c565b61029f61041d36600461423b565b6119fe565b61029f611b27565b60665461027c9060ff1681565b61044a610445366004613e81565b611bac565b6040516102469190614273565b61029f611c18565b61029f61046d366004614308565b611dc5565b61029f610480366004614373565b611e56565b61023c610493366004613b0d565b611eda565b6103c0611f4f565b606b5462010000900460ff1661027c565b61029f6104bf36600461423b565b611f5e565b61023c6104d2366004613e81565b6000908152606e602052604090205490565b61023c6104f23660046143d5565b60696020526000908152604090205481565b606b5460ff1661027c565b61029f61051d366004614400565b612105565b61027c610530366004613b0d565b6001600160a01b03919091166000908152606960205260409020541490565b61023c61055d366004613f6c565b612285565b61029f6122b8565b6103c0610578366004613e81565b6000908152606f60205260409020546001600160a01b031690565b61023c6105a1366004613ef9565b612350565b61027c6105b4366004614439565b6001600160a01b03918216600090815260786020908152604080832093909416825291909152205460ff1690565b61027c6105f0366004614467565b606760209081526000928352604080842090915290825290205460ff1681565b61029f61061e3660046143d5565b6123ff565b61029f61063136600461449c565b612432565b61029f6106443660046143d5565b61274f565b61029f610657366004613ef9565b612839565b60006001600160a01b0383166106cd5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152607e602090815260408083206001600160a01b03949094168352929052205490565b606654600090610100900460ff168015610734575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b90503361073f611f4f565b6001600160a01b031614806107515750805b61076d5760405162461bcd60e51b81526004016106c490614504565b815161078090607c9060208501906139eb565b505050565b606654600090610100900460ff1680156107c4575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336107cf611f4f565b6001600160a01b031614806107e15750805b6107fd5760405162461bcd60e51b81526004016106c490614504565b606b54610100900460ff16156108545760405162461bcd60e51b815260206004820152601c60248201527b416c7265616479206861732073657269616c697a6564206974656d7360201b60448201526064016106c4565b50606b805460ff19811660ff90911615179055565b606654600090610100900460ff1680156108a8575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336108b3611f4f565b6001600160a01b031614806108c55750805b6108e15760405162461bcd60e51b81526004016106c490614504565b6108ed858585856128b1565b5050505050565b6060607c610901836129ce565b60405160200161091292919061458f565b6040516020818303038152906040529050919050565b33600081815260696020526040902054151580610954575033610949611f4f565b6001600160a01b0316145b6109ac5760405162461bcd60e51b8152602060048201526024808201527f436f6e7472616374206973206e6f742072656769737465726564206e6f72204f6044820152633bb732b960e11b60648201526084016106c4565b506001600160a01b039091166000818152606960209081526040808320859055938252606a8152928120805460018101825590825292902090910180546001600160a01b0319169091179055565b606654600090610100900460ff168015610a39575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610a44611f4f565b6001600160a01b03161480610a565750805b610a725760405162461bcd60e51b81526004016106c490614504565b600080604051602001610a8791815260200190565b60405160208183030381529060405290506108ed85858584611e56565b606654600090610100900460ff168015610ae3575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610aee611f4f565b6001600160a01b03161480610b005750805b610b1c5760405162461bcd60e51b81526004016106c490614504565b6001600160a01b03841660009081526067602090815260408083206001600160e01b0319871684529091529020805460ff191660011790558115610b89576001600160a01b03841660009081526068602090815260408083208584529091529020805460ff191660011790555b50505050565b606654600090610100900460ff168015610bce575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610bd9611f4f565b6001600160a01b03161480610beb5750805b610c075760405162461bcd60e51b81526004016106c490614504565b6001600160a01b0383166000908152606960205260409020548390610c6b5760405162461bcd60e51b815260206004820152601a60248201527910dbdb9d1c9858dd081a5cc81b9bdd081c9959da5cdd195c995960321b60448201526064016106c4565b6001600160a01b0384166000908152606960209081526040808320548352606a909152902080548190610ca09060019061464b565b81548110610cb057610cb0614662565b9060005260206000200160009054906101000a90046001600160a01b0316818581548110610ce057610ce0614662565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080805480610d1e57610d1e614678565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b039690961681526069909552505060408320929092555050565b600082815260716020526040812054819081906001600160a01b0316610d8c576070610d9b565b60008581526071602052604090205b6040805180820190915290546001600160a01b038116808352600160a01b90910462ffffff166020830181905290945090915061271090610ddc908661468e565b610de691906146c3565b9150509250929050565b606654600090610100900460ff168015610e2f575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610e3a611f4f565b6001600160a01b03161480610e4c5750805b610e685760405162461bcd60e51b81526004016106c490614504565b506066805461ff001981166101009182900460ff1615909102179055565b606654600090610100900460ff168015610ec5575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033610ed0611f4f565b6001600160a01b03161480610ee25750805b610efe5760405162461bcd60e51b81526004016106c490614504565b60005b84518110156108ed57606d6000848381518110610f2057610f20614662565b60200260200101518152602001908152602001600020858281518110610f4857610f48614662565b602090810291909101810151825460018101845560009384529190922001558251839082908110610f7b57610f7b614662565b6020026020010151606e6000878481518110610f9957610f99614662565b6020026020010151815260200190815260200160002081905550838181518110610fc557610fc5614662565b6020026020010151606f6000878481518110610fe357610fe3614662565b6020026020010151815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550607e600084838151811061103357611033614662565b60200260200101518152602001908152602001600020600085838151811061105d5761105d614662565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002085828151811061109757611097614662565b6020908102919091018101518254600181018455600093845291909220015583518490829081106110ca576110ca614662565b60200260200101516001600160a01b031660006001600160a01b03166110ed3390565b6001600160a01b03166000805160206149ff83398151915286858151811061111757611117614662565b6020026020010151600160405161112f9291906146d7565b60405180910390a480611141816146e5565b915050610f01565b606654600090610100900460ff168015611188575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611193611f4f565b6001600160a01b031614806111a55750805b6111c15760405162461bcd60e51b81526004016106c490614504565b6001600160a01b03841660009081526067602090815260408083206001600160e01b0319871684529091529020805460ff191690558115610b89576001600160a01b03841660009081526068602090815260408083208584529091529020805460ff1916600117905550505050565b846daaeb6d7670e522a718067333cd4e3b1561141d57336001600160a01b0382160361138a5782518451146112775760405162461bcd60e51b81526004016106c4906146fe565b6001600160a01b03851661129d5760405162461bcd60e51b81526004016106c490614746565b6001600160a01b0386163314806112b957506112b986336105b4565b6112d55760405162461bcd60e51b81526004016106c49061478b565b3360005b855181101561133e5760008682815181106112f6576112f6614662565b60200260200101519050600086838151811061131457611314614662565b6020026020010151905061132b8a8a84848a612432565b505080611337906146e5565b90506112d9565b50856001600160a01b0316876001600160a01b0316826001600160a01b03166000805160206149df833981519152888860405161137c9291906147dd565b60405180910390a45061154d565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906113bd9030903390600401614802565b602060405180830381865afa1580156113da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fe919061481c565b61141d5733604051633b79c77360e21b81526004016106c491906140c2565b825184511461143e5760405162461bcd60e51b81526004016106c4906146fe565b6001600160a01b0385166114645760405162461bcd60e51b81526004016106c490614746565b6001600160a01b038616331480611480575061148086336105b4565b61149c5760405162461bcd60e51b81526004016106c49061478b565b3360005b85518110156115055760008682815181106114bd576114bd614662565b6020026020010151905060008683815181106114db576114db614662565b602002602001015190506114f28a8a84848a612432565b5050806114fe906146e5565b90506114a0565b50856001600160a01b0316876001600160a01b0316826001600160a01b03166000805160206149df83398151915288886040516115439291906147dd565b60405180910390a4505b505050505050565b856daaeb6d7670e522a718067333cd4e3b156116c657336001600160a01b03821603611633576001600160a01b038716331480611597575061159787336105b4565b6115b35760405162461bcd60e51b81526004016106c49061478b565b60005b8581101561162d5760008787838181106115d2576115d2614662565b90506020020160208101906115e791906143d5565b90506001600160a01b03811661160f5760405162461bcd60e51b81526004016106c490614746565b61161c8982888888612432565b50611626816146e5565b90506115b6565b5061177a565b604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c6171134906116669030903390600401614802565b602060405180830381865afa158015611683573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a7919061481c565b6116c65733604051633b79c77360e21b81526004016106c491906140c2565b6001600160a01b0387163314806116e257506116e287336105b4565b6116fe5760405162461bcd60e51b81526004016106c49061478b565b60005b8581101561177857600087878381811061171d5761171d614662565b905060200201602081019061173291906143d5565b90506001600160a01b03811661175a5760405162461bcd60e51b81526004016106c490614746565b6117678982888888612432565b50611771816146e5565b9050611701565b505b50505050505050565b606654600090610100900460ff1680156117c2575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336117cd611f4f565b6001600160a01b031614806117df5750805b6117fb5760405162461bcd60e51b81526004016106c490614504565b506066805460ff19811660ff90911615179055565b606081518351146118755760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016106c4565b600083516001600160401b0381111561189057611890613b71565b6040519080825280602002602001820160405280156118b9578160200160208202803683370190505b50905060005b84518110156119f65760006001600160a01b03168582815181106118e5576118e5614662565b60200260200101516001600160a01b03160361195d5760405162461bcd60e51b815260206004820152603160248201527f455243313135353a2062617463682062616c616e636520717565727920666f7260448201527020746865207a65726f206164647265737360781b60648201526084016106c4565b607e600085838151811061197357611973614662565b60200260200101518152602001908152602001600020600086838151811061199d5761199d614662565b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020805490508282815181106119db576119db614662565b60209081029190910101526119ef816146e5565b90506118bf565b509392505050565b606654600090610100900460ff168015611a3d575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611a48611f4f565b6001600160a01b03161480611a5a5750805b611a765760405162461bcd60e51b81526004016106c490614504565b6000828152606d6020908152604080832080546001808201835591855283852001889055878452606e8352818420869055606f835281842080546001600160a01b0319166001600160a01b038916908117909155868552607e8452828520818652845291842080549182018155845291832090910186905590336001600160a01b03166000805160206149ff833981519152856001604051611b199291906146d7565b60405180910390a450505050565b606654600090610100900460ff168015611b66575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611b71611f4f565b6001600160a01b03161480611b835750805b611b9f5760405162461bcd60e51b81526004016106c490614504565b611ba96000612ace565b50565b6000818152606a6020908152604091829020805483518184028101840190945280845260609392830182828015611c0c57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611bee575b50505050509050919050565b600154610100900460ff1615808015611c3557506001805460ff16105b80611c4e5750303b158015611c4e57506001805460ff16145b611cb15760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106c4565b6001805460ff1916811790558015611cd3576001805461ff0019166101001790555b611cdb612b20565b611ceb636cdb3d1360e11b612b51565b611cfb6303a24d0760e21b612b51565b611d03612bcf565b611d1363152a902d60e11b612b51565b611d32739dc5ee2d52d014f8b81d662fa8f4ca525f27cd6b6001612c56565b6040518060600160405280602d8152602001614a3f602d91398051611d5f91607c916020909101906139eb565b50606b805462ff00ff1916620100011790556066805460ff191660011790558015611ba9576001805461ff00191681556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a150565b606654600090610100900460ff168015611e04575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611e0f611f4f565b6001600160a01b03161480611e215750805b611e3d5760405162461bcd60e51b81526004016106c490614504565b611e49607a8686613a6f565b5061154d607b8484613a6f565b606654600090610100900460ff168015611e95575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033611ea0611f4f565b6001600160a01b03161480611eb25750805b611ece5760405162461bcd60e51b81526004016106c490614504565b6108ed85858585612de4565b6000818152607e602090815260408083206001600160a01b038616845290915281205415611f45576000828152607e602090815260408083206001600160a01b038716845290915281208054909190611f3557611f35614662565b9060005260206000200154611f48565b60005b9392505050565b6034546001600160a01b031690565b306001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc09190614839565b6001600160a01b0316336001600160a01b03161461200c5760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b60448201526064016106c4565b61271081111561205b5760405162461bcd60e51b815260206004820152601a60248201527908aa48664727062a4def2c2d8e8d2cae67440a8dede40d0d2ced60331b60448201526064016106c4565b826000036120ae57604080518082019091526001600160a01b03831680825262ffffff8316602090920182905260708054600160a01b9093026001600160b81b0319909316909117919091179055505050565b6040805180820182526001600160a01b03938416815262ffffff928316602080830191825260009687526071905291909420935184549151909216600160a01b026001600160b81b03199091169190921617179055565b816daaeb6d7670e522a718067333cd4e3b156121ae57604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061214e9030908590600401614802565b602060405180830381865afa15801561216b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218f919061481c565b6121ae5780604051633b79c77360e21b81526004016106c491906140c2565b6001600160a01b03831633036122185760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016106c4565b3360008181526078602090815260408083206001600160a01b03881680855290835292819020805460ff191687151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000828152606d602052604081208054839081106122a5576122a5614662565b9060005260206000200154905092915050565b606654600090610100900460ff1680156122f7575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033612302611f4f565b6001600160a01b031614806123145750805b6123305760405162461bcd60e51b81526004016106c490614504565b50606b805462ff0000198116620100009182900460ff1615909102179055565b6000828152607e602090815260408083206001600160a01b038716845290915281205415806123ac57506000838152607e602090815260408083206001600160a01b03881684529091529020546123a99060019061464b565b82115b6123f4576000838152607e602090815260408083206001600160a01b038816845290915290208054839081106123e4576123e4614662565b90600052602060002001546123f7565b60005b949350505050565b60405162461bcd60e51b8152602060048201526008602482015267111a5cd8589b195960c21b60448201526064016106c4565b846daaeb6d7670e522a718067333cd4e3b156124db57604051633185c44d60e21b81526daaeb6d7670e522a718067333cd4e9063c61711349061247b9030908590600401614802565b602060405180830381865afa158015612498573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124bc919061481c565b6124db5780604051633b79c77360e21b81526004016106c491906140c2565b6001600160a01b0385166125015760405162461bcd60e51b81526004016106c490614746565b6001600160a01b03861633148061251d575061251d86336105b4565b8061252c575061252c84613042565b6125975760405162461bcd60e51b815260206004820152603660248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f726044820152751030b8383937bb32b2103737b910313cb830b9b9b2b960511b60648201526084016106c4565b606b54339060ff16156125e35760005b848110156125e15760006125bb8988611eda565b905080156125ce576125ce818a8a61308b565b50806125d9816146e5565b9150506125a7565b505b856001600160a01b0316876001600160a01b0316826001600160a01b03166000805160206149ff83398151915288886040516126209291906146d7565b60405180910390a46003600052606a602052600080516020614a1f833981519152541580159061268e575060036000908152606a602052600080516020614a1f8339815191528054829061267657612676614662565b6000918252602090912001546001600160a01b031614155b1561177a5760005b848110156117785760036000908152606a602052600080516020614a1f83398151915280549091906126ca576126ca614662565b60009182526020909120015460405163b68c437960e01b81526001600160a01b039091169063b68c43799061270a908b908b908b90600190600401614856565b600060405180830381600087803b15801561272457600080fd5b505af1158015612738573d6000803e3d6000fd5b505050508080612747906146e5565b915050612696565b606654600090610100900460ff16801561278e575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033612799611f4f565b6001600160a01b031614806127ab5750805b6127c75760405162461bcd60e51b81526004016106c490614504565b6001600160a01b03821661282c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106c4565b61283582612ace565b5050565b6001600160a01b038316331480612855575061285583336105b4565b80612863575061286361321c565b6128a65760405162461bcd60e51b81526020600482015260146024820152732737ba1020b8383937bb32b2103a3790313ab93760611b60448201526064016106c4565b610780838383613260565b81518351146128d25760405162461bcd60e51b81526004016106c4906146fe565b60005b83518110156108ed57600060018483815181106128f4576128f4614662565b6020026020010151116129205782828151811061291357612913614662565b6020026020010151612962565b61294283838151811061293557612935614662565b6020026020010151613433565b6040516020016129529190614228565b6040516020818303038152906040525b90506129bb86838151811061297957612979614662565b602002602001015186848151811061299357612993614662565b60200260200101518685815181106129ad576129ad614662565b602002602001015184612de4565b50806129c6816146e5565b9150506128d5565b6060816000036129f55750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a1f5780612a09816146e5565b9150612a189050600a836146c3565b91506129f9565b6000816001600160401b03811115612a3957612a39613b71565b6040519080825280601f01601f191660200182016040528015612a63576020820181803683370190505b5090505b84156123f757612a7860018361464b565b9150612a85600a866148a2565b612a909060306148b6565b60f81b818381518110612aa557612aa5614662565b60200101906001600160f81b031916908160001a905350612ac7600a866146c3565b9450612a67565b603480546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154610100900460ff16612b475760405162461bcd60e51b81526004016106c4906148ce565b612b4f613449565b565b6001600160e01b03198082169003612baa5760405162461bcd60e51b815260206004820152601c60248201527b115490cc4d8d4e881a5b9d985b1a59081a5b9d195c999858d9481a5960221b60448201526064016106c4565b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b6301ffc9a760e01b60009081526020527f67be87c3ff9960ca1e9cfac5cab2ff4747269cf9ed20c9b7306235ac35a491c55460ff1615612c465760405162461bcd60e51b8152602060048201526012602482015271105b1c9958591e48149959da5cdd195c995960721b60448201526064016106c4565b612b4f6301ffc9a760e01b612b51565b600154610100900460ff16612c7d5760405162461bcd60e51b81526004016106c4906148ce565b6daaeb6d7670e522a718067333cd4e3b156128355760405163c3c5a54760e01b81526daaeb6d7670e522a718067333cd4e9063c3c5a54790612cc39030906004016140c2565b6020604051808303816000875af1158015612ce2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d06919061481c565b612835578015612d7157604051633e9f1edf60e11b81526daaeb6d7670e522a718067333cd4e90637d3e3dbe90612d439030908690600401614802565b600060405180830381600087803b158015612d5d57600080fd5b505af115801561154d573d6000803e3d6000fd5b6001600160a01b03821615612db35760405163a0af290360e01b81526daaeb6d7670e522a718067333cd4e9063a0af290390612d439030908690600401614802565b604051632210724360e11b81526daaeb6d7670e522a718067333cd4e90634420e48690612d439030906004016140c2565b606b54339060ff1615612f0e5760005b83811015612f0c57606b5462010000900460ff1615612ef057612e18836000613479565b600003612e645760405162461bcd60e51b815260206004820152601a60248201527926bab9ba10383937bb34b2329039b2b934b0b610373ab6b132b960311b60448201526064016106c4565b600060018511612e9b57612e9684604051602001612e829190614919565b6040516020818303038152906040526134d7565b612edd565b612ec384604051602001612eaf9190614919565b604051602081830303815290604052613433565b8281518110612ed457612ed4614662565b60200260200101515b9050612eea8188886134ed565b50612efa565b612efa8587613570565b80612f04816146e5565b915050612df4565b505b6003600052606a602052600080516020614a1f8339815191525415801590612f74575060036000908152606a602052600080516020614a1f8339815191528054339290612f5d57612f5d614662565b6000918252602090912001546001600160a01b0316145b15612ff55760005b83811015612ff35760405163b68c437960e01b8152339063b68c437990612fae906000908a908a908390600401614856565b600060405180830381600087803b158015612fc857600080fd5b505af1158015612fdc573d6000803e3d6000fd5b505050508080612feb906146e5565b915050612f7c565b505b846001600160a01b031660006001600160a01b0316826001600160a01b03166000805160206149ff83398151915287876040516130339291906146d7565b60405180910390a45050505050565b606654600090610100900460ff16801561305f575061305f61321c565b8015613085575033600090815260686020908152604080832085845290915290205460ff165b92915050565b6000838152606f60205260409020546001600160a01b038381169116146130fe5760405162461bcd60e51b815260206004820152602160248201527f4e6f7420636f7272656374206f776e6572206f662073657269616c6e756d62656044820152603960f91b60648201526084016106c4565b6000838152606e6020908152604080832054606f835281842080546001600160a01b0319166001600160a01b03878116918217909255828652607e8552838620908652909352818420928616845290832090925b815481101561177a578682828154811061316e5761316e614662565b90600052602060002001540361320a578154829061318e9060019061464b565b8154811061319e5761319e614662565b90600052602060002001548282815481106131bb576131bb614662565b9060005260206000200181905550818054806131d9576131d9614678565b600082815260208082208301600019908101839055909201909255845460018101865585835291200187905561177a565b80613214816146e5565b915050613152565b606654600090610100900460ff16801561325b575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905090565b6001600160a01b0383166132c25760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201526265737360e81b60648201526084016106c4565b606b54339060ff16156132ee5760006132db8585611eda565b905080156132ec576132ec81613641565b505b6003600052606a602052600080516020614a1f8339815191525415801590613354575060036000908152606a602052600080516020614a1f8339815191528054829061333c5761333c614662565b6000918252602090912001546001600160a01b031614155b156133f55760036000908152606a602052600080516020614a1f833981519152805490919061338557613385614662565b600091825260208220015460405163b68c437960e01b81526001600160a01b039091169163b68c4379916133c29188918890600390600401614856565b600060405180830381600087803b1580156133dc57600080fd5b505af11580156133f0573d6000803e3d6000fd5b505050505b60006001600160a01b0316846001600160a01b0316826001600160a01b03166000805160206149ff8339815191528686604051611b199291906146d7565b6060818060200190518101906130859190614935565b600154610100900460ff166134705760405162461bcd60e51b81526004016106c4906148ce565b612b4f33612ace565b60006134868260206148b6565b835110156134ce5760405162461bcd60e51b8152602060048201526015602482015274746f55696e743235365f6f75744f66426f756e647360581b60448201526064016106c4565b50016020015190565b60008180602001905181019061308591906149c5565b606654600090610100900460ff16801561352c575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033613537611f4f565b6001600160a01b031614806135495750805b6135655760405162461bcd60e51b81526004016106c490614504565b610b8984848461384a565b606654600090610100900460ff1680156135af575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b9050336135ba611f4f565b6001600160a01b031614806135cc5750805b6135e85760405162461bcd60e51b81526004016106c490614504565b60008383606c5460405160200161361b939291909283526001600160a01b03919091166020830152604082015260600190565b6040516020818303038152906040528051906020012060001c9050610b8981848661384a565b6000818152606e6020908152604080832054808452607e8352818420858552606f80855283862080546001600160a01b038116885292865293862087875294526001600160a01b03191690915590915b825481101561374557838382815481106136ad576136ad614662565b90600052602060002001540361373357825483906136cd9060019061464b565b815481106136dd576136dd614662565b90600052602060002001548382815481106136fa576136fa614662565b90600052602060002001819055508280548061371857613718614678565b60019003818190600052602060002001600090559055613745565b8061373d816146e5565b915050613691565b5060005b6000828152606d6020526040902054811015610b89576000828152606d6020526040902080548591908390811061378257613782614662565b906000526020600020015403613838576000828152606d6020526040902080546137ae9060019061464b565b815481106137be576137be614662565b9060005260206000200154606d600084815260200190815260200160002082815481106137ed576137ed614662565b9060005260206000200181905550606d600083815260200190815260200160002080548061381d5761381d614678565b60019003818190600052602060002001600090559055610b89565b80613842816146e5565b915050613749565b606654600090610100900460ff168015613889575033600090815260676020908152604080832083356001600160e01b031916845290915290205460ff165b905033613894611f4f565b6001600160a01b031614806138a65750805b6138c25760405162461bcd60e51b81526004016106c490614504565b6000848152606e60205260409020541580156138f357506000848152606f60205260409020546001600160a01b0316155b61393c5760405162461bcd60e51b815260206004820152601a60248201527914d95c9a585b081b9d5b58995c88185b1c9958591e481d5cd95960321b60448201526064016106c4565b6000828152606d6020908152604080832080546001808201835591855283852001889055878452606e8352818420869055606f835281842080546001600160a01b0319166001600160a01b038916908117909155868552607e84528285209085528352908320805491820181558352912001849055606b54610100900460ff166139d057606b805461ff0019166101001790555b606c80549060006139e0836146e5565b919050555050505050565b8280546139f790614539565b90600052602060002090601f016020900481019282613a195760008555613a5f565b82601f10613a3257805160ff1916838001178555613a5f565b82800160010185558215613a5f579182015b82811115613a5f578251825591602001919060010190613a44565b50613a6b929150613ae3565b5090565b828054613a7b90614539565b90600052602060002090601f016020900481019282613a9d5760008555613a5f565b82601f10613ab65782800160ff19823516178555613a5f565b82800160010185558215613a5f579182015b82811115613a5f578235825591602001919060010190613ac8565b5b80821115613a6b5760008155600101613ae4565b6001600160a01b0381168114611ba957600080fd5b60008060408385031215613b2057600080fd5b8235613b2b81613af8565b946020939093013593505050565b80356001600160e01b031981168114613b5157600080fd5b919050565b600060208284031215613b6857600080fd5b611f4882613b39565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613baf57613baf613b71565b604052919050565b60006001600160401b03831115613bd057613bd0613b71565b613be3601f8401601f1916602001613b87565b9050828152838383011115613bf757600080fd5b828260208301376000602084830101529392505050565b600060208284031215613c2057600080fd5b81356001600160401b03811115613c3657600080fd5b8201601f81018413613c4757600080fd5b6123f784823560208401613bb7565b60006001600160401b03821115613c6f57613c6f613b71565b5060051b60200190565b600082601f830112613c8a57600080fd5b81356020613c9f613c9a83613c56565b613b87565b82815260059290921b84018101918181019086841115613cbe57600080fd5b8286015b84811015613ce2578035613cd581613af8565b8352918301918301613cc2565b509695505050505050565b600082601f830112613cfe57600080fd5b81356020613d0e613c9a83613c56565b82815260059290921b84018101918181019086841115613d2d57600080fd5b8286015b84811015613ce25780358352918301918301613d31565b600082601f830112613d5957600080fd5b611f4883833560208501613bb7565b60008060008060808587031215613d7e57600080fd5b84356001600160401b0380821115613d9557600080fd5b613da188838901613c79565b9550602091508187013581811115613db857600080fd5b613dc489828a01613ced565b955050604087013581811115613dd957600080fd5b613de589828a01613ced565b945050606087013581811115613dfa57600080fd5b8701601f81018913613e0b57600080fd5b8035613e19613c9a82613c56565b81815260059190911b8201840190848101908b831115613e3857600080fd5b8584015b83811015613e7057803586811115613e545760008081fd5b613e628e8983890101613d48565b845250918601918601613e3c565b50989b979a50959850505050505050565b600060208284031215613e9357600080fd5b5035919050565b60005b83811015613eb5578181015183820152602001613e9d565b83811115610b895750506000910152565b6020815260008251806020840152613ee5816040850160208701613e9a565b601f01601f19169190910160400192915050565b600080600060608486031215613f0e57600080fd5b8335613f1981613af8565b95602085013595506040909401359392505050565b600080600060608486031215613f4357600080fd5b8335613f4e81613af8565b9250613f5c60208501613b39565b9150604084013590509250925092565b60008060408385031215613f7f57600080fd5b50508035926020909101359150565b600080600060608486031215613fa357600080fd5b83356001600160401b0380821115613fba57600080fd5b613fc687838801613ced565b94506020860135915080821115613fdc57600080fd5b613fe887838801613c79565b93506040860135915080821115613ffe57600080fd5b5061400b86828701613ced565b9150509250925092565b600080600080600060a0868803121561402d57600080fd5b853561403881613af8565b9450602086013561404881613af8565b935060408601356001600160401b038082111561406457600080fd5b61407089838a01613ced565b9450606088013591508082111561408657600080fd5b61409289838a01613ced565b935060808801359150808211156140a857600080fd5b506140b588828901613d48565b9150509295509295909350565b6001600160a01b0391909116815260200190565b60008060008060008060a087890312156140ef57600080fd5b86356140fa81613af8565b955060208701356001600160401b038082111561411657600080fd5b818901915089601f83011261412a57600080fd5b81358181111561413957600080fd5b8a60208260051b850101111561414e57600080fd5b602083019750809650506040890135945060608901359350608089013591508082111561417a57600080fd5b5061418789828a01613d48565b9150509295509295509295565b600080604083850312156141a757600080fd5b82356001600160401b03808211156141be57600080fd5b6141ca86838701613c79565b935060208501359150808211156141e057600080fd5b50610de685828601613ced565b600081518084526020808501945080840160005b8381101561421d57815187529582019590820190600101614201565b509495945050505050565b602081526000611f4860208301846141ed565b60008060006060848603121561425057600080fd5b83359250602084013561426281613af8565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b818110156142b45783516001600160a01b03168352928401929184019160010161428f565b50909695505050505050565b60008083601f8401126142d257600080fd5b5081356001600160401b038111156142e957600080fd5b60208301915083602082850101111561430157600080fd5b9250929050565b6000806000806040858703121561431e57600080fd5b84356001600160401b038082111561433557600080fd5b614341888389016142c0565b9096509450602087013591508082111561435a57600080fd5b50614367878288016142c0565b95989497509550505050565b6000806000806080858703121561438957600080fd5b843561439481613af8565b9350602085013592506040850135915060608501356001600160401b038111156143bd57600080fd5b6143c987828801613d48565b91505092959194509250565b6000602082840312156143e757600080fd5b8135611f4881613af8565b8015158114611ba957600080fd5b6000806040838503121561441357600080fd5b823561441e81613af8565b9150602083013561442e816143f2565b809150509250929050565b6000806040838503121561444c57600080fd5b823561445781613af8565b9150602083013561442e81613af8565b6000806040838503121561447a57600080fd5b823561448581613af8565b915061449360208401613b39565b90509250929050565b600080600080600060a086880312156144b457600080fd5b85356144bf81613af8565b945060208601356144cf81613af8565b9350604086013592506060860135915060808601356001600160401b038111156144f857600080fd5b6140b588828901613d48565b6020808252601b908201527a4e6f74206f776e6572206f722061626c6520746f2062797061737360281b604082015260600190565b600181811c9082168061454d57607f821691505b60208210810361456d57634e487b7160e01b600052602260045260246000fd5b50919050565b60008151614585818560208601613e9a565b9290920192915050565b600080845481600182811c9150808316806145ab57607f831692505b602080841082036145ca57634e487b7160e01b86526022600452602486fd5b8180156145de57600181146145ef5761461c565b60ff1986168952848901965061461c565b60008b81526020902060005b868110156146145781548b8201529085019083016145fb565b505084890196505b50505050505061462c8185614573565b95945050505050565b634e487b7160e01b600052601160045260246000fd5b60008282101561465d5761465d614635565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60008160001904831182151516156146a8576146a8614635565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826146d2576146d26146ad565b500490565b918252602082015260400190565b6000600182016146f7576146f7614635565b5060010190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6040815260006147f060408301856141ed565b828103602084015261462c81856141ed565b6001600160a01b0392831681529116602082015260400190565b60006020828403121561482e57600080fd5b8151611f48816143f2565b60006020828403121561484b57600080fd5b8151611f4881613af8565b6001600160a01b0385811682528416602082015260408101839052608081016005831061489357634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b6000826148b1576148b16146ad565b500690565b600082198211156148c9576148c9614635565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6000825161492b818460208701613e9a565b9190910192915050565b6000602080838503121561494857600080fd5b82516001600160401b0381111561495e57600080fd5b8301601f8101851361496f57600080fd5b805161497d613c9a82613c56565b81815260059190911b8201830190838101908783111561499c57600080fd5b928401925b828410156149ba578351825292840192908401906149a1565b979650505050505050565b6000602082840312156149d757600080fd5b505191905056fe4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fbc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62165f0fc496c6f74e1376579ffc36bcfc90ef4779c44b9232cf0d606db3cc69d168747470733a2f2f6170692e656d626c656d7661756c742e696f2f733a65766d657461646174612f6d6574612fa2646970667358221220e7b332f8ff3c1e4979d0646e6c4a8f8bf0d9a2d5bc6b797034a0abd06181e1ab64736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.