Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 149 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Grant Role | 18798213 | 338 days ago | IN | 0 ETH | 0.00184046 | ||||
Mint Tokens | 18711272 | 350 days ago | IN | 0 ETH | 0.0067424 | ||||
Mint Tokens | 18458876 | 385 days ago | IN | 0 ETH | 0.00220697 | ||||
Bulk Mint Tokens | 17668433 | 496 days ago | IN | 0 ETH | 0.0018913 | ||||
Mint Tokens | 17654759 | 498 days ago | IN | 0 ETH | 0.00131398 | ||||
Mint Tokens | 17654587 | 498 days ago | IN | 0 ETH | 0.00284566 | ||||
Mint Tokens | 17654550 | 498 days ago | IN | 0 ETH | 0.00282012 | ||||
Bulk Mint Tokens | 17620203 | 503 days ago | IN | 0 ETH | 0.00214449 | ||||
Mint Tokens | 17619715 | 503 days ago | IN | 0 ETH | 0.00459697 | ||||
Mint Tokens | 17619201 | 503 days ago | IN | 0 ETH | 0.0024344 | ||||
Mint Tokens | 17618936 | 503 days ago | IN | 0 ETH | 0.00190594 | ||||
Mint Tokens | 17618578 | 503 days ago | IN | 0 ETH | 0.0011338 | ||||
Mint Tokens | 17618534 | 503 days ago | IN | 0 ETH | 0.00280314 | ||||
Mint Tokens | 17618034 | 503 days ago | IN | 0 ETH | 0.00118045 | ||||
Mint Tokens | 17618025 | 503 days ago | IN | 0 ETH | 0.00142393 | ||||
Mint Tokens | 17617600 | 503 days ago | IN | 0 ETH | 0.00277169 | ||||
Mint Tokens | 17617322 | 503 days ago | IN | 0 ETH | 0.00602893 | ||||
Mint Tokens | 17617175 | 503 days ago | IN | 0 ETH | 0.00307763 | ||||
Mint Tokens | 17617172 | 503 days ago | IN | 0 ETH | 0.0058494 | ||||
Mint Tokens | 17617163 | 503 days ago | IN | 0 ETH | 0.00325105 | ||||
Bulk Mint Tokens | 17617112 | 503 days ago | IN | 0 ETH | 0.00461058 | ||||
Mint Tokens | 17617039 | 503 days ago | IN | 0 ETH | 0.00438701 | ||||
Mint Tokens | 17617014 | 503 days ago | IN | 0 ETH | 0.00167579 | ||||
Mint Tokens | 17617014 | 503 days ago | IN | 0 ETH | 0.00462099 | ||||
Mint Tokens | 17616948 | 503 days ago | IN | 0 ETH | 0.00260476 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
RainiTokenMinter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/structs/BitMaps.sol"; interface IStakingPool { function balanceOf(address _owner) external view returns (uint256 balance); function mint(address[] calldata _addresses, uint256[] calldata _points) external; function burn(address _owner, uint256 _amount) external; } interface IMintableToken { function mint( address _to, uint256 _id, uint256 _amount ) external; } interface IRainiNft1155 { function mint( address _to, uint256 _cardId, uint256 _cardLevel, uint256 _amount, bytes1 _mintedContractChar, uint256 _number, uint256[] memory _data ) external; } contract RainiTokenMinter is AccessControl { using ECDSA for bytes32; using BitMaps for BitMaps.BitMap; address public verifier; struct ContractInfo { address contractAddress; bool isLegacy; } mapping(uint256 => ContractInfo) public tokenContracts; BitMaps.BitMap private sigUsed; event TokensMinted(uint256 transactionId); constructor( address _verifier ) { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); verifier = _verifier; } modifier onlyOwner() { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender())); _; } function setVerifier(address _verifier) public onlyOwner { verifier = _verifier; } function addTokenContract(uint256 _contractId, address _contractAddress, bool _isLegacy) public onlyOwner { tokenContracts[_contractId] = ContractInfo(_contractAddress, _isLegacy); } function removeTokenContract(uint256 _contractId) public onlyOwner { delete tokenContracts[_contractId]; } function checkSignature(bytes memory message, bytes memory sig) public view returns (bool _success) { bytes32 _hash = keccak256(abi.encode("RainiNftMinter|", block.chainid, message)); address signer = ECDSA.recover(_hash.toEthSignedMessageHash(), sig); return signer == verifier; } function _mint( address _to, uint256 _contractId, uint256 _tokenId, uint256 _amount ) internal { ContractInfo memory _contractInfo = tokenContracts[_contractId]; if (_contractInfo.isLegacy) { IRainiNft1155(_contractInfo.contractAddress).mint(_to, _tokenId, 0, _amount, "", 0, new uint256[](0)); } else { IMintableToken(_contractInfo.contractAddress).mint(_to, _tokenId, _amount); } } function mintTokens( bytes memory sig, uint256 transactionId, uint256[] memory _contractId, uint256[] memory _tokenId, uint256[] memory _amount) public { require (!sigUsed.get(transactionId), "items claimed"); sigUsed.set(transactionId); bytes memory _hashString = abi.encode(transactionId, _msgSender(), "|mintTokens|"); for (uint256 i = 0; i < _contractId.length; i++) { _hashString = abi.encode( _hashString, _contractId[i], _tokenId[i], _amount[i] ); } require(checkSignature(_hashString, sig), "Invalid sig"); for (uint256 i = 0; i < _contractId.length; i++) { _mint(_msgSender(), _contractId[i], _tokenId[i], _amount[i]); } emit TokensMinted(transactionId); } function bulkMintTokens( bytes[] memory sig, uint256[] memory transactionId, uint256[][] memory _contractId, uint256[][] memory _tokenId, uint256[][] memory _amount ) external { for (uint256 i = 0; i < sig.length; i++) { mintTokens(sig[i], transactionId[i], _contractId[i], _tokenId[i], _amount[i]); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/BitMaps.sol) pragma solidity ^0.8.0; /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largely inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] &= ~mask; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @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 ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } 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"); } } /** * @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) { 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. /// @solidity memory-safe-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 { 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 = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 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 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 Message, created from `s`. 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(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_verifier","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"transactionId","type":"uint256"}],"name":"TokensMinted","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_contractId","type":"uint256"},{"internalType":"address","name":"_contractAddress","type":"address"},{"internalType":"bool","name":"_isLegacy","type":"bool"}],"name":"addTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"sig","type":"bytes[]"},{"internalType":"uint256[]","name":"transactionId","type":"uint256[]"},{"internalType":"uint256[][]","name":"_contractId","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_tokenId","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_amount","type":"uint256[][]"}],"name":"bulkMintTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"message","type":"bytes"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"checkSignature","outputs":[{"internalType":"bool","name":"_success","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"uint256","name":"transactionId","type":"uint256"},{"internalType":"uint256[]","name":"_contractId","type":"uint256[]"},{"internalType":"uint256[]","name":"_tokenId","type":"uint256[]"},{"internalType":"uint256[]","name":"_amount","type":"uint256[]"}],"name":"mintTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_contractId","type":"uint256"}],"name":"removeTokenContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_verifier","type":"address"}],"name":"setVerifier","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenContracts","outputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"bool","name":"isLegacy","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"verifier","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200180938038062001809833981016040819052620000349162000117565b6200004160003362000067565b600180546001600160a01b0319166001600160a01b039290921691909117905562000149565b62000073828262000077565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000073576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620000d33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000602082840312156200012a57600080fd5b81516001600160a01b03811681146200014257600080fd5b9392505050565b6116b080620001596000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806336568abe1161009757806391d148541161006657806391d148541461025957806395a8cf831461026c578063a217fddf1461027f578063d547741f1461028757600080fd5b806336568abe1461020d5780635437988d146102205780637f2b21f9146102335780638f6491e41461024657600080fd5b80631d9fb309116100d35780631d9fb3091461014a578063248a9ca31461019e5780632b7ac3f3146101cf5780632f2ff15d146101fa57600080fd5b8063015a95d9146100fa57806301ffc9a71461010f57806316cadd3714610137575b600080fd5b61010d61010836600461114b565b61029a565b005b61012261011d36600461121d565b61034a565b60405190151581526020015b60405180910390f35b610122610145366004611247565b610381565b61017f6101583660046112ab565b6002602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b03909316835290151560208301520161012e565b6101c16101ac3660046112ab565b60009081526020819052604090206001015490565b60405190815260200161012e565b6001546101e2906001600160a01b031681565b6040516001600160a01b03909116815260200161012e565b61010d6102083660046112e0565b61042b565b61010d61021b3660046112e0565b610455565b61010d61022e36600461130c565b6104d8565b61010d610241366004611327565b61050e565b61010d61025436600461136c565b610576565b6101226102673660046112e0565b6107be565b61010d61027a3660046112ab565b6107e7565b6101c1600081565b61010d6102953660046112e0565b610819565b60005b8551811015610342576103308682815181106102bb576102bb611416565b60200260200101518683815181106102d5576102d5611416565b60200260200101518684815181106102ef576102ef611416565b602002602001015186858151811061030957610309611416565b602002602001015186868151811061032357610323611416565b6020026020010151610576565b8061033a81611442565b91505061029d565b505050505050565b60006001600160e01b03198216637965db0b60e01b148061037b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008046846040516020016103979291906114ab565b604051602081830303815290604052805190602001209050600061041161040b836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b8561083e565b6001546001600160a01b0390811691161495945050505050565b60008281526020819052604090206001015461044681610862565b610450838361086f565b505050565b6001600160a01b03811633146104ca5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104d482826108f3565b5050565b6104e36000336107be565b6104ec57600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6105196000336107be565b61052257600080fd5b6040805180820182526001600160a01b039384168152911515602080840191825260009586526002905293209051815493511515600160a01b026001600160a81b0319909416921691909117919091179055565b600884901c600090815260036020526040902054600160ff86161b16156105cf5760405162461bcd60e51b815260206004820152600d60248201526c1a5d195b5cc818db185a5b5959609a1b60448201526064016104c1565b600884901c60009081526003602052604090208054600160ff87161b17905560408051602081018690523381830152606080820152600c60808201526b1f1b5a5b9d151bdad95b9cdf60a21b60a0808301919091528251808303909101815260c090910190915260005b84518110156106c8578185828151811061065557610655611416565b602002602001015185838151811061066f5761066f611416565b602002602001015185848151811061068957610689611416565b60200260200101516040516020016106a494939291906114f2565b604051602081830303815290604052915080806106c090611442565b915050610639565b506106d38187610381565b61070d5760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b60448201526064016104c1565b60005b8451811015610782576107703386838151811061072f5761072f611416565b602002602001015186848151811061074957610749611416565b602002602001015186858151811061076357610763611416565b6020026020010151610958565b8061077a81611442565b915050610710565b506040518581527f772f66a00a405709c30e7f18feadcc8f123b20c09c7260165d3eec36c9f213729060200160405180910390a1505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6107f26000336107be565b6107fb57600080fd5b600090815260026020526040902080546001600160a81b0319169055565b60008281526020819052604090206001015461083481610862565b61045083836108f3565b600080600061084d8585610aa4565b9150915061085a81610ae9565b509392505050565b61086c8133610c33565b50565b61087982826107be565b6104d4576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556108af3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6108fd82826107be565b156104d4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000838152600260209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615801591830191909152610a305780516001600160a01b031663a39501df868560008681806040519080825280602002602001820160405280156109d7578160200160208202803683370190505b506040518763ffffffff1660e01b81526004016109f996959493929190611521565b600060405180830381600087803b158015610a1357600080fd5b505af1158015610a27573d6000803e3d6000fd5b50505050610a9d565b8051604051630ab714fb60e11b81526001600160a01b03878116600483015260248201869052604482018590529091169063156e29f690606401600060405180830381600087803b158015610a8457600080fd5b505af1158015610a98573d6000803e3d6000fd5b505050505b5050505050565b6000808251604103610ada5760208301516040840151606085015160001a610ace87828585610c8c565b94509450505050610ae2565b506000905060025b9250929050565b6000816004811115610afd57610afd61159b565b03610b055750565b6001816004811115610b1957610b1961159b565b03610b665760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c1565b6002816004811115610b7a57610b7a61159b565b03610bc75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c1565b6003816004811115610bdb57610bdb61159b565b0361086c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104c1565b610c3d82826107be565b6104d457610c4a81610d50565b610c55836020610d62565b604051602001610c669291906115b1565b60408051601f198184030181529082905262461bcd60e51b82526104c191600401611626565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610cc35750600090506003610d47565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610d17573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d4057600060019250925050610d47565b9150600090505b94509492505050565b606061037b6001600160a01b03831660145b60606000610d71836002611639565b610d7c906002611650565b67ffffffffffffffff811115610d9457610d94610f05565b6040519080825280601f01601f191660200182016040528015610dbe576020820181803683370190505b509050600360fc1b81600081518110610dd957610dd9611416565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610e0857610e08611416565b60200101906001600160f81b031916908160001a9053506000610e2c846002611639565b610e37906001611650565b90505b6001811115610eaf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610e6b57610e6b611416565b1a60f81b828281518110610e8157610e81611416565b60200101906001600160f81b031916908160001a90535060049490941c93610ea881611663565b9050610e3a565b508315610efe5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104c1565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f4457610f44610f05565b604052919050565b600067ffffffffffffffff821115610f6657610f66610f05565b5060051b60200190565b600082601f830112610f8157600080fd5b813567ffffffffffffffff811115610f9b57610f9b610f05565b610fae601f8201601f1916602001610f1b565b818152846020838601011115610fc357600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112610ff157600080fd5b8135602061100661100183610f4c565b610f1b565b82815260059290921b8401810191818101908684111561102557600080fd5b8286015b8481101561106557803567ffffffffffffffff8111156110495760008081fd5b6110578986838b0101610f70565b845250918301918301611029565b509695505050505050565b600082601f83011261108157600080fd5b8135602061109161100183610f4c565b82815260059290921b840181019181810190868411156110b057600080fd5b8286015b8481101561106557803583529183019183016110b4565b600082601f8301126110dc57600080fd5b813560206110ec61100183610f4c565b82815260059290921b8401810191818101908684111561110b57600080fd5b8286015b8481101561106557803567ffffffffffffffff81111561112f5760008081fd5b61113d8986838b0101611070565b84525091830191830161110f565b600080600080600060a0868803121561116357600080fd5b853567ffffffffffffffff8082111561117b57600080fd5b61118789838a01610fe0565b9650602088013591508082111561119d57600080fd5b6111a989838a01611070565b955060408801359150808211156111bf57600080fd5b6111cb89838a016110cb565b945060608801359150808211156111e157600080fd5b6111ed89838a016110cb565b9350608088013591508082111561120357600080fd5b50611210888289016110cb565b9150509295509295909350565b60006020828403121561122f57600080fd5b81356001600160e01b031981168114610efe57600080fd5b6000806040838503121561125a57600080fd5b823567ffffffffffffffff8082111561127257600080fd5b61127e86838701610f70565b9350602085013591508082111561129457600080fd5b506112a185828601610f70565b9150509250929050565b6000602082840312156112bd57600080fd5b5035919050565b80356001600160a01b03811681146112db57600080fd5b919050565b600080604083850312156112f357600080fd5b82359150611303602084016112c4565b90509250929050565b60006020828403121561131e57600080fd5b610efe826112c4565b60008060006060848603121561133c57600080fd5b8335925061134c602085016112c4565b91506040840135801515811461136157600080fd5b809150509250925092565b600080600080600060a0868803121561138457600080fd5b853567ffffffffffffffff8082111561139c57600080fd5b6113a889838a01610f70565b96506020880135955060408801359150808211156113c557600080fd5b6113d189838a01611070565b945060608801359150808211156113e757600080fd5b6113f389838a01611070565b9350608088013591508082111561140957600080fd5b5061121088828901611070565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114545761145461142c565b5060010190565b60005b8381101561147657818101518382015260200161145e565b50506000910152565b6000815180845261149781602086016020860161145b565b601f01601f19169290920160200192915050565b60608152600f60608201526e14985a5b9a53999d135a5b9d195c9f608a1b608082015282602082015260a0604082015260006114ea60a083018461147f565b949350505050565b608081526000611505608083018761147f565b6020830195909552506040810192909252606090910152919050565b600060e0820160018060a01b038916835260208881850152876040850152866060850152600060808501528560a085015260e060c085015281855180845261010086019150828701935060005b8181101561158a5784518352938301939183019160010161156e565b50909b9a5050505050505050505050565b634e487b7160e01b600052602160045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516115e981601785016020880161145b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161161a81602884016020880161145b565b01602801949350505050565b602081526000610efe602083018461147f565b808202811582820484141761037b5761037b61142c565b8082018082111561037b5761037b61142c565b6000816116725761167261142c565b50600019019056fea2646970667358221220ec6c49c26a1415f95b9d50e3052aa3606c50223a9e7d2273b7909ab1da6d602164736f6c63430008110033000000000000000000000000535bd10bb584aa630866aaad839446460669dce3
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806336568abe1161009757806391d148541161006657806391d148541461025957806395a8cf831461026c578063a217fddf1461027f578063d547741f1461028757600080fd5b806336568abe1461020d5780635437988d146102205780637f2b21f9146102335780638f6491e41461024657600080fd5b80631d9fb309116100d35780631d9fb3091461014a578063248a9ca31461019e5780632b7ac3f3146101cf5780632f2ff15d146101fa57600080fd5b8063015a95d9146100fa57806301ffc9a71461010f57806316cadd3714610137575b600080fd5b61010d61010836600461114b565b61029a565b005b61012261011d36600461121d565b61034a565b60405190151581526020015b60405180910390f35b610122610145366004611247565b610381565b61017f6101583660046112ab565b6002602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b03909316835290151560208301520161012e565b6101c16101ac3660046112ab565b60009081526020819052604090206001015490565b60405190815260200161012e565b6001546101e2906001600160a01b031681565b6040516001600160a01b03909116815260200161012e565b61010d6102083660046112e0565b61042b565b61010d61021b3660046112e0565b610455565b61010d61022e36600461130c565b6104d8565b61010d610241366004611327565b61050e565b61010d61025436600461136c565b610576565b6101226102673660046112e0565b6107be565b61010d61027a3660046112ab565b6107e7565b6101c1600081565b61010d6102953660046112e0565b610819565b60005b8551811015610342576103308682815181106102bb576102bb611416565b60200260200101518683815181106102d5576102d5611416565b60200260200101518684815181106102ef576102ef611416565b602002602001015186858151811061030957610309611416565b602002602001015186868151811061032357610323611416565b6020026020010151610576565b8061033a81611442565b91505061029d565b505050505050565b60006001600160e01b03198216637965db0b60e01b148061037b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60008046846040516020016103979291906114ab565b604051602081830303815290604052805190602001209050600061041161040b836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b8561083e565b6001546001600160a01b0390811691161495945050505050565b60008281526020819052604090206001015461044681610862565b610450838361086f565b505050565b6001600160a01b03811633146104ca5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104d482826108f3565b5050565b6104e36000336107be565b6104ec57600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6105196000336107be565b61052257600080fd5b6040805180820182526001600160a01b039384168152911515602080840191825260009586526002905293209051815493511515600160a01b026001600160a81b0319909416921691909117919091179055565b600884901c600090815260036020526040902054600160ff86161b16156105cf5760405162461bcd60e51b815260206004820152600d60248201526c1a5d195b5cc818db185a5b5959609a1b60448201526064016104c1565b600884901c60009081526003602052604090208054600160ff87161b17905560408051602081018690523381830152606080820152600c60808201526b1f1b5a5b9d151bdad95b9cdf60a21b60a0808301919091528251808303909101815260c090910190915260005b84518110156106c8578185828151811061065557610655611416565b602002602001015185838151811061066f5761066f611416565b602002602001015185848151811061068957610689611416565b60200260200101516040516020016106a494939291906114f2565b604051602081830303815290604052915080806106c090611442565b915050610639565b506106d38187610381565b61070d5760405162461bcd60e51b815260206004820152600b60248201526a496e76616c69642073696760a81b60448201526064016104c1565b60005b8451811015610782576107703386838151811061072f5761072f611416565b602002602001015186848151811061074957610749611416565b602002602001015186858151811061076357610763611416565b6020026020010151610958565b8061077a81611442565b915050610710565b506040518581527f772f66a00a405709c30e7f18feadcc8f123b20c09c7260165d3eec36c9f213729060200160405180910390a1505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6107f26000336107be565b6107fb57600080fd5b600090815260026020526040902080546001600160a81b0319169055565b60008281526020819052604090206001015461083481610862565b61045083836108f3565b600080600061084d8585610aa4565b9150915061085a81610ae9565b509392505050565b61086c8133610c33565b50565b61087982826107be565b6104d4576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556108af3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6108fd82826107be565b156104d4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000838152600260209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615801591830191909152610a305780516001600160a01b031663a39501df868560008681806040519080825280602002602001820160405280156109d7578160200160208202803683370190505b506040518763ffffffff1660e01b81526004016109f996959493929190611521565b600060405180830381600087803b158015610a1357600080fd5b505af1158015610a27573d6000803e3d6000fd5b50505050610a9d565b8051604051630ab714fb60e11b81526001600160a01b03878116600483015260248201869052604482018590529091169063156e29f690606401600060405180830381600087803b158015610a8457600080fd5b505af1158015610a98573d6000803e3d6000fd5b505050505b5050505050565b6000808251604103610ada5760208301516040840151606085015160001a610ace87828585610c8c565b94509450505050610ae2565b506000905060025b9250929050565b6000816004811115610afd57610afd61159b565b03610b055750565b6001816004811115610b1957610b1961159b565b03610b665760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104c1565b6002816004811115610b7a57610b7a61159b565b03610bc75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104c1565b6003816004811115610bdb57610bdb61159b565b0361086c5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104c1565b610c3d82826107be565b6104d457610c4a81610d50565b610c55836020610d62565b604051602001610c669291906115b1565b60408051601f198184030181529082905262461bcd60e51b82526104c191600401611626565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610cc35750600090506003610d47565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610d17573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d4057600060019250925050610d47565b9150600090505b94509492505050565b606061037b6001600160a01b03831660145b60606000610d71836002611639565b610d7c906002611650565b67ffffffffffffffff811115610d9457610d94610f05565b6040519080825280601f01601f191660200182016040528015610dbe576020820181803683370190505b509050600360fc1b81600081518110610dd957610dd9611416565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110610e0857610e08611416565b60200101906001600160f81b031916908160001a9053506000610e2c846002611639565b610e37906001611650565b90505b6001811115610eaf576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110610e6b57610e6b611416565b1a60f81b828281518110610e8157610e81611416565b60200101906001600160f81b031916908160001a90535060049490941c93610ea881611663565b9050610e3a565b508315610efe5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016104c1565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715610f4457610f44610f05565b604052919050565b600067ffffffffffffffff821115610f6657610f66610f05565b5060051b60200190565b600082601f830112610f8157600080fd5b813567ffffffffffffffff811115610f9b57610f9b610f05565b610fae601f8201601f1916602001610f1b565b818152846020838601011115610fc357600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112610ff157600080fd5b8135602061100661100183610f4c565b610f1b565b82815260059290921b8401810191818101908684111561102557600080fd5b8286015b8481101561106557803567ffffffffffffffff8111156110495760008081fd5b6110578986838b0101610f70565b845250918301918301611029565b509695505050505050565b600082601f83011261108157600080fd5b8135602061109161100183610f4c565b82815260059290921b840181019181810190868411156110b057600080fd5b8286015b8481101561106557803583529183019183016110b4565b600082601f8301126110dc57600080fd5b813560206110ec61100183610f4c565b82815260059290921b8401810191818101908684111561110b57600080fd5b8286015b8481101561106557803567ffffffffffffffff81111561112f5760008081fd5b61113d8986838b0101611070565b84525091830191830161110f565b600080600080600060a0868803121561116357600080fd5b853567ffffffffffffffff8082111561117b57600080fd5b61118789838a01610fe0565b9650602088013591508082111561119d57600080fd5b6111a989838a01611070565b955060408801359150808211156111bf57600080fd5b6111cb89838a016110cb565b945060608801359150808211156111e157600080fd5b6111ed89838a016110cb565b9350608088013591508082111561120357600080fd5b50611210888289016110cb565b9150509295509295909350565b60006020828403121561122f57600080fd5b81356001600160e01b031981168114610efe57600080fd5b6000806040838503121561125a57600080fd5b823567ffffffffffffffff8082111561127257600080fd5b61127e86838701610f70565b9350602085013591508082111561129457600080fd5b506112a185828601610f70565b9150509250929050565b6000602082840312156112bd57600080fd5b5035919050565b80356001600160a01b03811681146112db57600080fd5b919050565b600080604083850312156112f357600080fd5b82359150611303602084016112c4565b90509250929050565b60006020828403121561131e57600080fd5b610efe826112c4565b60008060006060848603121561133c57600080fd5b8335925061134c602085016112c4565b91506040840135801515811461136157600080fd5b809150509250925092565b600080600080600060a0868803121561138457600080fd5b853567ffffffffffffffff8082111561139c57600080fd5b6113a889838a01610f70565b96506020880135955060408801359150808211156113c557600080fd5b6113d189838a01611070565b945060608801359150808211156113e757600080fd5b6113f389838a01611070565b9350608088013591508082111561140957600080fd5b5061121088828901611070565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016114545761145461142c565b5060010190565b60005b8381101561147657818101518382015260200161145e565b50506000910152565b6000815180845261149781602086016020860161145b565b601f01601f19169290920160200192915050565b60608152600f60608201526e14985a5b9a53999d135a5b9d195c9f608a1b608082015282602082015260a0604082015260006114ea60a083018461147f565b949350505050565b608081526000611505608083018761147f565b6020830195909552506040810192909252606090910152919050565b600060e0820160018060a01b038916835260208881850152876040850152866060850152600060808501528560a085015260e060c085015281855180845261010086019150828701935060005b8181101561158a5784518352938301939183019160010161156e565b50909b9a5050505050505050505050565b634e487b7160e01b600052602160045260246000fd5b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516115e981601785016020880161145b565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161161a81602884016020880161145b565b01602801949350505050565b602081526000610efe602083018461147f565b808202811582820484141761037b5761037b61142c565b8082018082111561037b5761037b61142c565b6000816116725761167261142c565b50600019019056fea2646970667358221220ec6c49c26a1415f95b9d50e3052aa3606c50223a9e7d2273b7909ab1da6d602164736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000535bd10bb584aa630866aaad839446460669dce3
-----Decoded View---------------
Arg [0] : _verifier (address): 0x535BD10Bb584aa630866aAAD839446460669DcE3
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000535bd10bb584aa630866aaad839446460669dce3
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.