Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60a06040 | 15136764 | 723 days ago | IN | Create: QuadPassport | 0 ETH | 0.20957147 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
QuadPassport
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/IAccessControlUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "./ERC1155/ERC1155Upgradeable.sol"; import "./interfaces/IQuadPassport.sol"; import "./interfaces/IQuadGovernance.sol"; import "./storage/QuadGovernanceStore.sol"; import "./storage/QuadPassportStore.sol"; /// @title Quadrata Web3 Identity Passport /// @author Fabrice Cheng, Theodore Clapp /// @notice This represents wallet accounts Web3 Passport /// @dev Passport extended the ERC1155 standard with restrictions on transfers contract QuadPassport is IQuadPassport, ERC1155Upgradeable, UUPSUpgradeable, QuadPassportStore { using SafeERC20Upgradeable for IERC20MetadataUpgradeable; event GovernanceUpdated(address indexed _oldGovernance, address indexed _governance); event SetPendingGovernance(address indexed _pendingGovernance); constructor() initializer { // used to prevent logic contract self destruct take over } /// @dev initializer (constructor) /// @param _governanceContract address of the IQuadGovernance contract /// @param _uri URI of the Quadrata Passport function initialize( address _governanceContract, string memory _uri ) public initializer { require(_governanceContract != address(0), "GOVERNANCE_ADDRESS_ZERO"); __ERC1155_init(_uri); governance = IQuadGovernance(_governanceContract); name = "Quadrata Passport"; symbol = "QP"; } /// @dev Overwitten to prevent reverts when a contract is missing `onERC1155BatchReceived` and receiving a passport function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override {} /// @dev Overwitten to prevent reverts when a contract is missing `onERC1155Received` and receiving a passport function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) internal override {} fallback() external payable {} /// @notice Claim and mint a wallet account Quadrata Passport /// @dev Only when authorized by an eligible issuer /// @param _config Input paramters required to mint /// @param _sigIssuer ECDSA signature computed by an eligible issuer to authorize the mint /// @param _sigAccount (Optional) ECDSA signature computed by an eligible EOA to authorize the mint function mintPassport( MintConfig calldata _config, bytes calldata _sigIssuer, bytes calldata _sigAccount ) external payable override { require(msg.value == governance.mintPrice(), "INVALID_MINT_PRICE"); require(governance.eligibleTokenId(_config.tokenId), "PASSPORT_TOKENID_INVALID"); require(_config.account != address(0), "ACCOUNT_CANNOT_BE_ZERO"); require(_config.issuedAt != 0, "ISSUED_AT_CANNOT_BE_ZERO"); require(_config.issuedAt <= block.timestamp, "INVALID_ISSUED_AT"); (bytes32 hash, address issuer) = _verifySignersMint(_config, _sigIssuer, _sigAccount); _accountBalancesETH[governance.issuersTreasury(issuer)] += governance.mintPrice(); _usedHashes[hash] = true; _attributes[_config.account][keccak256("COUNTRY")][issuer] = Attribute({value: _config.country, epoch: _config.issuedAt}); _attributes[_config.account][keccak256("DID")][issuer] = Attribute({value: _config.quadDID, epoch: _config.issuedAt}); _attributes[_config.account][keccak256("IS_BUSINESS")][issuer] = Attribute({value: _config.isBusiness, epoch: _config.issuedAt}); _attributesByDID[_config.quadDID][keccak256("AML")][issuer] = Attribute({value: _config.aml, epoch: _config.issuedAt}); if(balanceOf(_config.account, _config.tokenId) == 0) _mint(_config.account, _config.tokenId, 1, ""); } /// @notice Update or set a new attribute for your existing passport /// @dev Only when authorized by an eligible issuer /// @param _account the account to be updated /// @param _tokenId tokenId of the Passport (1 for now) /// @param _attribute keccak256 of the attribute type (ex: keccak256("COUNTRY")) /// @param _value keccak256 of the value of the attribute (ex: keccak256("FRANCE")) /// @param _issuedAt epoch when the operation has been authorized by the Issuer /// @param _sig ECDSA signature computed by an eligible issuer to authorize the operation function setAttribute( address _account, uint256 _tokenId, bytes32 _attribute, bytes32 _value, uint256 _issuedAt, bytes calldata _sig ) external payable override { require(msg.value == governance.mintPricePerAttribute(_attribute), "INVALID_ATTR_MINT_PRICE"); require(_account != address(0), "ACCOUNT_CANNOT_BE_ZERO"); require(_issuedAt != 0, "ISSUED_AT_CANNOT_BE_ZERO"); require(_issuedAt <= block.timestamp, "INVALID_ISSUED_AT"); (bytes32 hash, address issuer) = _verifyIssuerSetAttr(_account, _tokenId, _attribute, _value, _issuedAt, _sig); _accountBalancesETH[governance.issuersTreasury(issuer)] += governance.mintPricePerAttribute(_attribute); _usedHashes[hash] = true; _setAttributeInternal(_account, _tokenId, _attribute, _value, _issuedAt, issuer); } /// @notice (only Issuer) Update or set a new attribute for an existing passport /// @dev Only issuer role /// @param _account address of the wallet to update /// @param _tokenId tokenId of the Passport (1 for now) /// @param _attribute keccak256 of the attribute type (ex: keccak256("COUNTRY")) /// @param _value keccak256 of the value of the attribute (ex: keccak256("FRANCE")) /// @param _issuedAt epoch when the operation has been authorized by the Issuer function setAttributeIssuer( address _account, uint256 _tokenId, bytes32 _attribute, bytes32 _value, uint256 _issuedAt ) external override { require(IAccessControlUpgradeable(address(governance)).hasRole(ISSUER_ROLE, _msgSender()), "INVALID_ISSUER"); require(_account != address(0), "ACCOUNT_CANNOT_BE_ZERO"); require(_issuedAt != 0, "ISSUED_AT_CANNOT_BE_ZERO"); require(_issuedAt <= block.timestamp, "INVALID_ISSUED_AT"); _setAttributeInternal(_account, _tokenId, _attribute, _value, _issuedAt, _msgSender()); } function _setAttributeInternal( address _account, uint256 _tokenId, bytes32 _attribute, bytes32 _value, uint256 _issuedAt, address _issuer ) internal { require(governance.eligibleTokenId(_tokenId), "PASSPORT_TOKENID_INVALID"); require(balanceOf(_account, _tokenId) == 1, "PASSPORT_DOES_NOT_EXIST"); require(_attribute != keccak256("DID"), "MUST_BURN_AND_MINT"); require(governance.eligibleAttributes(_attribute) || governance.eligibleAttributesByDID(_attribute), "ATTRIBUTE_NOT_ELIGIBLE" ); if (governance.eligibleAttributes(_attribute)) { _attributes[_account][_attribute][_issuer] = Attribute({ value: _value, epoch: _issuedAt }); } else { // Attribute grouped by DID bytes32 dID = _attributes[_account][keccak256("DID")][_issuer].value; require(dID != bytes32(0), "DID_NOT_FOUND"); _attributesByDID[dID][_attribute][_issuer] = Attribute({ value: _value, epoch: _issuedAt }); } } /// @notice Burn your Quadrata passport /// @dev Only owner of the passport /// @param _tokenId tokenId of the Passport (1 for now) function burnPassport( uint256 _tokenId ) external override { require(balanceOf(_msgSender(), _tokenId) == 1, "CANNOT_BURN_ZERO_BALANCE"); _burn(_msgSender(), _tokenId, 1); for (uint256 i = 0; i < governance.getEligibleAttributesLength(); i++) { bytes32 attributeType = governance.eligibleAttributesArray(i); for(uint256 j = 0; j < governance.getIssuersLength(); j++) { delete _attributes[_msgSender()][attributeType][governance.issuers(j).issuer]; } } } /// @notice Issuer can burn an account's Quadrata passport when requested /// @dev Only issuer role /// @param _account address of the wallet to burn /// @param _tokenId tokenId of the Passport (1 for now) function burnPassportIssuer( address _account, uint256 _tokenId ) external override { require(IAccessControlUpgradeable(address(governance)).hasRole(ISSUER_ROLE, _msgSender()), "INVALID_ISSUER"); require(balanceOf(_account, _tokenId) == 1, "CANNOT_BURN_ZERO_BALANCE"); // only delete attributes from sender for (uint256 i = 0; i < governance.getEligibleAttributesLength(); i++) { bytes32 attributeType = governance.eligibleAttributesArray(i); delete _attributes[_account][attributeType][_msgSender()]; } // if another attribute is found, keep the passport, otherwise burn if all values are null for (uint256 i = 0; i < governance.getEligibleAttributesLength(); i++) { bytes32 attributeType = governance.eligibleAttributesArray(i); for(uint256 j = 0; j < governance.getIssuersLength(); j++) { Attribute memory attribute = _attributes[_account][attributeType][governance.issuers(j).issuer]; if(attribute.epoch != 0) { return; } } } _burn(_account, _tokenId, 1); } /// @dev Verify sigs and ensure account is an EOA or Smart Contract depending on IS_BUSINESS status /// @param _config all the mint function parameters /// @param _sigIssuer sig of issuer EOA /// @param _sigAccount sig of EOA authorizing claim of passport NFT /// @return unique hash of mintPassport invocation and extracted issuer of passport function _verifySignersMint( MintConfig calldata _config, bytes calldata _sigIssuer, bytes calldata _sigAccount ) internal view returns(bytes32, address){ require(_config.account != address(0), "ACCOUNT_CANNOT_BE_ZERO"); require(_config.issuedAt != 0, "ISSUED_AT_CANNOT_BE_ZERO"); require(_config.issuedAt <= block.timestamp, "INVALID_ISSUED_AT"); bytes32 extractionHash = keccak256(abi.encode(_config.account, _config.tokenId, _config.quadDID, _config.aml, _config.country, _config.isBusiness, _config.issuedAt)); bytes32 signedMsg = ECDSAUpgradeable.toEthSignedMessageHash(extractionHash); address issuer = ECDSAUpgradeable.recover(signedMsg, _sigIssuer); bytes32 issuerMintHash = keccak256(abi.encode(extractionHash, issuer)); require(!_usedHashes[issuerMintHash], "SIGNATURE_ALREADY_USED"); require(IAccessControlUpgradeable(address(governance)).hasRole(ISSUER_ROLE, issuer), "INVALID_ISSUER"); // if the account isn't a Business, then ensure account is EOA // Businesses can be Smart Contracts or EOAs // Individuals can only be EOAs if(_config.isBusiness == keccak256("FALSE")) { extractionHash = keccak256(abi.encodePacked(_config.account)); signedMsg = ECDSAUpgradeable.toEthSignedMessageHash(extractionHash); require(ECDSAUpgradeable.recover(signedMsg, _sigAccount) == _config.account, "INVALID_ACCOUNT"); } return (issuerMintHash, issuer); } function _verifyIssuerSetAttr( address _account, uint256 _tokenId, bytes32 _attribute, bytes32 _value, uint256 _issuedAt, bytes calldata _sig ) internal view returns(bytes32,address) { bytes32 hash = keccak256(abi.encode(_account, _tokenId, _attribute, _value, _issuedAt)); require(!_usedHashes[hash], "SIGNATURE_ALREADY_USED"); bytes32 signedMsg = ECDSAUpgradeable.toEthSignedMessageHash(hash); address issuer = ECDSAUpgradeable.recover(signedMsg, _sig); require(IAccessControlUpgradeable(address(governance)).hasRole(ISSUER_ROLE, issuer), "INVALID_ISSUER"); return (hash, issuer); } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override(ERC1155Upgradeable) { require( (from == address(0) && to != address(0)) || (from != address(0) && to == address(0)), "ONLY_MINT_OR_BURN_ALLOWED" ); super._beforeTokenTransfer(operator, from, to, ids, amounts, data); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC1155Upgradeable, IERC165Upgradeable) returns (bool) { return super.supportsInterface(interfaceId); } /// @dev Allow an issuer's treasury or the Quadrata treasury to withdraw $ETH /// @param _to address of either an issuer's treasury or the Quadrata treasury /// @return the amount of $ETH withdrawn function withdrawETH(address payable _to) external override returns(uint256) { require(_to != address(0), "WITHDRAW_ADDRESS_ZERO"); uint256 currentBalance = _accountBalancesETH[_to]; require(currentBalance > 0, "NOT_ENOUGH_BALANCE"); _accountBalancesETH[_to] = 0; (bool sent,) = _to.call{value: currentBalance}(""); require(sent, "FAILED_TO_TRANSFER_NATIVE_ETH"); return currentBalance; } /// @dev Allow an issuer's treasury or the Quadrata treasury to withdraw ERC20 tokens /// @param _to address of either an issuer's treasury or the Quadrata treasury /// @param _token address of the ERC20 tokens to withdraw /// @return the amount of ERC20 withdrawn function withdrawToken(address payable _to, address _token) external override returns(uint256) { require(_to != address(0), "WITHDRAW_ADDRESS_ZERO"); uint256 currentBalance = _accountBalances[_token][_to]; require(currentBalance > 0, "NOT_ENOUGH_BALANCE"); _accountBalances[_token][_to] = 0; IERC20MetadataUpgradeable erc20 = IERC20MetadataUpgradeable(_token); erc20.safeTransfer(_to, currentBalance); return currentBalance; } /// @dev Admin function to set the new pending Governance address /// @param _governanceContract contract address of IQuadGovernance function setGovernance(address _governanceContract) external override { require(_msgSender() == address(governance), 'ONLY_GOVERNANCE_CONTRACT'); require(_governanceContract != address(0), "GOVERNANCE_ADDRESS_ZERO"); pendingGovernance = _governanceContract; emit SetPendingGovernance(pendingGovernance); } /// @dev Admin function to accept and set the governance contract address function acceptGovernance() external override { require(_msgSender() == pendingGovernance, 'ONLY_PENDING_GOVERNANCE_CONTRACT'); address oldGov = address(governance); governance = IQuadGovernance(pendingGovernance); pendingGovernance = address(0); emit GovernanceUpdated(oldGov, address(governance)); } /// @dev Allow an authorized readers to get attribute information about a passport holder for a specific issuer /// @param _account address of user /// @param _attribute attribute to get respective value from /// @param _issuer the entity that gave the attribute value /// @return value of attribute from issuer function attributes( address _account, bytes32 _attribute, address _issuer ) public view override returns (Attribute memory) { require(IAccessControlUpgradeable(address(governance)).hasRole(READER_ROLE, _msgSender()), "INVALID_READER"); if (!IAccessControlUpgradeable(address(governance)).hasRole(ISSUER_ROLE, _issuer)) return Attribute({value: bytes32(0), epoch: 0}); return _attributes[_account][_attribute][_issuer]; } /// @dev Allow an authorized readers to get information about a QuadDID for a specific issuer /// @param _dID did of user /// @param _attribute attribute to get respective value from /// @param _issuer the entity that gave the attribute value /// @return did value by issuer function attributesByDID( bytes32 _dID, bytes32 _attribute, address _issuer ) public view override returns (Attribute memory) { require(IAccessControlUpgradeable(address(governance)).hasRole(READER_ROLE, _msgSender()), "INVALID_READER"); if (!IAccessControlUpgradeable(address(governance)).hasRole(ISSUER_ROLE, _issuer)) return Attribute({value: bytes32(0), epoch: 0}); return _attributesByDID[_dID][_attribute][_issuer]; } /// @dev Increase balance of account /// @param _account address of user /// @param _amount the entity that gave the attribute value function increaseAccountBalanceETH( address _account, uint256 _amount ) public override { require(IAccessControlUpgradeable(address(governance)).hasRole(READER_ROLE, _msgSender()), "INVALID_READER"); _accountBalancesETH[_account] += _amount; } /// @dev Increase balance of account /// @param _account address of user /// @param _amount the entity that gave the attribute value function increaseAccountBalance( address _token, address _account, uint256 _amount ) public override { require(IAccessControlUpgradeable(address(governance)).hasRole(READER_ROLE, _msgSender()), "INVALID_READER"); _accountBalances[_token][_account] += _amount; } function _authorizeUpgrade(address) internal view override { require(IAccessControlUpgradeable(address(governance)).hasRole(GOVERNANCE_ROLE, _msgSender()), "INVALID_ADMIN"); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal initializer { __ERC1967Upgrade_init_unchained(); __UUPSUpgradeable_init_unchained(); } function __UUPSUpgradeable_init_unchained() internal initializer { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeTo(address newImplementation) external virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. */ function upgradeToAndCall(address newImplementation, bytes memory data) external payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallSecure(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20MetadataUpgradeable is IERC20Upgradeable { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20Upgradeable.sol"; import "../../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using AddressUpgradeable for address; function safeTransfer( IERC20Upgradeable token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20Upgradeable token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20Upgradeable token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20Upgradeable token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControlUpgradeable { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "./extensions/IERC1155MetadataURIUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using AddressUpgradeable for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal initializer { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC1155Upgradeable).interfaceId || interfaceId == type(IERC1155MetadataURIUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address account, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] += amount; emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn( address account, uint256 id, uint256 amount ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address account, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 accountBalance = _balances[id][account]; require(accountBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][account] = accountBalance - amount; } } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155ReceiverUpgradeable.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } uint256[47] private __gap; }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "../ERC1155/IERC1155Upgradeable.sol"; import "../storage/QuadPassportStore.sol"; interface IQuadPassport is IERC1155Upgradeable { function mintPassport( QuadPassportStore.MintConfig calldata config, bytes calldata _sigIssuer, bytes calldata _sigAccount ) external payable; function setAttribute( address _account, uint256 _tokenId, bytes32 _attribute, bytes32 _value, uint256 _issuedAt, bytes calldata _sig ) external payable; function setAttributeIssuer( address _account, uint256 _tokenId, bytes32 _attribute, bytes32 _value, uint256 _issuedAt ) external ; function burnPassport(uint256 _tokenId) external; function burnPassportIssuer(address _account, uint256 _tokenId) external; function setGovernance(address _governanceContract) external; function withdrawETH(address payable _to) external returns (uint256); function withdrawToken(address payable _to, address _token) external returns (uint256); function attributes(address, bytes32, address) external view returns (QuadPassportStore.Attribute memory); function attributesByDID(bytes32, bytes32, address) external view returns (QuadPassportStore.Attribute memory); function increaseAccountBalanceETH(address, uint256) external; function increaseAccountBalance(address, address, uint256) external; function acceptGovernance() external; }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "../storage/QuadGovernanceStore.sol"; interface IQuadGovernance { function setTreasury(address _treasury) external; function setPassportContractAddress(address _passportAddr) external; function updateGovernanceInPassport(address _newGovernance) external; function setMintPrice(uint256 _mintPrice) external; function setEligibleTokenId(uint256 _tokenId, bool _eligibleStatus) external; function setEligibleAttribute(bytes32 _attribute, bool _eligibleStatus) external; function setEligibleAttributeByDID(bytes32 _attribute, bool _eligibleStatus) external; function setAttributePrice(bytes32 _attribute, uint256 _price) external; function setBusinessAttributePrice(bytes32 _attribute, uint256 _price) external; function setAttributeMintPrice(bytes32 _attribute, uint256 _price) external; function setOracle(address _oracleAddr) external; function setRevSplitIssuer(uint256 _split) external; function setIssuer(address _issuer, address _treasury) external; function deleteIssuer(address _issuer) external; function allowTokenPayment( address _tokenAddr, bool _isAllowed ) external; function getEligibleAttributesLength() external view returns(uint256); function getPrice(address _tokenAddr) external view returns (uint256); function getPriceETH() external view returns (uint256); function mintPrice() external view returns (uint256); function eligibleTokenId(uint256) external view returns(bool); function issuersTreasury(address) external view returns (address); function mintPricePerAttribute(bytes32) external view returns(uint256); function eligibleAttributes(bytes32) external view returns(bool); function eligibleAttributesByDID(bytes32) external view returns(bool); function eligibleAttributesArray(uint256) external view returns(bytes32); function pricePerAttribute(bytes32) external view returns(uint256); function pricePerBusinessAttribute(bytes32) external view returns(uint256); function revSplitIssuer() external view returns (uint256); function treasury() external view returns (address); function getIssuersLength() external view returns (uint256); function getIssuers() external view returns (QuadGovernanceStore.Issuer[] memory); function issuers(uint256) external view returns(QuadGovernanceStore.Issuer memory); function getIssuerStatus(address _issuer) external view returns(QuadGovernanceStore.IssuerStatus); }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "../interfaces/IQuadPassport.sol"; contract QuadGovernanceStore { struct Config { uint256 revSplitIssuer; // 50 means 50%; uint256 mintPrice; // Price in $ETH IQuadPassport passport; address oracle; address treasury; } enum IssuerStatus { DEACTIVATED, ACTIVE } struct Issuer { address issuer; IssuerStatus status; } // Admin Functions bytes32[] internal _eligibleAttributesArray; mapping(uint256 => bool) internal _eligibleTokenId; mapping(bytes32 => bool) internal _eligibleAttributes; mapping(bytes32 => bool) internal _eligibleAttributesByDID; // Price in $USD (1e6 decimals) mapping(bytes32 => uint256) internal _pricePerAttribute; // Price in $ETH mapping(bytes32 => uint256) internal _mintPricePerAttribute; mapping(address => bool) public eligibleTokenPayments; mapping(address => address) internal _issuersTreasury; bytes32 public constant ISSUER_ROLE = keccak256("ISSUER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE"); bytes32 public constant READER_ROLE = keccak256("READER_ROLE"); Config public config; // Price in $USD (1e6 decimals) mapping(bytes32 => uint256) internal _pricePerBusinessAttribute; Issuer[] internal _issuers; mapping(address => uint256) internal _issuerIndices; }
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "../interfaces/IQuadPassport.sol"; import "../interfaces/IQuadGovernance.sol"; contract QuadPassportStore { struct Attribute { bytes32 value; uint256 epoch; } /// @dev MintConfig is defined to prevent 'stack frame too deep' during compilation /// @notice This struct is used to abstract mintPassport function parameters /// `account` EOA/Contract to mint the passport /// `tokenId` tokenId of the Passport (1 for now) /// `quadDID` Quadrata Decentralized Identity (raw value) /// `aml` keccak256 of the AML status value /// `country` keccak256 of the country value /// `isBusiness` flag identifying if a wallet is a business or individual /// `issuedAt` epoch when the passport has been issued by the Issuer struct MintConfig { address account; uint256 tokenId; bytes32 quadDID; bytes32 aml; bytes32 country; bytes32 isBusiness; uint256 issuedAt; } bytes32 public constant ISSUER_ROLE = keccak256("ISSUER_ROLE"); bytes32 public constant GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE"); bytes32 public constant READER_ROLE = keccak256("READER_ROLE"); IQuadGovernance public governance; address public pendingGovernance; // Hash => bool mapping(bytes32 => bool) internal _usedHashes; // Passport attributes // Wallet => (Attribute Name => (Issuer => Attribute)) mapping(address => mapping(bytes32 => mapping(address => Attribute))) internal _attributes; // DID => (AttributeType => (Issuer => Attribute(value, epoch))) mapping(bytes32 => mapping(bytes32 => mapping(address => Attribute))) internal _attributesByDID; // Accounting // ERC20 => Account => balance mapping(address => mapping(address => uint256)) internal _accountBalances; mapping(address => uint256) internal _accountBalancesETH; string public symbol; string public name; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ * * @custom:oz-upgrades-unsafe-allow delegatecall */ abstract contract ERC1967UpgradeUpgradeable is Initializable { function __ERC1967Upgrade_init() internal initializer { __ERC1967Upgrade_init_unchained(); } function __ERC1967Upgrade_init_unchained() internal initializer { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall( address newImplementation, bytes memory data, bool forceCall ) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallSecure( address newImplementation, bytes memory data, bool forceCall ) internal { address oldImplementation = _getImplementation(); // Initial upgrade and setup call _setImplementation(newImplementation); if (data.length > 0 || forceCall) { _functionDelegateCall(newImplementation, data); } // Perform rollback test if not already in progress StorageSlotUpgradeable.BooleanSlot storage rollbackTesting = StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT); if (!rollbackTesting.value) { // Trigger rollback using upgradeTo from the new implementation rollbackTesting.value = true; _functionDelegateCall( newImplementation, abi.encodeWithSignature("upgradeTo(address)", oldImplementation) ); rollbackTesting.value = false; // Check rollback was effective require(oldImplementation == _getImplementation(), "ERC1967Upgrade: upgrade breaks further upgrades"); // Finally reset to the new implementation and log the upgrade _upgradeTo(newImplementation); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Emitted when the beacon is upgraded. */ event BeaconUpgraded(address indexed beacon); /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall( address newBeacon, bytes memory data, bool forceCall ) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { _functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function _functionDelegateCall(address target, bytes memory data) private returns (bytes memory) { require(AddressUpgradeable.isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return AddressUpgradeable.verifyCallResult(success, returndata, "Address: low-level delegate call failed"); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 a proxied contract can't have 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. * * 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. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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 * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT 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 initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_oldGovernance","type":"address"},{"indexed":true,"internalType":"address","name":"_governance","type":"address"}],"name":"GovernanceUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_pendingGovernance","type":"address"}],"name":"SetPendingGovernance","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"GOVERNANCE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ISSUER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"READER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"bytes32","name":"_attribute","type":"bytes32"},{"internalType":"address","name":"_issuer","type":"address"}],"name":"attributes","outputs":[{"components":[{"internalType":"bytes32","name":"value","type":"bytes32"},{"internalType":"uint256","name":"epoch","type":"uint256"}],"internalType":"struct QuadPassportStore.Attribute","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_dID","type":"bytes32"},{"internalType":"bytes32","name":"_attribute","type":"bytes32"},{"internalType":"address","name":"_issuer","type":"address"}],"name":"attributesByDID","outputs":[{"components":[{"internalType":"bytes32","name":"value","type":"bytes32"},{"internalType":"uint256","name":"epoch","type":"uint256"}],"internalType":"struct QuadPassportStore.Attribute","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burnPassport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burnPassportIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"contract IQuadGovernance","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseAccountBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"increaseAccountBalanceETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governanceContract","type":"address"},{"internalType":"string","name":"_uri","type":"string"}],"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":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"quadDID","type":"bytes32"},{"internalType":"bytes32","name":"aml","type":"bytes32"},{"internalType":"bytes32","name":"country","type":"bytes32"},{"internalType":"bytes32","name":"isBusiness","type":"bytes32"},{"internalType":"uint256","name":"issuedAt","type":"uint256"}],"internalType":"struct QuadPassportStore.MintConfig","name":"_config","type":"tuple"},{"internalType":"bytes","name":"_sigIssuer","type":"bytes"},{"internalType":"bytes","name":"_sigAccount","type":"bytes"}],"name":"mintPassport","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingGovernance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes32","name":"_attribute","type":"bytes32"},{"internalType":"bytes32","name":"_value","type":"bytes32"},{"internalType":"uint256","name":"_issuedAt","type":"uint256"},{"internalType":"bytes","name":"_sig","type":"bytes"}],"name":"setAttribute","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"bytes32","name":"_attribute","type":"bytes32"},{"internalType":"bytes32","name":"_value","type":"bytes32"},{"internalType":"uint256","name":"_issuedAt","type":"uint256"}],"name":"setAttributeIssuer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governanceContract","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdrawETH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"withdrawToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523060601b6080523480156200001857600080fd5b50600054610100900460ff168062000033575060005460ff16155b6200009b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff16158015620000be576000805461ffff19166101011790555b8015620000d1576000805461ff00191690555b5060805160601c615b3b6200010660003960008181611313015281816113980152818161170a015261178f0152615b3b6000f3fe6080604052600436106101c25760003560e01c8063690d8320116100f6578063dd1583721161008f578063f36c8f5c11610061578063f36c8f5c146105aa578063f399e22e146105de578063f39c38a0146105fe578063fb9dffb41461061e57005b8063dd15837214610501578063e985e9c514610521578063f16596f71461056a578063f242432a1461058a57005b8063a22cb465116100c8578063a22cb46514610481578063a4953ef4146104a1578063ab033ea9146104c1578063d881de41146104e157005b8063690d8320146103f857806382aefa241461041857806395d89b411461044c578063996a57801461046157005b80632eb2c2d611610168578063458c44581161013a578063458c44581461034c5780634e1273f4146103805780634f1ef286146103ad5780635aa6e675146103c057005b80632eb2c2d6146102d957806336079ac6146102f95780633659cfe61461030c5780633aeac4e11461032c57005b80630e89341c116101a15780630e89341c146102495780631e12d310146102695780631fc60015146102a4578063238efcbc146102c457005b8062fdd58e146101c457806301ffc9a7146101f757806306fdde0314610227575b005b3480156101d057600080fd5b506101e46101df3660046155b0565b610631565b6040519081526020015b60405180910390f35b34801561020357600080fd5b506102176102123660046157b3565b6106dc565b60405190151581526020016101ee565b34801561023357600080fd5b5061023c6106ed565b6040516101ee9190615969565b34801561025557600080fd5b5061023c6102643660046158c3565b61077c565b34801561027557600080fd5b50610289610284366004615786565b610810565b604080518251815260209283015192810192909252016101ee565b3480156102b057600080fd5b506101c26102bf3660046155b0565b610a1a565b3480156102d057600080fd5b506101c2610b39565b3480156102e557600080fd5b506101c26102f436600461534c565b610c06565b6101c261030736600461583c565b610ca8565b34801561031857600080fd5b506101c26103273660046152ca565b611308565b34801561033857600080fd5b506101e4610347366004615302565b611484565b34801561035857600080fd5b506101e47fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf81565b34801561038c57600080fd5b506103a061039b366004615699565b611591565b6040516101ee9190615931565b6101c26103bb36600461550b565b6116ff565b3480156103cc57600080fd5b5060fb546103e0906001600160a01b031681565b6040516001600160a01b0390911681526020016101ee565b34801561040457600080fd5b506101e46104133660046152ca565b61186c565b34801561042457600080fd5b506101e47f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12281565b34801561045857600080fd5b5061023c6119e3565b34801561046d57600080fd5b506101c261047c3660046155b0565b6119f1565b34801561048d57600080fd5b506101c261049c36600461549d565b611f3e565b3480156104ad57600080fd5b506101c26104bc3660046153f6565b612029565b3480156104cd57600080fd5b506101c26104dc3660046152ca565b612158565b3480156104ed57600080fd5b506102896104fc3660046154ca565b612268565b34801561050d57600080fd5b506101c261051c3660046155db565b612476565b34801561052d57600080fd5b5061021761053c36600461533a565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b34801561057657600080fd5b506101c26105853660046158c3565b612658565b34801561059657600080fd5b506101c26105a5366004615436565b612943565b3480156105b657600080fd5b506101e47f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b3480156105ea57600080fd5b506101c26105f9366004615559565b6129de565b34801561060a57600080fd5b5060fc546103e0906001600160a01b031681565b6101c261062c36600461561e565b612ba6565b60006001600160a01b0383166106b45760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006106e782612ed2565b92915050565b61010380546106fb90615a39565b80601f016020809104026020016040519081016040528092919081815260200182805461072790615a39565b80156107745780601f1061074957610100808354040283529160200191610774565b820191906000526020600020905b81548152906001019060200180831161075757829003601f168201915b505050505081565b60606067805461078b90615a39565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790615a39565b80156108045780601f106107d957610100808354040283529160200191610804565b820191906000526020600020905b8154815290600101906020018083116107e757829003601f168201915b50505050509050919050565b604080518082019091526000808252602082015260fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b15801561089c57600080fd5b505afa1580156108b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d49190615752565b6109115760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b038481166024830152909116906391d148549060440160206040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b49190615752565b6109d257506040805180820190915260008082526020820152610a13565b50600083815260ff6020908152604080832085845282528083206001600160a01b038516845282529182902082518084019093528054835260010154908201525b9392505050565b60fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b158015610a9257600080fd5b505afa158015610aa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aca9190615752565b610b075760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b6001600160a01b0382166000908152610101602052604081208054839290610b309084906159f1565b90915550505050565b60fc546001600160a01b0316336001600160a01b031614610b9c5760405162461bcd60e51b815260206004820181905260248201527f4f4e4c595f50454e44494e475f474f5645524e414e43455f434f4e545241435460448201526064016106ab565b60fb805460fc805473ffffffffffffffffffffffffffffffffffffffff198084166001600160a01b038381169182179096559116909155604051929091169182907f434a2db650703b36c824e745330d6397cdaa9ee2cc891a4938ae853e1c50b68d90600090a350565b6001600160a01b038516331480610c225750610c22853361053c565b610c945760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016106ab565b610ca18585858585612f6d565b5050505050565b60fb60009054906101000a90046001600160a01b03166001600160a01b0316636817c76c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf657600080fd5b505afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2e919061576e565b3414610d7c5760405162461bcd60e51b815260206004820152601260248201527f494e56414c49445f4d494e545f5052494345000000000000000000000000000060448201526064016106ab565b60fb54604051636314780360e01b8152602087013560048201526001600160a01b039091169063631478039060240160206040518083038186803b158015610dc357600080fd5b505afa158015610dd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfb9190615752565b610e475760405162461bcd60e51b815260206004820152601860248201527f50415353504f52545f544f4b454e49445f494e56414c4944000000000000000060448201526064016106ab565b6000610e5660208701876152ca565b6001600160a01b03161415610ead5760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b60c0850135610efe5760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b428560c001351115610f465760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b600080610f568787878787613200565b9150915060fb60009054906101000a90046001600160a01b03166001600160a01b0316636817c76c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe0919061576e565b60fb54604051635c2a2af160e01b81526001600160a01b03848116600483015261010192600092911690635c2a2af19060240160206040518083038186803b15801561102b57600080fd5b505afa15801561103f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106391906152e6565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461109291906159f1565b9091555050600082815260fd60209081526040808320805460ff19166001179055805180820190915260808a0135815260c08a0135818301529160fe916110db908b018b6152ca565b6001600160a01b039081168252602080830193909352604091820160009081207fc4713d2897c0d675d85b414a1974570a575e5032b6f7be9545631a1f922b26ef825284528281209186168152908352818120845181559383015160019094019390935580518082018252908a0135815260c08a0135818301529160fe91611165908b018b6152ca565b6001600160a01b039081168252602080830193909352604091820160009081207f09deac0378109c72d82cccd3c343a90f7020f0f1af78dcd4fc949c6301aa94888252845282812091861681529083528181208451815593830151600190940193909355805180820190915260a08a0135815260c08a0135818301529160fe916111f1908b018b6152ca565b6001600160a01b039081168252602080830193909352604091820160009081207faf369ce728c816785c72f1ff0222ca9553b2cb93729d6a803be6af0d2369239b8252845282812091861680825291845282812085518155948401516001958601558251808401845260608d0135815260c08d01358186019081528d850135835260ff86528483207faf192d67680c4285e52cd2a94216ce249fb4e0227d267dcc01ea88f1b020a1198452865284832093835292855292902091518255519201919091556112cf906112c5908901896152ca565b8860200135610631565b6112ff576112ff6112e360208901896152ca565b8860200135600160405180602001604052806000815250613721565b50505050505050565b306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614156113965760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016106ab565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166113f17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b03161461145c5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016106ab565b61146581613845565b6040805160008082526020820190925261148191839190613941565b50565b60006001600160a01b0383166114dc5760405162461bcd60e51b815260206004820152601560248201527f57495448445241575f414444524553535f5a45524f000000000000000000000060448201526064016106ab565b6001600160a01b0380831660009081526101006020908152604080832093871683529290522054806115505760405162461bcd60e51b815260206004820152601260248201527f4e4f545f454e4f5547485f42414c414e4345000000000000000000000000000060448201526064016106ab565b6001600160a01b038084166000818152610100602090815260408083209489168352939052918220919091558390611589908684613afe565b509392505050565b6060815183511461160a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016106ab565b6000835167ffffffffffffffff81111561163457634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561165d578160200160208202803683370190505b50905060005b8451811015611589576116c485828151811061168f57634e487b7160e01b600052603260045260246000fd5b60200260200101518583815181106116b757634e487b7160e01b600052603260045260246000fd5b6020026020010151610631565b8282815181106116e457634e487b7160e01b600052603260045260246000fd5b60209081029190910101526116f881615a74565b9050611663565b306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016141561178d5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016106ab565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166117e87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146118535760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016106ab565b61185c82613845565b61186882826001613941565b5050565b60006001600160a01b0382166118c45760405162461bcd60e51b815260206004820152601560248201527f57495448445241575f414444524553535f5a45524f000000000000000000000060448201526064016106ab565b6001600160a01b038216600090815261010160205260409020548061192b5760405162461bcd60e51b815260206004820152601260248201527f4e4f545f454e4f5547485f42414c414e4345000000000000000000000000000060448201526064016106ab565b6001600160a01b038316600081815261010160205260408082208290555190919083908381818185875af1925050503d8060008114611986576040519150601f19603f3d011682016040523d82523d6000602084013e61198b565b606091505b50509050806119dc5760405162461bcd60e51b815260206004820152601d60248201527f4641494c45445f544f5f5452414e534645525f4e41544956455f45544800000060448201526064016106ab565b5092915050565b61010280546106fb90615a39565b60fb546001600160a01b03166391d148547f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa122336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b158015611a6957600080fd5b505afa158015611a7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa19190615752565b611ade5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b611ae88282610631565b600114611b375760405162461bcd60e51b815260206004820152601860248201527f43414e4e4f545f4255524e5f5a45524f5f42414c414e4345000000000000000060448201526064016106ab565b60005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316632b3c25c66040518163ffffffff1660e01b815260040160206040518083038186803b158015611b8857600080fd5b505afa158015611b9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc0919061576e565b811015611c8a5760fb5460405163a024748760e01b8152600481018390526000916001600160a01b03169063a02474879060240160206040518083038186803b158015611c0c57600080fd5b505afa158015611c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c44919061576e565b6001600160a01b038516600090815260fe602090815260408083209383529281528282203383529052908120818155600101555080611c8281615a74565b915050611b3a565b5060005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316632b3c25c66040518163ffffffff1660e01b815260040160206040518083038186803b158015611cdc57600080fd5b505afa158015611cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d14919061576e565b811015611f315760fb5460405163a024748760e01b8152600481018390526000916001600160a01b03169063a02474879060240160206040518083038186803b158015611d6057600080fd5b505afa158015611d74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d98919061576e565b905060005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316638c4499a46040518163ffffffff1660e01b815260040160206040518083038186803b158015611deb57600080fd5b505afa158015611dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e23919061576e565b811015611f1c576001600160a01b03858116600090815260fe6020908152604080832086845290915280822060fb54915163187b0c3160e21b815260048101869052929390928492909116906361ec30c490602401604080518083038186803b158015611e8f57600080fd5b505afa158015611ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec791906157db565b516001600160a01b03168152602080820192909252604090810160002081518083019092528054825260010154918101829052915015611f0957505050505050565b5080611f1481615a74565b915050611d9d565b50508080611f2990615a74565b915050611c8e565b5061186882826001613b7e565b336001600160a01b0383161415611fbd5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016106ab565b3360008181526066602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156120a157600080fd5b505afa1580156120b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d99190615752565b6121165760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b6001600160a01b038084166000908152610100602090815260408083209386168352929052908120805483929061214e9084906159f1565b9091555050505050565b60fb546001600160a01b0316336001600160a01b0316146121bb5760405162461bcd60e51b815260206004820152601860248201527f4f4e4c595f474f5645524e414e43455f434f4e5452414354000000000000000060448201526064016106ab565b6001600160a01b0381166122115760405162461bcd60e51b815260206004820152601760248201527f474f5645524e414e43455f414444524553535f5a45524f00000000000000000060448201526064016106ab565b60fc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f76b3f20c6900119eb71b9afc1a8736e0828e24d6ae34bc194a70fc6a84663ea790600090a250565b604080518082019091526000808252602082015260fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156122f457600080fd5b505afa158015612308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232c9190615752565b6123695760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b038481166024830152909116906391d148549060440160206040518083038186803b1580156123d457600080fd5b505afa1580156123e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240c9190615752565b61242a57506040805180820190915260008082526020820152610a13565b506001600160a01b03808416600090815260fe60209081526040808320868452825280832093851683529281529082902082518084019093528054835260010154908201529392505050565b60fb546001600160a01b03166391d148547f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa122336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156124ee57600080fd5b505afa158015612502573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125269190615752565b6125635760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b6001600160a01b0385166125b95760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b806126065760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b4281111561264a5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b610ca1858585858533613d2e565b6126623382610631565b6001146126b15760405162461bcd60e51b815260206004820152601860248201527f43414e4e4f545f4255524e5f5a45524f5f42414c414e4345000000000000000060448201526064016106ab565b6126bd33826001613b7e565b60005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316632b3c25c66040518163ffffffff1660e01b815260040160206040518083038186803b15801561270e57600080fd5b505afa158015612722573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612746919061576e565b8110156118685760fb5460405163a024748760e01b8152600481018390526000916001600160a01b03169063a02474879060240160206040518083038186803b15801561279257600080fd5b505afa1580156127a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ca919061576e565b905060005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316638c4499a46040518163ffffffff1660e01b815260040160206040518083038186803b15801561281d57600080fd5b505afa158015612831573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612855919061576e565b81101561292e5733600090815260fe6020908152604080832085845290915280822060fb54825163187b0c3160e21b81526004810186905283519294936001600160a01b03909216926361ec30c492602480840193919291829003018186803b1580156128c157600080fd5b505afa1580156128d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f991906157db565b516001600160a01b0316815260208101919091526040016000908120818155600101558061292681615a74565b9150506127cf565b5050808061293b90615a74565b9150506126c0565b6001600160a01b03851633148061295f575061295f853361053c565b6129d15760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f766564000000000000000000000000000000000000000000000060648201526084016106ab565b610ca185858585856141da565b600054610100900460ff16806129f7575060005460ff16155b612a5a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015612a7c576000805461ffff19166101011790555b6001600160a01b038316612ad25760405162461bcd60e51b815260206004820152601760248201527f474f5645524e414e43455f414444524553535f5a45524f00000000000000000060448201526064016106ab565b612adb8261436a565b60fb805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385161790556040805180820190915260118082527f51756164726174612050617373706f72740000000000000000000000000000006020909201918252612b48916101039161510b565b506040805180820190915260028082527f51500000000000000000000000000000000000000000000000000000000000006020909201918252612b8e916101029161510b565b508015612ba1576000805461ff00191690555b505050565b60fb54604051636dccc9bb60e11b8152600481018790526001600160a01b039091169063db9993769060240160206040518083038186803b158015612bea57600080fd5b505afa158015612bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c22919061576e565b3414612c705760405162461bcd60e51b815260206004820152601760248201527f494e56414c49445f415454525f4d494e545f505249434500000000000000000060448201526064016106ab565b6001600160a01b038716612cc65760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b82612d135760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b42831115612d575760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b600080612d6989898989898989614436565b60fb54604051636dccc9bb60e11b8152600481018b90529294509092506001600160a01b03169063db9993769060240160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de9919061576e565b60fb54604051635c2a2af160e01b81526001600160a01b03848116600483015261010192600092911690635c2a2af19060240160206040518083038186803b158015612e3457600080fd5b505afa158015612e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6c91906152e6565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254612e9b91906159f1565b9091555050600082815260fd60205260409020805460ff19166001179055612ec7898989898986613d2e565b505050505050505050565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480612f3557506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806106e757507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146106e7565b8151835114612fe45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016106ab565b6001600160a01b0384166130485760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016106ab565b33613057818787878787614677565b60005b845181101561319f57600085828151811061308557634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008583815181106130b157634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156131455760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016106ab565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906131849084906159f1565b925050819055505050508061319890615a74565b905061305a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516131ef929190615944565b60405180910390a45b505050505050565b6000808061321160208901896152ca565b6001600160a01b031614156132685760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b60c08701356132b95760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b428760c0013511156133015760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b600061331060208901896152ca565b604080516001600160a01b039092166020838101919091528a01358282015289013560608281019190915289013560808281019190915289013560a08281019190915289013560c08281019190915289013560e08201526101000160405160208183030381529060405280519060200120905060006133dc826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506000613420828a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061470c92505050565b9050600083826040516020016134499291909182526001600160a01b0316602082015260400190565b60408051601f198184030181529181528151602092830120600081815260fd90935291205490915060ff16156134c15760405162461bcd60e51b815260206004820152601660248201527f5349474e41545552455f414c52454144595f555345440000000000000000000060448201526064016106ab565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b038481166024830152909116906391d148549060440160206040518083038186803b15801561352c57600080fd5b505afa158015613540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135649190615752565b6135a15760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b7fa357fcb91396b2afa7ab60192e270c625a2eb250b8f839ddb179f207b40459b48b60a001351415613712576135da60208c018c6152ca565b604051602001613602919060609190911b6bffffffffffffffffffffffff1916815260140190565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c80850182905283518086039091018152605c9094019092528251920191909120909450925061367360208c018c6152ca565b6001600160a01b03166136bc848a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061470c92505050565b6001600160a01b0316146137125760405162461bcd60e51b815260206004820152600f60248201527f494e56414c49445f4143434f554e54000000000000000000000000000000000060448201526064016106ab565b9a909950975050505050505050565b6001600160a01b03841661379d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016106ab565b336137bd816000876137ae88614728565b6137b788614728565b87614677565b60008481526065602090815260408083206001600160a01b0389168452909152812080548592906137ef9084906159f1565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ca1565b60fb546001600160a01b03166391d148547f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb1336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156138bd57600080fd5b505afa1580156138d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138f59190615752565b6114815760405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f41444d494e0000000000000000000000000000000000000060448201526064016106ab565b60006139747f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061397f84614781565b60008351118061398c5750815b1561399d5761399b8484614843565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610ca157805460ff191660011781556040516001600160a01b0383166024820152613a4a90869060440160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f3659cfe600000000000000000000000000000000000000000000000000000000179052614843565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614613af55760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201527f757274686572207570677261646573000000000000000000000000000000000060648201526084016106ab565b610ca185614945565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612ba1908490614985565b6001600160a01b038316613bfa5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016106ab565b33613c2981856000613c0b87614728565b613c1487614728565b60405180602001604052806000815250614677565b60008381526065602090815260408083206001600160a01b038816845290915290205482811015613cc15760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e63650000000000000000000000000000000000000000000000000000000060648201526084016106ab565b60008481526065602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60fb54604051636314780360e01b8152600481018790526001600160a01b039091169063631478039060240160206040518083038186803b158015613d7257600080fd5b505afa158015613d86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613daa9190615752565b613df65760405162461bcd60e51b815260206004820152601860248201527f50415353504f52545f544f4b454e49445f494e56414c4944000000000000000060448201526064016106ab565b613e008686610631565b600114613e4f5760405162461bcd60e51b815260206004820152601760248201527f50415353504f52545f444f45535f4e4f545f455849535400000000000000000060448201526064016106ab565b7f09deac0378109c72d82cccd3c343a90f7020f0f1af78dcd4fc949c6301aa9488841415613ebf5760405162461bcd60e51b815260206004820152601260248201527f4d5553545f4255524e5f414e445f4d494e54000000000000000000000000000060448201526064016106ab565b60fb546040516309525c0760e31b8152600481018690526001600160a01b0390911690634a92e0389060240160206040518083038186803b158015613f0357600080fd5b505afa158015613f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3b9190615752565b80613fd6575060fb546040517f97e44996000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b03909116906397e449969060240160206040518083038186803b158015613f9e57600080fd5b505afa158015613fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fd69190615752565b6140225760405162461bcd60e51b815260206004820152601660248201527f4154545249425554455f4e4f545f454c494749424c450000000000000000000060448201526064016106ab565b60fb546040516309525c0760e31b8152600481018690526001600160a01b0390911690634a92e0389060240160206040518083038186803b15801561406657600080fd5b505afa15801561407a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061409e9190615752565b156140f15760408051808201825284815260208082018581526001600160a01b03808b16600090815260fe84528581208a82528452858120918716815292529290209051815590516001909101556131f8565b6001600160a01b03808716600090815260fe602090815260408083207f09deac0378109c72d82cccd3c343a90f7020f0f1af78dcd4fc949c6301aa948884528252808320938516835292905220548061418c5760405162461bcd60e51b815260206004820152600d60248201527f4449445f4e4f545f464f554e440000000000000000000000000000000000000060448201526064016106ab565b6040805180820182528581526020808201868152600094855260ff825283852089865282528385206001600160a01b0387168652909152919092209151825551600190910155505050505050565b6001600160a01b03841661423e5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016106ab565b3361424e8187876137ae88614728565b60008481526065602090815260408083206001600160a01b038a168452909152902054838110156142d45760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016106ab565b60008581526065602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906143139084906159f1565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46112ff565b600054610100900460ff1680614383575060005460ff16155b6143e65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015614408576000805461ffff19166101011790555b614410614a6a565b614418614a6a565b61442182614b1c565b8015611868576000805461ff00191690555050565b604080516001600160a01b0389166020820152908101879052606081018690526080810185905260a081018490526000908190819060c00160408051601f198184030181529181528151602092830120600081815260fd90935291205490915060ff16156144e65760405162461bcd60e51b815260206004820152601660248201527f5349474e41545552455f414c52454144595f555345440000000000000000000060448201526064016106ab565b600061453f826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060006145838288888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061470c92505050565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b0380841660248301529293509116906391d148549060440160206040518083038186803b1580156145f057600080fd5b505afa158015614604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146289190615752565b6146655760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b919b919a509098505050505050505050565b6001600160a01b03851615801561469657506001600160a01b03841615155b806146bb57506001600160a01b038516158015906146bb57506001600160a01b038416155b6147075760405162461bcd60e51b815260206004820152601960248201527f4f4e4c595f4d494e545f4f525f4255524e5f414c4c4f5745440000000000000060448201526064016106ab565b6131f8565b600080600061471b8585614bc3565b9150915061158981614c33565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061477057634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b803b6147f55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016106ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6060823b6148b95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016106ab565b600080846001600160a01b0316846040516148d49190615915565b600060405180830381855af49150503d806000811461490f576040519150601f19603f3d011682016040523d82523d6000602084013e614914565b606091505b509150915061493c8282604051806060016040528060278152602001615adf60279139614e34565b95945050505050565b61494e81614781565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006149da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614e6d9092919063ffffffff16565b805190915015612ba157808060200190518101906149f89190615752565b612ba15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106ab565b600054610100900460ff1680614a83575060005460ff16155b614ae65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015614b08576000805461ffff19166101011790555b8015611481576000805461ff001916905550565b600054610100900460ff1680614b35575060005460ff16155b614b985760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b61442182614e84565b600080825160411415614bfa5760208301516040840151606085015160001a614bee87828585614e97565b94509450505050614c2c565b825160401415614c245760208301516040840151614c19868383614f84565b935093505050614c2c565b506000905060025b9250929050565b6000816004811115614c5557634e487b7160e01b600052602160045260246000fd5b1415614c5e5750565b6001816004811115614c8057634e487b7160e01b600052602160045260246000fd5b1415614cce5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106ab565b6002816004811115614cf057634e487b7160e01b600052602160045260246000fd5b1415614d3e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106ab565b6003816004811115614d6057634e487b7160e01b600052602160045260246000fd5b1415614db95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106ab565b6004816004811115614ddb57634e487b7160e01b600052602160045260246000fd5b14156114815760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106ab565b60608315614e43575081610a13565b825115614e535782518084602001fd5b8160405162461bcd60e51b81526004016106ab9190615969565b6060614e7c8484600085614fcc565b949350505050565b805161186890606790602084019061510b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614ece5750600090506003614f7b565b8460ff16601b14158015614ee657508460ff16601c14155b15614ef75750600090506004614f7b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614f4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614f7457600060019250925050614f7b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01614fbe87828885614e97565b935093505050935093915050565b6060824710156150445760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106ab565b843b6150925760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106ab565b600080866001600160a01b031685876040516150ae9190615915565b60006040518083038185875af1925050503d80600081146150eb576040519150601f19603f3d011682016040523d82523d6000602084013e6150f0565b606091505b5091509150615100828286614e34565b979650505050505050565b82805461511790615a39565b90600052602060002090601f016020900481019282615139576000855561517f565b82601f1061515257805160ff191683800117855561517f565b8280016001018555821561517f579182015b8281111561517f578251825591602001919060010190615164565b5061518b92915061518f565b5090565b5b8082111561518b5760008155600101615190565b600067ffffffffffffffff8311156151be576151be615aa5565b6151d1601f8401601f191660200161599c565b90508281528383830111156151e557600080fd5b828260208301376000602084830101529392505050565b600082601f83011261520c578081fd5b8135602061522161521c836159cd565b61599c565b80838252828201915082860187848660051b8901011115615240578586fd5b855b8581101561525e57813584529284019290840190600101615242565b5090979650505050505050565b60008083601f84011261527c578182fd5b50813567ffffffffffffffff811115615293578182fd5b602083019150836020828501011115614c2c57600080fd5b600082601f8301126152bb578081fd5b610a13838335602085016151a4565b6000602082840312156152db578081fd5b8135610a1381615abb565b6000602082840312156152f7578081fd5b8151610a1381615abb565b60008060408385031215615314578081fd5b823561531f81615abb565b9150602083013561532f81615abb565b809150509250929050565b60008060408385031215615314578182fd5b600080600080600060a08688031215615363578081fd5b853561536e81615abb565b9450602086013561537e81615abb565b9350604086013567ffffffffffffffff8082111561539a578283fd5b6153a689838a016151fc565b945060608801359150808211156153bb578283fd5b6153c789838a016151fc565b935060808801359150808211156153dc578283fd5b506153e9888289016152ab565b9150509295509295909350565b60008060006060848603121561540a578081fd5b833561541581615abb565b9250602084013561542581615abb565b929592945050506040919091013590565b600080600080600060a0868803121561544d578283fd5b853561545881615abb565b9450602086013561546881615abb565b93506040860135925060608601359150608086013567ffffffffffffffff811115615491578182fd5b6153e9888289016152ab565b600080604083850312156154af578182fd5b82356154ba81615abb565b9150602083013561532f81615ad0565b6000806000606084860312156154de578081fd5b83356154e981615abb565b925060208401359150604084013561550081615abb565b809150509250925092565b6000806040838503121561551d578182fd5b823561552881615abb565b9150602083013567ffffffffffffffff811115615543578182fd5b61554f858286016152ab565b9150509250929050565b6000806040838503121561556b578182fd5b823561557681615abb565b9150602083013567ffffffffffffffff811115615591578182fd5b8301601f810185136155a1578182fd5b61554f858235602084016151a4565b600080604083850312156155c2578182fd5b82356155cd81615abb565b946020939093013593505050565b600080600080600060a086880312156155f2578283fd5b85356155fd81615abb565b97602087013597506040870135966060810135965060800135945092505050565b600080600080600080600060c0888a031215615638578485fd5b873561564381615abb565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff81111561567a578283fd5b6156868a828b0161526b565b989b979a50959850939692959293505050565b600080604083850312156156ab578182fd5b823567ffffffffffffffff808211156156c2578384fd5b818501915085601f8301126156d5578384fd5b813560206156e561521c836159cd565b8083825282820191508286018a848660051b8901011115615704578889fd5b8896505b8487101561572f57803561571b81615abb565b835260019690960195918301918301615708565b5096505086013592505080821115615745578283fd5b5061554f858286016151fc565b600060208284031215615763578081fd5b8151610a1381615ad0565b60006020828403121561577f578081fd5b5051919050565b60008060006060848603121561579a578081fd5b8335925060208401359150604084013561550081615abb565b6000602082840312156157c4578081fd5b81356001600160e01b031981168114610a13578182fd5b6000604082840312156157ec578081fd5b6040516040810181811067ffffffffffffffff8211171561580f5761580f615aa5565b604052825161581d81615abb565b8152602083015160028110615830578283fd5b60208201529392505050565b6000806000806000858703610120811215615855578384fd5b60e0811215615862578384fd5b5085945060e086013567ffffffffffffffff80821115615880578485fd5b61588c89838a0161526b565b90965094506101008801359150808211156158a5578283fd5b506158b28882890161526b565b969995985093965092949392505050565b6000602082840312156158d4578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561590a578151875295820195908201906001016158ee565b509495945050505050565b60008251615927818460208701615a09565b9190910192915050565b602081526000610a1360208301846158db565b60408152600061595760408301856158db565b828103602084015261493c81856158db565b6020815260008251806020840152615988816040850160208701615a09565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff811182821017156159c5576159c5615aa5565b604052919050565b600067ffffffffffffffff8211156159e7576159e7615aa5565b5060051b60200190565b60008219821115615a0457615a04615a8f565b500190565b60005b83811015615a24578181015183820152602001615a0c565b83811115615a33576000848401525b50505050565b600181811c90821680615a4d57607f821691505b60208210811415615a6e57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615a8857615a88615a8f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461148157600080fd5b801515811461148157600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122069de07f09778874bf2e954b1f2f14c0a79a248e5592208e3a6fc32e35790868364736f6c63430008040033
Deployed Bytecode
0x6080604052600436106101c25760003560e01c8063690d8320116100f6578063dd1583721161008f578063f36c8f5c11610061578063f36c8f5c146105aa578063f399e22e146105de578063f39c38a0146105fe578063fb9dffb41461061e57005b8063dd15837214610501578063e985e9c514610521578063f16596f71461056a578063f242432a1461058a57005b8063a22cb465116100c8578063a22cb46514610481578063a4953ef4146104a1578063ab033ea9146104c1578063d881de41146104e157005b8063690d8320146103f857806382aefa241461041857806395d89b411461044c578063996a57801461046157005b80632eb2c2d611610168578063458c44581161013a578063458c44581461034c5780634e1273f4146103805780634f1ef286146103ad5780635aa6e675146103c057005b80632eb2c2d6146102d957806336079ac6146102f95780633659cfe61461030c5780633aeac4e11461032c57005b80630e89341c116101a15780630e89341c146102495780631e12d310146102695780631fc60015146102a4578063238efcbc146102c457005b8062fdd58e146101c457806301ffc9a7146101f757806306fdde0314610227575b005b3480156101d057600080fd5b506101e46101df3660046155b0565b610631565b6040519081526020015b60405180910390f35b34801561020357600080fd5b506102176102123660046157b3565b6106dc565b60405190151581526020016101ee565b34801561023357600080fd5b5061023c6106ed565b6040516101ee9190615969565b34801561025557600080fd5b5061023c6102643660046158c3565b61077c565b34801561027557600080fd5b50610289610284366004615786565b610810565b604080518251815260209283015192810192909252016101ee565b3480156102b057600080fd5b506101c26102bf3660046155b0565b610a1a565b3480156102d057600080fd5b506101c2610b39565b3480156102e557600080fd5b506101c26102f436600461534c565b610c06565b6101c261030736600461583c565b610ca8565b34801561031857600080fd5b506101c26103273660046152ca565b611308565b34801561033857600080fd5b506101e4610347366004615302565b611484565b34801561035857600080fd5b506101e47fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf81565b34801561038c57600080fd5b506103a061039b366004615699565b611591565b6040516101ee9190615931565b6101c26103bb36600461550b565b6116ff565b3480156103cc57600080fd5b5060fb546103e0906001600160a01b031681565b6040516001600160a01b0390911681526020016101ee565b34801561040457600080fd5b506101e46104133660046152ca565b61186c565b34801561042457600080fd5b506101e47f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12281565b34801561045857600080fd5b5061023c6119e3565b34801561046d57600080fd5b506101c261047c3660046155b0565b6119f1565b34801561048d57600080fd5b506101c261049c36600461549d565b611f3e565b3480156104ad57600080fd5b506101c26104bc3660046153f6565b612029565b3480156104cd57600080fd5b506101c26104dc3660046152ca565b612158565b3480156104ed57600080fd5b506102896104fc3660046154ca565b612268565b34801561050d57600080fd5b506101c261051c3660046155db565b612476565b34801561052d57600080fd5b5061021761053c36600461533a565b6001600160a01b03918216600090815260666020908152604080832093909416825291909152205460ff1690565b34801561057657600080fd5b506101c26105853660046158c3565b612658565b34801561059657600080fd5b506101c26105a5366004615436565b612943565b3480156105b657600080fd5b506101e47f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb181565b3480156105ea57600080fd5b506101c26105f9366004615559565b6129de565b34801561060a57600080fd5b5060fc546103e0906001600160a01b031681565b6101c261062c36600461561e565b612ba6565b60006001600160a01b0383166106b45760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5060009081526065602090815260408083206001600160a01b03949094168352929052205490565b60006106e782612ed2565b92915050565b61010380546106fb90615a39565b80601f016020809104026020016040519081016040528092919081815260200182805461072790615a39565b80156107745780601f1061074957610100808354040283529160200191610774565b820191906000526020600020905b81548152906001019060200180831161075757829003601f168201915b505050505081565b60606067805461078b90615a39565b80601f01602080910402602001604051908101604052809291908181526020018280546107b790615a39565b80156108045780601f106107d957610100808354040283529160200191610804565b820191906000526020600020905b8154815290600101906020018083116107e757829003601f168201915b50505050509050919050565b604080518082019091526000808252602082015260fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b15801561089c57600080fd5b505afa1580156108b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d49190615752565b6109115760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b038481166024830152909116906391d148549060440160206040518083038186803b15801561097c57600080fd5b505afa158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b49190615752565b6109d257506040805180820190915260008082526020820152610a13565b50600083815260ff6020908152604080832085845282528083206001600160a01b038516845282529182902082518084019093528054835260010154908201525b9392505050565b60fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b158015610a9257600080fd5b505afa158015610aa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aca9190615752565b610b075760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b6001600160a01b0382166000908152610101602052604081208054839290610b309084906159f1565b90915550505050565b60fc546001600160a01b0316336001600160a01b031614610b9c5760405162461bcd60e51b815260206004820181905260248201527f4f4e4c595f50454e44494e475f474f5645524e414e43455f434f4e545241435460448201526064016106ab565b60fb805460fc805473ffffffffffffffffffffffffffffffffffffffff198084166001600160a01b038381169182179096559116909155604051929091169182907f434a2db650703b36c824e745330d6397cdaa9ee2cc891a4938ae853e1c50b68d90600090a350565b6001600160a01b038516331480610c225750610c22853361053c565b610c945760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f766564000000000000000000000000000060648201526084016106ab565b610ca18585858585612f6d565b5050505050565b60fb60009054906101000a90046001600160a01b03166001600160a01b0316636817c76c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf657600080fd5b505afa158015610d0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2e919061576e565b3414610d7c5760405162461bcd60e51b815260206004820152601260248201527f494e56414c49445f4d494e545f5052494345000000000000000000000000000060448201526064016106ab565b60fb54604051636314780360e01b8152602087013560048201526001600160a01b039091169063631478039060240160206040518083038186803b158015610dc357600080fd5b505afa158015610dd7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dfb9190615752565b610e475760405162461bcd60e51b815260206004820152601860248201527f50415353504f52545f544f4b454e49445f494e56414c4944000000000000000060448201526064016106ab565b6000610e5660208701876152ca565b6001600160a01b03161415610ead5760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b60c0850135610efe5760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b428560c001351115610f465760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b600080610f568787878787613200565b9150915060fb60009054906101000a90046001600160a01b03166001600160a01b0316636817c76c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610fa857600080fd5b505afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe0919061576e565b60fb54604051635c2a2af160e01b81526001600160a01b03848116600483015261010192600092911690635c2a2af19060240160206040518083038186803b15801561102b57600080fd5b505afa15801561103f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106391906152e6565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461109291906159f1565b9091555050600082815260fd60209081526040808320805460ff19166001179055805180820190915260808a0135815260c08a0135818301529160fe916110db908b018b6152ca565b6001600160a01b039081168252602080830193909352604091820160009081207fc4713d2897c0d675d85b414a1974570a575e5032b6f7be9545631a1f922b26ef825284528281209186168152908352818120845181559383015160019094019390935580518082018252908a0135815260c08a0135818301529160fe91611165908b018b6152ca565b6001600160a01b039081168252602080830193909352604091820160009081207f09deac0378109c72d82cccd3c343a90f7020f0f1af78dcd4fc949c6301aa94888252845282812091861681529083528181208451815593830151600190940193909355805180820190915260a08a0135815260c08a0135818301529160fe916111f1908b018b6152ca565b6001600160a01b039081168252602080830193909352604091820160009081207faf369ce728c816785c72f1ff0222ca9553b2cb93729d6a803be6af0d2369239b8252845282812091861680825291845282812085518155948401516001958601558251808401845260608d0135815260c08d01358186019081528d850135835260ff86528483207faf192d67680c4285e52cd2a94216ce249fb4e0227d267dcc01ea88f1b020a1198452865284832093835292855292902091518255519201919091556112cf906112c5908901896152ca565b8860200135610631565b6112ff576112ff6112e360208901896152ca565b8860200135600160405180602001604052806000815250613721565b50505050505050565b306001600160a01b037f000000000000000000000000055b12ce604b91ef079898bab005b5b930d5e0001614156113965760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016106ab565b7f000000000000000000000000055b12ce604b91ef079898bab005b5b930d5e0006001600160a01b03166113f17f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b03161461145c5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016106ab565b61146581613845565b6040805160008082526020820190925261148191839190613941565b50565b60006001600160a01b0383166114dc5760405162461bcd60e51b815260206004820152601560248201527f57495448445241575f414444524553535f5a45524f000000000000000000000060448201526064016106ab565b6001600160a01b0380831660009081526101006020908152604080832093871683529290522054806115505760405162461bcd60e51b815260206004820152601260248201527f4e4f545f454e4f5547485f42414c414e4345000000000000000000000000000060448201526064016106ab565b6001600160a01b038084166000818152610100602090815260408083209489168352939052918220919091558390611589908684613afe565b509392505050565b6060815183511461160a5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d61746368000000000000000000000000000000000000000000000060648201526084016106ab565b6000835167ffffffffffffffff81111561163457634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561165d578160200160208202803683370190505b50905060005b8451811015611589576116c485828151811061168f57634e487b7160e01b600052603260045260246000fd5b60200260200101518583815181106116b757634e487b7160e01b600052603260045260246000fd5b6020026020010151610631565b8282815181106116e457634e487b7160e01b600052603260045260246000fd5b60209081029190910101526116f881615a74565b9050611663565b306001600160a01b037f000000000000000000000000055b12ce604b91ef079898bab005b5b930d5e00016141561178d5760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b19195b1959d85d1958d85b1b60a21b60648201526084016106ab565b7f000000000000000000000000055b12ce604b91ef079898bab005b5b930d5e0006001600160a01b03166117e87f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b6001600160a01b0316146118535760405162461bcd60e51b815260206004820152602c60248201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060448201526b6163746976652070726f787960a01b60648201526084016106ab565b61185c82613845565b61186882826001613941565b5050565b60006001600160a01b0382166118c45760405162461bcd60e51b815260206004820152601560248201527f57495448445241575f414444524553535f5a45524f000000000000000000000060448201526064016106ab565b6001600160a01b038216600090815261010160205260409020548061192b5760405162461bcd60e51b815260206004820152601260248201527f4e4f545f454e4f5547485f42414c414e4345000000000000000000000000000060448201526064016106ab565b6001600160a01b038316600081815261010160205260408082208290555190919083908381818185875af1925050503d8060008114611986576040519150601f19603f3d011682016040523d82523d6000602084013e61198b565b606091505b50509050806119dc5760405162461bcd60e51b815260206004820152601d60248201527f4641494c45445f544f5f5452414e534645525f4e41544956455f45544800000060448201526064016106ab565b5092915050565b61010280546106fb90615a39565b60fb546001600160a01b03166391d148547f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa122336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b158015611a6957600080fd5b505afa158015611a7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa19190615752565b611ade5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b611ae88282610631565b600114611b375760405162461bcd60e51b815260206004820152601860248201527f43414e4e4f545f4255524e5f5a45524f5f42414c414e4345000000000000000060448201526064016106ab565b60005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316632b3c25c66040518163ffffffff1660e01b815260040160206040518083038186803b158015611b8857600080fd5b505afa158015611b9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bc0919061576e565b811015611c8a5760fb5460405163a024748760e01b8152600481018390526000916001600160a01b03169063a02474879060240160206040518083038186803b158015611c0c57600080fd5b505afa158015611c20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c44919061576e565b6001600160a01b038516600090815260fe602090815260408083209383529281528282203383529052908120818155600101555080611c8281615a74565b915050611b3a565b5060005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316632b3c25c66040518163ffffffff1660e01b815260040160206040518083038186803b158015611cdc57600080fd5b505afa158015611cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d14919061576e565b811015611f315760fb5460405163a024748760e01b8152600481018390526000916001600160a01b03169063a02474879060240160206040518083038186803b158015611d6057600080fd5b505afa158015611d74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d98919061576e565b905060005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316638c4499a46040518163ffffffff1660e01b815260040160206040518083038186803b158015611deb57600080fd5b505afa158015611dff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e23919061576e565b811015611f1c576001600160a01b03858116600090815260fe6020908152604080832086845290915280822060fb54915163187b0c3160e21b815260048101869052929390928492909116906361ec30c490602401604080518083038186803b158015611e8f57600080fd5b505afa158015611ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec791906157db565b516001600160a01b03168152602080820192909252604090810160002081518083019092528054825260010154918101829052915015611f0957505050505050565b5080611f1481615a74565b915050611d9d565b50508080611f2990615a74565b915050611c8e565b5061186882826001613b7e565b336001600160a01b0383161415611fbd5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084016106ab565b3360008181526066602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156120a157600080fd5b505afa1580156120b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d99190615752565b6121165760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b6001600160a01b038084166000908152610100602090815260408083209386168352929052908120805483929061214e9084906159f1565b9091555050505050565b60fb546001600160a01b0316336001600160a01b0316146121bb5760405162461bcd60e51b815260206004820152601860248201527f4f4e4c595f474f5645524e414e43455f434f4e5452414354000000000000000060448201526064016106ab565b6001600160a01b0381166122115760405162461bcd60e51b815260206004820152601760248201527f474f5645524e414e43455f414444524553535f5a45524f00000000000000000060448201526064016106ab565b60fc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040517f76b3f20c6900119eb71b9afc1a8736e0828e24d6ae34bc194a70fc6a84663ea790600090a250565b604080518082019091526000808252602082015260fb546001600160a01b03166391d148547fc757f485a2bb9eadbad5c86f7618c2a7a2ecb41b29f8610fb0e8bea3ed5ab6cf336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156122f457600080fd5b505afa158015612308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061232c9190615752565b6123695760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa922a0a222a960911b60448201526064016106ab565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b038481166024830152909116906391d148549060440160206040518083038186803b1580156123d457600080fd5b505afa1580156123e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240c9190615752565b61242a57506040805180820190915260008082526020820152610a13565b506001600160a01b03808416600090815260fe60209081526040808320868452825280832093851683529281529082902082518084019093528054835260010154908201529392505050565b60fb546001600160a01b03166391d148547f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa122336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156124ee57600080fd5b505afa158015612502573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125269190615752565b6125635760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b6001600160a01b0385166125b95760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b806126065760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b4281111561264a5760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b610ca1858585858533613d2e565b6126623382610631565b6001146126b15760405162461bcd60e51b815260206004820152601860248201527f43414e4e4f545f4255524e5f5a45524f5f42414c414e4345000000000000000060448201526064016106ab565b6126bd33826001613b7e565b60005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316632b3c25c66040518163ffffffff1660e01b815260040160206040518083038186803b15801561270e57600080fd5b505afa158015612722573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612746919061576e565b8110156118685760fb5460405163a024748760e01b8152600481018390526000916001600160a01b03169063a02474879060240160206040518083038186803b15801561279257600080fd5b505afa1580156127a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127ca919061576e565b905060005b60fb60009054906101000a90046001600160a01b03166001600160a01b0316638c4499a46040518163ffffffff1660e01b815260040160206040518083038186803b15801561281d57600080fd5b505afa158015612831573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612855919061576e565b81101561292e5733600090815260fe6020908152604080832085845290915280822060fb54825163187b0c3160e21b81526004810186905283519294936001600160a01b03909216926361ec30c492602480840193919291829003018186803b1580156128c157600080fd5b505afa1580156128d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f991906157db565b516001600160a01b0316815260208101919091526040016000908120818155600101558061292681615a74565b9150506127cf565b5050808061293b90615a74565b9150506126c0565b6001600160a01b03851633148061295f575061295f853361053c565b6129d15760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f766564000000000000000000000000000000000000000000000060648201526084016106ab565b610ca185858585856141da565b600054610100900460ff16806129f7575060005460ff16155b612a5a5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015612a7c576000805461ffff19166101011790555b6001600160a01b038316612ad25760405162461bcd60e51b815260206004820152601760248201527f474f5645524e414e43455f414444524553535f5a45524f00000000000000000060448201526064016106ab565b612adb8261436a565b60fb805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385161790556040805180820190915260118082527f51756164726174612050617373706f72740000000000000000000000000000006020909201918252612b48916101039161510b565b506040805180820190915260028082527f51500000000000000000000000000000000000000000000000000000000000006020909201918252612b8e916101029161510b565b508015612ba1576000805461ff00191690555b505050565b60fb54604051636dccc9bb60e11b8152600481018790526001600160a01b039091169063db9993769060240160206040518083038186803b158015612bea57600080fd5b505afa158015612bfe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c22919061576e565b3414612c705760405162461bcd60e51b815260206004820152601760248201527f494e56414c49445f415454525f4d494e545f505249434500000000000000000060448201526064016106ab565b6001600160a01b038716612cc65760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b82612d135760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b42831115612d575760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b600080612d6989898989898989614436565b60fb54604051636dccc9bb60e11b8152600481018b90529294509092506001600160a01b03169063db9993769060240160206040518083038186803b158015612db157600080fd5b505afa158015612dc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de9919061576e565b60fb54604051635c2a2af160e01b81526001600160a01b03848116600483015261010192600092911690635c2a2af19060240160206040518083038186803b158015612e3457600080fd5b505afa158015612e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e6c91906152e6565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254612e9b91906159f1565b9091555050600082815260fd60205260409020805460ff19166001179055612ec7898989898986613d2e565b505050505050505050565b60006001600160e01b031982167fd9b67a26000000000000000000000000000000000000000000000000000000001480612f3557506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806106e757507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146106e7565b8151835114612fe45760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d6174636800000000000000000000000000000000000000000000000060648201526084016106ab565b6001600160a01b0384166130485760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016106ab565b33613057818787878787614677565b60005b845181101561319f57600085828151811061308557634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008583815181106130b157634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526065835260408082206001600160a01b038e1683529093529190912054909150818110156131455760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016106ab565b60008381526065602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906131849084906159f1565b925050819055505050508061319890615a74565b905061305a565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516131ef929190615944565b60405180910390a45b505050505050565b6000808061321160208901896152ca565b6001600160a01b031614156132685760405162461bcd60e51b815260206004820152601660248201527f4143434f554e545f43414e4e4f545f42455f5a45524f0000000000000000000060448201526064016106ab565b60c08701356132b95760405162461bcd60e51b815260206004820152601860248201527f4953535545445f41545f43414e4e4f545f42455f5a45524f000000000000000060448201526064016106ab565b428760c0013511156133015760405162461bcd60e51b81526020600482015260116024820152701253959053125117d254d4d5515117d055607a1b60448201526064016106ab565b600061331060208901896152ca565b604080516001600160a01b039092166020838101919091528a01358282015289013560608281019190915289013560808281019190915289013560a08281019190915289013560c08281019190915289013560e08201526101000160405160208183030381529060405280519060200120905060006133dc826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b90506000613420828a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061470c92505050565b9050600083826040516020016134499291909182526001600160a01b0316602082015260400190565b60408051601f198184030181529181528151602092830120600081815260fd90935291205490915060ff16156134c15760405162461bcd60e51b815260206004820152601660248201527f5349474e41545552455f414c52454144595f555345440000000000000000000060448201526064016106ab565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b038481166024830152909116906391d148549060440160206040518083038186803b15801561352c57600080fd5b505afa158015613540573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135649190615752565b6135a15760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b7fa357fcb91396b2afa7ab60192e270c625a2eb250b8f839ddb179f207b40459b48b60a001351415613712576135da60208c018c6152ca565b604051602001613602919060609190911b6bffffffffffffffffffffffff1916815260140190565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c80850182905283518086039091018152605c9094019092528251920191909120909450925061367360208c018c6152ca565b6001600160a01b03166136bc848a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061470c92505050565b6001600160a01b0316146137125760405162461bcd60e51b815260206004820152600f60248201527f494e56414c49445f4143434f554e54000000000000000000000000000000000060448201526064016106ab565b9a909950975050505050505050565b6001600160a01b03841661379d5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016106ab565b336137bd816000876137ae88614728565b6137b788614728565b87614677565b60008481526065602090815260408083206001600160a01b0389168452909152812080548592906137ef9084906159f1565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4610ca1565b60fb546001600160a01b03166391d148547f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb1336040516001600160e01b031960e085901b16815260048101929092526001600160a01b0316602482015260440160206040518083038186803b1580156138bd57600080fd5b505afa1580156138d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138f59190615752565b6114815760405162461bcd60e51b815260206004820152600d60248201527f494e56414c49445f41444d494e0000000000000000000000000000000000000060448201526064016106ab565b60006139747f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b905061397f84614781565b60008351118061398c5750815b1561399d5761399b8484614843565b505b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143805460ff16610ca157805460ff191660011781556040516001600160a01b0383166024820152613a4a90869060440160408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f3659cfe600000000000000000000000000000000000000000000000000000000179052614843565b50805460ff191681557f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b03838116911614613af55760405162461bcd60e51b815260206004820152602f60248201527f45524331393637557067726164653a207570677261646520627265616b73206660448201527f757274686572207570677261646573000000000000000000000000000000000060648201526084016106ab565b610ca185614945565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612ba1908490614985565b6001600160a01b038316613bfa5760405162461bcd60e51b815260206004820152602360248201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016106ab565b33613c2981856000613c0b87614728565b613c1487614728565b60405180602001604052806000815250614677565b60008381526065602090815260408083206001600160a01b038816845290915290205482811015613cc15760405162461bcd60e51b8152602060048201526024808201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c60448201527f616e63650000000000000000000000000000000000000000000000000000000060648201526084016106ab565b60008481526065602090815260408083206001600160a01b03898116808652918452828520888703905582518981529384018890529092908616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b60fb54604051636314780360e01b8152600481018790526001600160a01b039091169063631478039060240160206040518083038186803b158015613d7257600080fd5b505afa158015613d86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613daa9190615752565b613df65760405162461bcd60e51b815260206004820152601860248201527f50415353504f52545f544f4b454e49445f494e56414c4944000000000000000060448201526064016106ab565b613e008686610631565b600114613e4f5760405162461bcd60e51b815260206004820152601760248201527f50415353504f52545f444f45535f4e4f545f455849535400000000000000000060448201526064016106ab565b7f09deac0378109c72d82cccd3c343a90f7020f0f1af78dcd4fc949c6301aa9488841415613ebf5760405162461bcd60e51b815260206004820152601260248201527f4d5553545f4255524e5f414e445f4d494e54000000000000000000000000000060448201526064016106ab565b60fb546040516309525c0760e31b8152600481018690526001600160a01b0390911690634a92e0389060240160206040518083038186803b158015613f0357600080fd5b505afa158015613f17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f3b9190615752565b80613fd6575060fb546040517f97e44996000000000000000000000000000000000000000000000000000000008152600481018690526001600160a01b03909116906397e449969060240160206040518083038186803b158015613f9e57600080fd5b505afa158015613fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fd69190615752565b6140225760405162461bcd60e51b815260206004820152601660248201527f4154545249425554455f4e4f545f454c494749424c450000000000000000000060448201526064016106ab565b60fb546040516309525c0760e31b8152600481018690526001600160a01b0390911690634a92e0389060240160206040518083038186803b15801561406657600080fd5b505afa15801561407a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061409e9190615752565b156140f15760408051808201825284815260208082018581526001600160a01b03808b16600090815260fe84528581208a82528452858120918716815292529290209051815590516001909101556131f8565b6001600160a01b03808716600090815260fe602090815260408083207f09deac0378109c72d82cccd3c343a90f7020f0f1af78dcd4fc949c6301aa948884528252808320938516835292905220548061418c5760405162461bcd60e51b815260206004820152600d60248201527f4449445f4e4f545f464f554e440000000000000000000000000000000000000060448201526064016106ab565b6040805180820182528581526020808201868152600094855260ff825283852089865282528385206001600160a01b0387168652909152919092209151825551600190910155505050505050565b6001600160a01b03841661423e5760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b60648201526084016106ab565b3361424e8187876137ae88614728565b60008481526065602090815260408083206001600160a01b038a168452909152902054838110156142d45760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b60648201526084016106ab565b60008581526065602090815260408083206001600160a01b038b81168552925280832087850390559088168252812080548692906143139084906159f1565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46112ff565b600054610100900460ff1680614383575060005460ff16155b6143e65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015614408576000805461ffff19166101011790555b614410614a6a565b614418614a6a565b61442182614b1c565b8015611868576000805461ff00191690555050565b604080516001600160a01b0389166020820152908101879052606081018690526080810185905260a081018490526000908190819060c00160408051601f198184030181529181528151602092830120600081815260fd90935291205490915060ff16156144e65760405162461bcd60e51b815260206004820152601660248201527f5349474e41545552455f414c52454144595f555345440000000000000000000060448201526064016106ab565b600061453f826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b905060006145838288888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061470c92505050565b60fb54604051632474521560e21b81527f114e74f6ea3bd819998f78687bfcb11b140da08e9b7d222fa9c1f1ba1f2aa12260048201526001600160a01b0380841660248301529293509116906391d148549060440160206040518083038186803b1580156145f057600080fd5b505afa158015614604573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146289190615752565b6146655760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa4a9a9aaa2a960911b60448201526064016106ab565b919b919a509098505050505050505050565b6001600160a01b03851615801561469657506001600160a01b03841615155b806146bb57506001600160a01b038516158015906146bb57506001600160a01b038416155b6147075760405162461bcd60e51b815260206004820152601960248201527f4f4e4c595f4d494e545f4f525f4255524e5f414c4c4f5745440000000000000060448201526064016106ab565b6131f8565b600080600061471b8585614bc3565b9150915061158981614c33565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061477057634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b803b6147f55760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201527f6f74206120636f6e74726163740000000000000000000000000000000000000060648201526084016106ab565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6060823b6148b95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f60448201527f6e7472616374000000000000000000000000000000000000000000000000000060648201526084016106ab565b600080846001600160a01b0316846040516148d49190615915565b600060405180830381855af49150503d806000811461490f576040519150601f19603f3d011682016040523d82523d6000602084013e614914565b606091505b509150915061493c8282604051806060016040528060278152602001615adf60279139614e34565b95945050505050565b61494e81614781565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60006149da826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614e6d9092919063ffffffff16565b805190915015612ba157808060200190518101906149f89190615752565b612ba15760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016106ab565b600054610100900460ff1680614a83575060005460ff16155b614ae65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015614b08576000805461ffff19166101011790555b8015611481576000805461ff001916905550565b600054610100900460ff1680614b35575060005460ff16155b614b985760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106ab565b600054610100900460ff16158015614bba576000805461ffff19166101011790555b61442182614e84565b600080825160411415614bfa5760208301516040840151606085015160001a614bee87828585614e97565b94509450505050614c2c565b825160401415614c245760208301516040840151614c19868383614f84565b935093505050614c2c565b506000905060025b9250929050565b6000816004811115614c5557634e487b7160e01b600052602160045260246000fd5b1415614c5e5750565b6001816004811115614c8057634e487b7160e01b600052602160045260246000fd5b1415614cce5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106ab565b6002816004811115614cf057634e487b7160e01b600052602160045260246000fd5b1415614d3e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106ab565b6003816004811115614d6057634e487b7160e01b600052602160045260246000fd5b1415614db95760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106ab565b6004816004811115614ddb57634e487b7160e01b600052602160045260246000fd5b14156114815760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106ab565b60608315614e43575081610a13565b825115614e535782518084602001fd5b8160405162461bcd60e51b81526004016106ab9190615969565b6060614e7c8484600085614fcc565b949350505050565b805161186890606790602084019061510b565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614ece5750600090506003614f7b565b8460ff16601b14158015614ee657508460ff16601c14155b15614ef75750600090506004614f7b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614f4b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614f7457600060019250925050614f7b565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01614fbe87828885614e97565b935093505050935093915050565b6060824710156150445760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016106ab565b843b6150925760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106ab565b600080866001600160a01b031685876040516150ae9190615915565b60006040518083038185875af1925050503d80600081146150eb576040519150601f19603f3d011682016040523d82523d6000602084013e6150f0565b606091505b5091509150615100828286614e34565b979650505050505050565b82805461511790615a39565b90600052602060002090601f016020900481019282615139576000855561517f565b82601f1061515257805160ff191683800117855561517f565b8280016001018555821561517f579182015b8281111561517f578251825591602001919060010190615164565b5061518b92915061518f565b5090565b5b8082111561518b5760008155600101615190565b600067ffffffffffffffff8311156151be576151be615aa5565b6151d1601f8401601f191660200161599c565b90508281528383830111156151e557600080fd5b828260208301376000602084830101529392505050565b600082601f83011261520c578081fd5b8135602061522161521c836159cd565b61599c565b80838252828201915082860187848660051b8901011115615240578586fd5b855b8581101561525e57813584529284019290840190600101615242565b5090979650505050505050565b60008083601f84011261527c578182fd5b50813567ffffffffffffffff811115615293578182fd5b602083019150836020828501011115614c2c57600080fd5b600082601f8301126152bb578081fd5b610a13838335602085016151a4565b6000602082840312156152db578081fd5b8135610a1381615abb565b6000602082840312156152f7578081fd5b8151610a1381615abb565b60008060408385031215615314578081fd5b823561531f81615abb565b9150602083013561532f81615abb565b809150509250929050565b60008060408385031215615314578182fd5b600080600080600060a08688031215615363578081fd5b853561536e81615abb565b9450602086013561537e81615abb565b9350604086013567ffffffffffffffff8082111561539a578283fd5b6153a689838a016151fc565b945060608801359150808211156153bb578283fd5b6153c789838a016151fc565b935060808801359150808211156153dc578283fd5b506153e9888289016152ab565b9150509295509295909350565b60008060006060848603121561540a578081fd5b833561541581615abb565b9250602084013561542581615abb565b929592945050506040919091013590565b600080600080600060a0868803121561544d578283fd5b853561545881615abb565b9450602086013561546881615abb565b93506040860135925060608601359150608086013567ffffffffffffffff811115615491578182fd5b6153e9888289016152ab565b600080604083850312156154af578182fd5b82356154ba81615abb565b9150602083013561532f81615ad0565b6000806000606084860312156154de578081fd5b83356154e981615abb565b925060208401359150604084013561550081615abb565b809150509250925092565b6000806040838503121561551d578182fd5b823561552881615abb565b9150602083013567ffffffffffffffff811115615543578182fd5b61554f858286016152ab565b9150509250929050565b6000806040838503121561556b578182fd5b823561557681615abb565b9150602083013567ffffffffffffffff811115615591578182fd5b8301601f810185136155a1578182fd5b61554f858235602084016151a4565b600080604083850312156155c2578182fd5b82356155cd81615abb565b946020939093013593505050565b600080600080600060a086880312156155f2578283fd5b85356155fd81615abb565b97602087013597506040870135966060810135965060800135945092505050565b600080600080600080600060c0888a031215615638578485fd5b873561564381615abb565b96506020880135955060408801359450606088013593506080880135925060a088013567ffffffffffffffff81111561567a578283fd5b6156868a828b0161526b565b989b979a50959850939692959293505050565b600080604083850312156156ab578182fd5b823567ffffffffffffffff808211156156c2578384fd5b818501915085601f8301126156d5578384fd5b813560206156e561521c836159cd565b8083825282820191508286018a848660051b8901011115615704578889fd5b8896505b8487101561572f57803561571b81615abb565b835260019690960195918301918301615708565b5096505086013592505080821115615745578283fd5b5061554f858286016151fc565b600060208284031215615763578081fd5b8151610a1381615ad0565b60006020828403121561577f578081fd5b5051919050565b60008060006060848603121561579a578081fd5b8335925060208401359150604084013561550081615abb565b6000602082840312156157c4578081fd5b81356001600160e01b031981168114610a13578182fd5b6000604082840312156157ec578081fd5b6040516040810181811067ffffffffffffffff8211171561580f5761580f615aa5565b604052825161581d81615abb565b8152602083015160028110615830578283fd5b60208201529392505050565b6000806000806000858703610120811215615855578384fd5b60e0811215615862578384fd5b5085945060e086013567ffffffffffffffff80821115615880578485fd5b61588c89838a0161526b565b90965094506101008801359150808211156158a5578283fd5b506158b28882890161526b565b969995985093965092949392505050565b6000602082840312156158d4578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561590a578151875295820195908201906001016158ee565b509495945050505050565b60008251615927818460208701615a09565b9190910192915050565b602081526000610a1360208301846158db565b60408152600061595760408301856158db565b828103602084015261493c81856158db565b6020815260008251806020840152615988816040850160208701615a09565b601f01601f19169190910160400192915050565b604051601f8201601f1916810167ffffffffffffffff811182821017156159c5576159c5615aa5565b604052919050565b600067ffffffffffffffff8211156159e7576159e7615aa5565b5060051b60200190565b60008219821115615a0457615a04615a8f565b500190565b60005b83811015615a24578181015183820152602001615a0c565b83811115615a33576000848401525b50505050565b600181811c90821680615a4d57607f821691505b60208210811415615a6e57634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415615a8857615a88615a8f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461148157600080fd5b801515811461148157600080fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a264697066735822122069de07f09778874bf2e954b1f2f14c0a79a248e5592208e3a6fc32e35790868364736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 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.