Source Code
Overview
S Balance
More Info
ContractCreator
Multichain Info
N/A
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
SonicResolverV2
Compiler Version
v0.8.33+commit.64118f21
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
/*
/$$ /$$ /$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$$
| $$ /$$/| $$__ $$ /$$__ $$| $$ /$ | $$| $$$ | $$ | $$ /$$__ $$| $$__ $$ /$$__ $$
| $$ /$$/ | $$ \ $$| $$ \ $$| $$ /$$$| $$| $$$$| $$ | $$ | $$ \ $$| $$ \ $$| $$ \__/
| $$$$$/ | $$$$$$$/| $$ | $$| $$/$$ $$ $$| $$ $$ $$ | $$ | $$$$$$$$| $$$$$$$ | $$$$$$
| $$ $$ | $$__ $$| $$ | $$| $$$$_ $$$$| $$ $$$$ | $$ | $$__ $$| $$__ $$ \____ $$
| $$\ $$ | $$ \ $$| $$ | $$| $$$/ \ $$$| $$\ $$$ | $$ | $$ | $$| $$ \ $$ /$$ \ $$
| $$ \ $$| $$ | $$| $$$$$$/| $$/ \ $$| $$ \ $$ | $$$$$$$$| $$ | $$| $$$$$$$/| $$$$$$/
|__/ \__/|__/ |__/ \______/ |__/ \__/|__/ \__/ |________/|__/ |__/|_______/ \______/
krownlabs.app
x.com/krownlabs
discord.gg/KTU4krfhrG
Version 2.0 - Enhanced Resolver with ENS Compatibility
*/
pragma solidity ^0.8.20;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol";
/**
* @title SonicResolverV2
* @notice ENS-compatible resolver with standard text records and contenthash support
* @dev Supports address resolution, text records, contenthash (IPFS/Swarm), and reverse resolution
*/
contract SonicResolverV2 is Initializable, OwnableUpgradeable, UUPSUpgradeable {
struct Record {
address addr;
bytes contenthash; // IPFS/Swarm content hash
mapping(string => string) texts; // ENS-standard text records
}
// State variables
mapping(uint256 => Record) private records;
mapping(address => uint256) public reverseRecords; // Address -> Primary domain tokenId
ISonicRegistryV2 public registry;
// Events
event AddressChanged(uint256 indexed tokenId, address newAddress);
event ContenthashChanged(uint256 indexed tokenId, bytes hash);
event TextChanged(uint256 indexed tokenId, string indexed key, string value);
event PrimaryNameSet(address indexed addr, uint256 indexed tokenId);
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() {
_disableInitializers();
}
function initialize(address _registry) public initializer {
__Ownable_init(msg.sender);
__UUPSUpgradeable_init();
registry = ISonicRegistryV2(_registry);
}
// ========== MODIFIERS ==========
modifier onlyDomainOwner(uint256 tokenId) {
require(registry.ownerOf(tokenId) == msg.sender, "Not domain owner");
require(!registry.isExpired(tokenId), "Domain expired");
_;
}
modifier onlyDomainOwnerOrExpired(uint256 tokenId) {
require(
registry.ownerOf(tokenId) == msg.sender || registry.isExpired(tokenId),
"Not authorized"
);
_;
}
// ========== ADDRESS RESOLUTION ==========
/**
* @notice Set the address that this domain resolves to
* @param tokenId Domain token ID
* @param newAddress Address to resolve to
*/
function setAddress(uint256 tokenId, address newAddress) external onlyDomainOwner(tokenId) {
records[tokenId].addr = newAddress;
emit AddressChanged(tokenId, newAddress);
}
/**
* @notice Get the address that this domain resolves to
* @param tokenId Domain token ID
* @return The resolved address (address(0) if not set or expired)
*/
function addr(uint256 tokenId) external view returns (address) {
if (registry.isExpired(tokenId)) return address(0);
return records[tokenId].addr;
}
// ========== CONTENTHASH (IPFS/SWARM) ==========
/**
* @notice Set contenthash for IPFS/Swarm content
* @dev Format follows ENS contenthash standard (ENSIP-7)
* @param tokenId Domain token ID
* @param hash Content hash bytes
*/
function setContenthash(uint256 tokenId, bytes calldata hash)
external
onlyDomainOwner(tokenId)
{
records[tokenId].contenthash = hash;
emit ContenthashChanged(tokenId, hash);
}
/**
* @notice Get contenthash for domain
* @param tokenId Domain token ID
* @return Content hash bytes (empty if not set or expired)
*/
function contenthash(uint256 tokenId) external view returns (bytes memory) {
if (registry.isExpired(tokenId)) return "";
return records[tokenId].contenthash;
}
// ========== TEXT RECORDS (ENS-COMPATIBLE) ==========
/**
* @notice Set a text record (ENS-compatible)
* @dev Standard keys: email, url, avatar, description, notice, keywords,
* com.twitter, com.github, com.discord, org.telegram
* @param tokenId Domain token ID
* @param key Record key
* @param value Record value
*/
function setText(uint256 tokenId, string calldata key, string calldata value)
external
onlyDomainOwner(tokenId)
{
records[tokenId].texts[key] = value;
emit TextChanged(tokenId, key, value);
}
/**
* @notice Set multiple text records at once (gas optimization)
* @param tokenId Domain token ID
* @param keys Array of record keys
* @param values Array of record values
*/
function setTextBatch(
uint256 tokenId,
string[] calldata keys,
string[] calldata values
) external onlyDomainOwner(tokenId) {
require(keys.length == values.length, "Array length mismatch");
for (uint256 i = 0; i < keys.length; i++) {
records[tokenId].texts[keys[i]] = values[i];
emit TextChanged(tokenId, keys[i], values[i]);
}
}
/**
* @notice Get a text record
* @param tokenId Domain token ID
* @param key Record key
* @return Record value (empty string if not set or expired)
*/
function text(uint256 tokenId, string calldata key)
external
view
returns (string memory)
{
if (registry.isExpired(tokenId)) return "";
return records[tokenId].texts[key];
}
// ========== BULK TEXT GETTERS (FOR UI) ==========
/**
* @notice Get multiple text records at once
* @param tokenId Domain token ID
* @param keys Array of keys to fetch
* @return values Array of corresponding values
*/
function getTexts(uint256 tokenId, string[] calldata keys)
external
view
returns (string[] memory values)
{
values = new string[](keys.length);
if (registry.isExpired(tokenId)) {
return values; // Return empty array
}
for (uint256 i = 0; i < keys.length; i++) {
values[i] = records[tokenId].texts[keys[i]];
}
}
/**
* @notice Get standard social media links (convenience function)
* @param tokenId Domain token ID
* @return twitter Twitter/X handle
* @return github GitHub username
* @return discord Discord username
* @return telegram Telegram username
*/
function getSocials(uint256 tokenId)
external
view
returns (
string memory twitter,
string memory github,
string memory discord,
string memory telegram
)
{
if (registry.isExpired(tokenId)) {
return ("", "", "", "");
}
twitter = records[tokenId].texts["com.twitter"];
github = records[tokenId].texts["com.github"];
discord = records[tokenId].texts["com.discord"];
telegram = records[tokenId].texts["org.telegram"];
}
// ========== REVERSE RESOLUTION (PRIMARY NAME) ==========
/**
* @notice Set this domain as your primary name
* @dev Used for reverse resolution (address -> name)
* @param tokenId Domain token ID you own
*/
function setPrimaryName(uint256 tokenId) external {
require(registry.ownerOf(tokenId) == msg.sender, "Not owner");
require(!registry.isExpired(tokenId), "Domain expired");
reverseRecords[msg.sender] = tokenId;
emit PrimaryNameSet(msg.sender, tokenId);
}
/**
* @notice Clear your primary name
*/
function clearPrimaryName() external {
delete reverseRecords[msg.sender];
emit PrimaryNameSet(msg.sender, 0);
}
/**
* @notice Get primary name for an address
* @param owner Address to lookup
* @return name Full domain name with TLD (empty if not set)
*/
function getPrimaryName(address owner) external view returns (string memory name) {
uint256 tokenId = reverseRecords[owner];
if (tokenId == 0) return "";
if (registry.isExpired(tokenId)) return "";
if (registry.ownerOf(tokenId) != owner) return ""; // Ownership changed
string memory domainName = registry.tokenIdToName(tokenId);
return string(abi.encodePacked(domainName, ".s"));
}
/**
* @notice Get primary name tokenId for an address
* @param owner Address to lookup
* @return tokenId (0 if not set or invalid)
*/
function getPrimaryNameTokenId(address owner) external view returns (uint256) {
uint256 tokenId = reverseRecords[owner];
if (tokenId == 0) return 0;
if (registry.isExpired(tokenId)) return 0;
if (registry.ownerOf(tokenId) != owner) return 0;
return tokenId;
}
// ========== LEGACY COMPATIBILITY ==========
/**
* @notice Legacy method for getting address (alias for addr)
*/
function resolveAddress(uint256 tokenId) external view returns (address) {
if (registry.isExpired(tokenId)) return address(0);
return records[tokenId].addr;
}
/**
* @notice Legacy method for getting content
*/
function resolveContent(uint256 tokenId) external view returns (string memory) {
if (registry.isExpired(tokenId)) return "";
return records[tokenId].texts["url"];
}
/**
* @notice Legacy method for getting text
*/
function resolveText(uint256 tokenId, string calldata key)
external
view
returns (string memory)
{
if (registry.isExpired(tokenId)) return "";
return records[tokenId].texts[key];
}
// ========== ADMIN ==========
function setRegistry(address _registry) external onlyOwner {
registry = ISonicRegistryV2(_registry);
}
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
}
interface ISonicRegistryV2 {
function ownerOf(uint256 tokenId) external view returns (address);
function tokenIdToName(uint256 tokenId) external view returns (string memory);
function isExpired(uint256 tokenId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol";
import {Initializable} from "../proxy/utils/Initializable.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 OwnableUpgradeable is Initializable, ContextUpgradeable {
/// @custom:storage-location erc7201:openzeppelin.storage.Ownable
struct OwnableStorage {
address _owner;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300;
function _getOwnableStorage() private pure returns (OwnableStorage storage $) {
assembly {
$.slot := OwnableStorageLocation
}
}
/**
* @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.
*/
function __Ownable_init(address initialOwner) internal onlyInitializing {
__Ownable_init_unchained(initialOwner);
}
function __Ownable_init_unchained(address initialOwner) internal onlyInitializing {
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) {
OwnableStorage storage $ = _getOwnableStorage();
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 {
OwnableStorage storage $ = _getOwnableStorage();
address oldOwner = $._owner;
$._owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.20;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```solidity
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
*
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Storage of the initializable contract.
*
* It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions
* when using with upgradeable contracts.
*
* @custom:storage-location erc7201:openzeppelin.storage.Initializable
*/
struct InitializableStorage {
/**
* @dev Indicates that the contract has been initialized.
*/
uint64 _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool _initializing;
}
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00;
/**
* @dev The contract is already initialized.
*/
error InvalidInitialization();
/**
* @dev The contract is not initializing.
*/
error NotInitializing();
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint64 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts.
*
* Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any
* number of times. This behavior in the constructor can be useful during testing and is not expected to be used in
* production.
*
* Emits an {Initialized} event.
*/
modifier initializer() {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
// Cache values to avoid duplicated sloads
bool isTopLevelCall = !$._initializing;
uint64 initialized = $._initialized;
// Allowed calls:
// - initialSetup: the contract is not in the initializing state and no previous version was
// initialized
// - construction: the contract is initialized at version 1 (no reinitialization) and the
// current contract is just being deployed
bool initialSetup = initialized == 0 && isTopLevelCall;
bool construction = initialized == 1 && address(this).code.length == 0;
if (!initialSetup && !construction) {
revert InvalidInitialization();
}
$._initialized = 1;
if (isTopLevelCall) {
$._initializing = true;
}
_;
if (isTopLevelCall) {
$._initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* A reinitializer may be used after the original initialization step. This is essential to configure modules that
* are added through upgrades and that require initialization.
*
* When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
* cannot be nested. If one is invoked in the context of another, execution will revert.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*
* WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization.
*
* Emits an {Initialized} event.
*/
modifier reinitializer(uint64 version) {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing || $._initialized >= version) {
revert InvalidInitialization();
}
$._initialized = version;
$._initializing = true;
_;
$._initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
_checkInitializing();
_;
}
/**
* @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}.
*/
function _checkInitializing() internal view virtual {
if (!_isInitializing()) {
revert NotInitializing();
}
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*
* Emits an {Initialized} event the first time it is successfully executed.
*/
function _disableInitializers() internal virtual {
// solhint-disable-next-line var-name-mixedcase
InitializableStorage storage $ = _getInitializableStorage();
if ($._initializing) {
revert InvalidInitialization();
}
if ($._initialized != type(uint64).max) {
$._initialized = type(uint64).max;
emit Initialized(type(uint64).max);
}
}
/**
* @dev Returns the highest version that has been initialized. See {reinitializer}.
*/
function _getInitializedVersion() internal view returns (uint64) {
return _getInitializableStorage()._initialized;
}
/**
* @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
*/
function _isInitializing() internal view returns (bool) {
return _getInitializableStorage()._initializing;
}
/**
* @dev Pointer to storage slot. Allows integrators to override it with a custom storage location.
*
* NOTE: Consider following the ERC-7201 formula to derive storage locations.
*/
function _initializableStorageSlot() internal pure virtual returns (bytes32) {
return INITIALIZABLE_STORAGE;
}
/**
* @dev Returns a pointer to the storage namespace.
*/
// solhint-disable-next-line var-name-mixedcase
function _getInitializableStorage() private pure returns (InitializableStorage storage $) {
bytes32 slot = _initializableStorageSlot();
assembly {
$.slot := slot
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (proxy/utils/UUPSUpgradeable.sol)
pragma solidity ^0.8.22;
import {IERC1822Proxiable} from "@openzeppelin/contracts/interfaces/draft-IERC1822.sol";
import {ERC1967Utils} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol";
import {Initializable} from "./Initializable.sol";
/**
* @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an
* {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy.
*
* A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is
* reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing
* `UUPSUpgradeable` with a custom implementation of upgrades.
*
* The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism.
*/
abstract contract UUPSUpgradeable is Initializable, IERC1822Proxiable {
/// @custom:oz-upgrades-unsafe-allow state-variable-immutable
address private immutable __self = address(this);
/**
* @dev The version of the upgrade interface of the contract. If this getter is missing, both `upgradeTo(address)`
* and `upgradeToAndCall(address,bytes)` are present, and `upgradeTo` must be used if no function should be called,
* while `upgradeToAndCall` will invoke the `receive` function if the second argument is the empty byte string.
* If the getter returns `"5.0.0"`, only `upgradeToAndCall(address,bytes)` is present, and the second argument must
* be the empty byte string if no function should be called, making it impossible to invoke the `receive` function
* during an upgrade.
*/
string public constant UPGRADE_INTERFACE_VERSION = "5.0.0";
/**
* @dev The call is from an unauthorized context.
*/
error UUPSUnauthorizedCallContext();
/**
* @dev The storage `slot` is unsupported as a UUID.
*/
error UUPSUnsupportedProxiableUUID(bytes32 slot);
/**
* @dev Check that the execution is being performed through a delegatecall call and that the execution context is
* a proxy contract with an implementation (as defined in ERC-1967) pointing to self. This should only be the case
* for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a
* function through ERC-1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to
* fail.
*/
modifier onlyProxy() {
_checkProxy();
_;
}
/**
* @dev Check that the execution is not being performed through a delegate call. This allows a function to be
* callable on the implementing contract but not through proxies.
*/
modifier notDelegated() {
_checkNotDelegated();
_;
}
function __UUPSUpgradeable_init() internal onlyInitializing {
}
function __UUPSUpgradeable_init_unchained() internal onlyInitializing {
}
/**
* @dev Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the
* implementation. It is used to validate the implementation's compatibility when performing an upgrade.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.
*/
function proxiableUUID() external view virtual notDelegated returns (bytes32) {
return ERC1967Utils.IMPLEMENTATION_SLOT;
}
/**
* @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call
* encoded in `data`.
*
* Calls {_authorizeUpgrade}.
*
* Emits an {Upgraded} event.
*
* @custom:oz-upgrades-unsafe-allow-reachable delegatecall
*/
function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy {
_authorizeUpgrade(newImplementation);
_upgradeToAndCallUUPS(newImplementation, data);
}
/**
* @dev Reverts if the execution is not performed via delegatecall or the execution
* context is not of a proxy with an ERC-1967 compliant implementation pointing to self.
*/
function _checkProxy() internal view virtual {
if (
address(this) == __self || // Must be called through delegatecall
ERC1967Utils.getImplementation() != __self // Must be called through an active proxy
) {
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Reverts if the execution is performed via delegatecall.
* See {notDelegated}.
*/
function _checkNotDelegated() internal view virtual {
if (address(this) != __self) {
// Must not be called through delegatecall
revert UUPSUnauthorizedCallContext();
}
}
/**
* @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by
* {upgradeToAndCall}.
*
* Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
*
* ```solidity
* function _authorizeUpgrade(address) internal onlyOwner {}
* ```
*/
function _authorizeUpgrade(address newImplementation) internal virtual;
/**
* @dev Performs an implementation upgrade with a security check for UUPS proxies, and additional setup call.
*
* As a security check, {proxiableUUID} is invoked in the new implementation, and the return value
* is expected to be the implementation slot in ERC-1967.
*
* Emits an {IERC1967-Upgraded} event.
*/
function _upgradeToAndCallUUPS(address newImplementation, bytes memory data) private {
try IERC1822Proxiable(newImplementation).proxiableUUID() returns (bytes32 slot) {
if (slot != ERC1967Utils.IMPLEMENTATION_SLOT) {
revert UUPSUnsupportedProxiableUUID(slot);
}
ERC1967Utils.upgradeToAndCall(newImplementation, data);
} catch {
// The implementation is not UUPS
revert ERC1967Utils.ERC1967InvalidImplementation(newImplementation);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
import {Initializable} from "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
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.4.0) (interfaces/draft-IERC1822.sol)
pragma solidity >=0.4.16;
/**
* @dev ERC-1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified
* proxy whose upgrades are fully controlled by the current implementation.
*/
interface IERC1822Proxiable {
/**
* @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation
* address.
*
* IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks
* bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this
* function revert if invoked through a proxy.
*/
function proxiableUUID() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1967.sol)
pragma solidity >=0.4.11;
/**
* @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC.
*/
interface IERC1967 {
/**
* @dev Emitted when the implementation is upgraded.
*/
event Upgraded(address indexed implementation);
/**
* @dev Emitted when the admin account has changed.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Emitted when the beacon is changed.
*/
event BeaconUpgraded(address indexed beacon);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/beacon/IBeacon.sol)
pragma solidity >=0.4.16;
/**
* @dev This is the interface that {BeaconProxy} expects of its beacon.
*/
interface IBeacon {
/**
* @dev Must return an address that can be used as a delegate call target.
*
* {UpgradeableBeacon} will check that this address is a contract.
*/
function implementation() external view returns (address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (proxy/ERC1967/ERC1967Utils.sol)
pragma solidity ^0.8.21;
import {IBeacon} from "../beacon/IBeacon.sol";
import {IERC1967} from "../../interfaces/IERC1967.sol";
import {Address} from "../../utils/Address.sol";
import {StorageSlot} from "../../utils/StorageSlot.sol";
/**
* @dev This library provides getters and event emitting update functions for
* https://eips.ethereum.org/EIPS/eip-1967[ERC-1967] slots.
*/
library ERC1967Utils {
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
/**
* @dev The `implementation` of the proxy is invalid.
*/
error ERC1967InvalidImplementation(address implementation);
/**
* @dev The `admin` of the proxy is invalid.
*/
error ERC1967InvalidAdmin(address admin);
/**
* @dev The `beacon` of the proxy is invalid.
*/
error ERC1967InvalidBeacon(address beacon);
/**
* @dev An upgrade function sees `msg.value > 0` that may be lost.
*/
error ERC1967NonPayable();
/**
* @dev Returns the current implementation address.
*/
function getImplementation() internal view returns (address) {
return StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 implementation slot.
*/
function _setImplementation(address newImplementation) private {
if (newImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(newImplementation);
}
StorageSlot.getAddressSlot(IMPLEMENTATION_SLOT).value = newImplementation;
}
/**
* @dev Performs implementation upgrade with additional setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-Upgraded} event.
*/
function upgradeToAndCall(address newImplementation, bytes memory data) internal {
_setImplementation(newImplementation);
emit IERC1967.Upgraded(newImplementation);
if (data.length > 0) {
Address.functionDelegateCall(newImplementation, data);
} else {
_checkNonPayable();
}
}
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
/**
* @dev Returns the current admin.
*
* TIP: To get this value clients can read directly from the storage slot shown below (specified by ERC-1967) using
* the https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function getAdmin() internal view returns (address) {
return StorageSlot.getAddressSlot(ADMIN_SLOT).value;
}
/**
* @dev Stores a new address in the ERC-1967 admin slot.
*/
function _setAdmin(address newAdmin) private {
if (newAdmin == address(0)) {
revert ERC1967InvalidAdmin(address(0));
}
StorageSlot.getAddressSlot(ADMIN_SLOT).value = newAdmin;
}
/**
* @dev Changes the admin of the proxy.
*
* Emits an {IERC1967-AdminChanged} event.
*/
function changeAdmin(address newAdmin) internal {
emit IERC1967.AdminChanged(getAdmin(), newAdmin);
_setAdmin(newAdmin);
}
/**
* @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy.
* This is the keccak-256 hash of "eip1967.proxy.beacon" subtracted by 1.
*/
// solhint-disable-next-line private-vars-leading-underscore
bytes32 internal constant BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50;
/**
* @dev Returns the current beacon.
*/
function getBeacon() internal view returns (address) {
return StorageSlot.getAddressSlot(BEACON_SLOT).value;
}
/**
* @dev Stores a new beacon in the ERC-1967 beacon slot.
*/
function _setBeacon(address newBeacon) private {
if (newBeacon.code.length == 0) {
revert ERC1967InvalidBeacon(newBeacon);
}
StorageSlot.getAddressSlot(BEACON_SLOT).value = newBeacon;
address beaconImplementation = IBeacon(newBeacon).implementation();
if (beaconImplementation.code.length == 0) {
revert ERC1967InvalidImplementation(beaconImplementation);
}
}
/**
* @dev Change the beacon and trigger a setup call if data is nonempty.
* This function is payable only if the setup call is performed, otherwise `msg.value` is rejected
* to avoid stuck value in the contract.
*
* Emits an {IERC1967-BeaconUpgraded} event.
*
* CAUTION: Invoking this function has no effect on an instance of {BeaconProxy} since v5, since
* it uses an immutable beacon without looking at the value of the ERC-1967 beacon slot for
* efficiency.
*/
function upgradeBeaconToAndCall(address newBeacon, bytes memory data) internal {
_setBeacon(newBeacon);
emit IERC1967.BeaconUpgraded(newBeacon);
if (data.length > 0) {
Address.functionDelegateCall(IBeacon(newBeacon).implementation(), data);
} else {
_checkNonPayable();
}
}
/**
* @dev Reverts if `msg.value` is not zero. It can be used to avoid `msg.value` stuck in the contract
* if an upgrade doesn't perform an initialization call.
*/
function _checkNonPayable() private {
if (msg.value > 0) {
revert ERC1967NonPayable();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/Address.sol)
pragma solidity ^0.8.20;
import {Errors} from "./Errors.sol";
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert Errors.InsufficientBalance(address(this).balance, amount);
}
(bool success, bytes memory returndata) = recipient.call{value: amount}("");
if (!success) {
_revert(returndata);
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {Errors.FailedCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert Errors.InsufficientBalance(address(this).balance, value);
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case
* of an unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {Errors.FailedCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly ("memory-safe") {
revert(add(returndata, 0x20), mload(returndata))
}
} else {
revert Errors.FailedCall();
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of common custom errors used in multiple contracts
*
* IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library.
* It is recommended to avoid relying on the error API for critical functionality.
*
* _Available since v5.1._
*/
library Errors {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error InsufficientBalance(uint256 balance, uint256 needed);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedCall();
/**
* @dev The deployment failed.
*/
error FailedDeployment();
/**
* @dev A necessary precompile is missing.
*/
error MissingPrecompile(address);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC-1967 implementation slot:
* ```solidity
* contract ERC1967 {
* // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*
* TIP: Consider using this library along with {SlotDerivation}.
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct Int256Slot {
int256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `Int256Slot` with member `value` located at `slot`.
*/
function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns a `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
/**
* @dev Returns a `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
assembly ("memory-safe") {
r.slot := store.slot
}
}
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"viaIR": true,
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","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":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"AddressChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PrimaryNameSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"addr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clearPrimaryName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getPrimaryName","outputs":[{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getPrimaryNameTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSocials","outputs":[{"internalType":"string","name":"twitter","type":"string"},{"internalType":"string","name":"github","type":"string"},{"internalType":"string","name":"discord","type":"string"},{"internalType":"string","name":"telegram","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string[]","name":"keys","type":"string[]"}],"name":"getTexts","outputs":[{"internalType":"string[]","name":"values","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_registry","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract ISonicRegistryV2","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resolveAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resolveContent","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"key","type":"string"}],"name":"resolveText","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"reverseRecords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"newAddress","type":"address"}],"name":"setAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setPrimaryName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_registry","type":"address"}],"name":"setRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string[]","name":"keys","type":"string[]"},{"internalType":"string[]","name":"values","type":"string[]"}],"name":"setTextBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
60a080604052346100ea57306080527ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460ff8160401c166100d9576002600160401b03196001600160401b03821601610073575b60405161207d90816100f08239608051818181610abe0152610b910152f35b6001600160401b0319166001600160401b039081177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005581527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d290602090a13880610054565b63f92ee8a960e01b60005260046000fd5b600080fdfe608080604052600436101561001357600080fd5b60003560e01c908163072c3b991461104c57508063149cff301461013d578063308e3386146109f45780633fb2478214610de45780634c16a74e14610dc05780634c7c26a314610d555780634f1ef28614610b1557806352d1902d14610aab578063543a666b14610a8c578063715018a614610a225780637b103999146109f957806382d324f0146109f457806388f97a67146107db5780638da5cb5b146107a5578063a4f6965714610668578063a91ee0dc14610625578063ac4ce2c6146104be578063ad3cb1cc14610477578063afc53671146103d4578063b7a750381461039a578063c4d66de81461021e578063cb323d76146101e7578063e67427f6146101bc578063f2fde38b14610191578063ff669b10146101425763ffa186491461013d57600080fd5b611314565b3461018c57600036600319011261018c57336000526001602052600060408120556000337f41f2b80eda6de6f23cab2e867951d054a48d6794db479c1d252bb840a374b62c8280a3005b600080fd5b3461018c57602036600319011261018c576101ba6101ad611406565b6101b5611f22565b611eac565b005b3461018c57602036600319011261018c5760206101df6101da611406565b611dc1565b604051908152f35b3461018c57602036600319011261018c5761021a610206600435611d3f565b6040519182916020835260208301906113c7565b0390f35b3461018c57602036600319011261018c57610237611406565b600080516020612028833981519152549060ff8260401c1615916001600160401b03811680159081610392575b6001149081610388575b15908161037f575b5061036e5767ffffffffffffffff1981166001176000805160206120288339815191525582610341575b506102a9611f58565b6102b1611f58565b6102ba33611eac565b6102c2611f58565b60018060a01b03166bffffffffffffffffffffffff60a01b60025416176002556102e857005b68ff0000000000000000196000805160206120288339815191525416600080516020612028833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff1916680100000000000000011760008051602061202883398151915255826102a0565b63f92ee8a960e01b60005260046000fd5b90501584610276565b303b15915061026e565b849150610264565b3461018c57602036600319011261018c576001600160a01b036103bb611406565b1660005260016020526020604060002054604051908152f35b3461018c57604036600319011261018c576024356001600160401b03811161018c576104076104109136906004016112e4565b90600435611c3a565b6040518091602082016020835281518091526040830190602060408260051b8601019301916000905b82821061044857505050500390f35b919360019193955060206104678192603f198a820301865288516113c7565b9601920192018594939192610439565b3461018c57600036600319011261018c5761021a604080519061049a818361141c565b60058252640352e302e360dc1b6020830152519182916020835260208301906113c7565b3461018c57604036600319011261018c576004356024356001600160a01b0381169081900361018c576002546040516331a9108f60e11b81526004810184905291906001600160a01b0316602083602481845afa9081156105ec5761053b6020926024956000916105f8575b506001600160a01b03163314611477565b6040519384809263d9548e5360e01b82528760048301525afa9081156105ec576105926020927fa5d871c0e725767cd5aefc99c53aeca35f09dcc268145cbb13b74a7e2f48f196946000916105bf575b50156114ce565b83600052600082526040600020816bffffffffffffffffffffffff60a01b825416179055604051908152a2005b6105df9150843d86116105e5575b6105d7818361141c565b8101906114b6565b8661058b565b503d6105cd565b6040513d6000823e3d90fd5b6106189150843d861161061e575b610610818361141c565b810190611458565b8761052a565b503d610606565b3461018c57602036600319011261018c5761063e611406565b610646611f22565b600280546001600160a01b0319166001600160a01b0392909216919091179055005b3461018c57602036600319011261018c576002546040516331a9108f60e11b815260048035908201819052916001600160a01b031690602081602481855afa9081156105ec57600091610786575b50336001600160a01b03909116036107555760206024916040519283809263d9548e5360e01b82528660048301525afa80156105ec576106fe916000916107365750156114ce565b33600052600160205280604060002055337f41f2b80eda6de6f23cab2e867951d054a48d6794db479c1d252bb840a374b62c600080a3005b61074f915060203d6020116105e5576105d7818361141c565b8361058b565b60405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606490fd5b61079f915060203d60201161061e57610610818361141c565b836106b6565b3461018c57600036600319011261018c57600080516020611fe8833981519152546040516001600160a01b039091168152602090f35b3461018c576107e936611371565b6002546040516331a9108f60e11b81526004810185905291939291906001600160a01b0316602082602481845afa9081156105ec5761083f6020926024946000916109d757506001600160a01b03163314611477565b6040519283809263d9548e5360e01b82528760048301525afa80156105ec57610870916000916109b85750156114ce565b8160005260006020526001604060002001926001600160401b0381116109a2576108a48161089e865461157b565b866115b5565b600093601f8211600114610920576108f682807f6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb99697600091610915575b508160011b916000199060031b1c19161790565b90555b610910604051928392602084526020840191611618565b0390a2005b9050850135886108e2565b80855260208520601f19831695805b87811061098a5750837f6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb9969710610970575b5050600182811b0190556108f9565b840135600019600385901b60f8161c191690558580610961565b9091602060018192858901358155019301910161092f565b634e487b7160e01b600052604160045260246000fd5b6109d1915060203d6020116105e5576105d7818361141c565b8561058b565b6109ee9150843d861161061e57610610818361141c565b8861052a565b6113ec565b3461018c57600036600319011261018c576002546040516001600160a01b039091168152602090f35b3461018c57600036600319011261018c57610a3b611f22565b600080516020611fe883398151915280546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461018c57602036600319011261018c5761021a610206600435611b69565b3461018c57600036600319011261018c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03163003610b045760206040516000805160206120088339815191528152f35b63703e46dd60e11b60005260046000fd5b604036600319011261018c57610b29611406565b602435906001600160401b03821161018c573660238301121561018c57816004013590610b558261143d565b91610b63604051938461141c565b8083526020830193366024838301011161018c57816000926024602093018737840101526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016308114908115610d32575b50610b0457610bc9611f22565b6040516352d1902d60e01b81526001600160a01b0382169390602081600481885afa60009181610cfe575b50610c0e5784634c9c8ce360e01b60005260045260246000fd5b80600080516020612008833981519152869203610cea5750823b15610cd65760008051602061200883398151915280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2825115610cbb57600080916101ba945190845af43d15610cb3573d91610c968361143d565b92610ca4604051948561141c565b83523d6000602085013e611f86565b606091611f86565b50505034610cc557005b63b398979f60e01b60005260046000fd5b634c9c8ce360e01b60005260045260246000fd5b632a87526960e21b60005260045260246000fd5b9091506020813d602011610d2a575b81610d1a6020938361141c565b8101031261018c57519086610bf4565b3d9150610d0d565b600080516020612008833981519152546001600160a01b03161415905084610bbc565b3461018c57602036600319011261018c57610d96610da461021a610db2610d7d6004356119c4565b93929590916040519788976080895260808901906113c7565b9087820360208901526113c7565b9085820360408701526113c7565b9083820360608501526113c7565b3461018c57602036600319011261018c5761021a610206610ddf611406565b6117f0565b3461018c57606036600319011261018c576004356024356001600160401b03811161018c57610e17903690600401611344565b90916044356001600160401b03811161018c57610e38903690600401611344565b6002546040516331a9108f60e11b815260048101859052919491906001600160a01b0316602082602481845afa9081156105ec57610e8d60209260249460009161102f57506001600160a01b03163314611477565b6040519283809263d9548e5360e01b82528860048301525afa80156105ec57610ebe916000916110105750156114ce565b826000526000602052610ed960026040600020018287611562565b946001600160401b0385116109a257610efc85610ef6885461157b565b886115b5565b600095601f8611600114610f8b57610f4e86807f7121d1b42aabab02ef111a84b9dc36375a901fd0635378f23df84878362f96c7979899600091610f8057508160011b916000199060031b1c19161790565b90555b81604051928392833781016000815203902093610f7b604051928392602084526020840191611618565b0390a3005b90508601358a6108e2565b8087526020872096601f198716815b818110610ff8575090877f7121d1b42aabab02ef111a84b9dc36375a901fd0635378f23df84878362f96c79798999210610fde575b5050600187811b019055610f51565b85013560001960038a901b60f8161c191690558780610fcf565b868301358a5560019099019860209283019201610f9a565b611029915060203d6020116105e5576105d7818361141c565b8761058b565b6110469150843d861161061e57610610818361141c565b8a61052a565b3461018c57606036600319011261018c57600435906024356001600160401b03811161018c576110809036906004016112e4565b9190926044356001600160401b03811161018c576110a29036906004016112e4565b6002546331a9108f60e11b8552600485018490529093906001600160a01b0316602082602481845afa9081156105ec576110f360209260249460009161102f57506001600160a01b03163314611477565b6040519283809263d9548e5360e01b82528760048301525afa80156105ec57611124916000916110105750156114ce565b8284036112a75760005b84811061113757005b61114281858461150b565b8460005260006020526111676002604060002001611161858a8c61150b565b90611562565b916001600160401b0382116109a25761118a82611184855461157b565b856115b5565b600090601f831160011461123f5791806111c0926001969594600092611234575b50508160011b916000199060031b1c19161790565b90555b7f7121d1b42aabab02ef111a84b9dc36375a901fd0635378f23df84878362f96c7846111f083898b61150b565b92906111fd858a8961150b565b949091600082604051938493843782019081520390209361122b604051928392602084526020840191611618565b0390a30161112e565b013590508b806111ab565b8382526020822091601f198416815b81811061128f575091600196959492918388959310611275575b505050811b0190556111c3565b0135600019600384901b60f8161c191690558a8080611268565b8383013585556001909401936020928301920161124e565b60405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b6044820152606490fd5b9181601f8401121561018c578235916001600160401b03831161018c576020808501948460051b01011161018c57565b3461018c57602036600319011261018c576020611332600435611639565b6040516001600160a01b039091168152f35b9181601f8401121561018c578235916001600160401b03831161018c576020838186019501011161018c57565b90604060031983011261018c5760043591602435906001600160401b03821161018c576113a091600401611344565b9091565b60005b8381106113b75750506000910152565b81810151838201526020016113a7565b906020916113e0815180928185528580860191016113a4565b601f01601f1916010190565b3461018c5761021a61020661140036611371565b9161173d565b600435906001600160a01b038216820361018c57565b90601f801991011681019081106001600160401b038211176109a257604052565b6001600160401b0381116109a257601f01601f191660200190565b9081602091031261018c57516001600160a01b038116810361018c5790565b1561147e57565b60405162461bcd60e51b815260206004820152601060248201526f2737ba103237b6b0b4b71037bbb732b960811b6044820152606490fd5b9081602091031261018c5751801515810361018c5790565b156114d557565b60405162461bcd60e51b815260206004820152600e60248201526d111bdb585a5b88195e1c1a5c995960921b6044820152606490fd5b919081101561154c5760051b81013590601e198136030182121561018c5701908135916001600160401b03831161018c57602001823603811361018c579190565b634e487b7160e01b600052603260045260246000fd5b6020919283604051948593843782019081520301902090565b90600182811c921680156115ab575b602083101461159557565b634e487b7160e01b600052602260045260246000fd5b91607f169161158a565b919091601f83116115c6575b505050565b8183116115d257505050565b60005260206000206020601f830160051c921061160f575b81601f9101920160051c039060005b828110156115c1576000828201556001016115f9565b600091506115ea565b908060209392818452848401376000828201840152601f01601f1916010190565b60025460405163d9548e5360e01b81526004810183905290602090829060249082906001600160a01b03165afa9081156105ec5760009161169b575b50611695576000908152602081905260409020546001600160a01b031690565b50600090565b6116b4915060203d6020116105e5576105d7818361141c565b38611675565b600092918154916116ca8361157b565b808352926001811690811561172057506001146116e657505050565b60009081526020812093945091925b838310611706575060209250010190565b6001816020929493945483858701015201910191906116f5565b915050602093945060ff929192191683830152151560051b010190565b60025460405163d9548e5360e01b81526004810183905292939290602090829060249082906001600160a01b03165afa9081156105ec576000916117d1575b506117b9576117af926117b6926117a3926000526000602052600260406000200191611562565b604051928380926116ba565b038261141c565b90565b5050506040516117ca60208261141c565b6000815290565b6117ea915060203d6020116105e5576105d7818361141c565b3861177c565b6001600160a01b031660008181526001602052604090205480156119765760025460405163d9548e5360e01b8152600481018390526001600160a01b039091169290602081602481875afa9081156105ec576000916119a5575b506117b9576040516331a9108f60e11b815260048101839052602081602481875afa9081156105ec57600091611986575b506001600160a01b0316036119765760009060246040518094819363da2bfdb160e01b835260048301525afa9081156105ec576000916118f1575b506117b660026020604051846118d582965180928580860191016113a4565b8101612e7360f01b838201520301601d1981018452018261141c565b903d8082843e611901818461141c565b82019160208184031261196e578051906001600160401b038211611972570182601f8201121561196e578051916119378361143d565b93611945604051958661141c565b8385526020848401011161196b57509061196591602080850191016113a4565b386118b6565b80fd5b5080fd5b8280fd5b50506040516117ca60208261141c565b61199f915060203d60201161061e57610610818361141c565b3861187b565b6119be915060203d6020116105e5576105d7818361141c565b3861184a565b906024602060018060a01b03600254166040519283809263d9548e5360e01b82528760048301525afa9081156105ec57600091611b4a575b50611b03578160005260006020526117af611a41602b6002604060002001604051906a31b7b6973a3bb4ba3a32b960a91b8252600b82015220604051928380926116ba565b918060005260006020526117af611a81602a6002604060002001604051906931b7b69733b4ba343ab160b11b8252600a82015220604051928380926116ba565b918160005260006020526117af611ac2602b6002604060002001604051906a18dbdb4b991a5cd8dbdc9960aa1b8252600b82015220604051928380926116ba565b9160005260006020526117af6117b6602c6002604060002001604051906b6f72672e74656c656772616d60a01b8252600c82015220604051928380926116ba565b60405160209250611b14838261141c565b6000815291604051611b26828261141c565b6000815291604051611b38838261141c565b60008152916117ca604051918261141c565b611b63915060203d6020116105e5576105d7818361141c565b386119fc565b60025460405163d9548e5360e01b81526004810183905290602090829060249082906001600160a01b03165afa9081156105ec57600091611bf0575b50611be15760005260006020526117af6117b66023600260406000200160405190621d5c9b60ea1b8252600382015220604051928380926116ba565b506040516117ca60208261141c565b611c09915060203d6020116105e5576105d7818361141c565b38611ba5565b6001600160401b0381116109a25760051b60200190565b805182101561154c5760209160051b010190565b90929192611c4784611c0f565b93611c55604051958661141c565b808552601f19611c6482611c0f565b0160005b818110611d2e57505060025460405163d9548e5360e01b8152600481018590528691602090829060249082906001600160a01b03165afa9081156105ec57600091611d0f575b50611d08575060005b818110611cc45750505050565b6001908460005260006020526117af611cec6117a3600260406000200161116185888a61150b565b611cf68289611c26565b52611d018188611c26565b5001611cb7565b9450505050565b611d28915060203d6020116105e5576105d7818361141c565b38611cae565b806060602080938a01015201611c68565b60025460405163d9548e5360e01b81526004810183905290602090829060249082906001600160a01b03165afa9081156105ec57600091611da2575b50611be15760005260006020526117af6117b66001604060002001604051928380926116ba565b611dbb915060203d6020116105e5576105d7818361141c565b38611d7b565b6001600160a01b0316600081815260016020526040902054908115611ea55760025460405163d9548e5360e01b8152600481018490526001600160a01b0390911690602081602481855afa9081156105ec57600091611e86575b50611e7e576020602491604051928380926331a9108f60e11b82528760048301525afa9081156105ec57600091611e5f575b506001600160a01b0316036116955790565b611e78915060203d60201161061e57610610818361141c565b38611e4d565b505050600090565b611e9f915060203d6020116105e5576105d7818361141c565b38611e1b565b5050600090565b6001600160a01b03168015611f0c57600080516020611fe883398151915280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b600080516020611fe8833981519152546001600160a01b03163303611f4357565b63118cdaa760e01b6000523360045260246000fd5b60ff6000805160206120288339815191525460401c1615611f7557565b631afcd79f60e31b60005260046000fd5b90611fac5750805115611f9b57602081519101fd5b63d6bda27560e01b60005260046000fd5b81511580611fde575b611fbd575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15611fb556fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a2646970667358221220f0395a2a6e5f5334d94792a18d5a09ef61a518f19c730b6060d09310357ebf6264736f6c63430008210033
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c908163072c3b991461104c57508063149cff301461013d578063308e3386146109f45780633fb2478214610de45780634c16a74e14610dc05780634c7c26a314610d555780634f1ef28614610b1557806352d1902d14610aab578063543a666b14610a8c578063715018a614610a225780637b103999146109f957806382d324f0146109f457806388f97a67146107db5780638da5cb5b146107a5578063a4f6965714610668578063a91ee0dc14610625578063ac4ce2c6146104be578063ad3cb1cc14610477578063afc53671146103d4578063b7a750381461039a578063c4d66de81461021e578063cb323d76146101e7578063e67427f6146101bc578063f2fde38b14610191578063ff669b10146101425763ffa186491461013d57600080fd5b611314565b3461018c57600036600319011261018c57336000526001602052600060408120556000337f41f2b80eda6de6f23cab2e867951d054a48d6794db479c1d252bb840a374b62c8280a3005b600080fd5b3461018c57602036600319011261018c576101ba6101ad611406565b6101b5611f22565b611eac565b005b3461018c57602036600319011261018c5760206101df6101da611406565b611dc1565b604051908152f35b3461018c57602036600319011261018c5761021a610206600435611d3f565b6040519182916020835260208301906113c7565b0390f35b3461018c57602036600319011261018c57610237611406565b600080516020612028833981519152549060ff8260401c1615916001600160401b03811680159081610392575b6001149081610388575b15908161037f575b5061036e5767ffffffffffffffff1981166001176000805160206120288339815191525582610341575b506102a9611f58565b6102b1611f58565b6102ba33611eac565b6102c2611f58565b60018060a01b03166bffffffffffffffffffffffff60a01b60025416176002556102e857005b68ff0000000000000000196000805160206120288339815191525416600080516020612028833981519152557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b68ffffffffffffffffff1916680100000000000000011760008051602061202883398151915255826102a0565b63f92ee8a960e01b60005260046000fd5b90501584610276565b303b15915061026e565b849150610264565b3461018c57602036600319011261018c576001600160a01b036103bb611406565b1660005260016020526020604060002054604051908152f35b3461018c57604036600319011261018c576024356001600160401b03811161018c576104076104109136906004016112e4565b90600435611c3a565b6040518091602082016020835281518091526040830190602060408260051b8601019301916000905b82821061044857505050500390f35b919360019193955060206104678192603f198a820301865288516113c7565b9601920192018594939192610439565b3461018c57600036600319011261018c5761021a604080519061049a818361141c565b60058252640352e302e360dc1b6020830152519182916020835260208301906113c7565b3461018c57604036600319011261018c576004356024356001600160a01b0381169081900361018c576002546040516331a9108f60e11b81526004810184905291906001600160a01b0316602083602481845afa9081156105ec5761053b6020926024956000916105f8575b506001600160a01b03163314611477565b6040519384809263d9548e5360e01b82528760048301525afa9081156105ec576105926020927fa5d871c0e725767cd5aefc99c53aeca35f09dcc268145cbb13b74a7e2f48f196946000916105bf575b50156114ce565b83600052600082526040600020816bffffffffffffffffffffffff60a01b825416179055604051908152a2005b6105df9150843d86116105e5575b6105d7818361141c565b8101906114b6565b8661058b565b503d6105cd565b6040513d6000823e3d90fd5b6106189150843d861161061e575b610610818361141c565b810190611458565b8761052a565b503d610606565b3461018c57602036600319011261018c5761063e611406565b610646611f22565b600280546001600160a01b0319166001600160a01b0392909216919091179055005b3461018c57602036600319011261018c576002546040516331a9108f60e11b815260048035908201819052916001600160a01b031690602081602481855afa9081156105ec57600091610786575b50336001600160a01b03909116036107555760206024916040519283809263d9548e5360e01b82528660048301525afa80156105ec576106fe916000916107365750156114ce565b33600052600160205280604060002055337f41f2b80eda6de6f23cab2e867951d054a48d6794db479c1d252bb840a374b62c600080a3005b61074f915060203d6020116105e5576105d7818361141c565b8361058b565b60405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606490fd5b61079f915060203d60201161061e57610610818361141c565b836106b6565b3461018c57600036600319011261018c57600080516020611fe8833981519152546040516001600160a01b039091168152602090f35b3461018c576107e936611371565b6002546040516331a9108f60e11b81526004810185905291939291906001600160a01b0316602082602481845afa9081156105ec5761083f6020926024946000916109d757506001600160a01b03163314611477565b6040519283809263d9548e5360e01b82528760048301525afa80156105ec57610870916000916109b85750156114ce565b8160005260006020526001604060002001926001600160401b0381116109a2576108a48161089e865461157b565b866115b5565b600093601f8211600114610920576108f682807f6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb99697600091610915575b508160011b916000199060031b1c19161790565b90555b610910604051928392602084526020840191611618565b0390a2005b9050850135886108e2565b80855260208520601f19831695805b87811061098a5750837f6fd3fdff55b0feb6f24c338494b36929368cd564825688c741d54b8d7fa7beb9969710610970575b5050600182811b0190556108f9565b840135600019600385901b60f8161c191690558580610961565b9091602060018192858901358155019301910161092f565b634e487b7160e01b600052604160045260246000fd5b6109d1915060203d6020116105e5576105d7818361141c565b8561058b565b6109ee9150843d861161061e57610610818361141c565b8861052a565b6113ec565b3461018c57600036600319011261018c576002546040516001600160a01b039091168152602090f35b3461018c57600036600319011261018c57610a3b611f22565b600080516020611fe883398151915280546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461018c57602036600319011261018c5761021a610206600435611b69565b3461018c57600036600319011261018c577f0000000000000000000000008703cd0e252016aa718aaea81ad80f867b2286736001600160a01b03163003610b045760206040516000805160206120088339815191528152f35b63703e46dd60e11b60005260046000fd5b604036600319011261018c57610b29611406565b602435906001600160401b03821161018c573660238301121561018c57816004013590610b558261143d565b91610b63604051938461141c565b8083526020830193366024838301011161018c57816000926024602093018737840101526001600160a01b037f0000000000000000000000008703cd0e252016aa718aaea81ad80f867b22867316308114908115610d32575b50610b0457610bc9611f22565b6040516352d1902d60e01b81526001600160a01b0382169390602081600481885afa60009181610cfe575b50610c0e5784634c9c8ce360e01b60005260045260246000fd5b80600080516020612008833981519152869203610cea5750823b15610cd65760008051602061200883398151915280546001600160a01b031916821790557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b600080a2825115610cbb57600080916101ba945190845af43d15610cb3573d91610c968361143d565b92610ca4604051948561141c565b83523d6000602085013e611f86565b606091611f86565b50505034610cc557005b63b398979f60e01b60005260046000fd5b634c9c8ce360e01b60005260045260246000fd5b632a87526960e21b60005260045260246000fd5b9091506020813d602011610d2a575b81610d1a6020938361141c565b8101031261018c57519086610bf4565b3d9150610d0d565b600080516020612008833981519152546001600160a01b03161415905084610bbc565b3461018c57602036600319011261018c57610d96610da461021a610db2610d7d6004356119c4565b93929590916040519788976080895260808901906113c7565b9087820360208901526113c7565b9085820360408701526113c7565b9083820360608501526113c7565b3461018c57602036600319011261018c5761021a610206610ddf611406565b6117f0565b3461018c57606036600319011261018c576004356024356001600160401b03811161018c57610e17903690600401611344565b90916044356001600160401b03811161018c57610e38903690600401611344565b6002546040516331a9108f60e11b815260048101859052919491906001600160a01b0316602082602481845afa9081156105ec57610e8d60209260249460009161102f57506001600160a01b03163314611477565b6040519283809263d9548e5360e01b82528860048301525afa80156105ec57610ebe916000916110105750156114ce565b826000526000602052610ed960026040600020018287611562565b946001600160401b0385116109a257610efc85610ef6885461157b565b886115b5565b600095601f8611600114610f8b57610f4e86807f7121d1b42aabab02ef111a84b9dc36375a901fd0635378f23df84878362f96c7979899600091610f8057508160011b916000199060031b1c19161790565b90555b81604051928392833781016000815203902093610f7b604051928392602084526020840191611618565b0390a3005b90508601358a6108e2565b8087526020872096601f198716815b818110610ff8575090877f7121d1b42aabab02ef111a84b9dc36375a901fd0635378f23df84878362f96c79798999210610fde575b5050600187811b019055610f51565b85013560001960038a901b60f8161c191690558780610fcf565b868301358a5560019099019860209283019201610f9a565b611029915060203d6020116105e5576105d7818361141c565b8761058b565b6110469150843d861161061e57610610818361141c565b8a61052a565b3461018c57606036600319011261018c57600435906024356001600160401b03811161018c576110809036906004016112e4565b9190926044356001600160401b03811161018c576110a29036906004016112e4565b6002546331a9108f60e11b8552600485018490529093906001600160a01b0316602082602481845afa9081156105ec576110f360209260249460009161102f57506001600160a01b03163314611477565b6040519283809263d9548e5360e01b82528760048301525afa80156105ec57611124916000916110105750156114ce565b8284036112a75760005b84811061113757005b61114281858461150b565b8460005260006020526111676002604060002001611161858a8c61150b565b90611562565b916001600160401b0382116109a25761118a82611184855461157b565b856115b5565b600090601f831160011461123f5791806111c0926001969594600092611234575b50508160011b916000199060031b1c19161790565b90555b7f7121d1b42aabab02ef111a84b9dc36375a901fd0635378f23df84878362f96c7846111f083898b61150b565b92906111fd858a8961150b565b949091600082604051938493843782019081520390209361122b604051928392602084526020840191611618565b0390a30161112e565b013590508b806111ab565b8382526020822091601f198416815b81811061128f575091600196959492918388959310611275575b505050811b0190556111c3565b0135600019600384901b60f8161c191690558a8080611268565b8383013585556001909401936020928301920161124e565b60405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b6044820152606490fd5b9181601f8401121561018c578235916001600160401b03831161018c576020808501948460051b01011161018c57565b3461018c57602036600319011261018c576020611332600435611639565b6040516001600160a01b039091168152f35b9181601f8401121561018c578235916001600160401b03831161018c576020838186019501011161018c57565b90604060031983011261018c5760043591602435906001600160401b03821161018c576113a091600401611344565b9091565b60005b8381106113b75750506000910152565b81810151838201526020016113a7565b906020916113e0815180928185528580860191016113a4565b601f01601f1916010190565b3461018c5761021a61020661140036611371565b9161173d565b600435906001600160a01b038216820361018c57565b90601f801991011681019081106001600160401b038211176109a257604052565b6001600160401b0381116109a257601f01601f191660200190565b9081602091031261018c57516001600160a01b038116810361018c5790565b1561147e57565b60405162461bcd60e51b815260206004820152601060248201526f2737ba103237b6b0b4b71037bbb732b960811b6044820152606490fd5b9081602091031261018c5751801515810361018c5790565b156114d557565b60405162461bcd60e51b815260206004820152600e60248201526d111bdb585a5b88195e1c1a5c995960921b6044820152606490fd5b919081101561154c5760051b81013590601e198136030182121561018c5701908135916001600160401b03831161018c57602001823603811361018c579190565b634e487b7160e01b600052603260045260246000fd5b6020919283604051948593843782019081520301902090565b90600182811c921680156115ab575b602083101461159557565b634e487b7160e01b600052602260045260246000fd5b91607f169161158a565b919091601f83116115c6575b505050565b8183116115d257505050565b60005260206000206020601f830160051c921061160f575b81601f9101920160051c039060005b828110156115c1576000828201556001016115f9565b600091506115ea565b908060209392818452848401376000828201840152601f01601f1916010190565b60025460405163d9548e5360e01b81526004810183905290602090829060249082906001600160a01b03165afa9081156105ec5760009161169b575b50611695576000908152602081905260409020546001600160a01b031690565b50600090565b6116b4915060203d6020116105e5576105d7818361141c565b38611675565b600092918154916116ca8361157b565b808352926001811690811561172057506001146116e657505050565b60009081526020812093945091925b838310611706575060209250010190565b6001816020929493945483858701015201910191906116f5565b915050602093945060ff929192191683830152151560051b010190565b60025460405163d9548e5360e01b81526004810183905292939290602090829060249082906001600160a01b03165afa9081156105ec576000916117d1575b506117b9576117af926117b6926117a3926000526000602052600260406000200191611562565b604051928380926116ba565b038261141c565b90565b5050506040516117ca60208261141c565b6000815290565b6117ea915060203d6020116105e5576105d7818361141c565b3861177c565b6001600160a01b031660008181526001602052604090205480156119765760025460405163d9548e5360e01b8152600481018390526001600160a01b039091169290602081602481875afa9081156105ec576000916119a5575b506117b9576040516331a9108f60e11b815260048101839052602081602481875afa9081156105ec57600091611986575b506001600160a01b0316036119765760009060246040518094819363da2bfdb160e01b835260048301525afa9081156105ec576000916118f1575b506117b660026020604051846118d582965180928580860191016113a4565b8101612e7360f01b838201520301601d1981018452018261141c565b903d8082843e611901818461141c565b82019160208184031261196e578051906001600160401b038211611972570182601f8201121561196e578051916119378361143d565b93611945604051958661141c565b8385526020848401011161196b57509061196591602080850191016113a4565b386118b6565b80fd5b5080fd5b8280fd5b50506040516117ca60208261141c565b61199f915060203d60201161061e57610610818361141c565b3861187b565b6119be915060203d6020116105e5576105d7818361141c565b3861184a565b906024602060018060a01b03600254166040519283809263d9548e5360e01b82528760048301525afa9081156105ec57600091611b4a575b50611b03578160005260006020526117af611a41602b6002604060002001604051906a31b7b6973a3bb4ba3a32b960a91b8252600b82015220604051928380926116ba565b918060005260006020526117af611a81602a6002604060002001604051906931b7b69733b4ba343ab160b11b8252600a82015220604051928380926116ba565b918160005260006020526117af611ac2602b6002604060002001604051906a18dbdb4b991a5cd8dbdc9960aa1b8252600b82015220604051928380926116ba565b9160005260006020526117af6117b6602c6002604060002001604051906b6f72672e74656c656772616d60a01b8252600c82015220604051928380926116ba565b60405160209250611b14838261141c565b6000815291604051611b26828261141c565b6000815291604051611b38838261141c565b60008152916117ca604051918261141c565b611b63915060203d6020116105e5576105d7818361141c565b386119fc565b60025460405163d9548e5360e01b81526004810183905290602090829060249082906001600160a01b03165afa9081156105ec57600091611bf0575b50611be15760005260006020526117af6117b66023600260406000200160405190621d5c9b60ea1b8252600382015220604051928380926116ba565b506040516117ca60208261141c565b611c09915060203d6020116105e5576105d7818361141c565b38611ba5565b6001600160401b0381116109a25760051b60200190565b805182101561154c5760209160051b010190565b90929192611c4784611c0f565b93611c55604051958661141c565b808552601f19611c6482611c0f565b0160005b818110611d2e57505060025460405163d9548e5360e01b8152600481018590528691602090829060249082906001600160a01b03165afa9081156105ec57600091611d0f575b50611d08575060005b818110611cc45750505050565b6001908460005260006020526117af611cec6117a3600260406000200161116185888a61150b565b611cf68289611c26565b52611d018188611c26565b5001611cb7565b9450505050565b611d28915060203d6020116105e5576105d7818361141c565b38611cae565b806060602080938a01015201611c68565b60025460405163d9548e5360e01b81526004810183905290602090829060249082906001600160a01b03165afa9081156105ec57600091611da2575b50611be15760005260006020526117af6117b66001604060002001604051928380926116ba565b611dbb915060203d6020116105e5576105d7818361141c565b38611d7b565b6001600160a01b0316600081815260016020526040902054908115611ea55760025460405163d9548e5360e01b8152600481018490526001600160a01b0390911690602081602481855afa9081156105ec57600091611e86575b50611e7e576020602491604051928380926331a9108f60e11b82528760048301525afa9081156105ec57600091611e5f575b506001600160a01b0316036116955790565b611e78915060203d60201161061e57610610818361141c565b38611e4d565b505050600090565b611e9f915060203d6020116105e5576105d7818361141c565b38611e1b565b5050600090565b6001600160a01b03168015611f0c57600080516020611fe883398151915280546001600160a01b0319811683179091556001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b631e4fbdf760e01b600052600060045260246000fd5b600080516020611fe8833981519152546001600160a01b03163303611f4357565b63118cdaa760e01b6000523360045260246000fd5b60ff6000805160206120288339815191525460401c1615611f7557565b631afcd79f60e31b60005260046000fd5b90611fac5750805115611f9b57602081519101fd5b63d6bda27560e01b60005260046000fd5b81511580611fde575b611fbd575090565b639996b31560e01b60009081526001600160a01b0391909116600452602490fd5b50803b15611fb556fe9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbcf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00a2646970667358221220f0395a2a6e5f5334d94792a18d5a09ef61a518f19c730b6060d09310357ebf6264736f6c63430008210033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.