More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 1,257 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Safe Transfer Fr... | 307759016 | 62 days ago | IN | 0 ETH | 0.0000007 | ||||
Set Approval For... | 304256351 | 73 days ago | IN | 0 ETH | 0.0000003 | ||||
Set Approval For... | 295422760 | 98 days ago | IN | 0 ETH | 0.00000364 | ||||
Set Approval For... | 282654465 | 136 days ago | IN | 0 ETH | 0.00000149 | ||||
Set Approval For... | 279261411 | 145 days ago | IN | 0 ETH | 0.00000727 | ||||
Retrieve Delegat... | 278153282 | 149 days ago | IN | 0 ETH | 0.00000519 | ||||
Retrieve Delegat... | 229395127 | 290 days ago | IN | 0 ETH | 0.00000082 | ||||
Retrieve Delegat... | 229395031 | 290 days ago | IN | 0 ETH | 0.00000081 | ||||
Set Approval For... | 229390237 | 291 days ago | IN | 0 ETH | 0.00000061 | ||||
Set Approval For... | 225168526 | 303 days ago | IN | 0 ETH | 0.00000046 | ||||
Set Approval For... | 224199845 | 306 days ago | IN | 0 ETH | 0.00000154 | ||||
Update Receiver ... | 220825950 | 315 days ago | IN | 0 ETH | 0.00000125 | ||||
Set Approval For... | 220813801 | 315 days ago | IN | 0 ETH | 0.00000121 | ||||
Set Approval For... | 220774406 | 315 days ago | IN | 0 ETH | 0.00001008 | ||||
Set Approval For... | 220395575 | 317 days ago | IN | 0 ETH | 0.00000117 | ||||
Set Approval For... | 219118289 | 320 days ago | IN | 0 ETH | 0.00000239 | ||||
Set Approval For... | 218587263 | 322 days ago | IN | 0 ETH | 0.00000113 | ||||
Toggle Delegatio... | 218575036 | 322 days ago | IN | 0 ETH | 0.0000008 | ||||
Set Approval For... | 218540179 | 322 days ago | IN | 0 ETH | 0.00000082 | ||||
Safe Transfer Fr... | 218535641 | 322 days ago | IN | 0 ETH | 0.00000113 | ||||
Safe Transfer Fr... | 218011811 | 323 days ago | IN | 0 ETH | 0.000003 | ||||
Retrieve Delegat... | 217113242 | 326 days ago | IN | 0 ETH | 0.00000099 | ||||
Retrieve Delegat... | 217113198 | 326 days ago | IN | 0 ETH | 0.00000098 | ||||
Retrieve Delegat... | 217113099 | 326 days ago | IN | 0 ETH | 0.00000099 | ||||
Retrieve Delegat... | 217113049 | 326 days ago | IN | 0 ETH | 0.00000098 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
210715594 | 345 days ago | 0.1 ETH | ||||
210715091 | 345 days ago | 0.1 ETH | ||||
210714984 | 345 days ago | 0.1 ETH | ||||
210707233 | 345 days ago | 0.1 ETH | ||||
210705126 | 345 days ago | 0.1 ETH | ||||
210614609 | 345 days ago | 0.1 ETH | ||||
210599473 | 345 days ago | 0.01 ETH | ||||
210552989 | 345 days ago | 0.1 ETH | ||||
210534266 | 345 days ago | 0.1 ETH | ||||
210473992 | 346 days ago | 0.1 ETH | ||||
210461367 | 346 days ago | 0.1 ETH | ||||
210404385 | 346 days ago | 0.1 ETH | ||||
210307669 | 346 days ago | 0.1 ETH | ||||
210254560 | 346 days ago | 0.1 ETH | ||||
210247228 | 346 days ago | 0.1 ETH | ||||
210206048 | 346 days ago | 0.1 ETH | ||||
210205742 | 346 days ago | 0.1 ETH | ||||
210205597 | 346 days ago | 0.1 ETH | ||||
210157235 | 347 days ago | 0.1 ETH | ||||
210051076 | 347 days ago | 0.1 ETH | ||||
210048687 | 347 days ago | 0.1 ETH | ||||
209962840 | 347 days ago | 0.1 ETH | ||||
209961111 | 347 days ago | 0.1 ETH | ||||
209959412 | 347 days ago | 0.1 ETH | ||||
209892127 | 347 days ago | 0.1 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
ValidatorIdentity
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.25; import { IdentityERC721 } from "../IdentityERC721.sol"; import { IValidatorIdentity } from "./IValidatorIdentity.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { MessageHashUtils } from "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @title ValidatorIdentity * @notice Validators require an identity to link the wallet where they wish to receive rewards (if applicable). * Unlike the Ticker, ValidatorIdentity is permanently owned by its creator and contains no tax. * * For more details, refer to IValidatorIdentity.sol. */ contract ValidatorIdentity is IValidatorIdentity, IdentityERC721 { using MessageHashUtils for bytes32; mapping(uint256 => DelegatedIdentity) internal delegations; Identifier[] internal identities; uint32 public earlyBridsEnd; bytes32 public EARLY_BIRD_ROOT; modifier onlyEndEarlyBirdsPeriod() { if (earlyBridsEnd > block.timestamp) revert EarlyBirdOnly(); _; } constructor(address _owner, address _treasury, address _nameFilter, uint256 _cost) IdentityERC721(_owner, _treasury, _nameFilter, _cost, "ValidatorIdentity", "EthI") { identities.push(Identifier({ name: "DEAD_WALLET", tokenReceiver: address(0) })); earlyBridsEnd = uint32(block.timestamp + 1 weeks); EARLY_BIRD_ROOT = 0x62fbdf096d8fd9adb08eda13e6f821e6e0da674a69c02a5cf718f17cffea12ac; } function createWhitelisted(string calldata _name, address _receiverWallet, bytes32[] calldata proofs) external payable { bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(msg.sender)))); if (!MerkleProof.verify(proofs, EARLY_BIRD_ROOT, leaf)) revert InvalidProof(); _executeCreate(_name, _receiverWallet); } function createWithSignature( string calldata _name, address _receiverWallet, uint256 _deadline, bytes memory _signature ) external payable override onlyEndEarlyBirdsPeriod { if (block.timestamp >= _deadline) revert ExpiredSignature(); bytes32 ethSignature = keccak256(abi.encodePacked(msg.sender, _name, _deadline)).toEthSignedMessageHash(); address signer = ECDSA.recover(ethSignature, _signature); if (signer != msg.sender) revert NotSigner(); _executeCreate(_name, _receiverWallet); } function create(string calldata _name, address _receiverWallet) external payable override onlyEndEarlyBirdsPeriod { _executeCreate(_name, _receiverWallet); } function _executeCreate(string memory _name, address _receiverWallet) internal { _create(_name, cost); identities.push( Identifier({ name: _name, tokenReceiver: _receiverWallet == address(0) ? msg.sender : _receiverWallet }) ); } function delegate(uint256 _nftId, string memory _name, uint128 _delegateCost, uint8 _amountOfMonths) external override { if (_amountOfMonths == 0) revert InvalidMonthTime(); if (_nftId == 0) { _nftId = identityIds[_name]; } else { _name = identities[_nftId].name; } delegations[_nftId] = DelegatedIdentity({ isEnabled: true, owner: msg.sender, originalTokenReceiver: identities[_nftId].tokenReceiver, delegatee: address(0), durationInMonths: _amountOfMonths, endDelegationTime: 0, cost: _delegateCost }); _transfer(msg.sender, address(this), _nftId); emit DelegationUpdated(_name, _nftId, true); } function acceptDelegation(uint256 _nftId, string memory _name, address _receiverWallet) external payable override { if (_nftId == 0) { _nftId = identityIds[_name]; } else { _name = identities[_nftId].name; } DelegatedIdentity storage delegated = delegations[_nftId]; if (!delegated.isEnabled) revert DelegationNotActive(); if (delegated.endDelegationTime > block.timestamp) revert DelegationNotOver(); if (delegated.cost != msg.value) revert NotEnough(); uint32 endPeriod = uint32(block.timestamp + (30 days * delegated.durationInMonths)); delegated.delegatee = msg.sender; delegated.endDelegationTime = endPeriod; _updateReceiverAddress(_nftId, _receiverWallet); _sendNative(delegated.owner, msg.value, true); emit IdentityDelegated(_name, _nftId, msg.sender, endPeriod); } function toggleDelegation(uint256 _nftId, string memory _name) external override { if (_nftId == 0) { _nftId = identityIds[_name]; } else { _name = identities[_nftId].name; } DelegatedIdentity storage delegated = delegations[_nftId]; bool currentState = delegated.isEnabled; if (delegated.owner != msg.sender) revert NotIdentityOwner(); delegated.isEnabled = !currentState; emit DelegationUpdated(_name, _nftId, !currentState); } function retrieveDelegation(uint256 _nftId, string memory _name) external override { if (_nftId == 0) { _nftId = identityIds[_name]; } else { _name = identities[_nftId].name; } DelegatedIdentity storage delegated = delegations[_nftId]; if (delegated.owner != msg.sender) revert NotIdentityOwner(); if (delegated.endDelegationTime > block.timestamp) revert DelegationNotOver(); if (delegated.isEnabled) { emit DelegationUpdated(_name, _nftId, false); } _updateReceiverAddress(_nftId, delegated.originalTokenReceiver); delete delegations[_nftId]; _transfer(address(this), msg.sender, _nftId); } function updateDelegationWalletReceiver(uint256 _nftId, string memory _name, address _receiverWallet) external override { if (_nftId == 0) { _nftId = identityIds[_name]; } else { _name = identities[_nftId].name; } DelegatedIdentity storage delegated = delegations[_nftId]; if (delegated.delegatee != msg.sender) revert NotDelegatee(); if (delegated.endDelegationTime <= block.timestamp) revert DelegationOver(); _updateReceiverAddress(_nftId, _receiverWallet); } function updateReceiverAddress(uint256 _nftId, string memory _name, address _receiver) external override { if (_nftId == 0) { _nftId = identityIds[_name]; } else { _name = identities[_nftId].name; } if (ownerOf(_nftId) != msg.sender) revert NotIdentityOwner(); _updateReceiverAddress(_nftId, _receiver); } function _updateReceiverAddress(uint256 _nftId, address _receiver) private { Identifier storage identity = identities[_nftId]; identity.tokenReceiver = _receiver; emit TokenReceiverUpdated(_nftId, identity.name, _receiver); } function updateEarlyBirdRoot(bytes32 _root) external onlyOwner { EARLY_BIRD_ROOT = _root; } function getIdentityData(uint256 _nftId, string calldata _name) external view override returns (Identifier memory) { if (_nftId == 0) { _nftId = identityIds[_name]; } return identities[_nftId]; } function getDelegationData(uint256 _nftId, string calldata _name) external view override returns (DelegatedIdentity memory) { if (_nftId == 0) { _nftId = identityIds[_name]; } return delegations[_nftId]; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.25; import { IIdentityERC721 } from "./IIdentityERC721.sol"; import { SendNativeHelper } from "./../SendNativeHelper.sol"; import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { NameFilter } from "./NameFilter.sol"; /** * @title IdentityERC721 * @notice The base of Ticker & ValidatorIdentity. It handles name verification, id traking and the payment */ abstract contract IdentityERC721 is IIdentityERC721, ERC721, SendNativeHelper, Ownable { address public immutable treasury; uint256 public cost; NameFilter public nameFilter; mapping(string => uint256) internal identityIds; uint256 private nextIdToMint; /** * @dev Important, you need to have an array of your IdentityData. In the constructor, you must push your first * element as "DEAD". nftId starts at 1 * @dev when creating an Indentity, call _create to validate and mint */ constructor( address _owner, address _treasury, address _nameFilter, uint256 _cost, string memory _name, string memory _symbol ) ERC721(_name, _symbol) Ownable(_owner) { if (_treasury == address(0)) revert TreasuryNotSet(); nameFilter = NameFilter(_nameFilter); nextIdToMint = 1; treasury = _treasury; cost = _cost; } function _create(string memory _name, uint256 _expectingCost) internal returns (uint256 mintedId_) { if (_expectingCost != 0 && msg.value != _expectingCost) revert ValueIsNotEqualsToCost(); if (identityIds[_name] != 0) revert NameAlreadyTaken(); (bool isNameHealthy, uint256 characterIndex) = nameFilter.isNameValidWithIndexError(_name); if (!isNameHealthy) revert InvalidCharacter(characterIndex); mintedId_ = nextIdToMint; nextIdToMint++; identityIds[_name] = mintedId_; _mint(msg.sender, mintedId_); emit NewIdentityCreated(mintedId_, _name, msg.sender); if (_expectingCost == 0) return mintedId_; _sendNative(treasury, msg.value, true); return mintedId_; } function _update(address to, uint256 tokenId, address auth) internal override returns (address) { if (tokenId == 0) revert InvalidIdZero(); return super._update(to, tokenId, auth); } function isNameAvailable(string calldata _name) external view returns (bool success_, int32 failedAt_) { if (identityIds[_name] != 0) return (false, -1); uint256 characterIndex; (success_, characterIndex) = nameFilter.isNameValidWithIndexError(_name); return (success_, int32(uint32(characterIndex))); } function getIdentityNFTId(string calldata _name) external view override returns (uint256) { return identityIds[_name]; } function ownerOf(string calldata _name) external view returns (address) { return ownerOf(identityIds[_name]); } function updateNameFilter(address _newFilter) external onlyOwner { nameFilter = NameFilter(_newFilter); emit NameFilterUpdated(_newFilter); } function updateCost(uint256 _cost) external onlyOwner { cost = _cost; emit CostUpdated(_cost); } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.8.0; interface IValidatorIdentity { error EarlyBirdOnly(); error InvalidProof(); /** * @notice Identifier * @param name Name of the Wallet * @param tokenReceiver Address that will be receiving Ticker's reward if any */ struct Identifier { string name; address tokenReceiver; } /** * @notice DelegatedIdentity * @param isEnabled If the Delegation is enabled * @param owner The original owner of the Identity * @param originalTokenReceiver The original Identifier::tokenReceiver * @param delegatee The one buying the delegation * @param durationInMonths The duration in months of the delegation * @param endDelegationTime The time when the bought delegation ends * @param cost The upfront cost of the delegation */ struct DelegatedIdentity { bool isEnabled; address owner; address originalTokenReceiver; address delegatee; uint8 durationInMonths; uint32 endDelegationTime; uint128 cost; } error NotSigner(); error ExpiredSignature(); error DelegationNotOver(); error DelegationNotActive(); error DelegationOver(); error NotDelegatee(); error NotPaid(); error InvalidMonthTime(); event TokenReceiverUpdated(uint256 indexed walletId, string indexed walletName, address newTokenReceiver); event DelegationUpdated(string indexed identity, uint256 indexed nftId, bool isEnabled); event IdentityDelegated( string indexed identity, uint256 indexed nftId, address indexed delegatee, uint32 endPeriod ); /** * createWithSignature Create an Identity with signature to avoid getting front-runned * @param _name Name of the Identity * @param _receiverWallet Wallet that will be receiving the rewards * @param _deadline Deadline of the signature * @param _signature signed message abi.encodePacket(userAddress,name,deadline) */ function createWithSignature( string calldata _name, address _receiverWallet, uint256 _deadline, bytes memory _signature ) external payable; /** * create Create an Identity * @param _name name of the Identity * @param _receiverWallet Wallet that will be receiving the rewards */ function create(string calldata _name, address _receiverWallet) external payable; /** * @notice delegate Send temporary your nft away to let other user use it for a period of time * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @param _delegateCost cost to accept this delegation * @param _amountOfMonths term duration in months * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. */ function delegate(uint256 _nftId, string memory _name, uint128 _delegateCost, uint8 _amountOfMonths) external; /** * @notice acceptDelegation Accept a delegation to use it for yourself during the set period defined * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @param _receiverWallet wallet you want the token(s) to be minted to * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. */ function acceptDelegation(uint256 _nftId, string memory _name, address _receiverWallet) external payable; /** * @notice toggleDelegation Disable/Enable your delegation, so if it's currently used, nobody won't be able to * accept it * when the term ends * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. */ function toggleDelegation(uint256 _nftId, string memory _name) external; /** * @notice retrieveDelegation() your identity * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. * @dev Only the identity origina; owner can call this and it shouldn't be during a delegation * @dev The system will automatically restore the original wallet receiver before transferring */ function retrieveDelegation(uint256 _nftId, string memory _name) external; /** * updateDelegationWalletReceiver Update the wallet that will receive the token(s) from the delegation * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @param _receiverWallet wallet you want the token(s) to be minted to * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. * @dev only the delegatee can call this function. The term needs to be still active */ function updateDelegationWalletReceiver(uint256 _nftId, string memory _name, address _receiverWallet) external; /** * updateReceiverAddress Update Receiver Wallet of an Identity * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @param _receiver address that will be receiving any rewards * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. * @dev Only the owner of the Identity can call this function */ function updateReceiverAddress(uint256 _nftId, string memory _name, address _receiver) external; /** * getIdentityDataWithName Get Identity information with name * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @return identity_ tuple(name,tokenReceiver) * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. */ function getIdentityData(uint256 _nftId, string calldata _name) external view returns (Identifier memory); /** * @notice getDelegationData() Retrieves delegation data using the identity name. * @param _nftId The ID of the NFT. * @param _name The name of the identity. * @dev Use either `_nftId` or `_name`. If you want to use `_name`, set `_nftId` to 0. */ function getDelegationData(uint256 _nftId, string calldata _name) external view returns (DelegatedIdentity memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @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 } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile 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 {MessageHashUtils-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] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { 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, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile 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 {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); 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] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. 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. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // 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, s); } // 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, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @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, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) pragma solidity ^0.8.20; import {Strings} from "../Strings.sol"; /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the Merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT pragma solidity >= 0.8.0; interface IIdentityERC721 { error NameAlreadyTaken(); error InvalidCharacter(uint256 characterIndex); error ValueIsNotEqualsToCost(); error TreasuryNotSet(); error NotIdentityOwner(); error InvalidIdZero(); event NewIdentityCreated(uint256 indexed identityId, string indexed identityName, address indexed owner); event NameFilterUpdated(address indexed newNameFilter); event CostUpdated(uint256 newCost); /** * @notice getIdentityNFTId get the NFT Id attached to the name * @param _name Identity Name * @return nftId * @dev ID: 0 == DEAD_NFT */ function getIdentityNFTId(string calldata _name) external view returns (uint256); /** * @notice ownerOf getOwner of the NFT with the Identity Name * @param _name Name of the Identity */ function ownerOf(string calldata _name) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.25; /** * @title SendNativeHelper * @notice This helper facilitates the sending of native tokens and manages actions in case of reversion or tracking * rewards upon failure. */ abstract contract SendNativeHelper { error NotEnough(); error FailedToSendETH(); mapping(address wallet => uint256) internal pendingClaims; function _sendNative(address _to, uint256 _amount, bool _revertIfFails) internal { if (_amount == 0) return; (bool success,) = _to.call{ value: _amount }(""); if (!success) { if (_revertIfFails) revert FailedToSendETH(); pendingClaims[_to] += _amount; } } function claimFund() external { uint256 balance = pendingClaims[msg.sender]; pendingClaims[msg.sender] = 0; if (balance == 0) revert NotEnough(); _sendNative(msg.sender, balance, true); } function getPendingToClaim(address _user) external view returns (uint256) { return pendingClaims[_user]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.20; import {IERC721} from "./IERC721.sol"; import {IERC721Receiver} from "./IERC721Receiver.sol"; import {IERC721Metadata} from "./extensions/IERC721Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {Strings} from "../../utils/Strings.sol"; import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol"; import {IERC721Errors} from "../../interfaces/draft-IERC6093.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}. */ abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Errors { using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; mapping(uint256 tokenId => address) private _owners; mapping(address owner => uint256) private _balances; mapping(uint256 tokenId => address) private _tokenApprovals; mapping(address owner => mapping(address operator => 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 returns (uint256) { if (owner == address(0)) { revert ERC721InvalidOwner(address(0)); } return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual returns (address) { return _requireOwned(tokenId); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual returns (string memory) { _requireOwned(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string.concat(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 { _approve(to, tokenId, _msgSender()); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual returns (address) { _requireOwned(tokenId); return _getApproved(tokenId); } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } // Setting an "auth" arguments enables the `_isAuthorized` check which verifies that the token exists // (from != 0). Therefore, it is not needed to verify that the return value is not 0 here. address previousOwner = _update(to, tokenId, _msgSender()); if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual { transferFrom(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist * * IMPORTANT: Any overrides to this function that add ownership of tokens not tracked by the * core ERC721 logic MUST be matched with the use of {_increaseBalance} to keep balances * consistent with ownership. The invariant to preserve is 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`. */ function _ownerOf(uint256 tokenId) internal view virtual returns (address) { return _owners[tokenId]; } /** * @dev Returns the approved address for `tokenId`. Returns 0 if `tokenId` is not minted. */ function _getApproved(uint256 tokenId) internal view virtual returns (address) { return _tokenApprovals[tokenId]; } /** * @dev Returns whether `spender` is allowed to manage `owner`'s tokens, or `tokenId` in * particular (ignoring whether it is owned by `owner`). * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _isAuthorized(address owner, address spender, uint256 tokenId) internal view virtual returns (bool) { return spender != address(0) && (owner == spender || isApprovedForAll(owner, spender) || _getApproved(tokenId) == spender); } /** * @dev Checks if `spender` can operate on `tokenId`, assuming the provided `owner` is the actual owner. * Reverts if `spender` does not have approval from the provided `owner` for the given token or for all its assets * the `spender` for the specific `tokenId`. * * WARNING: This function assumes that `owner` is the actual owner of `tokenId` and does not verify this * assumption. */ function _checkAuthorized(address owner, address spender, uint256 tokenId) internal view virtual { if (!_isAuthorized(owner, spender, tokenId)) { if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } else { revert ERC721InsufficientApproval(spender, tokenId); } } } /** * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override. * * NOTE: the value is limited to type(uint128).max. This protect against _balance overflow. It is unrealistic that * a uint256 would ever overflow from increments when these increments are bounded to uint128 values. * * WARNING: Increasing an account's balance using this function tends to be paired with an override of the * {_ownerOf} function to resolve the ownership of the corresponding tokens so that balances and ownership * remain consistent with one another. */ function _increaseBalance(address account, uint128 value) internal virtual { unchecked { _balances[account] += value; } } /** * @dev Transfers `tokenId` from its current owner to `to`, or alternatively mints (or burns) if the current owner * (or `to`) is the zero address. Returns the owner of the `tokenId` before the update. * * The `auth` argument is optional. If the value passed is non 0, then this function will check that * `auth` is either the owner of the token, or approved to operate on the token (by the owner). * * Emits a {Transfer} event. * * NOTE: If overriding this function in a way that tracks balances, see also {_increaseBalance}. */ function _update(address to, uint256 tokenId, address auth) internal virtual returns (address) { address from = _ownerOf(tokenId); // Perform (optional) operator check if (auth != address(0)) { _checkAuthorized(from, auth, tokenId); } // Execute the update if (from != address(0)) { // Clear approval. No need to re-authorize or emit the Approval event _approve(address(0), tokenId, address(0), false); unchecked { _balances[from] -= 1; } } if (to != address(0)) { unchecked { _balances[to] += 1; } } _owners[tokenId] = to; emit Transfer(from, to, tokenId); return from; } /** * @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 { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner != address(0)) { revert ERC721InvalidSender(address(0)); } } /** * @dev Mints `tokenId`, transfers it to `to` and checks for `to` acceptance. * * 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 { _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); _checkOnERC721Received(address(0), to, tokenId, data); } /** * @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 { address previousOwner = _update(address(0), tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } } /** * @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 { if (to == address(0)) { revert ERC721InvalidReceiver(address(0)); } address previousOwner = _update(to, tokenId, address(0)); if (previousOwner == address(0)) { revert ERC721NonexistentToken(tokenId); } else if (previousOwner != from) { revert ERC721IncorrectOwner(from, tokenId, previousOwner); } } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking that contract recipients * are aware of the ERC721 standard 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 like {safeTransferFrom} in the sense that it invokes * {IERC721Receiver-onERC721Received} on the receiver, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `tokenId` token must exist and be owned by `from`. * - `to` cannot be the zero address. * - `from` cannot be the zero address. * - 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) internal { _safeTransfer(from, to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeTransfer-address-address-uint256-}[`_safeTransfer`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory data) internal virtual { _transfer(from, to, tokenId); _checkOnERC721Received(from, to, tokenId, data); } /** * @dev Approve `to` to operate on `tokenId` * * The `auth` argument is optional. If the value passed is non 0, then this function will check that `auth` is * either the owner of the token, or approved to operate on all tokens held by this owner. * * Emits an {Approval} event. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address to, uint256 tokenId, address auth) internal { _approve(to, tokenId, auth, true); } /** * @dev Variant of `_approve` with an optional flag to enable or disable the {Approval} event. The event is not * emitted in the context of transfers. */ function _approve(address to, uint256 tokenId, address auth, bool emitEvent) internal virtual { // Avoid reading the owner unless necessary if (emitEvent || auth != address(0)) { address owner = _requireOwned(tokenId); // We do not use _isAuthorized because single-token approvals should not be able to call approve if (auth != address(0) && owner != auth && !isApprovedForAll(owner, auth)) { revert ERC721InvalidApprover(auth); } if (emitEvent) { emit Approval(owner, to, tokenId); } } _tokenApprovals[tokenId] = to; } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Requirements: * - operator can't be the address zero. * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll(address owner, address operator, bool approved) internal virtual { if (operator == address(0)) { revert ERC721InvalidOperator(operator); } _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` doesn't have a current owner (it hasn't been minted, or it has been burned). * Returns the owner. * * Overrides to ownership logic should be done to {_ownerOf}. */ function _requireOwned(uint256 tokenId) internal view returns (address) { address owner = _ownerOf(tokenId); if (owner == address(0)) { revert ERC721NonexistentToken(tokenId); } return owner; } /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target address. This will revert if the * recipient doesn't accept the token transfer. 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 */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private { if (to.code.length > 0) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { if (retval != IERC721Receiver.onERC721Received.selector) { revert ERC721InvalidReceiver(to); } } catch (bytes memory reason) { if (reason.length == 0) { revert ERC721InvalidReceiver(to); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 pragma solidity ^0.8.25; /** * @title NameFilter * @notice It filters the character we do not allow in an Identity Name. * @dev It is in it's standalone as we might later on change the name filtering logic, allowing or removing unicodes */ contract NameFilter { function isNameValid(string calldata _str) external pure returns (bool valid_) { (valid_,) = isNameValidWithIndexError(_str); return valid_; } function isNameValidWithIndexError(string calldata _str) public pure returns (bool, uint256 index) { bytes memory strBytes = bytes(_str); uint8 charByte; uint16 charValue; if (strBytes.length == 0) return (false, index); while (index < strBytes.length) { charByte = uint8(strBytes[index]); if (charByte <= 0x7F) { // Single byte character (Basic Latin range) if ( !(charByte > 0x20 && charByte <= 0x7E) || charByte == 0xA0 || charByte == 0x24 || charByte == 0x3A || charByte == 0x2C || charByte == 0x40 || charByte == 0x2D ) { return (false, index); } index += 1; } else if (charByte < 0xE0) { // Two byte character if (index + 1 >= strBytes.length) { return (false, index); // Incomplete UTF-8 sequence } charValue = (uint16(uint8(strBytes[index]) & 0x1F) << 6) | (uint16(uint8(strBytes[index + 1])) & 0x3F); if ( charValue < 0x00A0 || charValue == 0x200B || charValue == 0xFEFF || (charValue >= 0x2000 && charValue <= 0x206F) // General Punctuation || (charValue >= 0x2150 && charValue <= 0x218F) // Number Forms || (charValue >= 0xFF00 && charValue <= 0xFFEF) // Halfwidth and Fullwidth Forms || (charValue >= 161 && charValue <= 191) // Latin-1 Supplement || charValue == 215 || charValue == 247 // Multiplication and Division signs ) { return (false, index); } index += 2; } else { // Three byte character (CJK, Cyrillic, Arabic, Hebrew, Hangul Jamo, etc.) if (index + 2 >= strBytes.length) { return (false, index); // Incomplete UTF-8 sequence } charValue = (uint16(uint8(strBytes[index]) & 0x0F) << 12) | (uint16(uint8(strBytes[index + 1]) & 0x3F) << 6) | (uint16(uint8(strBytes[index + 2])) & 0x3F); if ( (charValue >= 0x1100 && charValue <= 0x11FF) // Hangul Jamo || (charValue >= 0x0410 && charValue <= 0x044F) // Cyrillic || (charValue >= 0x3040 && charValue <= 0x309F) // Hiragana || (charValue >= 0x30A0 && charValue <= 0x30FF) // Katakana || (charValue >= 0xAC00 && charValue <= 0xD7AF) // Hangul || (charValue >= 0x0600 && charValue <= 0x06FF) // Arabic || (charValue >= 0x05D0 && charValue <= 0x05EA) // Hebrew || (charValue >= 20_000 && charValue <= 20_099) // Chinese limited range ) { index += 3; } else { return (false, index); } } } return (true, index); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @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), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(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) { uint256 localValue = value; 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] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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 bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.20; import {IERC165} from "../../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 address zero. * * 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 (last updated v5.0.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.20; /** * @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 v5.0.0) (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.20; import {IERC721} from "../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 v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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 towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (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 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) 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. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 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. uint256 twos = denominator & (0 - denominator); 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 (unsignedRoundsUp(rounding) && 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 * towards zero. * * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @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 v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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); }
{ "remappings": [ "src/=src/", "ds-test/=node_modules/@layerzerolabs/toolbox-foundry/lib/ds-test/", "forge-std/=node_modules/@layerzerolabs/toolbox-foundry/lib/forge-std/src/", "@layerzerolabs/=node_modules/@layerzerolabs/", "@openzeppelin/=node_modules/@openzeppelin/", "@axelar-network/=node_modules/@axelar-network/", "@chainlink/=node_modules/@chainlink/", "@eth-optimism/=node_modules/@eth-optimism/", "hardhat-deploy/=node_modules/hardhat-deploy/", "hardhat/=node_modules/hardhat/", "solidity-bytes-utils/=node_modules/solidity-bytes-utils/", "solmate/=node_modules/@layerzerolabs/toolbox-foundry/lib/solmate/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"address","name":"_nameFilter","type":"address"},{"internalType":"uint256","name":"_cost","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DelegationNotActive","type":"error"},{"inputs":[],"name":"DelegationNotOver","type":"error"},{"inputs":[],"name":"DelegationOver","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721IncorrectOwner","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721InsufficientApproval","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC721InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC721InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ERC721InvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC721InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC721InvalidSender","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC721NonexistentToken","type":"error"},{"inputs":[],"name":"EarlyBirdOnly","type":"error"},{"inputs":[],"name":"ExpiredSignature","type":"error"},{"inputs":[],"name":"FailedToSendETH","type":"error"},{"inputs":[{"internalType":"uint256","name":"characterIndex","type":"uint256"}],"name":"InvalidCharacter","type":"error"},{"inputs":[],"name":"InvalidIdZero","type":"error"},{"inputs":[],"name":"InvalidMonthTime","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"NameAlreadyTaken","type":"error"},{"inputs":[],"name":"NotDelegatee","type":"error"},{"inputs":[],"name":"NotEnough","type":"error"},{"inputs":[],"name":"NotIdentityOwner","type":"error"},{"inputs":[],"name":"NotPaid","type":"error"},{"inputs":[],"name":"NotSigner","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TreasuryNotSet","type":"error"},{"inputs":[],"name":"ValueIsNotEqualsToCost","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":false,"internalType":"uint256","name":"newCost","type":"uint256"}],"name":"CostUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"identity","type":"string"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isEnabled","type":"bool"}],"name":"DelegationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"identity","type":"string"},{"indexed":true,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":true,"internalType":"address","name":"delegatee","type":"address"},{"indexed":false,"internalType":"uint32","name":"endPeriod","type":"uint32"}],"name":"IdentityDelegated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newNameFilter","type":"address"}],"name":"NameFilterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"identityId","type":"uint256"},{"indexed":true,"internalType":"string","name":"identityName","type":"string"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"NewIdentityCreated","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":"uint256","name":"walletId","type":"uint256"},{"indexed":true,"internalType":"string","name":"walletName","type":"string"},{"indexed":false,"internalType":"address","name":"newTokenReceiver","type":"address"}],"name":"TokenReceiverUpdated","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":[],"name":"EARLY_BIRD_ROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_receiverWallet","type":"address"}],"name":"acceptDelegation","outputs":[],"stateMutability":"payable","type":"function"},{"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":"claimFund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_receiverWallet","type":"address"}],"name":"create","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_receiverWallet","type":"address"},{"internalType":"bytes32[]","name":"proofs","type":"bytes32[]"}],"name":"createWhitelisted","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_receiverWallet","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"createWithSignature","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint128","name":"_delegateCost","type":"uint128"},{"internalType":"uint8","name":"_amountOfMonths","type":"uint8"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earlyBridsEnd","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"}],"name":"getDelegationData","outputs":[{"components":[{"internalType":"bool","name":"isEnabled","type":"bool"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"originalTokenReceiver","type":"address"},{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint8","name":"durationInMonths","type":"uint8"},{"internalType":"uint32","name":"endDelegationTime","type":"uint32"},{"internalType":"uint128","name":"cost","type":"uint128"}],"internalType":"struct IValidatorIdentity.DelegatedIdentity","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"}],"name":"getIdentityData","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"tokenReceiver","type":"address"}],"internalType":"struct IValidatorIdentity.Identifier","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"getIdentityNFTId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getPendingToClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"string","name":"_name","type":"string"}],"name":"isNameAvailable","outputs":[{"internalType":"bool","name":"success_","type":"bool"},{"internalType":"int32","name":"failedAt_","type":"int32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nameFilter","outputs":[{"internalType":"contract NameFilter","name":"","type":"address"}],"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":[{"internalType":"string","name":"_name","type":"string"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"}],"name":"retrieveDelegation","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":"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":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"}],"name":"toggleDelegation","outputs":[],"stateMutability":"nonpayable","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":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"updateCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_receiverWallet","type":"address"}],"name":"updateDelegationWalletReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"updateEarlyBirdRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newFilter","type":"address"}],"name":"updateNameFilter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_receiver","type":"address"}],"name":"updateReceiverAddress","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a03461063757601f612d6b38819003828101601f191684019392916001600160401b0391908286118587101761063c5781608092869260409889528339810103126106375761004e83610671565b60209161005c838601610671565b93606061006a888801610671565b96015191610076610652565b92601184527056616c696461746f724964656e7469747960781b8685015261009c610652565b96600498898952634574684960e01b888a0152855198848a11610622576000998a54976001988981811c91168015610618575b8c82101461060457908b828a8f818796116105ae575b92505050508b908d8a841160011461054d5792610542575b5050600019600383901b1c191690881b178a555b80519085821161052f5787548881811c91168015610525575b8b821014610512579081888493116104c4575b508a90888311600114610464578c92610459575b5050600019600383901b1c191690871b1786555b6001600160a01b03968716801561044257600780546001600160a01b031980821684179092558d519199989796959493929089167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08d80a3878316156104345750861687600954161760095584600b5560805260085588519189830183811083821117610421578a526101f6610652565b600b81526a1111505117d5d05313115560aa1b88820152835286830196888852600d54680100000000000000008110156103fb5785810180600d5581101561040e57600d8a52818a2090861b0193519081519384116103fb5784548681811c911680156103f1575b828210146103de57908184869594931161038c575b50809284116001146103295750899261031e575b5050600019600383901b1c191690831b1781555b019251169082541617905562093a8042019182421161030b578363ffffffff841663ffffffff19600e541617600e557f62fbdf096d8fd9adb08eda13e6f821e6e0da674a69c02a5cf718f17cffea12ac600f55516126e59081610686823960805181818161102201526124860152f35b634e487b7160e01b825260119052602490fd5b015190503880610287565b9190869450601f198416868c52838c20938c905b828210610373575050841161035a575b505050811b01815561029b565b015160001960f88460031b161c1916905538808061034d565b848401518655899790950194938401939081019061033d565b9091929350858b52818b208480870160051c8201928488106103d5575b9187968a92969594930160051c01915b8281106103c7575050610273565b8d81558796508991016103b9565b925081926103a9565b634e487b7160e01b8b5260228c5260248bfd5b90607f169061025e565b634e487b7160e01b8a5260418b5260248afd5b634e487b7160e01b8a5260328b5260248afd5b634e487b7160e01b895260418a52602489fd5b63b2c4cce960e01b81528b90fd5b8b51631e4fbdf760e01b8152808c018b9052602490fd5b015190503880610151565b898d528b8d208a94509190601f1984168e8e5b8282106104ad5750508411610494575b505050811b018655610165565b015160001960f88460031b161c19169055388080610487565b8385015186558d979095019493840193018e610477565b909150888c528a8c208880850160051c8201928d8610610509575b918b91869594930160051c01915b8281106104fb57505061013d565b8e81558594508b91016104ed565b925081926104df565b634e487b7160e01b8c5260228d5260248cfd5b90607f169061012a565b634e487b7160e01b8b5260418c5260248bfd5b0151905038806100fd565b8080528d81208c9550929190601f198516908f5b828210610597575050841161057e575b505050811b018a55610111565b015160001960f88460031b161c19169055388080610571565b8385015186558e979095019493840193018f610561565b8394955080809492939452209181860160051c83019386106105fb575b859493910160051c909101908b908f5b8382106105ed578f93508c91506100e5565b81558594508c91018f6105db565b925081926105cb565b50634e487b7160e01b8c5260228d5260248cfd5b90607f16906100cf565b60418b634e487b7160e01b6000525260246000fd5b600080fd5b634e487b7160e01b600052604160045260246000fd5b60408051919082016001600160401b0381118382101761063c57604052565b51906001600160a01b03821682036106375756fe608060408181526004918236101561001657600080fd5b600092833560e01c91826301ffc9a7146116a25750816306fdde03146115f1578163081812fc146115b5578163095ea7b3146114d857816313faede6146114b95781631c7239db1461137257816323099aad1461124957816323b872dd1461123157816323c5a088146111e357816325100059146111ab57816333f86adc146110dd57816342842e0e146110b457816343f0f27a146110925781635072b0841461105157816361d027b31461100d5781636352211e14610fed578163657869c814610fc457816370a0823114610f6f578163715018a614610f125781637906d87014610eaa57816384b47b0f14610e45578163863b5ba014610d1e57816388a80f7214610cdf5781638cf44d2114610c925781638da5cb5b14610c69578163920ffa2614610c1257816395d89b4114610b245781639afdb71b14610a9b5781639d6a8a2714610969578163a22cb465146108bd578163af8fc6e9146106a4578163b88d4fde14610651578163c7a12cb2146105a0578163c87b56dd1461054e578163e4838b92146103b1578163e5faf45b14610392578163e985e9c514610344578163f2fde38b146102b057508063f74e0d92146102045763fd804a2f146101dd57600080fd5b3461020057816003193601126102005760209063ffffffff600e54169051908152f35b5080fd5b503461020057600161023f6102869361021c366117b3565b9180936020885161022c8161184c565b60608152015215610291575b5050611c41565b509180519261024d8461184c565b610256816119c2565b8452828060a01b039283910154169160208401928352815194859460208652518360208701526060860190611730565b925116908301520390f35b816020929350865193849283378101600a815203019020543880610238565b905034610340576020366003190112610340576102cb611755565b906102d4612186565b6001600160a01b0391821692831561032a575050600754826bffffffffffffffffffffffff60a01b821617600755167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b50503461020057806003193601126102005760ff81602093610364611755565b61036c611770565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b505034610200578160031936011261020057602090600f549051908152f35b9190506103bd36611942565b92918080610532575050815160208183516103db818385880161170d565b8101600a81520301902054925b838652600c6020528286209060ff8254161561052257600282019586549063ffffffff9042828460a81c1611610514576001600160801b0360038601541634036105065760ff8360a01c1662278d000262ffffff81169081036104f3574201908142116104e0575063ffffffff60a81b193316600164ffffffff0160a01b031990931692909217911660a881901b63ffffffff60a81b16919091179096556104b292916104ad916104999087612217565b54349060081c6001600160a01b03166121e2565b611c91565b90519283527f354e2edb6f99cde27dd6a07bba75fa959be0f31e231615d4086ce7847a0af43560203394a480f35b634e487b7160e01b8b526011905260248afd5b634e487b7160e01b8b526011825260248bfd5b865163342ccafd60e21b8152fd5b8651631f47e29160e01b8152fd5b8351638073b8f760e01b81528690fd5b6105489194925061054290611c41565b506119c2565b906103e8565b8383346102005760203660031901126102005761056e61059c9335611ed1565b5081815161057b81611867565b5280519161058883611867565b825251918291602083526020830190611730565b0390f35b838334610200576105b036611942565b9291808061063b57505060206105d2918184519382858094519384920161170d565b8101600a81520301902054905b818452600c60205280842060020154336001600160a01b0382160361062c5763ffffffff429160a81c16111561061d57509061061a91612217565b80f35b516326a3512960e21b81528490fd5b815162ad643760e61b81528690fd5b61064b9193925061054290611c41565b506105df565b8390346102005760803660031901126102005761066c611755565b610674611770565b906064356001600160401b0381116106a05761061a93610696913691016118f5565b9160443591611dad565b8480fd5b919050346103405760803660031901126103405781356024356001600160401b0381116106a0576106d890369085016118f5565b92604435906001600160801b03908183168093036108b9576064359560ff87168097036108b55793809187156108a7575080610891575050835160208185516107248183858a0161170d565b8101600a81520301902054945b61073a86611c41565b50600101548551916001600160a01b0391821691906107588461181b565b60018452602084019133835288850193845260608501938b85526080860192835260a08601938c855260c087019889528b8d52600c6020528a8d20965115156107ad90889060ff801983541691151516179055565b518654610100600160a81b0360089290921b91909116610100600160a81b0319909116178655516001860180549183166001600160a01b031990921691909117905592516002850180549251935163ffffffff60a81b60a89190911b1660ff60a01b60a09590951b949094166001600160c81b03199093169190941663ffffffff60a81b191617171790556003019151166001600160801b03198254161790553083339161085a926122f8565b61086390611c91565b90516001815260207feb10c321964629a795e10dab2ef056ab8b826d0d7eaf2a7850aee6e9aca37d8491a380f35b6108a19196945061054290611c41565b92610731565b8651637d472cad60e01b8152fd5b8780fd5b8680fd5b919050346103405780600319360112610340576108d8611755565b9060243580151592838203610965576001600160a01b031693841561094e57506109219033865260056020528286208587526020528286209060ff801983541691151516179055565b519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8251630b61174360e31b8152908101859052602490fd5b8580fd5b9190506080366003190112610340576001600160401b039180358381116106a0576109979036908301611786565b9190926109a2611770565b94604435906064359081116108b5576109be90369085016118f5565b9063ffffffff600e54164210610a8c5780421015610a7d57610a4a91610a41918451610a0f60548260208101943360601b86528b8d60348401378b8201906034820152036034810184520182611882565b5190207f19457468657265756d205369676e6564204d6573736167653a0a3332000000008a52601c52603c892061255e565b9092919261259a565b336001600160a01b0390911603610a70578561061a86610a6b3687896118be565b611f0c565b5163143606b960e31b8152fd5b50505163df4cc36d60e01b8152fd5b505051638b69380360e01b8152fd5b83833461020057610aab36611942565b92918080610b0e5750506020610acd918184519382858094519384920161170d565b8101600a81520301902054905b610ae382611ed1565b336001600160a01b0390911603610aff57509061061a91612217565b516303608c0d60e31b81528490fd5b610b1e9193925061054290611c41565b50610ada565b828434610c0f5780600319360112610c0f57815191828260019360015494610b4b86611988565b9182855260209687600182169182600014610be8575050600114610b8c575b50505061059c9291610b7d910385611882565b51928284938452830190611730565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610bd05750505082010181610b7d61059c610b6a565b8054848a018601528895508794909301928101610bb7565b60ff19168782015293151560051b86019093019350849250610b7d915061059c9050610b6a565b80fd5b828434610c0f576020366003190112610c0f578235906001600160401b038211610c0f5750610c52610c4c602094610c5893369101611786565b90611a67565b54611ed1565b90516001600160a01b039091168152f35b50503461020057816003193601126102005760075490516001600160a01b039091168152602090f35b90508234610c0f576020366003190112610c0f578135906001600160401b038211610c0f5750610cce91610cc891369101611786565b90611cd1565b8251911515825260030b6020820152f35b828434610c0f576020366003190112610c0f578235906001600160401b038211610c0f5750610c4c602093610d1692369101611786565b549051908152f35b9190503461034057610d2f36611913565b92908080610e3157505081516020818551610d4d8183858a0161170d565b8101600a81520301902054925b838552600c60205282852080546001600160a01b039391929133600883901c861603610e235763ffffffff600285015460a81c164210610e155750869360016003948861061a99989560ff610dba9616610ddc575b505001541685612217565b838352600c6020528220828155826001820155826002820155015533306122f8565b610de590611c91565b7feb10c321964629a795e10dab2ef056ab8b826d0d7eaf2a7850aee6e9aca37d84602088518b8152a38738610daf565b8551631f47e29160e01b8152fd5b85516303608c0d60e31b8152fd5b610e4091945061054290611c41565b610d5a565b9050816003193601126103405780356001600160401b038111610ea657610e6f9036908301611786565b9091610e79611770565b9363ffffffff600e54164210610e99578561061a86610a6b3687896118be565b51638b69380360e01b8152fd5b8380fd5b8334610c0f576020366003190112610c0f57610ec4611755565b610ecc612186565b600980546001600160a01b0319166001600160a01b039290921691821790557fc878bbf9df0b397963de29d29a4e7f92ce7077653700ce64d5108d6b7bfbdad18280a280f35b8334610c0f5780600319360112610c0f57610f2b612186565b600780546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b828434610c0f576020366003190112610c0f576001600160a01b03610f92611755565b16928315610faf5750806020938392526003845220549051908152f35b91516322718ad960e21b815291820152602490fd5b50503461020057816003193601126102005760095490516001600160a01b039091168152602090f35b828434610c0f576020366003190112610c0f5750610c5860209235611ed1565b505034610200578160031936011261020057517f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168152602090f35b90503461034057826003193601126103405733835260066020528183209183835493558215611085578361061a84336121e2565b5163342ccafd60e21b8152fd5b839034610200576020366003190112610200576110ad612186565b35600f5580f35b5050346102005761061a906110c8366117e6565b919251926110d584611867565b858452611dad565b91905034610340576110ee36611913565b929080806111975750508151602081855161110c8183858a0161170d565b8101600a81520301902054925b838552600c6020528285208054909233600883901c6001600160a01b0316036111895750916111806020926104ad60ff7feb10c321964629a795e10dab2ef056ab8b826d0d7eaf2a7850aee6e9aca37d8496161580949060ff801983541691151516179055565b9351908152a380f35b84516303608c0d60e31b8152fd5b6111a691945061054290611c41565b611119565b5050346102005760203660031901126102005760209181906001600160a01b036111d3611755565b1681526006845220549051908152f35b905034610340576020366003190112610340577ff8eb04e6c43013770ed5585d21a0eb9e40c228e8a53ccf549dc6cbdb8e50f67b916020913590611225612186565b8160085551908152a180f35b8334610c0f5761061a611243366117e6565b91611a80565b5050346102005760038160e09361125f366117b3565b90828460c0875161126f8161181b565b82815282602082015282898201528260608201528260808201528260a0820152015215611353575b50508152600c602052209160a08151916112b08361181b565b60ff855495818716151596878652600180861b039081602088019160081c1681528160018401541694808801958652826002850154968160608b0194818a16865260c060808d01988a8c8e1c168a528d63ffffffff9d8e91019c60a81c168c526001600160801b039e8f910154169c019b8c5284519d8e52511660208d01525116908a01525116606088015251166080860152511660a0840152511660c0820152f35b816020929350855193849283378101600a815203019020543880611297565b9190506060366003190112610340576001600160401b03928235848111610200576113a09036908501611786565b6113ab949194611770565b604435958787116106a057366023880112156106a057868401359788116106a05760248860051b8801019236841161096557865193602094858101903382528681526113f68161184c565b519020885186810191825286815261140d8161184c565b51902090600f5499866024818c519e8f9061142d838260051b0183611882565b8152019201915b8383106114a957505050509486955b8a5187101561148157858760051b8c01015190818110600014611472578852855260018888205b960195611443565b9088528552600188882061146a565b8795508989910361149c578561061a86610a6b3687896118be565b516309bde33960e01b8152fd5b8235815291810191889101611434565b5050346102005781600319360112610200576020906008549051908152f35b919050346103405780600319360112610340576114f3611755565b9160243561150081611ed1565b331515806115a2575b80611579575b611563576001600160a01b039485169482918691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a48452602052822080546001600160a01b031916909117905580f35b835163a9fbf51f60e01b81523381850152602490fd5b506001600160a01b03811686526005602090815284872033885290528386205460ff161561150f565b506001600160a01b038116331415611509565b905034610340576020366003190112610340579182602093356115d781611ed1565b50825283528190205490516001600160a01b039091168152f35b828434610c0f5780600319360112610c0f578151918282835461161381611988565b9081845260209560019187600182169182600014610be85750506001146116475750505061059c9291610b7d910385611882565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061168a5750505082010181610b7d61059c610b6a565b8054848a018601528895508794909301928101611671565b849134610340576020366003190112610340573563ffffffff60e01b811680910361034057602092506380ac58cd60e01b81149081156116fc575b81156116eb575b5015158152f35b6301ffc9a760e01b149050836116e4565b635b5e139f60e01b811491506116dd565b60005b8381106117205750506000910152565b8181015183820152602001611710565b906020916117498151809281855285808601910161170d565b601f01601f1916010190565b600435906001600160a01b038216820361176b57565b600080fd5b602435906001600160a01b038216820361176b57565b9181601f8401121561176b578235916001600160401b03831161176b576020838186019501011161176b57565b90604060031983011261176b5760043591602435906001600160401b03821161176b576117e291600401611786565b9091565b606090600319011261176b576001600160a01b0390600435828116810361176b5791602435908116810361176b579060443590565b60e081019081106001600160401b0382111761183657604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761183657604052565b602081019081106001600160401b0382111761183657604052565b90601f801991011681019081106001600160401b0382111761183657604052565b6001600160401b03811161183657601f01601f191660200190565b9291926118ca826118a3565b916118d86040519384611882565b82948184528183011161176b578281602093846000960137010152565b9080601f8301121561176b57816020611910933591016118be565b90565b90604060031983011261176b5760043591602435906001600160401b03821161176b57611910916004016118f5565b90606060031983011261176b5760043591602435906001600160401b03821161176b57611971916004016118f5565b906044356001600160a01b038116810361176b5790565b90600182811c921680156119b8575b60208310146119a257565b634e487b7160e01b600052602260045260246000fd5b91607f1691611997565b906040519182600082546119d581611988565b90818452602094600191600181169081600014611a455750600114611a06575b505050611a0492500383611882565b565b600090815285812095935091905b818310611a2d575050611a0493508201013880806119f5565b85548884018501529485019487945091830191611a14565b92505050611a0494925060ff191682840152151560051b8201013880806119f5565b6020908260405193849283378101600a81520301902090565b906001600160a01b039081168015611c28578315611c1657600091848352846020926002845260409383858720541695869133151580611b80575b509060027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9284611b4d575b85835260038152888320805460010190558683525286812080546001600160a01b0319168517905580a483168203611b1f5750505050565b516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b600087815260046020526040902080546001600160a01b0319169055848352600381528883208054600019019055611ae7565b91939450915080611bd5575b15611b9c57879291869138611abb565b848887611bb9576024915190637e27328960e01b82526004820152fd5b604491519063177e802f60e01b82523360048301526024820152fd5b503386148015611bfa575b80611b8c5750878252600481523384868420541614611b8c565b5085825260058152848220338352815260ff8583205416611be0565b60405163537b2c3f60e01b8152600490fd5b604051633250574960e11b815260006004820152602490fd5b600d54811015611c7b57600d60005260011b7fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50190600090565b634e487b7160e01b600052603260045260246000fd5b611ca99060206040519282848094519384920161170d565b810103902090565b919082604091031261176b578151801515810361176b5760209092015190565b919091604090815184828237602081868101600a81520301902054611da0576009548251631eeeb51b60e11b8152602060048201526024810186905294839286926001600160a01b031691839160449183918190838501376000828201840152601f01601f191681010301915afa928315611d9557600091600094611d61575b505063ffffffff90921660030b90565b63ffffffff9450611d879250803d10611d8e575b611d7f8183611882565b810190611cb1565b9238611d51565b503d611d75565b50513d6000823e3d90fd5b5060009250600019919050565b9190611dba828285611a80565b803b611dc7575b50505050565b611e0960018060a01b0380921694604051938493630a85bd0160e11b968786523360048701521660248501526044840152608060648401526084830190611730565b03906020816000938185885af190829082611e88575b5050611e575782611e2e6121b2565b8051919082611e5057604051633250574960e11b815260048101839052602490fd5b9050602001fd5b6001600160e01b03191603611e70575038808080611dc1565b60249060405190633250574960e11b82526004820152fd5b909192506020813d602011611ec9575b81611ea560209383611882565b810103126102005751906001600160e01b031982168203610c0f5750903880611e1f565b3d9150611e98565b6000818152600260205260409020546001600160a01b0316908115611ef4575090565b60249060405190637e27328960e01b82526004820152fd5b90611f1960085483612373565b506001600160a01b03908082166120be575033915b60405190611f3b8261184c565b81526020908282820194168452600d54916801000000000000000083101561183657611f6e600193848101600d55611c41565b9290926120a857518051916001600160401b038311611836578291611f938554611988565b601f8111612053575b5081601f8411600114611fed5750600092611fe2575b5050600019600383901b1c191690831b1781555b019151166bffffffffffffffffffffffff60a01b825416179055565b015190503880611fb2565b9190869450601f1984168660005283600020936000905b82821061203a5750508411612021575b505050811b018155611fc6565b015160001960f88460031b161c19169055388080612014565b8484015186558997909501949384019390810190612004565b909192508460005282600020601f850160051c81019184861061209e575b8594939291601f89920160051c01915b82811061208f575050611f9c565b60008155869550889101612081565b9091508190612071565b634e487b7160e01b600052600060045260246000fd5b91611f2e565b908015611c16576000818152600260205260408120546001600160a01b039081169384917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9183612151575b169283612139575b84815260026020526040812080546001600160a01b0319168517905580a490565b83815260036020526040812060018154019055612118565b600086815260046020526040902080546001600160a01b03191690558385526003602052604085208054600019019055612110565b6007546001600160a01b0316330361219a57565b60405163118cdaa760e01b8152336004820152602490fd5b3d156121dd573d906121c3826118a3565b916121d16040519384611882565b82523d6000602084013e565b606090565b811561221357600080809381935af16121f96121b2565b501561220157565b6040516338822c1360e11b8152600490fd5b5050565b61222081611c41565b50600181810180546001600160a01b0319166001600160a01b039095169485179055604051825490926000929061225683611988565b92600181169081156122de57506001146122a1575b505050817f07352a47b4a10d89eac4d032fb628af297962657cc2911254c4f05cab48748169260209203902093604051908152a3565b909192506000526020906020600020906000915b8483106122cd5750505090820190508180602061226b565b8054868401529183019181016122b5565b60ff1916865250505080151502820190508180602061226b565b906001600160a01b039081811615611c285783612314916120c4565b90808216908161233757604051637e27328960e01b815260048101869052602490fd5b83160361234357505050565b6040516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b9080159081159081612553575b5061254157604091825192815193602081818501966123a081838a61170d565b8101600a81520301902054612531576009548151631eeeb51b60e11b8152602060048201526001600160a01b039183908290841681806123e3602482018a611730565b03915afa90811561252657600090600092612506575b50156124ef5750600b549460001986146124d95761242b6020879260018401600b55855180938192895192839161170d565b8101600a8152030190205533156124c15761244685336120c4565b166124aa57506124563391611c91565b837ff74f655e2b76a90037aa4d131ea25cc6350e774e92f6f9295a43b0f5f28d20c1600080a461191057611910347f00000000000000000000000000000000000000000000000000000000000000006121e2565b516339e3563760e11b815260006004820152602490fd5b8151633250574960e11b815260006004820152602490fd5b634e487b7160e01b600052601160045260246000fd5b60249083519063f2e575c160e01b82526004820152fd5b905061251f9150833d8511611d8e57611d7f8183611882565b90386123f9565b83513d6000823e3d90fd5b51630d706ecd60e21b8152600490fd5b60405163031520f560e01b8152600490fd5b905034141538612380565b815191906041830361258f5761258892506020820151906060604084015193015160001a9061261f565b9192909190565b505060009160029190565b600481101561260957806125ac575050565b600181036125c65760405163f645eedf60e01b8152600490fd5b600281036125e75760405163fce698f760e01b815260048101839052602490fd5b6003146125f15750565b602490604051906335e2f38360e21b82526004820152fd5b634e487b7160e01b600052602160045260246000fd5b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084116126a357926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa156126975780516001600160a01b0381161561268e57918190565b50809160019190565b604051903d90823e3d90fd5b5050506000916003919056fea2646970667358221220e2bc72167755aced6102741fb60ae833cbb6e87978b85974d819d92f0d9c45e564736f6c63430008190033000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f0000000000000000000000007497b1ccd20fbf881564ab8e1ca13090f94bfd10000000000000000000000000000000000000000000000000016345785d8a0000
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c91826301ffc9a7146116a25750816306fdde03146115f1578163081812fc146115b5578163095ea7b3146114d857816313faede6146114b95781631c7239db1461137257816323099aad1461124957816323b872dd1461123157816323c5a088146111e357816325100059146111ab57816333f86adc146110dd57816342842e0e146110b457816343f0f27a146110925781635072b0841461105157816361d027b31461100d5781636352211e14610fed578163657869c814610fc457816370a0823114610f6f578163715018a614610f125781637906d87014610eaa57816384b47b0f14610e45578163863b5ba014610d1e57816388a80f7214610cdf5781638cf44d2114610c925781638da5cb5b14610c69578163920ffa2614610c1257816395d89b4114610b245781639afdb71b14610a9b5781639d6a8a2714610969578163a22cb465146108bd578163af8fc6e9146106a4578163b88d4fde14610651578163c7a12cb2146105a0578163c87b56dd1461054e578163e4838b92146103b1578163e5faf45b14610392578163e985e9c514610344578163f2fde38b146102b057508063f74e0d92146102045763fd804a2f146101dd57600080fd5b3461020057816003193601126102005760209063ffffffff600e54169051908152f35b5080fd5b503461020057600161023f6102869361021c366117b3565b9180936020885161022c8161184c565b60608152015215610291575b5050611c41565b509180519261024d8461184c565b610256816119c2565b8452828060a01b039283910154169160208401928352815194859460208652518360208701526060860190611730565b925116908301520390f35b816020929350865193849283378101600a815203019020543880610238565b905034610340576020366003190112610340576102cb611755565b906102d4612186565b6001600160a01b0391821692831561032a575050600754826bffffffffffffffffffffffff60a01b821617600755167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b50503461020057806003193601126102005760ff81602093610364611755565b61036c611770565b6001600160a01b0391821683526005875283832091168252855220549151911615158152f35b505034610200578160031936011261020057602090600f549051908152f35b9190506103bd36611942565b92918080610532575050815160208183516103db818385880161170d565b8101600a81520301902054925b838652600c6020528286209060ff8254161561052257600282019586549063ffffffff9042828460a81c1611610514576001600160801b0360038601541634036105065760ff8360a01c1662278d000262ffffff81169081036104f3574201908142116104e0575063ffffffff60a81b193316600164ffffffff0160a01b031990931692909217911660a881901b63ffffffff60a81b16919091179096556104b292916104ad916104999087612217565b54349060081c6001600160a01b03166121e2565b611c91565b90519283527f354e2edb6f99cde27dd6a07bba75fa959be0f31e231615d4086ce7847a0af43560203394a480f35b634e487b7160e01b8b526011905260248afd5b634e487b7160e01b8b526011825260248bfd5b865163342ccafd60e21b8152fd5b8651631f47e29160e01b8152fd5b8351638073b8f760e01b81528690fd5b6105489194925061054290611c41565b506119c2565b906103e8565b8383346102005760203660031901126102005761056e61059c9335611ed1565b5081815161057b81611867565b5280519161058883611867565b825251918291602083526020830190611730565b0390f35b838334610200576105b036611942565b9291808061063b57505060206105d2918184519382858094519384920161170d565b8101600a81520301902054905b818452600c60205280842060020154336001600160a01b0382160361062c5763ffffffff429160a81c16111561061d57509061061a91612217565b80f35b516326a3512960e21b81528490fd5b815162ad643760e61b81528690fd5b61064b9193925061054290611c41565b506105df565b8390346102005760803660031901126102005761066c611755565b610674611770565b906064356001600160401b0381116106a05761061a93610696913691016118f5565b9160443591611dad565b8480fd5b919050346103405760803660031901126103405781356024356001600160401b0381116106a0576106d890369085016118f5565b92604435906001600160801b03908183168093036108b9576064359560ff87168097036108b55793809187156108a7575080610891575050835160208185516107248183858a0161170d565b8101600a81520301902054945b61073a86611c41565b50600101548551916001600160a01b0391821691906107588461181b565b60018452602084019133835288850193845260608501938b85526080860192835260a08601938c855260c087019889528b8d52600c6020528a8d20965115156107ad90889060ff801983541691151516179055565b518654610100600160a81b0360089290921b91909116610100600160a81b0319909116178655516001860180549183166001600160a01b031990921691909117905592516002850180549251935163ffffffff60a81b60a89190911b1660ff60a01b60a09590951b949094166001600160c81b03199093169190941663ffffffff60a81b191617171790556003019151166001600160801b03198254161790553083339161085a926122f8565b61086390611c91565b90516001815260207feb10c321964629a795e10dab2ef056ab8b826d0d7eaf2a7850aee6e9aca37d8491a380f35b6108a19196945061054290611c41565b92610731565b8651637d472cad60e01b8152fd5b8780fd5b8680fd5b919050346103405780600319360112610340576108d8611755565b9060243580151592838203610965576001600160a01b031693841561094e57506109219033865260056020528286208587526020528286209060ff801983541691151516179055565b519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a380f35b8251630b61174360e31b8152908101859052602490fd5b8580fd5b9190506080366003190112610340576001600160401b039180358381116106a0576109979036908301611786565b9190926109a2611770565b94604435906064359081116108b5576109be90369085016118f5565b9063ffffffff600e54164210610a8c5780421015610a7d57610a4a91610a41918451610a0f60548260208101943360601b86528b8d60348401378b8201906034820152036034810184520182611882565b5190207f19457468657265756d205369676e6564204d6573736167653a0a3332000000008a52601c52603c892061255e565b9092919261259a565b336001600160a01b0390911603610a70578561061a86610a6b3687896118be565b611f0c565b5163143606b960e31b8152fd5b50505163df4cc36d60e01b8152fd5b505051638b69380360e01b8152fd5b83833461020057610aab36611942565b92918080610b0e5750506020610acd918184519382858094519384920161170d565b8101600a81520301902054905b610ae382611ed1565b336001600160a01b0390911603610aff57509061061a91612217565b516303608c0d60e31b81528490fd5b610b1e9193925061054290611c41565b50610ada565b828434610c0f5780600319360112610c0f57815191828260019360015494610b4b86611988565b9182855260209687600182169182600014610be8575050600114610b8c575b50505061059c9291610b7d910385611882565b51928284938452830190611730565b9190869350600183527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610bd05750505082010181610b7d61059c610b6a565b8054848a018601528895508794909301928101610bb7565b60ff19168782015293151560051b86019093019350849250610b7d915061059c9050610b6a565b80fd5b828434610c0f576020366003190112610c0f578235906001600160401b038211610c0f5750610c52610c4c602094610c5893369101611786565b90611a67565b54611ed1565b90516001600160a01b039091168152f35b50503461020057816003193601126102005760075490516001600160a01b039091168152602090f35b90508234610c0f576020366003190112610c0f578135906001600160401b038211610c0f5750610cce91610cc891369101611786565b90611cd1565b8251911515825260030b6020820152f35b828434610c0f576020366003190112610c0f578235906001600160401b038211610c0f5750610c4c602093610d1692369101611786565b549051908152f35b9190503461034057610d2f36611913565b92908080610e3157505081516020818551610d4d8183858a0161170d565b8101600a81520301902054925b838552600c60205282852080546001600160a01b039391929133600883901c861603610e235763ffffffff600285015460a81c164210610e155750869360016003948861061a99989560ff610dba9616610ddc575b505001541685612217565b838352600c6020528220828155826001820155826002820155015533306122f8565b610de590611c91565b7feb10c321964629a795e10dab2ef056ab8b826d0d7eaf2a7850aee6e9aca37d84602088518b8152a38738610daf565b8551631f47e29160e01b8152fd5b85516303608c0d60e31b8152fd5b610e4091945061054290611c41565b610d5a565b9050816003193601126103405780356001600160401b038111610ea657610e6f9036908301611786565b9091610e79611770565b9363ffffffff600e54164210610e99578561061a86610a6b3687896118be565b51638b69380360e01b8152fd5b8380fd5b8334610c0f576020366003190112610c0f57610ec4611755565b610ecc612186565b600980546001600160a01b0319166001600160a01b039290921691821790557fc878bbf9df0b397963de29d29a4e7f92ce7077653700ce64d5108d6b7bfbdad18280a280f35b8334610c0f5780600319360112610c0f57610f2b612186565b600780546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b828434610c0f576020366003190112610c0f576001600160a01b03610f92611755565b16928315610faf5750806020938392526003845220549051908152f35b91516322718ad960e21b815291820152602490fd5b50503461020057816003193601126102005760095490516001600160a01b039091168152602090f35b828434610c0f576020366003190112610c0f5750610c5860209235611ed1565b505034610200578160031936011261020057517f000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f6001600160a01b03168152602090f35b90503461034057826003193601126103405733835260066020528183209183835493558215611085578361061a84336121e2565b5163342ccafd60e21b8152fd5b839034610200576020366003190112610200576110ad612186565b35600f5580f35b5050346102005761061a906110c8366117e6565b919251926110d584611867565b858452611dad565b91905034610340576110ee36611913565b929080806111975750508151602081855161110c8183858a0161170d565b8101600a81520301902054925b838552600c6020528285208054909233600883901c6001600160a01b0316036111895750916111806020926104ad60ff7feb10c321964629a795e10dab2ef056ab8b826d0d7eaf2a7850aee6e9aca37d8496161580949060ff801983541691151516179055565b9351908152a380f35b84516303608c0d60e31b8152fd5b6111a691945061054290611c41565b611119565b5050346102005760203660031901126102005760209181906001600160a01b036111d3611755565b1681526006845220549051908152f35b905034610340576020366003190112610340577ff8eb04e6c43013770ed5585d21a0eb9e40c228e8a53ccf549dc6cbdb8e50f67b916020913590611225612186565b8160085551908152a180f35b8334610c0f5761061a611243366117e6565b91611a80565b5050346102005760038160e09361125f366117b3565b90828460c0875161126f8161181b565b82815282602082015282898201528260608201528260808201528260a0820152015215611353575b50508152600c602052209160a08151916112b08361181b565b60ff855495818716151596878652600180861b039081602088019160081c1681528160018401541694808801958652826002850154968160608b0194818a16865260c060808d01988a8c8e1c168a528d63ffffffff9d8e91019c60a81c168c526001600160801b039e8f910154169c019b8c5284519d8e52511660208d01525116908a01525116606088015251166080860152511660a0840152511660c0820152f35b816020929350855193849283378101600a815203019020543880611297565b9190506060366003190112610340576001600160401b03928235848111610200576113a09036908501611786565b6113ab949194611770565b604435958787116106a057366023880112156106a057868401359788116106a05760248860051b8801019236841161096557865193602094858101903382528681526113f68161184c565b519020885186810191825286815261140d8161184c565b51902090600f5499866024818c519e8f9061142d838260051b0183611882565b8152019201915b8383106114a957505050509486955b8a5187101561148157858760051b8c01015190818110600014611472578852855260018888205b960195611443565b9088528552600188882061146a565b8795508989910361149c578561061a86610a6b3687896118be565b516309bde33960e01b8152fd5b8235815291810191889101611434565b5050346102005781600319360112610200576020906008549051908152f35b919050346103405780600319360112610340576114f3611755565b9160243561150081611ed1565b331515806115a2575b80611579575b611563576001600160a01b039485169482918691167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258880a48452602052822080546001600160a01b031916909117905580f35b835163a9fbf51f60e01b81523381850152602490fd5b506001600160a01b03811686526005602090815284872033885290528386205460ff161561150f565b506001600160a01b038116331415611509565b905034610340576020366003190112610340579182602093356115d781611ed1565b50825283528190205490516001600160a01b039091168152f35b828434610c0f5780600319360112610c0f578151918282835461161381611988565b9081845260209560019187600182169182600014610be85750506001146116475750505061059c9291610b7d910385611882565b91908693508280527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061168a5750505082010181610b7d61059c610b6a565b8054848a018601528895508794909301928101611671565b849134610340576020366003190112610340573563ffffffff60e01b811680910361034057602092506380ac58cd60e01b81149081156116fc575b81156116eb575b5015158152f35b6301ffc9a760e01b149050836116e4565b635b5e139f60e01b811491506116dd565b60005b8381106117205750506000910152565b8181015183820152602001611710565b906020916117498151809281855285808601910161170d565b601f01601f1916010190565b600435906001600160a01b038216820361176b57565b600080fd5b602435906001600160a01b038216820361176b57565b9181601f8401121561176b578235916001600160401b03831161176b576020838186019501011161176b57565b90604060031983011261176b5760043591602435906001600160401b03821161176b576117e291600401611786565b9091565b606090600319011261176b576001600160a01b0390600435828116810361176b5791602435908116810361176b579060443590565b60e081019081106001600160401b0382111761183657604052565b634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b0382111761183657604052565b602081019081106001600160401b0382111761183657604052565b90601f801991011681019081106001600160401b0382111761183657604052565b6001600160401b03811161183657601f01601f191660200190565b9291926118ca826118a3565b916118d86040519384611882565b82948184528183011161176b578281602093846000960137010152565b9080601f8301121561176b57816020611910933591016118be565b90565b90604060031983011261176b5760043591602435906001600160401b03821161176b57611910916004016118f5565b90606060031983011261176b5760043591602435906001600160401b03821161176b57611971916004016118f5565b906044356001600160a01b038116810361176b5790565b90600182811c921680156119b8575b60208310146119a257565b634e487b7160e01b600052602260045260246000fd5b91607f1691611997565b906040519182600082546119d581611988565b90818452602094600191600181169081600014611a455750600114611a06575b505050611a0492500383611882565b565b600090815285812095935091905b818310611a2d575050611a0493508201013880806119f5565b85548884018501529485019487945091830191611a14565b92505050611a0494925060ff191682840152151560051b8201013880806119f5565b6020908260405193849283378101600a81520301902090565b906001600160a01b039081168015611c28578315611c1657600091848352846020926002845260409383858720541695869133151580611b80575b509060027fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9284611b4d575b85835260038152888320805460010190558683525286812080546001600160a01b0319168517905580a483168203611b1f5750505050565b516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b600087815260046020526040902080546001600160a01b0319169055848352600381528883208054600019019055611ae7565b91939450915080611bd5575b15611b9c57879291869138611abb565b848887611bb9576024915190637e27328960e01b82526004820152fd5b604491519063177e802f60e01b82523360048301526024820152fd5b503386148015611bfa575b80611b8c5750878252600481523384868420541614611b8c565b5085825260058152848220338352815260ff8583205416611be0565b60405163537b2c3f60e01b8152600490fd5b604051633250574960e11b815260006004820152602490fd5b600d54811015611c7b57600d60005260011b7fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50190600090565b634e487b7160e01b600052603260045260246000fd5b611ca99060206040519282848094519384920161170d565b810103902090565b919082604091031261176b578151801515810361176b5760209092015190565b919091604090815184828237602081868101600a81520301902054611da0576009548251631eeeb51b60e11b8152602060048201526024810186905294839286926001600160a01b031691839160449183918190838501376000828201840152601f01601f191681010301915afa928315611d9557600091600094611d61575b505063ffffffff90921660030b90565b63ffffffff9450611d879250803d10611d8e575b611d7f8183611882565b810190611cb1565b9238611d51565b503d611d75565b50513d6000823e3d90fd5b5060009250600019919050565b9190611dba828285611a80565b803b611dc7575b50505050565b611e0960018060a01b0380921694604051938493630a85bd0160e11b968786523360048701521660248501526044840152608060648401526084830190611730565b03906020816000938185885af190829082611e88575b5050611e575782611e2e6121b2565b8051919082611e5057604051633250574960e11b815260048101839052602490fd5b9050602001fd5b6001600160e01b03191603611e70575038808080611dc1565b60249060405190633250574960e11b82526004820152fd5b909192506020813d602011611ec9575b81611ea560209383611882565b810103126102005751906001600160e01b031982168203610c0f5750903880611e1f565b3d9150611e98565b6000818152600260205260409020546001600160a01b0316908115611ef4575090565b60249060405190637e27328960e01b82526004820152fd5b90611f1960085483612373565b506001600160a01b03908082166120be575033915b60405190611f3b8261184c565b81526020908282820194168452600d54916801000000000000000083101561183657611f6e600193848101600d55611c41565b9290926120a857518051916001600160401b038311611836578291611f938554611988565b601f8111612053575b5081601f8411600114611fed5750600092611fe2575b5050600019600383901b1c191690831b1781555b019151166bffffffffffffffffffffffff60a01b825416179055565b015190503880611fb2565b9190869450601f1984168660005283600020936000905b82821061203a5750508411612021575b505050811b018155611fc6565b015160001960f88460031b161c19169055388080612014565b8484015186558997909501949384019390810190612004565b909192508460005282600020601f850160051c81019184861061209e575b8594939291601f89920160051c01915b82811061208f575050611f9c565b60008155869550889101612081565b9091508190612071565b634e487b7160e01b600052600060045260246000fd5b91611f2e565b908015611c16576000818152600260205260408120546001600160a01b039081169384917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9183612151575b169283612139575b84815260026020526040812080546001600160a01b0319168517905580a490565b83815260036020526040812060018154019055612118565b600086815260046020526040902080546001600160a01b03191690558385526003602052604085208054600019019055612110565b6007546001600160a01b0316330361219a57565b60405163118cdaa760e01b8152336004820152602490fd5b3d156121dd573d906121c3826118a3565b916121d16040519384611882565b82523d6000602084013e565b606090565b811561221357600080809381935af16121f96121b2565b501561220157565b6040516338822c1360e11b8152600490fd5b5050565b61222081611c41565b50600181810180546001600160a01b0319166001600160a01b039095169485179055604051825490926000929061225683611988565b92600181169081156122de57506001146122a1575b505050817f07352a47b4a10d89eac4d032fb628af297962657cc2911254c4f05cab48748169260209203902093604051908152a3565b909192506000526020906020600020906000915b8483106122cd5750505090820190508180602061226b565b8054868401529183019181016122b5565b60ff1916865250505080151502820190508180602061226b565b906001600160a01b039081811615611c285783612314916120c4565b90808216908161233757604051637e27328960e01b815260048101869052602490fd5b83160361234357505050565b6040516364283d7b60e01b81526001600160a01b0392831660048201526024810193909352166044820152606490fd5b9080159081159081612553575b5061254157604091825192815193602081818501966123a081838a61170d565b8101600a81520301902054612531576009548151631eeeb51b60e11b8152602060048201526001600160a01b039183908290841681806123e3602482018a611730565b03915afa90811561252657600090600092612506575b50156124ef5750600b549460001986146124d95761242b6020879260018401600b55855180938192895192839161170d565b8101600a8152030190205533156124c15761244685336120c4565b166124aa57506124563391611c91565b837ff74f655e2b76a90037aa4d131ea25cc6350e774e92f6f9295a43b0f5f28d20c1600080a461191057611910347f000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f6121e2565b516339e3563760e11b815260006004820152602490fd5b8151633250574960e11b815260006004820152602490fd5b634e487b7160e01b600052601160045260246000fd5b60249083519063f2e575c160e01b82526004820152fd5b905061251f9150833d8511611d8e57611d7f8183611882565b90386123f9565b83513d6000823e3d90fd5b51630d706ecd60e21b8152600490fd5b60405163031520f560e01b8152600490fd5b905034141538612380565b815191906041830361258f5761258892506020820151906060604084015193015160001a9061261f565b9192909190565b505060009160029190565b600481101561260957806125ac575050565b600181036125c65760405163f645eedf60e01b8152600490fd5b600281036125e75760405163fce698f760e01b815260048101839052602490fd5b6003146125f15750565b602490604051906335e2f38360e21b82526004820152fd5b634e487b7160e01b600052602160045260246000fd5b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a084116126a357926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa156126975780516001600160a01b0381161561268e57918190565b50809160019190565b604051903d90823e3d90fd5b5050506000916003919056fea2646970667358221220e2bc72167755aced6102741fb60ae833cbb6e87978b85974d819d92f0d9c45e564736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f0000000000000000000000007497b1ccd20fbf881564ab8e1ca13090f94bfd10000000000000000000000000000000000000000000000000016345785d8a0000
-----Decoded View---------------
Arg [0] : _owner (address): 0x888D768764A2E304215247F0bA3457cCb0f0ab4f
Arg [1] : _treasury (address): 0x888D768764A2E304215247F0bA3457cCb0f0ab4f
Arg [2] : _nameFilter (address): 0x7497B1cCd20fbf881564AB8e1cA13090f94BFD10
Arg [3] : _cost (uint256): 100000000000000000
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f
Arg [1] : 000000000000000000000000888d768764a2e304215247f0ba3457ccb0f0ab4f
Arg [2] : 0000000000000000000000007497b1ccd20fbf881564ab8e1ca13090f94bfd10
Arg [3] : 000000000000000000000000000000000000000000000000016345785d8a0000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.