Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 240 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Set Approval For... | 24262923 | 43 days ago | IN | 0 ETH | 0.00000184 | ||||
| Set Approval For... | 23833716 | 103 days ago | IN | 0 ETH | 0.00003219 | ||||
| Set Approval For... | 23708124 | 121 days ago | IN | 0 ETH | 0.00009668 | ||||
| Set Approval For... | 23540288 | 144 days ago | IN | 0 ETH | 0.00001951 | ||||
| Set Approval For... | 23517126 | 148 days ago | IN | 0 ETH | 0.00000582 | ||||
| Set Approval For... | 23496063 | 151 days ago | IN | 0 ETH | 0.00005737 | ||||
| Set Approval For... | 23337799 | 173 days ago | IN | 0 ETH | 0.00007709 | ||||
| Set Approval For... | 23148036 | 199 days ago | IN | 0 ETH | 0.00011293 | ||||
| Set Approval For... | 23001906 | 220 days ago | IN | 0 ETH | 0.00003502 | ||||
| Claim | 22984497 | 222 days ago | IN | 0 ETH | 0.00017577 | ||||
| Claim | 22959306 | 226 days ago | IN | 0 ETH | 0.00032958 | ||||
| Claim | 22713706 | 260 days ago | IN | 0 ETH | 0.00013244 | ||||
| Set Approval For... | 22307893 | 317 days ago | IN | 0 ETH | 0.00002059 | ||||
| Claim | 20718369 | 539 days ago | IN | 0 ETH | 0.00024014 | ||||
| Claim | 20718367 | 539 days ago | IN | 0 ETH | 0.00029961 | ||||
| Claim | 20704981 | 541 days ago | IN | 0 ETH | 0.00029283 | ||||
| Claim | 20660188 | 547 days ago | IN | 0 ETH | 0.00018618 | ||||
| Claim | 20650875 | 548 days ago | IN | 0 ETH | 0.00011231 | ||||
| Claim | 20641520 | 549 days ago | IN | 0 ETH | 0.00031058 | ||||
| Set Approval For... | 20633030 | 551 days ago | IN | 0 ETH | 0.00007478 | ||||
| Claim | 20632219 | 551 days ago | IN | 0 ETH | 0.00017063 | ||||
| Claim | 20632216 | 551 days ago | IN | 0 ETH | 0.0002087 | ||||
| Claim | 20631836 | 551 days ago | IN | 0 ETH | 0.00015492 | ||||
| Claim | 20631823 | 551 days ago | IN | 0 ETH | 0.0002089 | ||||
| Claim | 20628744 | 551 days ago | IN | 0 ETH | 0.00057411 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Achievement
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// contracts/Achievement.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/access/Ownable.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC721/ERC721.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/utils/cryptography/EIP712.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/utils/Counters.sol";
import { ECDSA } from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/utils/cryptography/ECDSA.sol";
import {
AccessDenied,
EIP712Signature,
InvalidEAS,
InvalidLength,
InvalidSignature,
NotFound,
NO_EXPIRATION_TIME
} from "./Common.sol";
import { TrustedForwarderManager } from "./TrustedForwarderManager.sol";
/**
* @dev A struct representing the arguments of the claiming request.
*/
struct ClaimingRequestData {
address recipient; // The recipient of the claiming.
uint256 identifier; // The identifier of the NFT.
bytes data; // Custom claiming data.
}
/**
* @dev A struct representing the full arguments of the claiming request.
*/
struct ClaimingRequest {
ClaimingRequestData data; // The arguments of the claiming request.
EIP712Signature signature; // The EIP712 signature data.
uint64 deadline; // The deadline of the signature/request.
}
/**
* @title Achievement
* @author Dingning-aspecta
* @notice This contract aims to provide an ownable ERC721 that supports ERC2771
* @dev Only ClaimingRequest that signed by the owner will be executed successfully
*/
contract Achievement is ERC721, EIP712, Ownable, TrustedForwarderManager {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
error DeadlineExpired();
error UsedSignature();
// Emitted when a new NFT is claimed to help off-chain services to identify the NFT.
event ClaimToken(uint256 indexed tokenId, uint256 indexed identifier);
// Replay protection signatures.
mapping(bytes signature => bool used) private _signatures;
// Mapping from user address to claimed tokens.
mapping(address => uint256[]) private _userTokens;
string public baseURI;
// Claiming cost, in wei
uint256 public claimCost;
/**
* @notice Contract constructor.
*
* @param initialBaseURI initial base URI of tokens.
*
* @param trustedForwarder initial address of trusted forwarder.
*/
constructor(string memory initialBaseURI, address trustedForwarder) ERC721("Aspecta Builders Achievement", "ASP") EIP712("Aspecta Builder Achievement Regularly", "0.1") Ownable() {
baseURI = initialBaseURI;
claimCost = 0.00 ether;
_setTrustedForwarder(trustedForwarder);
}
/**
* @dev Only the owner can set new trusted forwarder.
*
* @param _trustedForwarder The arguments of the new trusted forwarder.
*/
function setTrustedForwarder(address _trustedForwarder) public onlyOwner {
_setTrustedForwarder(_trustedForwarder);
}
/**
* @dev Only owner can set new base URI.
*
* @param _newBaseURI The arguments of the new base URI.
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
baseURI = _newBaseURI;
}
/**
* @dev Returns the tokens claimed by the user.
*
* @param user The address of the user.
*/
function userTokens(address user) public view onlyOwner returns (uint256[] memory) {
return _userTokens[user];
}
/**
* @dev Only owner can set new claim cost.
*
* @param _newClaimCost The arguments of the new claim cost.
*/
function setClaimCost(uint256 _newClaimCost) public onlyOwner {
claimCost = _newClaimCost;
}
/**
* @dev Withdraw contract balance to owner.
*/
function withdraw() public onlyOwner {
payable(owner()).transfer(address(this).balance);
}
/**
* @dev Returns the base URI used in the contract.
*/
function _baseURI() internal view override returns (string memory) {
return baseURI;
}
/**
* @notice Claim NFT.
*
* @dev ClaimingRequest that must be signed by the owner can be executed successfully.
*
* @param request The arguments of the claiming request.
*/
function claim(ClaimingRequest calldata request)
public
payable
returns (uint256)
{
require(msg.value >= claimCost, "Claiming cost is not enough");
_verifyClaiming(request);
uint256 newItemId = _tokenIds.current();
_mint(request.data.recipient, newItemId);
_userTokens[request.data.recipient].push(newItemId);
_tokenIds.increment();
// Emit an event to let off-chain services know that the token has been claimed.
emit ClaimToken(newItemId, request.data.identifier);
return newItemId;
}
/**
* @dev Returns the domain separator used in the encoding of the signatures for attest, and revoke.
*/
function getDomainSeparator() external view returns (bytes32) {
return _domainSeparatorV4();
}
/**
* @dev Verifies claiming request.
*
* @param request The arguments of the claiming request.
*/
function _verifyClaiming(ClaimingRequest memory request) internal {
if (request.deadline != NO_EXPIRATION_TIME && request.deadline <= _time()) {
revert DeadlineExpired();
}
ClaimingRequestData memory data = request.data;
EIP712Signature memory signature = request.signature;
_verifyUnusedSignature(signature);
bytes32 digest = _hashTypedDataV4(
keccak256(
abi.encode(
data.recipient,
data.identifier,
keccak256(data.data),
request.deadline
)
)
);
if (ECDSA.recover(digest, signature.v, signature.r, signature.s) != owner()) {
revert InvalidSignature();
}
}
/**
* @dev Ensures that the provided EIP712 signature wasn't already used.
*
* @param signature The EIP712 signature data.
*/
function _verifyUnusedSignature(EIP712Signature memory signature) internal {
bytes memory packedSignature = abi.encodePacked(signature.v, signature.r, signature.s);
if (_signatures[packedSignature]) {
revert UsedSignature();
}
_signatures[packedSignature] = true;
}
/**
* @dev Returns the current's block timestamp. This method is overridden during tests and used to simulate the
* current block time.
*/
function _time() internal view virtual returns (uint64) {
return uint64(block.timestamp);
}
}// SPDX-License-Identifier: MIT
// solhint-disable no-inline-assembly
pragma solidity >=0.6.9;
/**
* @title TrustedForwarderManager
*
* @notice This contract provides the function of receiving relayed transactions for functions that do not access msg.sender and msg.data.
*/
abstract contract TrustedForwarderManager {
/*
* Forwarder singleton we accept calls from
*/
address private _trustedForwarder;
/**
* :warning: **Warning** :warning: The Forwarder can have a full control over your Recipient. Only trust verified Forwarder.
* @notice Method is not a required method to allow Recipients to trust multiple Forwarders. Not recommended yet.
* @return forwarder The address of the Forwarder contract that is being used.
*/
function getTrustedForwarder() public virtual view returns (address forwarder){
return _trustedForwarder;
}
function _setTrustedForwarder(address _forwarder) internal {
_trustedForwarder = _forwarder;
}
function isTrustedForwarder(address forwarder) public virtual view returns(bool) {
return forwarder == _trustedForwarder;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// A representation of an empty/uninitialized UID.
bytes32 constant EMPTY_UID = 0;
// A zero expiration represents an non-expiring attestation.
uint64 constant NO_EXPIRATION_TIME = 0;
error AccessDenied();
error InvalidEAS();
error InvalidLength();
error InvalidSignature();
error NotFound();
/**
* @dev A struct representing EIP712 signature data.
*/
struct EIP712Signature {
uint8 v; // The recovery ID.
bytes32 r; // The x-coordinate of the nonce R.
bytes32 s; // The signature data.
}
/**
* @dev A struct representing a single attestation.
*/
struct Attestation {
bytes32 uid; // A unique identifier of the attestation.
bytes32 schema; // The unique identifier of the schema.
uint64 time; // The time when the attestation was created (Unix timestamp).
uint64 expirationTime; // The time when the attestation expires (Unix timestamp).
uint64 revocationTime; // The time when the attestation was revoked (Unix timestamp).
bytes32 refUID; // The UID of the related attestation.
address recipient; // The recipient of the attestation.
address attester; // The attester/sender of the attestation.
bool revocable; // Whether the attestation is revocable.
bytes data; // Custom attestation data.
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 message) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
/// @solidity memory-safe-assembly
assembly {
mstore(0x00, "\x19Ethereum Signed Message:\n32")
mstore(0x1c, hash)
message := keccak256(0x00, 0x3c)
}
}
/**
* @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 data) {
/// @solidity memory-safe-assembly
assembly {
let ptr := mload(0x40)
mstore(ptr, "\x19\x01")
mstore(add(ptr, 0x02), domainSeparator)
mstore(add(ptr, 0x22), structHash)
data := keccak256(ptr, 0x42)
}
}
/**
* @dev Returns an Ethereum Signed Data with intended validator, created from a
* `validator` and `data` according to the version 0 of EIP-191.
*
* See {recover}.
*/
function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x00", validator, data));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)
pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
return counter._value;
}
function increment(Counter storage counter) internal {
unchecked {
counter._value += 1;
}
}
function decrement(Counter storage counter) internal {
uint256 value = counter._value;
require(value > 0, "Counter: decrement overflow");
unchecked {
counter._value = value - 1;
}
}
function reset(Counter storage counter) internal {
counter._value = 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/EIP712.sol)
pragma solidity ^0.8.8;
import "./ECDSA.sol";
import "../ShortStrings.sol";
import "../../interfaces/IERC5267.sol";
/**
* @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
*
* The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
* thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
* they need in their contracts using a combination of `abi.encode` and `keccak256`.
*
* This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
* scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
* ({_hashTypedDataV4}).
*
* The implementation of the domain separator was designed to be as efficient as possible while still properly updating
* the chain id to protect against replay attacks on an eventual fork of the chain.
*
* NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
* https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
*
* NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain
* separator of the implementation contract. This will cause the `_domainSeparatorV4` function to always rebuild the
* separator from the immutable values, which is cheaper than accessing a cached version in cold storage.
*
* _Available since v3.4._
*
* @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment
*/
abstract contract EIP712 is IERC5267 {
using ShortStrings for *;
bytes32 private constant _TYPE_HASH =
keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");
// Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
// invalidate the cached domain separator if the chain id changes.
bytes32 private immutable _cachedDomainSeparator;
uint256 private immutable _cachedChainId;
address private immutable _cachedThis;
bytes32 private immutable _hashedName;
bytes32 private immutable _hashedVersion;
ShortString private immutable _name;
ShortString private immutable _version;
string private _nameFallback;
string private _versionFallback;
/**
* @dev Initializes the domain separator and parameter caches.
*
* The meaning of `name` and `version` is specified in
* https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
*
* - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
* - `version`: the current major version of the signing domain.
*
* NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
* contract upgrade].
*/
constructor(string memory name, string memory version) {
_name = name.toShortStringWithFallback(_nameFallback);
_version = version.toShortStringWithFallback(_versionFallback);
_hashedName = keccak256(bytes(name));
_hashedVersion = keccak256(bytes(version));
_cachedChainId = block.chainid;
_cachedDomainSeparator = _buildDomainSeparator();
_cachedThis = address(this);
}
/**
* @dev Returns the domain separator for the current chain.
*/
function _domainSeparatorV4() internal view returns (bytes32) {
if (address(this) == _cachedThis && block.chainid == _cachedChainId) {
return _cachedDomainSeparator;
} else {
return _buildDomainSeparator();
}
}
function _buildDomainSeparator() private view returns (bytes32) {
return keccak256(abi.encode(_TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this)));
}
/**
* @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
* function returns the hash of the fully encoded EIP712 message for this domain.
*
* This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
*
* ```solidity
* bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
* keccak256("Mail(address to,string contents)"),
* mailTo,
* keccak256(bytes(mailContents))
* )));
* address signer = ECDSA.recover(digest, signature);
* ```
*/
function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
}
/**
* @dev See {EIP-5267}.
*
* _Available since v4.9._
*/
function eip712Domain()
public
view
virtual
override
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
)
{
return (
hex"0f", // 01111
_name.toStringWithFallback(_nameFallback),
_version.toStringWithFallback(_versionFallback),
block.chainid,
address(this),
bytes32(0),
new uint256[](0)
);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: address zero is not a valid owner");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _ownerOf(tokenId);
require(owner != address(0), "ERC721: invalid token ID");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
_requireMinted(tokenId);
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overridden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not token owner or approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
_requireMinted(tokenId);
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(address from, address to, uint256 tokenId) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_safeTransfer(from, to, tokenId, data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
*/
function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
return _owners[tokenId];
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _ownerOf(tokenId) != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(address to, uint256 tokenId, bytes memory data) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId, 1);
// Check that tokenId was not minted by `_beforeTokenTransfer` hook
require(!_exists(tokenId), "ERC721: token already minted");
unchecked {
// Will not overflow unless all 2**256 token ids are minted to the same owner.
// Given that tokens are minted one by one, it is impossible in practice that
// this ever happens. Might change if we allow batch minting.
// The ERC fails to describe this case.
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId, 1);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
* This is an internal function that does not check if the sender is authorized to operate on the token.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId, 1);
// Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
owner = ERC721.ownerOf(tokenId);
// Clear approvals
delete _tokenApprovals[tokenId];
unchecked {
// Cannot overflow, as that would require more tokens to be burned/transferred
// out than the owner initially received through minting and transferring in.
_balances[owner] -= 1;
}
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId, 1);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId, 1);
// Check that tokenId was not transferred by `_beforeTokenTransfer` hook
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
// Clear approvals from the previous owner
delete _tokenApprovals[tokenId];
unchecked {
// `_balances[from]` cannot overflow for the same reason as described in `_burn`:
// `from`'s balance is the number of token held, which is at least one before the current
// transfer.
// `_balances[to]` could overflow in the conditions described in `_mint`. That would require
// all 2**256 token ids to be minted, which in practice is impossible.
_balances[from] -= 1;
_balances[to] += 1;
}
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId, 1);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Reverts if the `tokenId` has not been minted yet.
*/
function _requireMinted(uint256 tokenId) internal view virtual {
require(_exists(tokenId), "ERC721: invalid token ID");
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
* - When `from` is zero, the tokens will be minted for `to`.
* - When `to` is zero, ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
* used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
* - When `from` is zero, the tokens were minted for `to`.
* - When `to` is zero, ``from``'s tokens were burned.
* - `from` and `to` are never both zero.
* - `batchSize` is non-zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal virtual {}
/**
* @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
*
* WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
* being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
* that `ownerOf(tokenId)` is `a`.
*/
// solhint-disable-next-line func-name-mixedcase
function __unsafe_increaseBalance(address account, uint256 amount) internal {
_balances[account] += amount;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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 (last updated v4.9.0) (interfaces/IERC5267.sol)
pragma solidity ^0.8.0;
interface IERC5267 {
/**
* @dev MAY be emitted to signal that the domain could have changed.
*/
event EIP712DomainChanged();
/**
* @dev returns the fields and values that describe the domain separator used by this contract for EIP-712
* signature.
*/
function eip712Domain()
external
view
returns (
bytes1 fields,
string memory name,
string memory version,
uint256 chainId,
address verifyingContract,
bytes32 salt,
uint256[] memory extensions
);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.8;
import "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
* ShortString private immutable _name;
* string private _nameFallback;
*
* constructor(string memory contractName) {
* _name = contractName.toShortStringWithFallback(_nameFallback);
* }
*
* function name() external view returns (string memory) {
* return _name.toStringWithFallback(_nameFallback);
* }
* }
* ```
*/
library ShortStrings {
// Used as an identifier for strings longer than 31 bytes.
bytes32 private constant _FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;
error StringTooLong(string str);
error InvalidShortString();
/**
* @dev Encode a string of at most 31 chars into a `ShortString`.
*
* This will trigger a `StringTooLong` error is the input string is too long.
*/
function toShortString(string memory str) internal pure returns (ShortString) {
bytes memory bstr = bytes(str);
if (bstr.length > 31) {
revert StringTooLong(str);
}
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
}
/**
* @dev Decode a `ShortString` back to a "normal" string.
*/
function toString(ShortString sstr) internal pure returns (string memory) {
uint256 len = byteLength(sstr);
// using `new string(len)` would work locally but is not memory safe.
string memory str = new string(32);
/// @solidity memory-safe-assembly
assembly {
mstore(str, len)
mstore(add(str, 0x20), sstr)
}
return str;
}
/**
* @dev Return the length of a `ShortString`.
*/
function byteLength(ShortString sstr) internal pure returns (uint256) {
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
if (result > 31) {
revert InvalidShortString();
}
return result;
}
/**
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
*/
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
if (bytes(value).length < 32) {
return toShortString(value);
} else {
StorageSlot.getStringSlot(store).value = value;
return ShortString.wrap(_FALLBACK_SENTINEL);
}
}
/**
* @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
*/
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
return toString(value);
} else {
return store;
}
}
/**
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
*
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
*/
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
if (ShortString.unwrap(value) != _FALLBACK_SENTINEL) {
return byteLength(value);
} else {
return bytes(store).length;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @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);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/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.9.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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
* or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
* understand this adds an external call which potentially creates a reentrancy vulnerability.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 tokenId) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 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 256, 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 << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.0;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract");
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._
* _Available since v4.9 for `string`, `bytes`._
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"initialBaseURI","type":"string"},{"internalType":"address","name":"trustedForwarder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"inputs":[],"name":"UsedSignature","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"identifier","type":"uint256"}],"name":"ClaimToken","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ClaimingRequestData","name":"data","type":"tuple"},{"components":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct EIP712Signature","name":"signature","type":"tuple"},{"internalType":"uint64","name":"deadline","type":"uint64"}],"internalType":"struct ClaimingRequest","name":"request","type":"tuple"}],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTrustedForwarder","outputs":[{"internalType":"address","name":"forwarder","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newClaimCost","type":"uint256"}],"name":"setClaimCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_trustedForwarder","type":"address"}],"name":"setTrustedForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
61016060405234801562000011575f80fd5b5060405162004ed338038062004ed3833981810160405281019062000037919062000631565b60405180606001604052806025815260200162004eae602591396040518060400160405280600381526020017f302e3100000000000000000000000000000000000000000000000000000000008152506040518060400160405280601c81526020017f41737065637461204275696c6465727320416368696576656d656e74000000008152506040518060400160405280600381526020017f4153500000000000000000000000000000000000000000000000000000000000815250815f9081620001039190620008cc565b508060019081620001159190620008cc565b5050506200012e6006836200021a60201b90919060201c565b61012081815250506200014c6007826200021a60201b90919060201c565b6101408181525050818051906020012060e08181525050808051906020012061010081815250504660a081815250506200018b6200026f60201b60201c565b608081815250503073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff16815250505050620001e8620001dc620002cb60201b60201c565b620002d260201b60201c565b81600d9081620001f99190620008cc565b505f600e8190555062000212816200039560201b60201c565b505062000b57565b5f6020835110156200023f576200023783620003d860201b60201c565b905062000269565b8262000251836200044260201b60201c565b5f019081620002619190620008cc565b5060ff5f1b90505b92915050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60e051610100514630604051602001620002b0959493929190620009ec565b60405160208183030381529060405280519060200120905090565b5f33905090565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8060095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f80829050601f815111156200042757826040517f305a27a90000000000000000000000000000000000000000000000000000000081526004016200041e919062000a97565b60405180910390fd5b805181620004359062000ae8565b5f1c175f1b915050919050565b5f819050919050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b620004ac8262000464565b810181811067ffffffffffffffff82111715620004ce57620004cd62000474565b5b80604052505050565b5f620004e26200044b565b9050620004f08282620004a1565b919050565b5f67ffffffffffffffff82111562000512576200051162000474565b5b6200051d8262000464565b9050602081019050919050565b5f5b83811015620005495780820151818401526020810190506200052c565b5f8484015250505050565b5f6200056a6200056484620004f5565b620004d7565b90508281526020810184848401111562000589576200058862000460565b5b620005968482856200052a565b509392505050565b5f82601f830112620005b557620005b46200045c565b5b8151620005c784826020860162000554565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f620005fb82620005d0565b9050919050565b6200060d81620005ef565b811462000618575f80fd5b50565b5f815190506200062b8162000602565b92915050565b5f80604083850312156200064a576200064962000454565b5b5f83015167ffffffffffffffff8111156200066a576200066962000458565b5b62000678858286016200059e565b92505060206200068b858286016200061b565b9150509250929050565b5f81519050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f6002820490506001821680620006e457607f821691505b602082108103620006fa57620006f96200069f565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026200075e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000721565b6200076a868362000721565b95508019841693508086168417925050509392505050565b5f819050919050565b5f819050919050565b5f620007b4620007ae620007a88462000782565b6200078b565b62000782565b9050919050565b5f819050919050565b620007cf8362000794565b620007e7620007de82620007bb565b8484546200072d565b825550505050565b5f90565b620007fd620007ef565b6200080a818484620007c4565b505050565b5b818110156200083157620008255f82620007f3565b60018101905062000810565b5050565b601f82111562000880576200084a8162000700565b620008558462000712565b8101602085101562000865578190505b6200087d620008748562000712565b8301826200080f565b50505b505050565b5f82821c905092915050565b5f620008a25f198460080262000885565b1980831691505092915050565b5f620008bc838362000891565b9150826002028217905092915050565b620008d78262000695565b67ffffffffffffffff811115620008f357620008f262000474565b5b620008ff8254620006cc565b6200090c82828562000835565b5f60209050601f83116001811462000942575f84156200092d578287015190505b620009398582620008af565b865550620009a8565b601f198416620009528662000700565b5f5b828110156200097b5784890151825560018201915060208501945060208101905062000954565b868310156200099b578489015162000997601f89168262000891565b8355505b6001600288020188555050505b505050505050565b5f819050919050565b620009c481620009b0565b82525050565b620009d58162000782565b82525050565b620009e681620005ef565b82525050565b5f60a08201905062000a015f830188620009b9565b62000a106020830187620009b9565b62000a1f6040830186620009b9565b62000a2e6060830185620009ca565b62000a3d6080830184620009db565b9695505050505050565b5f82825260208201905092915050565b5f62000a638262000695565b62000a6f818562000a47565b935062000a818185602086016200052a565b62000a8c8162000464565b840191505092915050565b5f6020820190508181035f83015262000ab1818462000a57565b905092915050565b5f81519050919050565b5f819050602082019050919050565b5f62000adf8251620009b0565b80915050919050565b5f62000af48262000ab9565b8262000b008462000ac3565b905062000b0d8162000ad2565b9250602082101562000b505762000b4b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8360200360080262000721565b831692505b5050919050565b60805160a05160c05160e05161010051610120516101405161430562000ba95f395f610ce401525f610cb001525f61265401525f61263301525f6120b401525f61210a01525f61213301526143055ff3fe6080604052600436106101b6575f3560e01c806384b0196e116100eb578063c87b56dd11610089578063e985e9c511610063578063e985e9c5146105ea578063ed24911d14610626578063ed498fa814610650578063f2fde38b1461068c576101b6565b8063c87b56dd1461055c578063ce1b815f14610598578063da742228146105c2576101b6565b8063a22cb465116100c5578063a22cb465146104b4578063a60e5e1e146104dc578063b88d4fde1461050c578063bbe15f8214610534576101b6565b806384b0196e146104305780638da5cb5b1461046057806395d89b411461048a576101b6565b806342842e0e116101585780636352211e116101325780636352211e146103785780636c0360eb146103b457806370a08231146103de578063715018a61461041a576101b6565b806342842e0e146102ec57806355f804b314610314578063572b6c051461033c576101b6565b8063095ea7b311610194578063095ea7b31461025c5780630fb8184b1461028457806323b872dd146102ae5780633ccfd60b146102d6576101b6565b806301ffc9a7146101ba57806306fdde03146101f6578063081812fc14610220575b5f80fd5b3480156101c5575f80fd5b506101e060048036038101906101db91906129f7565b6106b4565b6040516101ed9190612a3c565b60405180910390f35b348015610201575f80fd5b5061020a610795565b6040516102179190612adf565b60405180910390f35b34801561022b575f80fd5b5061024660048036038101906102419190612b32565b610824565b6040516102539190612b9c565b60405180910390f35b348015610267575f80fd5b50610282600480360381019061027d9190612bdf565b610866565b005b34801561028f575f80fd5b5061029861097c565b6040516102a59190612c2c565b60405180910390f35b3480156102b9575f80fd5b506102d460048036038101906102cf9190612c45565b610982565b005b3480156102e1575f80fd5b506102ea6109e2565b005b3480156102f7575f80fd5b50610312600480360381019061030d9190612c45565b610a37565b005b34801561031f575f80fd5b5061033a60048036038101906103359190612dc1565b610a56565b005b348015610347575f80fd5b50610362600480360381019061035d9190612e08565b610a71565b60405161036f9190612a3c565b60405180910390f35b348015610383575f80fd5b5061039e60048036038101906103999190612b32565b610ac9565b6040516103ab9190612b9c565b60405180910390f35b3480156103bf575f80fd5b506103c8610b4d565b6040516103d59190612adf565b60405180910390f35b3480156103e9575f80fd5b5061040460048036038101906103ff9190612e08565b610bd9565b6040516104119190612c2c565b60405180910390f35b348015610425575f80fd5b5061042e610c8d565b005b34801561043b575f80fd5b50610444610ca0565b6040516104579796959493929190612f3c565b60405180910390f35b34801561046b575f80fd5b50610474610d9d565b6040516104819190612b9c565b60405180910390f35b348015610495575f80fd5b5061049e610dc5565b6040516104ab9190612adf565b60405180910390f35b3480156104bf575f80fd5b506104da60048036038101906104d59190612fe8565b610e55565b005b6104f660048036038101906104f19190613048565b610e6b565b6040516105039190612c2c565b60405180910390f35b348015610517575f80fd5b50610532600480360381019061052d919061312d565b610fcc565b005b34801561053f575f80fd5b5061055a60048036038101906105559190612b32565b61102e565b005b348015610567575f80fd5b50610582600480360381019061057d9190612b32565b611040565b60405161058f9190612adf565b60405180910390f35b3480156105a3575f80fd5b506105ac6110a5565b6040516105b99190612b9c565b60405180910390f35b3480156105cd575f80fd5b506105e860048036038101906105e39190612e08565b6110cd565b005b3480156105f5575f80fd5b50610610600480360381019061060b91906131ad565b6110e1565b60405161061d9190612a3c565b60405180910390f35b348015610631575f80fd5b5061063a61116f565b60405161064791906131eb565b60405180910390f35b34801561065b575f80fd5b5061067660048036038101906106719190612e08565b61117d565b6040516106839190613204565b60405180910390f35b348015610697575f80fd5b506106b260048036038101906106ad9190612e08565b611218565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061077e57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061078e575061078d8261129a565b5b9050919050565b60605f80546107a390613251565b80601f01602080910402602001604051908101604052809291908181526020018280546107cf90613251565b801561081a5780601f106107f15761010080835404028352916020019161081a565b820191905f5260205f20905b8154815290600101906020018083116107fd57829003601f168201915b5050505050905090565b5f61082e82611303565b60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f61087082610ac9565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d7906132f1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108ff61134e565b73ffffffffffffffffffffffffffffffffffffffff16148061092e575061092d8161092861134e565b6110e1565b5b61096d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109649061337f565b60405180910390fd5b6109778383611355565b505050565b600e5481565b61099361098d61134e565b8261140b565b6109d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c99061340d565b60405180910390fd5b6109dd83838361149f565b505050565b6109ea61178b565b6109f2610d9d565b73ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015610a34573d5f803e3d5ffd5b50565b610a5183838360405180602001604052805f815250610fcc565b505050565b610a5e61178b565b80600d9081610a6d91906135c8565b5050565b5f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b5f80610ad483611809565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3b906136e1565b60405180910390fd5b80915050919050565b600d8054610b5a90613251565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8690613251565b8015610bd15780601f10610ba857610100808354040283529160200191610bd1565b820191905f5260205f20905b815481529060010190602001808311610bb457829003601f168201915b505050505081565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3f9061376f565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610c9561178b565b610c9e5f611842565b565b5f6060805f805f6060610cdd60067f000000000000000000000000000000000000000000000000000000000000000061190590919063ffffffff16565b610d1160077f000000000000000000000000000000000000000000000000000000000000000061190590919063ffffffff16565b46305f801b5f67ffffffffffffffff811115610d3057610d2f612c9d565b5b604051908082528060200260200182016040528015610d5e5781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610dd490613251565b80601f0160208091040260200160405190810160405280929190818152602001828054610e0090613251565b8015610e4b5780601f10610e2257610100808354040283529160200191610e4b565b820191905f5260205f20905b815481529060010190602001808311610e2e57829003601f168201915b5050505050905090565b610e67610e6061134e565b83836119b2565b5050565b5f600e54341015610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea8906137d7565b60405180910390fd5b610ec382610ebe906139f5565b611b19565b5f610ece600a611c85565b9050610ef983805f0190610ee29190613a0b565b5f016020810190610ef39190612e08565b82611c91565b600c5f84805f0190610f0b9190613a0b565b5f016020810190610f1c9190612e08565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f9091909190915055610f83600a611ea4565b82805f0190610f929190613a0b565b60200135817f3a5441177426877179ade803d8bd909d5d01dd87c91c8d50479c0ab9e9a76db960405160405180910390a380915050919050565b610fdd610fd761134e565b8361140b565b61101c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110139061340d565b60405180910390fd5b61102884848484611eb8565b50505050565b61103661178b565b80600e8190555050565b606061104b82611303565b5f611054611f14565b90505f8151116110725760405180602001604052805f81525061109d565b8061107c84611fa4565b60405160200161108d929190613a6c565b6040516020818303038152906040525b915050919050565b5f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110d561178b565b6110de8161206e565b50565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f6111786120b1565b905090565b606061118761178b565b600c5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561120c57602002820191905f5260205f20905b8154815260200190600101908083116111f8575b50505050509050919050565b61122061178b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361128e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128590613aff565b60405180910390fd5b61129781611842565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61130c81612167565b61134b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611342906136e1565b60405180910390fd5b50565b5f33905090565b8160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166113c583610ac9565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5f8061141683610ac9565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611458575061145781856110e1565b5b8061149657508373ffffffffffffffffffffffffffffffffffffffff1661147e84610824565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166114bf82610ac9565b73ffffffffffffffffffffffffffffffffffffffff1614611515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150c90613b8d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157a90613c1b565b60405180910390fd5b61159083838360016121a7565b8273ffffffffffffffffffffffffffffffffffffffff166115b082610ac9565b73ffffffffffffffffffffffffffffffffffffffff1614611606576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fd90613b8d565b60405180910390fd5b60045f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282540392505081905550600160035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160025f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461178683838360016121ad565b505050565b61179361134e565b73ffffffffffffffffffffffffffffffffffffffff166117b1610d9d565b73ffffffffffffffffffffffffffffffffffffffff1614611807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fe90613c83565b60405180910390fd5b565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606060ff5f1b83146119215761191a836121b3565b90506119ac565b81805461192d90613251565b80601f016020809104026020016040519081016040528092919081815260200182805461195990613251565b80156119a45780601f1061197b576101008083540402835291602001916119a4565b820191905f5260205f20905b81548152906001019060200180831161198757829003601f168201915b505050505090505b92915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611a20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1790613ceb565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b0c9190612a3c565b60405180910390a3505050565b5f67ffffffffffffffff16816040015167ffffffffffffffff1614158015611b605750611b44612225565b67ffffffffffffffff16816040015167ffffffffffffffff1611155b15611b97576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f815f015190505f82602001519050611baf8161222c565b5f611bfb835f015184602001518560400151805190602001208760400151604051602001611be09493929190613d18565b604051602081830303815290604052805190602001206122fa565b9050611c05610d9d565b73ffffffffffffffffffffffffffffffffffffffff16611c3282845f015185602001518660400151612313565b73ffffffffffffffffffffffffffffffffffffffff1614611c7f576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b5f815f01549050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611cff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf690613da5565b60405180910390fd5b611d0881612167565b15611d48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3f90613e0d565b60405180910390fd5b611d555f838360016121a7565b611d5e81612167565b15611d9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9590613e0d565b60405180910390fd5b600160035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160025f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611ea05f838360016121ad565b5050565b6001815f015f828254019250508190555050565b611ec384848461149f565b611ecf8484848461233c565b611f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0590613e9b565b60405180910390fd5b50505050565b6060600d8054611f2390613251565b80601f0160208091040260200160405190810160405280929190818152602001828054611f4f90613251565b8015611f9a5780601f10611f7157610100808354040283529160200191611f9a565b820191905f5260205f20905b815481529060010190602001808311611f7d57829003601f168201915b5050505050905090565b60605f6001611fb2846124be565b0190505f8167ffffffffffffffff811115611fd057611fcf612c9d565b5b6040519080825280601f01601f1916602001820160405280156120025781602001600182028036833780820191505090505b5090505f82602001820190505b600115612063578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161205857612057613eb9565b5b0494505f850361200f575b819350505050919050565b8060095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561212c57507f000000000000000000000000000000000000000000000000000000000000000046145b15612159577f00000000000000000000000000000000000000000000000000000000000000009050612164565b61216161260f565b90505b90565b5f8073ffffffffffffffffffffffffffffffffffffffff1661218883611809565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b50505050565b50505050565b60605f6121bf836126a4565b90505f602067ffffffffffffffff8111156121dd576121dc612c9d565b5b6040519080825280601f01601f19166020018201604052801561220f5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f42905090565b5f815f01518260200151836040015160405160200161224d93929190613f3a565b6040516020818303038152906040529050600b8160405161226e9190613fba565b90815260200160405180910390205f9054906101000a900460ff16156122c0576040517fcce9a82400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600b826040516122d29190613fba565b90815260200160405180910390205f6101000a81548160ff0219169083151502179055505050565b5f61230c6123066120b1565b836126f2565b9050919050565b5f805f61232287878787612732565b9150915061232f8161280a565b8192505050949350505050565b5f61235c8473ffffffffffffffffffffffffffffffffffffffff1661296f565b156124b1578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261238561134e565b8786866040518563ffffffff1660e01b81526004016123a79493929190614018565b6020604051808303815f875af19250505080156123e257506040513d601f19601f820116820180604052508101906123df9190614076565b60015b612461573d805f8114612410576040519150601f19603f3d011682016040523d82523d5f602084013e612415565b606091505b505f815103612459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245090613e9b565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506124b6565b600190505b949350505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061251a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816125105761250f613eb9565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612557576d04ee2d6d415b85acef8100000000838161254d5761254c613eb9565b5b0492506020810190505b662386f26fc10000831061258657662386f26fc10000838161257c5761257b613eb9565b5b0492506010810190505b6305f5e10083106125af576305f5e10083816125a5576125a4613eb9565b5b0492506008810190505b61271083106125d45761271083816125ca576125c9613eb9565b5b0492506004810190505b606483106125f757606483816125ed576125ec613eb9565b5b0492506002810190505b600a8310612606576001810190505b80915050919050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000046306040516020016126899594939291906140a1565b60405160208183030381529060405280519060200120905090565b5f8060ff835f1c169050601f8111156126e9576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0835f1c111561276a575f600391509150612801565b5f6001878787876040515f815260200160405260405161278d9493929190614101565b6020604051602081039080840390855afa1580156127ad573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036127f9575f60019250925050612801565b805f92509250505b94509492505050565b5f600481111561281d5761281c614144565b5b8160048111156128305761282f614144565b5b031561296c576001600481111561284a57612849614144565b5b81600481111561285d5761285c614144565b5b0361289d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612894906141bb565b60405180910390fd5b600260048111156128b1576128b0614144565b5b8160048111156128c4576128c3614144565b5b03612904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128fb90614223565b60405180910390fd5b6003600481111561291857612917614144565b5b81600481111561292b5761292a614144565b5b0361296b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612962906142b1565b60405180910390fd5b5b50565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6129d6816129a2565b81146129e0575f80fd5b50565b5f813590506129f1816129cd565b92915050565b5f60208284031215612a0c57612a0b61299a565b5b5f612a19848285016129e3565b91505092915050565b5f8115159050919050565b612a3681612a22565b82525050565b5f602082019050612a4f5f830184612a2d565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612a8c578082015181840152602081019050612a71565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612ab182612a55565b612abb8185612a5f565b9350612acb818560208601612a6f565b612ad481612a97565b840191505092915050565b5f6020820190508181035f830152612af78184612aa7565b905092915050565b5f819050919050565b612b1181612aff565b8114612b1b575f80fd5b50565b5f81359050612b2c81612b08565b92915050565b5f60208284031215612b4757612b4661299a565b5b5f612b5484828501612b1e565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612b8682612b5d565b9050919050565b612b9681612b7c565b82525050565b5f602082019050612baf5f830184612b8d565b92915050565b612bbe81612b7c565b8114612bc8575f80fd5b50565b5f81359050612bd981612bb5565b92915050565b5f8060408385031215612bf557612bf461299a565b5b5f612c0285828601612bcb565b9250506020612c1385828601612b1e565b9150509250929050565b612c2681612aff565b82525050565b5f602082019050612c3f5f830184612c1d565b92915050565b5f805f60608486031215612c5c57612c5b61299a565b5b5f612c6986828701612bcb565b9350506020612c7a86828701612bcb565b9250506040612c8b86828701612b1e565b9150509250925092565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612cd382612a97565b810181811067ffffffffffffffff82111715612cf257612cf1612c9d565b5b80604052505050565b5f612d04612991565b9050612d108282612cca565b919050565b5f67ffffffffffffffff821115612d2f57612d2e612c9d565b5b612d3882612a97565b9050602081019050919050565b828183375f83830152505050565b5f612d65612d6084612d15565b612cfb565b905082815260208101848484011115612d8157612d80612c99565b5b612d8c848285612d45565b509392505050565b5f82601f830112612da857612da7612c95565b5b8135612db8848260208601612d53565b91505092915050565b5f60208284031215612dd657612dd561299a565b5b5f82013567ffffffffffffffff811115612df357612df261299e565b5b612dff84828501612d94565b91505092915050565b5f60208284031215612e1d57612e1c61299a565b5b5f612e2a84828501612bcb565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b612e6781612e33565b82525050565b5f819050919050565b612e7f81612e6d565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b612eb781612aff565b82525050565b5f612ec88383612eae565b60208301905092915050565b5f602082019050919050565b5f612eea82612e85565b612ef48185612e8f565b9350612eff83612e9f565b805f5b83811015612f2f578151612f168882612ebd565b9750612f2183612ed4565b925050600181019050612f02565b5085935050505092915050565b5f60e082019050612f4f5f83018a612e5e565b8181036020830152612f618189612aa7565b90508181036040830152612f758188612aa7565b9050612f846060830187612c1d565b612f916080830186612b8d565b612f9e60a0830185612e76565b81810360c0830152612fb08184612ee0565b905098975050505050505050565b612fc781612a22565b8114612fd1575f80fd5b50565b5f81359050612fe281612fbe565b92915050565b5f8060408385031215612ffe57612ffd61299a565b5b5f61300b85828601612bcb565b925050602061301c85828601612fd4565b9150509250929050565b5f80fd5b5f60a0828403121561303f5761303e613026565b5b81905092915050565b5f6020828403121561305d5761305c61299a565b5b5f82013567ffffffffffffffff81111561307a5761307961299e565b5b6130868482850161302a565b91505092915050565b5f67ffffffffffffffff8211156130a9576130a8612c9d565b5b6130b282612a97565b9050602081019050919050565b5f6130d16130cc8461308f565b612cfb565b9050828152602081018484840111156130ed576130ec612c99565b5b6130f8848285612d45565b509392505050565b5f82601f83011261311457613113612c95565b5b81356131248482602086016130bf565b91505092915050565b5f805f80608085870312156131455761314461299a565b5b5f61315287828801612bcb565b945050602061316387828801612bcb565b935050604061317487828801612b1e565b925050606085013567ffffffffffffffff8111156131955761319461299e565b5b6131a187828801613100565b91505092959194509250565b5f80604083850312156131c3576131c261299a565b5b5f6131d085828601612bcb565b92505060206131e185828601612bcb565b9150509250929050565b5f6020820190506131fe5f830184612e76565b92915050565b5f6020820190508181035f83015261321c8184612ee0565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061326857607f821691505b60208210810361327b5761327a613224565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e655f8201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b5f6132db602183612a5f565b91506132e682613281565b604082019050919050565b5f6020820190508181035f830152613308816132cf565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f5f8201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b5f613369603d83612a5f565b91506133748261330f565b604082019050919050565b5f6020820190508181035f8301526133968161335d565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e655f8201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b5f6133f7602d83612a5f565b91506134028261339d565b604082019050919050565b5f6020820190508181035f830152613424816133eb565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026134877fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261344c565b613491868361344c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6134cc6134c76134c284612aff565b6134a9565b612aff565b9050919050565b5f819050919050565b6134e5836134b2565b6134f96134f1826134d3565b848454613458565b825550505050565b5f90565b61350d613501565b6135188184846134dc565b505050565b5b8181101561353b576135305f82613505565b60018101905061351e565b5050565b601f821115613580576135518161342b565b61355a8461343d565b81016020851015613569578190505b61357d6135758561343d565b83018261351d565b50505b505050565b5f82821c905092915050565b5f6135a05f1984600802613585565b1980831691505092915050565b5f6135b88383613591565b9150826002028217905092915050565b6135d182612a55565b67ffffffffffffffff8111156135ea576135e9612c9d565b5b6135f48254613251565b6135ff82828561353f565b5f60209050601f831160018114613630575f841561361e578287015190505b61362885826135ad565b86555061368f565b601f19841661363e8661342b565b5f5b8281101561366557848901518255600182019150602085019450602081019050613640565b86831015613682578489015161367e601f891682613591565b8355505b6001600288020188555050505b505050505050565b7f4552433732313a20696e76616c696420746f6b656e20494400000000000000005f82015250565b5f6136cb601883612a5f565b91506136d682613697565b602082019050919050565b5f6020820190508181035f8301526136f8816136bf565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f7420612076615f8201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b5f613759602983612a5f565b9150613764826136ff565b604082019050919050565b5f6020820190508181035f8301526137868161374d565b9050919050565b7f436c61696d696e6720636f7374206973206e6f7420656e6f75676800000000005f82015250565b5f6137c1601b83612a5f565b91506137cc8261378d565b602082019050919050565b5f6020820190508181035f8301526137ee816137b5565b9050919050565b5f80fd5b5f80fd5b5f60608284031215613812576138116137f5565b5b61381c6060612cfb565b90505f61382b84828501612bcb565b5f83015250602061383e84828501612b1e565b602083015250604082013567ffffffffffffffff811115613862576138616137f9565b5b61386e84828501613100565b60408301525092915050565b5f60ff82169050919050565b61388f8161387a565b8114613899575f80fd5b50565b5f813590506138aa81613886565b92915050565b6138b981612e6d565b81146138c3575f80fd5b50565b5f813590506138d4816138b0565b92915050565b5f606082840312156138ef576138ee6137f5565b5b6138f96060612cfb565b90505f6139088482850161389c565b5f83015250602061391b848285016138c6565b602083015250604061392f848285016138c6565b60408301525092915050565b5f67ffffffffffffffff82169050919050565b6139578161393b565b8114613961575f80fd5b50565b5f813590506139728161394e565b92915050565b5f60a0828403121561398d5761398c6137f5565b5b6139976060612cfb565b90505f82013567ffffffffffffffff8111156139b6576139b56137f9565b5b6139c2848285016137fd565b5f8301525060206139d5848285016138da565b60208301525060806139e984828501613964565b60408301525092915050565b5f613a003683613978565b9050919050565b5f80fd5b5f82356001606003833603038112613a2657613a25613a07565b5b80830191505092915050565b5f81905092915050565b5f613a4682612a55565b613a508185613a32565b9350613a60818560208601612a6f565b80840191505092915050565b5f613a778285613a3c565b9150613a838284613a3c565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f613ae9602683612a5f565b9150613af482613a8f565b604082019050919050565b5f6020820190508181035f830152613b1681613add565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f7272656374205f8201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b5f613b77602583612a5f565b9150613b8282613b1d565b604082019050919050565b5f6020820190508181035f830152613ba481613b6b565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f613c05602483612a5f565b9150613c1082613bab565b604082019050919050565b5f6020820190508181035f830152613c3281613bf9565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f613c6d602083612a5f565b9150613c7882613c39565b602082019050919050565b5f6020820190508181035f830152613c9a81613c61565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c6572000000000000005f82015250565b5f613cd5601983612a5f565b9150613ce082613ca1565b602082019050919050565b5f6020820190508181035f830152613d0281613cc9565b9050919050565b613d128161393b565b82525050565b5f608082019050613d2b5f830187612b8d565b613d386020830186612c1d565b613d456040830185612e76565b613d526060830184613d09565b95945050505050565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573735f82015250565b5f613d8f602083612a5f565b9150613d9a82613d5b565b602082019050919050565b5f6020820190508181035f830152613dbc81613d83565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000005f82015250565b5f613df7601c83612a5f565b9150613e0282613dc3565b602082019050919050565b5f6020820190508181035f830152613e2481613deb565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e2045524337323152655f8201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b5f613e85603283612a5f565b9150613e9082613e2b565b604082019050919050565b5f6020820190508181035f830152613eb281613e79565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f8160f81b9050919050565b5f613efc82613ee6565b9050919050565b613f14613f0f8261387a565b613ef2565b82525050565b5f819050919050565b613f34613f2f82612e6d565b613f1a565b82525050565b5f613f458286613f03565b600182019150613f558285613f23565b602082019150613f658284613f23565b602082019150819050949350505050565b5f81519050919050565b5f81905092915050565b5f613f9482613f76565b613f9e8185613f80565b9350613fae818560208601612a6f565b80840191505092915050565b5f613fc58284613f8a565b915081905092915050565b5f82825260208201905092915050565b5f613fea82613f76565b613ff48185613fd0565b9350614004818560208601612a6f565b61400d81612a97565b840191505092915050565b5f60808201905061402b5f830187612b8d565b6140386020830186612b8d565b6140456040830185612c1d565b81810360608301526140578184613fe0565b905095945050505050565b5f81519050614070816129cd565b92915050565b5f6020828403121561408b5761408a61299a565b5b5f61409884828501614062565b91505092915050565b5f60a0820190506140b45f830188612e76565b6140c16020830187612e76565b6140ce6040830186612e76565b6140db6060830185612c1d565b6140e86080830184612b8d565b9695505050505050565b6140fb8161387a565b82525050565b5f6080820190506141145f830187612e76565b61412160208301866140f2565b61412e6040830185612e76565b61413b6060830184612e76565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f45434453413a20696e76616c6964207369676e617475726500000000000000005f82015250565b5f6141a5601883612a5f565b91506141b082614171565b602082019050919050565b5f6020820190508181035f8301526141d281614199565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e677468005f82015250565b5f61420d601f83612a5f565b9150614218826141d9565b602082019050919050565b5f6020820190508181035f83015261423a81614201565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c5f8201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b5f61429b602283612a5f565b91506142a682614241565b604082019050919050565b5f6020820190508181035f8301526142c88161428f565b905091905056fea2646970667358221220f8640efa085d5c6ef2235ae1f310ad7de794cb7a3ecfd54d8c05622054ceb3ed64736f6c6343000818003341737065637461204275696c64657220416368696576656d656e7420526567756c61726c790000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d70ced3de8aafe99b5202ed4f6ba24c4029b39d8000000000000000000000000000000000000000000000000000000000000001468747470733a2f2f6578616d706c652e636f6d2f000000000000000000000000
Deployed Bytecode
0x6080604052600436106101b6575f3560e01c806384b0196e116100eb578063c87b56dd11610089578063e985e9c511610063578063e985e9c5146105ea578063ed24911d14610626578063ed498fa814610650578063f2fde38b1461068c576101b6565b8063c87b56dd1461055c578063ce1b815f14610598578063da742228146105c2576101b6565b8063a22cb465116100c5578063a22cb465146104b4578063a60e5e1e146104dc578063b88d4fde1461050c578063bbe15f8214610534576101b6565b806384b0196e146104305780638da5cb5b1461046057806395d89b411461048a576101b6565b806342842e0e116101585780636352211e116101325780636352211e146103785780636c0360eb146103b457806370a08231146103de578063715018a61461041a576101b6565b806342842e0e146102ec57806355f804b314610314578063572b6c051461033c576101b6565b8063095ea7b311610194578063095ea7b31461025c5780630fb8184b1461028457806323b872dd146102ae5780633ccfd60b146102d6576101b6565b806301ffc9a7146101ba57806306fdde03146101f6578063081812fc14610220575b5f80fd5b3480156101c5575f80fd5b506101e060048036038101906101db91906129f7565b6106b4565b6040516101ed9190612a3c565b60405180910390f35b348015610201575f80fd5b5061020a610795565b6040516102179190612adf565b60405180910390f35b34801561022b575f80fd5b5061024660048036038101906102419190612b32565b610824565b6040516102539190612b9c565b60405180910390f35b348015610267575f80fd5b50610282600480360381019061027d9190612bdf565b610866565b005b34801561028f575f80fd5b5061029861097c565b6040516102a59190612c2c565b60405180910390f35b3480156102b9575f80fd5b506102d460048036038101906102cf9190612c45565b610982565b005b3480156102e1575f80fd5b506102ea6109e2565b005b3480156102f7575f80fd5b50610312600480360381019061030d9190612c45565b610a37565b005b34801561031f575f80fd5b5061033a60048036038101906103359190612dc1565b610a56565b005b348015610347575f80fd5b50610362600480360381019061035d9190612e08565b610a71565b60405161036f9190612a3c565b60405180910390f35b348015610383575f80fd5b5061039e60048036038101906103999190612b32565b610ac9565b6040516103ab9190612b9c565b60405180910390f35b3480156103bf575f80fd5b506103c8610b4d565b6040516103d59190612adf565b60405180910390f35b3480156103e9575f80fd5b5061040460048036038101906103ff9190612e08565b610bd9565b6040516104119190612c2c565b60405180910390f35b348015610425575f80fd5b5061042e610c8d565b005b34801561043b575f80fd5b50610444610ca0565b6040516104579796959493929190612f3c565b60405180910390f35b34801561046b575f80fd5b50610474610d9d565b6040516104819190612b9c565b60405180910390f35b348015610495575f80fd5b5061049e610dc5565b6040516104ab9190612adf565b60405180910390f35b3480156104bf575f80fd5b506104da60048036038101906104d59190612fe8565b610e55565b005b6104f660048036038101906104f19190613048565b610e6b565b6040516105039190612c2c565b60405180910390f35b348015610517575f80fd5b50610532600480360381019061052d919061312d565b610fcc565b005b34801561053f575f80fd5b5061055a60048036038101906105559190612b32565b61102e565b005b348015610567575f80fd5b50610582600480360381019061057d9190612b32565b611040565b60405161058f9190612adf565b60405180910390f35b3480156105a3575f80fd5b506105ac6110a5565b6040516105b99190612b9c565b60405180910390f35b3480156105cd575f80fd5b506105e860048036038101906105e39190612e08565b6110cd565b005b3480156105f5575f80fd5b50610610600480360381019061060b91906131ad565b6110e1565b60405161061d9190612a3c565b60405180910390f35b348015610631575f80fd5b5061063a61116f565b60405161064791906131eb565b60405180910390f35b34801561065b575f80fd5b5061067660048036038101906106719190612e08565b61117d565b6040516106839190613204565b60405180910390f35b348015610697575f80fd5b506106b260048036038101906106ad9190612e08565b611218565b005b5f7f80ac58cd000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061077e57507f5b5e139f000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061078e575061078d8261129a565b5b9050919050565b60605f80546107a390613251565b80601f01602080910402602001604051908101604052809291908181526020018280546107cf90613251565b801561081a5780601f106107f15761010080835404028352916020019161081a565b820191905f5260205f20905b8154815290600101906020018083116107fd57829003601f168201915b5050505050905090565b5f61082e82611303565b60045f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f61087082610ac9565b90508073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036108e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d7906132f1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108ff61134e565b73ffffffffffffffffffffffffffffffffffffffff16148061092e575061092d8161092861134e565b6110e1565b5b61096d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109649061337f565b60405180910390fd5b6109778383611355565b505050565b600e5481565b61099361098d61134e565b8261140b565b6109d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c99061340d565b60405180910390fd5b6109dd83838361149f565b505050565b6109ea61178b565b6109f2610d9d565b73ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015610a34573d5f803e3d5ffd5b50565b610a5183838360405180602001604052805f815250610fcc565b505050565b610a5e61178b565b80600d9081610a6d91906135c8565b5050565b5f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b5f80610ad483611809565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610b44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b3b906136e1565b60405180910390fd5b80915050919050565b600d8054610b5a90613251565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8690613251565b8015610bd15780601f10610ba857610100808354040283529160200191610bd1565b820191905f5260205f20905b815481529060010190602001808311610bb457829003601f168201915b505050505081565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3f9061376f565b60405180910390fd5b60035f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b610c9561178b565b610c9e5f611842565b565b5f6060805f805f6060610cdd60067f00000000000000000000000000000000000000000000000000000000000000ff61190590919063ffffffff16565b610d1160077f302e31000000000000000000000000000000000000000000000000000000000361190590919063ffffffff16565b46305f801b5f67ffffffffffffffff811115610d3057610d2f612c9d565b5b604051908082528060200260200182016040528015610d5e5781602001602082028036833780820191505090505b507f0f00000000000000000000000000000000000000000000000000000000000000959493929190965096509650965096509650965090919293949596565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054610dd490613251565b80601f0160208091040260200160405190810160405280929190818152602001828054610e0090613251565b8015610e4b5780601f10610e2257610100808354040283529160200191610e4b565b820191905f5260205f20905b815481529060010190602001808311610e2e57829003601f168201915b5050505050905090565b610e67610e6061134e565b83836119b2565b5050565b5f600e54341015610eb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea8906137d7565b60405180910390fd5b610ec382610ebe906139f5565b611b19565b5f610ece600a611c85565b9050610ef983805f0190610ee29190613a0b565b5f016020810190610ef39190612e08565b82611c91565b600c5f84805f0190610f0b9190613a0b565b5f016020810190610f1c9190612e08565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081908060018154018082558091505060019003905f5260205f20015f9091909190915055610f83600a611ea4565b82805f0190610f929190613a0b565b60200135817f3a5441177426877179ade803d8bd909d5d01dd87c91c8d50479c0ab9e9a76db960405160405180910390a380915050919050565b610fdd610fd761134e565b8361140b565b61101c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110139061340d565b60405180910390fd5b61102884848484611eb8565b50505050565b61103661178b565b80600e8190555050565b606061104b82611303565b5f611054611f14565b90505f8151116110725760405180602001604052805f81525061109d565b8061107c84611fa4565b60405160200161108d929190613a6c565b6040516020818303038152906040525b915050919050565b5f60095f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6110d561178b565b6110de8161206e565b50565b5f60055f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f6111786120b1565b905090565b606061118761178b565b600c5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2080548060200260200160405190810160405280929190818152602001828054801561120c57602002820191905f5260205f20905b8154815260200190600101908083116111f8575b50505050509050919050565b61122061178b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361128e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128590613aff565b60405180910390fd5b61129781611842565b50565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b61130c81612167565b61134b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611342906136e1565b60405180910390fd5b50565b5f33905090565b8160045f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff166113c583610ac9565b73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b5f8061141683610ac9565b90508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480611458575061145781856110e1565b5b8061149657508373ffffffffffffffffffffffffffffffffffffffff1661147e84610824565b73ffffffffffffffffffffffffffffffffffffffff16145b91505092915050565b8273ffffffffffffffffffffffffffffffffffffffff166114bf82610ac9565b73ffffffffffffffffffffffffffffffffffffffff1614611515576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150c90613b8d565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157a90613c1b565b60405180910390fd5b61159083838360016121a7565b8273ffffffffffffffffffffffffffffffffffffffff166115b082610ac9565b73ffffffffffffffffffffffffffffffffffffffff1614611606576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115fd90613b8d565b60405180910390fd5b60045f8281526020019081526020015f205f6101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600160035f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8282540392505081905550600160035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160025f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461178683838360016121ad565b505050565b61179361134e565b73ffffffffffffffffffffffffffffffffffffffff166117b1610d9d565b73ffffffffffffffffffffffffffffffffffffffff1614611807576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117fe90613c83565b60405180910390fd5b565b5f60025f8381526020019081526020015f205f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b606060ff5f1b83146119215761191a836121b3565b90506119ac565b81805461192d90613251565b80601f016020809104026020016040519081016040528092919081815260200182805461195990613251565b80156119a45780601f1061197b576101008083540402835291602001916119a4565b820191905f5260205f20905b81548152906001019060200180831161198757829003601f168201915b505050505090505b92915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611a20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a1790613ceb565b60405180910390fd5b8060055f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611b0c9190612a3c565b60405180910390a3505050565b5f67ffffffffffffffff16816040015167ffffffffffffffff1614158015611b605750611b44612225565b67ffffffffffffffff16816040015167ffffffffffffffff1611155b15611b97576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f815f015190505f82602001519050611baf8161222c565b5f611bfb835f015184602001518560400151805190602001208760400151604051602001611be09493929190613d18565b604051602081830303815290604052805190602001206122fa565b9050611c05610d9d565b73ffffffffffffffffffffffffffffffffffffffff16611c3282845f015185602001518660400151612313565b73ffffffffffffffffffffffffffffffffffffffff1614611c7f576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050565b5f815f01549050919050565b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611cff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cf690613da5565b60405180910390fd5b611d0881612167565b15611d48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3f90613e0d565b60405180910390fd5b611d555f838360016121a7565b611d5e81612167565b15611d9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9590613e0d565b60405180910390fd5b600160035f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055508160025f8381526020019081526020015f205f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550808273ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4611ea05f838360016121ad565b5050565b6001815f015f828254019250508190555050565b611ec384848461149f565b611ecf8484848461233c565b611f0e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f0590613e9b565b60405180910390fd5b50505050565b6060600d8054611f2390613251565b80601f0160208091040260200160405190810160405280929190818152602001828054611f4f90613251565b8015611f9a5780601f10611f7157610100808354040283529160200191611f9a565b820191905f5260205f20905b815481529060010190602001808311611f7d57829003601f168201915b5050505050905090565b60605f6001611fb2846124be565b0190505f8167ffffffffffffffff811115611fd057611fcf612c9d565b5b6040519080825280601f01601f1916602001820160405280156120025781602001600182028036833780820191505090505b5090505f82602001820190505b600115612063578080600190039150507f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a858161205857612057613eb9565b5b0494505f850361200f575b819350505050919050565b8060095f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f7f000000000000000000000000e6dd82eae2e7dae382cd893e99008fc7d11c895c73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1614801561212c57507f000000000000000000000000000000000000000000000000000000000000000146145b15612159577fe946e920404395c337346767cf75722b47b611e87973d01a876fde113ad307229050612164565b61216161260f565b90505b90565b5f8073ffffffffffffffffffffffffffffffffffffffff1661218883611809565b73ffffffffffffffffffffffffffffffffffffffff1614159050919050565b50505050565b50505050565b60605f6121bf836126a4565b90505f602067ffffffffffffffff8111156121dd576121dc612c9d565b5b6040519080825280601f01601f19166020018201604052801561220f5781602001600182028036833780820191505090505b5090508181528360208201528092505050919050565b5f42905090565b5f815f01518260200151836040015160405160200161224d93929190613f3a565b6040516020818303038152906040529050600b8160405161226e9190613fba565b90815260200160405180910390205f9054906101000a900460ff16156122c0576040517fcce9a82400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600b826040516122d29190613fba565b90815260200160405180910390205f6101000a81548160ff0219169083151502179055505050565b5f61230c6123066120b1565b836126f2565b9050919050565b5f805f61232287878787612732565b9150915061232f8161280a565b8192505050949350505050565b5f61235c8473ffffffffffffffffffffffffffffffffffffffff1661296f565b156124b1578373ffffffffffffffffffffffffffffffffffffffff1663150b7a0261238561134e565b8786866040518563ffffffff1660e01b81526004016123a79493929190614018565b6020604051808303815f875af19250505080156123e257506040513d601f19601f820116820180604052508101906123df9190614076565b60015b612461573d805f8114612410576040519150601f19603f3d011682016040523d82523d5f602084013e612415565b606091505b505f815103612459576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245090613e9b565b60405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149150506124b6565b600190505b949350505050565b5f805f90507a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000831061251a577a184f03e93ff9f4daa797ed6e38ed64bf6a1f01000000000000000083816125105761250f613eb9565b5b0492506040810190505b6d04ee2d6d415b85acef81000000008310612557576d04ee2d6d415b85acef8100000000838161254d5761254c613eb9565b5b0492506020810190505b662386f26fc10000831061258657662386f26fc10000838161257c5761257b613eb9565b5b0492506010810190505b6305f5e10083106125af576305f5e10083816125a5576125a4613eb9565b5b0492506008810190505b61271083106125d45761271083816125ca576125c9613eb9565b5b0492506004810190505b606483106125f757606483816125ed576125ec613eb9565b5b0492506002810190505b600a8310612606576001810190505b80915050919050565b5f7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f7949de5349369d7de25ad98fc6d9d8ebdd55d8aff47371ae21797983efbd74e97f8cd160c72d102a6747abd189ac21d4a1f802e3fcc1bb8fc78cc4d558df0c7c2146306040516020016126899594939291906140a1565b60405160208183030381529060405280519060200120905090565b5f8060ff835f1c169050601f8111156126e9576040517fb3512b0c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80915050919050565b5f6040517f190100000000000000000000000000000000000000000000000000000000000081528360028201528260228201526042812091505092915050565b5f807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0835f1c111561276a575f600391509150612801565b5f6001878787876040515f815260200160405260405161278d9493929190614101565b6020604051602081039080840390855afa1580156127ad573d5f803e3d5ffd5b5050506020604051035190505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036127f9575f60019250925050612801565b805f92509250505b94509492505050565b5f600481111561281d5761281c614144565b5b8160048111156128305761282f614144565b5b031561296c576001600481111561284a57612849614144565b5b81600481111561285d5761285c614144565b5b0361289d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612894906141bb565b60405180910390fd5b600260048111156128b1576128b0614144565b5b8160048111156128c4576128c3614144565b5b03612904576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128fb90614223565b60405180910390fd5b6003600481111561291857612917614144565b5b81600481111561292b5761292a614144565b5b0361296b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612962906142b1565b60405180910390fd5b5b50565b5f808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6129d6816129a2565b81146129e0575f80fd5b50565b5f813590506129f1816129cd565b92915050565b5f60208284031215612a0c57612a0b61299a565b5b5f612a19848285016129e3565b91505092915050565b5f8115159050919050565b612a3681612a22565b82525050565b5f602082019050612a4f5f830184612a2d565b92915050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015612a8c578082015181840152602081019050612a71565b5f8484015250505050565b5f601f19601f8301169050919050565b5f612ab182612a55565b612abb8185612a5f565b9350612acb818560208601612a6f565b612ad481612a97565b840191505092915050565b5f6020820190508181035f830152612af78184612aa7565b905092915050565b5f819050919050565b612b1181612aff565b8114612b1b575f80fd5b50565b5f81359050612b2c81612b08565b92915050565b5f60208284031215612b4757612b4661299a565b5b5f612b5484828501612b1e565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f612b8682612b5d565b9050919050565b612b9681612b7c565b82525050565b5f602082019050612baf5f830184612b8d565b92915050565b612bbe81612b7c565b8114612bc8575f80fd5b50565b5f81359050612bd981612bb5565b92915050565b5f8060408385031215612bf557612bf461299a565b5b5f612c0285828601612bcb565b9250506020612c1385828601612b1e565b9150509250929050565b612c2681612aff565b82525050565b5f602082019050612c3f5f830184612c1d565b92915050565b5f805f60608486031215612c5c57612c5b61299a565b5b5f612c6986828701612bcb565b9350506020612c7a86828701612bcb565b9250506040612c8b86828701612b1e565b9150509250925092565b5f80fd5b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b612cd382612a97565b810181811067ffffffffffffffff82111715612cf257612cf1612c9d565b5b80604052505050565b5f612d04612991565b9050612d108282612cca565b919050565b5f67ffffffffffffffff821115612d2f57612d2e612c9d565b5b612d3882612a97565b9050602081019050919050565b828183375f83830152505050565b5f612d65612d6084612d15565b612cfb565b905082815260208101848484011115612d8157612d80612c99565b5b612d8c848285612d45565b509392505050565b5f82601f830112612da857612da7612c95565b5b8135612db8848260208601612d53565b91505092915050565b5f60208284031215612dd657612dd561299a565b5b5f82013567ffffffffffffffff811115612df357612df261299e565b5b612dff84828501612d94565b91505092915050565b5f60208284031215612e1d57612e1c61299a565b5b5f612e2a84828501612bcb565b91505092915050565b5f7fff0000000000000000000000000000000000000000000000000000000000000082169050919050565b612e6781612e33565b82525050565b5f819050919050565b612e7f81612e6d565b82525050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b612eb781612aff565b82525050565b5f612ec88383612eae565b60208301905092915050565b5f602082019050919050565b5f612eea82612e85565b612ef48185612e8f565b9350612eff83612e9f565b805f5b83811015612f2f578151612f168882612ebd565b9750612f2183612ed4565b925050600181019050612f02565b5085935050505092915050565b5f60e082019050612f4f5f83018a612e5e565b8181036020830152612f618189612aa7565b90508181036040830152612f758188612aa7565b9050612f846060830187612c1d565b612f916080830186612b8d565b612f9e60a0830185612e76565b81810360c0830152612fb08184612ee0565b905098975050505050505050565b612fc781612a22565b8114612fd1575f80fd5b50565b5f81359050612fe281612fbe565b92915050565b5f8060408385031215612ffe57612ffd61299a565b5b5f61300b85828601612bcb565b925050602061301c85828601612fd4565b9150509250929050565b5f80fd5b5f60a0828403121561303f5761303e613026565b5b81905092915050565b5f6020828403121561305d5761305c61299a565b5b5f82013567ffffffffffffffff81111561307a5761307961299e565b5b6130868482850161302a565b91505092915050565b5f67ffffffffffffffff8211156130a9576130a8612c9d565b5b6130b282612a97565b9050602081019050919050565b5f6130d16130cc8461308f565b612cfb565b9050828152602081018484840111156130ed576130ec612c99565b5b6130f8848285612d45565b509392505050565b5f82601f83011261311457613113612c95565b5b81356131248482602086016130bf565b91505092915050565b5f805f80608085870312156131455761314461299a565b5b5f61315287828801612bcb565b945050602061316387828801612bcb565b935050604061317487828801612b1e565b925050606085013567ffffffffffffffff8111156131955761319461299e565b5b6131a187828801613100565b91505092959194509250565b5f80604083850312156131c3576131c261299a565b5b5f6131d085828601612bcb565b92505060206131e185828601612bcb565b9150509250929050565b5f6020820190506131fe5f830184612e76565b92915050565b5f6020820190508181035f83015261321c8184612ee0565b905092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f600282049050600182168061326857607f821691505b60208210810361327b5761327a613224565b5b50919050565b7f4552433732313a20617070726f76616c20746f2063757272656e74206f776e655f8201527f7200000000000000000000000000000000000000000000000000000000000000602082015250565b5f6132db602183612a5f565b91506132e682613281565b604082019050919050565b5f6020820190508181035f830152613308816132cf565b9050919050565b7f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f5f8201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c000000602082015250565b5f613369603d83612a5f565b91506133748261330f565b604082019050919050565b5f6020820190508181035f8301526133968161335d565b9050919050565b7f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e655f8201527f72206f7220617070726f76656400000000000000000000000000000000000000602082015250565b5f6133f7602d83612a5f565b91506134028261339d565b604082019050919050565b5f6020820190508181035f830152613424816133eb565b9050919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026134877fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8261344c565b613491868361344c565b95508019841693508086168417925050509392505050565b5f819050919050565b5f6134cc6134c76134c284612aff565b6134a9565b612aff565b9050919050565b5f819050919050565b6134e5836134b2565b6134f96134f1826134d3565b848454613458565b825550505050565b5f90565b61350d613501565b6135188184846134dc565b505050565b5b8181101561353b576135305f82613505565b60018101905061351e565b5050565b601f821115613580576135518161342b565b61355a8461343d565b81016020851015613569578190505b61357d6135758561343d565b83018261351d565b50505b505050565b5f82821c905092915050565b5f6135a05f1984600802613585565b1980831691505092915050565b5f6135b88383613591565b9150826002028217905092915050565b6135d182612a55565b67ffffffffffffffff8111156135ea576135e9612c9d565b5b6135f48254613251565b6135ff82828561353f565b5f60209050601f831160018114613630575f841561361e578287015190505b61362885826135ad565b86555061368f565b601f19841661363e8661342b565b5f5b8281101561366557848901518255600182019150602085019450602081019050613640565b86831015613682578489015161367e601f891682613591565b8355505b6001600288020188555050505b505050505050565b7f4552433732313a20696e76616c696420746f6b656e20494400000000000000005f82015250565b5f6136cb601883612a5f565b91506136d682613697565b602082019050919050565b5f6020820190508181035f8301526136f8816136bf565b9050919050565b7f4552433732313a2061646472657373207a65726f206973206e6f7420612076615f8201527f6c6964206f776e65720000000000000000000000000000000000000000000000602082015250565b5f613759602983612a5f565b9150613764826136ff565b604082019050919050565b5f6020820190508181035f8301526137868161374d565b9050919050565b7f436c61696d696e6720636f7374206973206e6f7420656e6f75676800000000005f82015250565b5f6137c1601b83612a5f565b91506137cc8261378d565b602082019050919050565b5f6020820190508181035f8301526137ee816137b5565b9050919050565b5f80fd5b5f80fd5b5f60608284031215613812576138116137f5565b5b61381c6060612cfb565b90505f61382b84828501612bcb565b5f83015250602061383e84828501612b1e565b602083015250604082013567ffffffffffffffff811115613862576138616137f9565b5b61386e84828501613100565b60408301525092915050565b5f60ff82169050919050565b61388f8161387a565b8114613899575f80fd5b50565b5f813590506138aa81613886565b92915050565b6138b981612e6d565b81146138c3575f80fd5b50565b5f813590506138d4816138b0565b92915050565b5f606082840312156138ef576138ee6137f5565b5b6138f96060612cfb565b90505f6139088482850161389c565b5f83015250602061391b848285016138c6565b602083015250604061392f848285016138c6565b60408301525092915050565b5f67ffffffffffffffff82169050919050565b6139578161393b565b8114613961575f80fd5b50565b5f813590506139728161394e565b92915050565b5f60a0828403121561398d5761398c6137f5565b5b6139976060612cfb565b90505f82013567ffffffffffffffff8111156139b6576139b56137f9565b5b6139c2848285016137fd565b5f8301525060206139d5848285016138da565b60208301525060806139e984828501613964565b60408301525092915050565b5f613a003683613978565b9050919050565b5f80fd5b5f82356001606003833603038112613a2657613a25613a07565b5b80830191505092915050565b5f81905092915050565b5f613a4682612a55565b613a508185613a32565b9350613a60818560208601612a6f565b80840191505092915050565b5f613a778285613a3c565b9150613a838284613a3c565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f613ae9602683612a5f565b9150613af482613a8f565b604082019050919050565b5f6020820190508181035f830152613b1681613add565b9050919050565b7f4552433732313a207472616e736665722066726f6d20696e636f7272656374205f8201527f6f776e6572000000000000000000000000000000000000000000000000000000602082015250565b5f613b77602583612a5f565b9150613b8282613b1d565b604082019050919050565b5f6020820190508181035f830152613ba481613b6b565b9050919050565b7f4552433732313a207472616e7366657220746f20746865207a65726f206164645f8201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b5f613c05602483612a5f565b9150613c1082613bab565b604082019050919050565b5f6020820190508181035f830152613c3281613bf9565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f613c6d602083612a5f565b9150613c7882613c39565b602082019050919050565b5f6020820190508181035f830152613c9a81613c61565b9050919050565b7f4552433732313a20617070726f766520746f2063616c6c6572000000000000005f82015250565b5f613cd5601983612a5f565b9150613ce082613ca1565b602082019050919050565b5f6020820190508181035f830152613d0281613cc9565b9050919050565b613d128161393b565b82525050565b5f608082019050613d2b5f830187612b8d565b613d386020830186612c1d565b613d456040830185612e76565b613d526060830184613d09565b95945050505050565b7f4552433732313a206d696e7420746f20746865207a65726f20616464726573735f82015250565b5f613d8f602083612a5f565b9150613d9a82613d5b565b602082019050919050565b5f6020820190508181035f830152613dbc81613d83565b9050919050565b7f4552433732313a20746f6b656e20616c7265616479206d696e746564000000005f82015250565b5f613df7601c83612a5f565b9150613e0282613dc3565b602082019050919050565b5f6020820190508181035f830152613e2481613deb565b9050919050565b7f4552433732313a207472616e7366657220746f206e6f6e2045524337323152655f8201527f63656976657220696d706c656d656e7465720000000000000000000000000000602082015250565b5f613e85603283612a5f565b9150613e9082613e2b565b604082019050919050565b5f6020820190508181035f830152613eb281613e79565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f8160f81b9050919050565b5f613efc82613ee6565b9050919050565b613f14613f0f8261387a565b613ef2565b82525050565b5f819050919050565b613f34613f2f82612e6d565b613f1a565b82525050565b5f613f458286613f03565b600182019150613f558285613f23565b602082019150613f658284613f23565b602082019150819050949350505050565b5f81519050919050565b5f81905092915050565b5f613f9482613f76565b613f9e8185613f80565b9350613fae818560208601612a6f565b80840191505092915050565b5f613fc58284613f8a565b915081905092915050565b5f82825260208201905092915050565b5f613fea82613f76565b613ff48185613fd0565b9350614004818560208601612a6f565b61400d81612a97565b840191505092915050565b5f60808201905061402b5f830187612b8d565b6140386020830186612b8d565b6140456040830185612c1d565b81810360608301526140578184613fe0565b905095945050505050565b5f81519050614070816129cd565b92915050565b5f6020828403121561408b5761408a61299a565b5b5f61409884828501614062565b91505092915050565b5f60a0820190506140b45f830188612e76565b6140c16020830187612e76565b6140ce6040830186612e76565b6140db6060830185612c1d565b6140e86080830184612b8d565b9695505050505050565b6140fb8161387a565b82525050565b5f6080820190506141145f830187612e76565b61412160208301866140f2565b61412e6040830185612e76565b61413b6060830184612e76565b95945050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f45434453413a20696e76616c6964207369676e617475726500000000000000005f82015250565b5f6141a5601883612a5f565b91506141b082614171565b602082019050919050565b5f6020820190508181035f8301526141d281614199565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265206c656e677468005f82015250565b5f61420d601f83612a5f565b9150614218826141d9565b602082019050919050565b5f6020820190508181035f83015261423a81614201565b9050919050565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c5f8201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b5f61429b602283612a5f565b91506142a682614241565b604082019050919050565b5f6020820190508181035f8301526142c88161428f565b905091905056fea2646970667358221220f8640efa085d5c6ef2235ae1f310ad7de794cb7a3ecfd54d8c05622054ceb3ed64736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000d70ced3de8aafe99b5202ed4f6ba24c4029b39d8000000000000000000000000000000000000000000000000000000000000001468747470733a2f2f6578616d706c652e636f6d2f000000000000000000000000
-----Decoded View---------------
Arg [0] : initialBaseURI (string): https://example.com/
Arg [1] : trustedForwarder (address): 0xd70ced3DE8AAfE99B5202eD4f6ba24c4029B39D8
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 000000000000000000000000d70ced3de8aafe99b5202ed4f6ba24c4029b39d8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [3] : 68747470733a2f2f6578616d706c652e636f6d2f000000000000000000000000
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.