Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 887 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 17061302 | 509 days ago | IN | 0 ETH | 0.00175545 | ||||
Mint | 17061298 | 509 days ago | IN | 0 ETH | 0.00196789 | ||||
Mint | 17050748 | 511 days ago | IN | 0 ETH | 0.00146582 | ||||
Mint | 17050745 | 511 days ago | IN | 0 ETH | 0.00163713 | ||||
Mint | 17046638 | 511 days ago | IN | 0 ETH | 0.00222906 | ||||
Mint | 17019114 | 515 days ago | IN | 0 ETH | 0.00289507 | ||||
Mint | 17004964 | 517 days ago | IN | 0 ETH | 0.00127948 | ||||
Mint | 17004903 | 517 days ago | IN | 0 ETH | 0.00146108 | ||||
Mint | 17000684 | 518 days ago | IN | 0 ETH | 0.00153028 | ||||
Mint | 17000681 | 518 days ago | IN | 0 ETH | 0.00159389 | ||||
Mint | 17000678 | 518 days ago | IN | 0 ETH | 0.00174589 | ||||
Mint | 16974536 | 522 days ago | IN | 0 ETH | 0.00135087 | ||||
Mint | 16974534 | 522 days ago | IN | 0 ETH | 0.00142933 | ||||
Mint | 16963950 | 523 days ago | IN | 0 ETH | 0.00164858 | ||||
Mint | 16963947 | 523 days ago | IN | 0 ETH | 0.00180104 | ||||
Mint | 16907719 | 531 days ago | IN | 0 ETH | 0.00104807 | ||||
Mint | 16907713 | 531 days ago | IN | 0 ETH | 0.00092219 | ||||
Mint | 16907686 | 531 days ago | IN | 0 ETH | 0.00100432 | ||||
Mint | 16907330 | 531 days ago | IN | 0 ETH | 0.00106806 | ||||
Mint | 16907323 | 531 days ago | IN | 0 ETH | 0.00117763 | ||||
Mint | 16907317 | 531 days ago | IN | 0 ETH | 0.00098269 | ||||
Mint | 16907290 | 531 days ago | IN | 0 ETH | 0.0011069 | ||||
Mint | 16907253 | 531 days ago | IN | 0 ETH | 0.00092388 | ||||
Mint | 16907243 | 531 days ago | IN | 0 ETH | 0.00102262 | ||||
Mint | 16899452 | 532 days ago | IN | 0 ETH | 0.0015905 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SignatureMinter
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol'; import '@openzeppelin/contracts/utils/structs/BitMaps.sol'; import './IMintable.sol'; contract SignatureMinter is Ownable { using BitMaps for BitMaps.BitMap; IMintable _token; address _signerAddress; BitMaps.BitMap _usedNonces; constructor(address tokenAddress) { _token = IMintable(tokenAddress); } function nonceUsed(uint256 nonce) external view returns (bool) { return _usedNonces.get(nonce); } function mint( address to, uint256 tokenId, uint256 amount, uint256 nonce, bytes calldata signature ) external { require(!_usedNonces.get(nonce), 'Nonce already used'); require( _validateSignature( to, _asSingletonArray(tokenId), _asSingletonArray(amount), nonce, signature ), 'Invalid signature' ); _usedNonces.set(nonce); _token.mint(to, tokenId, amount); } function mintBatch( address to, uint256[] memory tokenIds, uint256[] memory amounts, uint256 nonce, bytes calldata signature ) external { require(!_usedNonces.get(nonce), 'Nonce already used'); require(_validateSignature(to, tokenIds, amounts, nonce, signature), 'Invalid signature'); _usedNonces.set(nonce); _token.mintBatch(to, tokenIds, amounts); } function adminMint( address to, uint256 tokenId, uint256 amount ) external onlyOwner { _token.mint(to, tokenId, amount); } function adminMint( address to, uint256[] memory tokenIds, uint256[] memory amounts ) external onlyOwner { _token.mintBatch(to, tokenIds, amounts); } function setTokenAddress(address tokenAddress) external onlyOwner { _token = IMintable(tokenAddress); } function setSignerAddress(address signerAddress) external onlyOwner { _signerAddress = signerAddress; } function _validateSignature( address to, uint256[] memory tokenIds, uint256[] memory amounts, uint256 nonce, bytes calldata signature ) internal view virtual returns (bool) { bytes32 tokenHash = keccak256(abi.encodePacked(tokenIds)); bytes32 amountHash = keccak256(abi.encodePacked(amounts)); bytes32 dataHash = keccak256(abi.encodePacked(tokenHash, amountHash, nonce, to)); bytes32 message = ECDSA.toEthSignedMessageHash(dataHash); return SignatureChecker.isValidSignatureNow(_signerAddress, message, signature); } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IMintable { function mint( address to, uint256 tokenId, uint256 amount ) external; function mintBatch( address to, uint256[] memory tokenIds, uint256[] memory amounts ) external; }
// 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/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../Address.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && recovered == signer) { return true; } (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length == 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } }
// 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.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (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 (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); } } }
{ "optimizer": { "enabled": true, "runs": 800 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"nonceUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signerAddress","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161103e38038061103e83398101604081905261002f916100ad565b6100383361005d565b600180546001600160a01b0319166001600160a01b03929092169190911790556100dd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156100bf57600080fd5b81516001600160a01b03811681146100d657600080fd5b9392505050565b610f52806100ec6000396000f3fe608060405234801561001057600080fd5b50600436106100bd5760003560e01c80638da5cb5b11610076578063b49c99b81161005b578063b49c99b81461017a578063f2fde38b1461018d578063fbf9ffa2146101a057600080fd5b80638da5cb5b1461011857806394d0d3a61461013857600080fd5b806326a4e8d2116100a757806326a4e8d2146100ea578063715018a6146100fd578063812015b91461010557600080fd5b80624a84cb146100c2578063046dc166146100d7575b600080fd5b6100d56100d0366004610ad8565b6101b3565b005b6100d56100e5366004610b0b565b61022e565b6100d56100f8366004610b0b565b610265565b6100d561029c565b6100d5610113366004610bd7565b6102b0565b6000546040516001600160a01b0390911681526020015b60405180910390f35b61016a610146366004610c4b565b600881901c600090815260036020526040812054600160ff84161b16151592915050565b604051901515815260200161012f565b6100d5610188366004610ca6565b6102ec565b6100d561019b366004610b0b565b610459565b6100d56101ae366004610d17565b6104e9565b6101bb6105ff565b600154604051630ab714fb60e11b81526001600160a01b03858116600483015260248201859052604482018490529091169063156e29f6906064015b600060405180830381600087803b15801561021157600080fd5b505af1158015610225573d6000803e3d6000fd5b50505050505050565b6102366105ff565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b61026d6105ff565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6102a46105ff565b6102ae6000610659565b565b6102b86105ff565b60015460405163d81d0a1560e01b81526001600160a01b039091169063d81d0a15906101f790869086908690600401610de9565b600883901c600090815260036020526040902054600160ff85161b161561035a5760405162461bcd60e51b815260206004820152601260248201527f4e6f6e636520616c72656164792075736564000000000000000000000000000060448201526064015b60405180910390fd5b61037886610367876106b6565b610370876106b6565b868686610701565b6103c45760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610351565b600883901c60009081526003602052604090208054600160ff86161b179055600154604051630ab714fb60e11b81526001600160a01b03888116600483015260248201889052604482018790529091169063156e29f6906064015b600060405180830381600087803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b50505050505050505050565b6104616105ff565b6001600160a01b0381166104dd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610351565b6104e681610659565b50565b600883901c600090815260036020526040902054600160ff85161b16156105525760405162461bcd60e51b815260206004820152601260248201527f4e6f6e636520616c7265616479207573656400000000000000000000000000006044820152606401610351565b610560868686868686610701565b6105ac5760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610351565b600883901c60009081526003602052604090208054600160ff86161b17905560015460405163d81d0a1560e01b81526001600160a01b039091169063d81d0a159061041f90899089908990600401610de9565b6000546001600160a01b031633146102ae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610351565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106106f0576106f0610e27565b602090810291909101015292915050565b600080866040516020016107159190610e3d565b6040516020818303038152906040528051906020012090506000866040516020016107409190610e3d565b60408051808303601f19018152828252805160209182012081840186905283830181905260608085018b90528d901b6bffffffffffffffffffffffff19166080850152825180850360740181526094850184528051908301207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060b486015260d08086018290528451808703909101815260f08601808652815191850191909120600254601f8c0186900490950287016101109081019096528a825292965090949193610833936001600160a01b0316928592918c918c9182910183828082843760009201919091525061084292505050565b9b9a5050505050505050505050565b600080600061085185856109b3565b9092509050600081600481111561086a5761086a610e73565b1480156108885750856001600160a01b0316826001600160a01b0316145b15610898576001925050506109ac565b600080876001600160a01b0316631626ba7e60e01b88886040516024016108c0929190610ead565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161092b9190610ee7565b600060405180830381855afa9150503d8060008114610966576040519150601f19603f3d011682016040523d82523d6000602084013e61096b565b606091505b509150915081801561097e575080516020145b80156109a557508051630b135d3f60e11b906109a39083016020908101908401610f03565b145b9450505050505b9392505050565b60008082516041036109e95760208301516040840151606085015160001a6109dd878285856109f8565b945094505050506109f1565b506000905060025b9250929050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610a2f5750600090506003610ab3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610a83573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610aac57600060019250925050610ab3565b9150600090505b94509492505050565b80356001600160a01b0381168114610ad357600080fd5b919050565b600080600060608486031215610aed57600080fd5b610af684610abc565b95602085013595506040909401359392505050565b600060208284031215610b1d57600080fd5b6109ac82610abc565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610b4d57600080fd5b8135602067ffffffffffffffff80831115610b6a57610b6a610b26565b8260051b604051601f19603f83011681018181108482111715610b8f57610b8f610b26565b604052938452858101830193838101925087851115610bad57600080fd5b83870191505b84821015610bcc57813583529183019190830190610bb3565b979650505050505050565b600080600060608486031215610bec57600080fd5b610bf584610abc565b9250602084013567ffffffffffffffff80821115610c1257600080fd5b610c1e87838801610b3c565b93506040860135915080821115610c3457600080fd5b50610c4186828701610b3c565b9150509250925092565b600060208284031215610c5d57600080fd5b5035919050565b60008083601f840112610c7657600080fd5b50813567ffffffffffffffff811115610c8e57600080fd5b6020830191508360208285010111156109f157600080fd5b60008060008060008060a08789031215610cbf57600080fd5b610cc887610abc565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115610cf957600080fd5b610d0589828a01610c64565b979a9699509497509295939492505050565b60008060008060008060a08789031215610d3057600080fd5b610d3987610abc565b9550602087013567ffffffffffffffff80821115610d5657600080fd5b610d628a838b01610b3c565b96506040890135915080821115610d7857600080fd5b610d848a838b01610b3c565b9550606089013594506080890135915080821115610da157600080fd5b50610d0589828a01610c64565b600081518084526020808501945080840160005b83811015610dde57815187529582019590820190600101610dc2565b509495945050505050565b6001600160a01b0384168152606060208201526000610e0b6060830185610dae565b8281036040840152610e1d8185610dae565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b815160009082906020808601845b83811015610e6757815185529382019390820190600101610e4b565b50929695505050505050565b634e487b7160e01b600052602160045260246000fd5b60005b83811015610ea4578181015183820152602001610e8c565b50506000910152565b8281526040602082015260008251806040840152610ed2816060850160208701610e89565b601f01601f1916919091016060019392505050565b60008251610ef9818460208701610e89565b9190910192915050565b600060208284031215610f1557600080fd5b505191905056fea26469706673582212208368bf3658816d5395b848818608c7e291d3c8aa615872ecfd85ea2a10986bcf64736f6c634300081100330000000000000000000000008afd8df358a6dd1200f2856963aab53baac65018
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100bd5760003560e01c80638da5cb5b11610076578063b49c99b81161005b578063b49c99b81461017a578063f2fde38b1461018d578063fbf9ffa2146101a057600080fd5b80638da5cb5b1461011857806394d0d3a61461013857600080fd5b806326a4e8d2116100a757806326a4e8d2146100ea578063715018a6146100fd578063812015b91461010557600080fd5b80624a84cb146100c2578063046dc166146100d7575b600080fd5b6100d56100d0366004610ad8565b6101b3565b005b6100d56100e5366004610b0b565b61022e565b6100d56100f8366004610b0b565b610265565b6100d561029c565b6100d5610113366004610bd7565b6102b0565b6000546040516001600160a01b0390911681526020015b60405180910390f35b61016a610146366004610c4b565b600881901c600090815260036020526040812054600160ff84161b16151592915050565b604051901515815260200161012f565b6100d5610188366004610ca6565b6102ec565b6100d561019b366004610b0b565b610459565b6100d56101ae366004610d17565b6104e9565b6101bb6105ff565b600154604051630ab714fb60e11b81526001600160a01b03858116600483015260248201859052604482018490529091169063156e29f6906064015b600060405180830381600087803b15801561021157600080fd5b505af1158015610225573d6000803e3d6000fd5b50505050505050565b6102366105ff565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b61026d6105ff565b6001805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6102a46105ff565b6102ae6000610659565b565b6102b86105ff565b60015460405163d81d0a1560e01b81526001600160a01b039091169063d81d0a15906101f790869086908690600401610de9565b600883901c600090815260036020526040902054600160ff85161b161561035a5760405162461bcd60e51b815260206004820152601260248201527f4e6f6e636520616c72656164792075736564000000000000000000000000000060448201526064015b60405180910390fd5b61037886610367876106b6565b610370876106b6565b868686610701565b6103c45760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610351565b600883901c60009081526003602052604090208054600160ff86161b179055600154604051630ab714fb60e11b81526001600160a01b03888116600483015260248201889052604482018790529091169063156e29f6906064015b600060405180830381600087803b15801561043957600080fd5b505af115801561044d573d6000803e3d6000fd5b50505050505050505050565b6104616105ff565b6001600160a01b0381166104dd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610351565b6104e681610659565b50565b600883901c600090815260036020526040902054600160ff85161b16156105525760405162461bcd60e51b815260206004820152601260248201527f4e6f6e636520616c7265616479207573656400000000000000000000000000006044820152606401610351565b610560868686868686610701565b6105ac5760405162461bcd60e51b815260206004820152601160248201527f496e76616c6964207369676e61747572650000000000000000000000000000006044820152606401610351565b600883901c60009081526003602052604090208054600160ff86161b17905560015460405163d81d0a1560e01b81526001600160a01b039091169063d81d0a159061041f90899089908990600401610de9565b6000546001600160a01b031633146102ae5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610351565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001808252818301909252606091600091906020808301908036833701905050905082816000815181106106f0576106f0610e27565b602090810291909101015292915050565b600080866040516020016107159190610e3d565b6040516020818303038152906040528051906020012090506000866040516020016107409190610e3d565b60408051808303601f19018152828252805160209182012081840186905283830181905260608085018b90528d901b6bffffffffffffffffffffffff19166080850152825180850360740181526094850184528051908301207f19457468657265756d205369676e6564204d6573736167653a0a33320000000060b486015260d08086018290528451808703909101815260f08601808652815191850191909120600254601f8c0186900490950287016101109081019096528a825292965090949193610833936001600160a01b0316928592918c918c9182910183828082843760009201919091525061084292505050565b9b9a5050505050505050505050565b600080600061085185856109b3565b9092509050600081600481111561086a5761086a610e73565b1480156108885750856001600160a01b0316826001600160a01b0316145b15610898576001925050506109ac565b600080876001600160a01b0316631626ba7e60e01b88886040516024016108c0929190610ead565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090941693909317909252905161092b9190610ee7565b600060405180830381855afa9150503d8060008114610966576040519150601f19603f3d011682016040523d82523d6000602084013e61096b565b606091505b509150915081801561097e575080516020145b80156109a557508051630b135d3f60e11b906109a39083016020908101908401610f03565b145b9450505050505b9392505050565b60008082516041036109e95760208301516040840151606085015160001a6109dd878285856109f8565b945094505050506109f1565b506000905060025b9250929050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610a2f5750600090506003610ab3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610a83573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610aac57600060019250925050610ab3565b9150600090505b94509492505050565b80356001600160a01b0381168114610ad357600080fd5b919050565b600080600060608486031215610aed57600080fd5b610af684610abc565b95602085013595506040909401359392505050565b600060208284031215610b1d57600080fd5b6109ac82610abc565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610b4d57600080fd5b8135602067ffffffffffffffff80831115610b6a57610b6a610b26565b8260051b604051601f19603f83011681018181108482111715610b8f57610b8f610b26565b604052938452858101830193838101925087851115610bad57600080fd5b83870191505b84821015610bcc57813583529183019190830190610bb3565b979650505050505050565b600080600060608486031215610bec57600080fd5b610bf584610abc565b9250602084013567ffffffffffffffff80821115610c1257600080fd5b610c1e87838801610b3c565b93506040860135915080821115610c3457600080fd5b50610c4186828701610b3c565b9150509250925092565b600060208284031215610c5d57600080fd5b5035919050565b60008083601f840112610c7657600080fd5b50813567ffffffffffffffff811115610c8e57600080fd5b6020830191508360208285010111156109f157600080fd5b60008060008060008060a08789031215610cbf57600080fd5b610cc887610abc565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff811115610cf957600080fd5b610d0589828a01610c64565b979a9699509497509295939492505050565b60008060008060008060a08789031215610d3057600080fd5b610d3987610abc565b9550602087013567ffffffffffffffff80821115610d5657600080fd5b610d628a838b01610b3c565b96506040890135915080821115610d7857600080fd5b610d848a838b01610b3c565b9550606089013594506080890135915080821115610da157600080fd5b50610d0589828a01610c64565b600081518084526020808501945080840160005b83811015610dde57815187529582019590820190600101610dc2565b509495945050505050565b6001600160a01b0384168152606060208201526000610e0b6060830185610dae565b8281036040840152610e1d8185610dae565b9695505050505050565b634e487b7160e01b600052603260045260246000fd5b815160009082906020808601845b83811015610e6757815185529382019390820190600101610e4b565b50929695505050505050565b634e487b7160e01b600052602160045260246000fd5b60005b83811015610ea4578181015183820152602001610e8c565b50506000910152565b8281526040602082015260008251806040840152610ed2816060850160208701610e89565b601f01601f1916919091016060019392505050565b60008251610ef9818460208701610e89565b9190910192915050565b600060208284031215610f1557600080fd5b505191905056fea26469706673582212208368bf3658816d5395b848818608c7e291d3c8aa615872ecfd85ea2a10986bcf64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000008afd8df358a6dd1200f2856963aab53baac65018
-----Decoded View---------------
Arg [0] : tokenAddress (address): 0x8afD8dF358A6DD1200f2856963Aab53BAaC65018
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008afd8df358a6dd1200f2856963aab53baac65018
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.