error Unauthorised(bytes32 node, address addr)
error IncompatibleParent()
error IncorrectTokenType()
error LabelMismatch(bytes32 labelHash, bytes32 expectedLabelhash)
error LabelTooShort()
error LabelTooLong(string label)
error IncorrectTargetOwner(address owner)
error CannotUpgrade()
error OperationProhibited(bytes32 node)
error NameIsNotWrapped()
error NameIsStillExpired()
contract ENS ens
contract IBaseRegistrar registrar
contract IMetadataService metadataService
mapping(bytes32 => bytes) names
string name
uint64 GRACE_PERIOD
bytes32 ETH_NODE
bytes32 ETH_LABELHASH
bytes32 ROOT_NODE
contract INameWrapperUpgrade upgradeContract
uint64 MAX_EXPIRY
mapping(address => struct EnumerableSet.Bytes32Set) _userNodes
constructor(contract ENS _ens, contract IBaseRegistrar _registrar, contract IMetadataService _metadataService) public
function initialize(contract ENS _ens, contract IBaseRegistrar _registrar, contract IMetadataService _metadataService) public
function _init(contract ENS _ens, contract IBaseRegistrar _registrar, contract IMetadataService _metadataService) internal
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)
function ownerOf(uint256 id) public view returns (address owner)
Gets the owner of a name
Name | Type | Description |
---|---|---|
id | uint256 | Label as a string of the .eth domain to wrap |
Name | Type | Description |
---|---|---|
owner | address | The owner of the name |
function getData(uint256 id) public view returns (address owner, uint32 fuses, uint64 expiry)
Gets the data for a name
Name | Type | Description |
---|---|---|
id | uint256 | Namehash of the name |
Name | Type | Description |
---|---|---|
owner | address | Owner of the name |
fuses | uint32 | Fuses of the name |
expiry | uint64 | Expiry of the name |
function setMetadataService(contract IMetadataService _metadataService) public
Set the metadata service. Only the owner can do this
Name | Type | Description |
---|---|---|
_metadataService | contract IMetadataService | The new metadata service |
function uri(uint256 tokenId) public view returns (string)
Get the metadata uri
Name | Type | Description |
---|---|---|
tokenId | uint256 | The id of the token |
Name | Type | Description |
---|---|---|
[0] | string | string uri of the metadata service |
function setUpgradeContract(contract INameWrapperUpgrade _upgradeAddress) public
Set the address of the upgradeContract of the contract. only admin can do this
The default value of upgradeContract is the 0 address. Use the 0 address at any time to make the contract not upgradable.
Name | Type | Description |
---|---|---|
_upgradeAddress | contract INameWrapperUpgrade | address of an upgraded contract |
modifier onlyTokenOwner(bytes32 node)
Checks if msg.sender is the owner or approved by the owner of a name
Name | Type | Description |
---|---|---|
node | bytes32 | namehash of the name to check |
function canModifyName(bytes32 node, address addr) public view returns (bool)
Checks if owner or approved by owner
Name | Type | Description |
---|---|---|
node | bytes32 | namehash of the name to check |
addr | address | which address to check permissions for |
Name | Type | Description |
---|---|---|
[0] | bool | whether or not is owner or approved |
function wrapETH2LD(string label, address wrappedOwner, uint16 ownerControlledFuses, address resolver) public
Wraps a .eth domain, creating a new token and sending the original ERC721 token to this contract
Can be called by the owner of the name on the .eth registrar or an authorised caller on the registrar
Name | Type | Description |
---|---|---|
label | string | Label as a string of the .eth domain to wrap |
wrappedOwner | address | Owner of the name in this contract |
ownerControlledFuses | uint16 | Initial owner-controlled fuses to set |
resolver | address | Resolver contract address |
function registerAndWrapETH2LD(string label, address wrappedOwner, uint256 duration, address resolver, uint16 ownerControlledFuses) external returns (uint256 registrarExpiry)
Registers a new .eth second-level domain and wraps it. Only callable by authorised controllers.
Name | Type | Description |
---|---|---|
label | string | The label to register (Eg, 'foo' for 'foo.eth'). |
wrappedOwner | address | The owner of the wrapped name. |
duration | uint256 | The duration, in seconds, to register the name for. |
resolver | address | The resolver address to set on the ENS registry (optional). |
ownerControlledFuses | uint16 | Initial owner-controlled fuses to set |
Name | Type | Description |
---|---|---|
registrarExpiry | uint256 | The expiry date of the new name on the .eth registrar, in seconds since the Unix epoch. |
function renew(uint256 tokenId, uint256 duration) external returns (uint256 expires)
Renews a .eth second-level domain.
Only callable by authorised controllers.
Name | Type | Description |
---|---|---|
tokenId | uint256 | The hash of the label to register (eg, keccak256('foo') , for 'foo.eth'). |
duration | uint256 | The number of seconds to renew the name for. |
Name | Type | Description |
---|---|---|
expires | uint256 | The expiry date of the name on the .eth registrar, in seconds since the Unix epoch. |
function wrap(bytes name, address wrappedOwner, address resolver) public
Wraps a non .eth domain, of any kind. Could be a DNSSEC name vitalik.xyz or a subdomain
Can be called by the owner in the registry or an authorised caller in the registry
Name | Type | Description |
---|---|---|
name | bytes | The name to wrap, in DNS format |
wrappedOwner | address | Owner of the name in this contract |
resolver | address | Resolver contract |
function unwrapETH2LD(bytes32 labelhash, address registrant, address controller) public
Unwraps a .eth domain. e.g. vitalik.eth
Can be called by the owner in the wrapper or an authorised caller in the wrapper
Name | Type | Description |
---|---|---|
labelhash | bytes32 | Labelhash of the .eth domain |
registrant | address | Sets the owner in the .eth registrar to this address |
controller | address | Sets the owner in the registry to this address |
function unwrap(bytes32 parentNode, bytes32 labelhash, address controller) public
Unwraps a non .eth domain, of any kind. Could be a DNSSEC name vitalik.xyz or a subdomain
Can be called by the owner in the wrapper or an authorised caller in the wrapper
Name | Type | Description |
---|---|---|
parentNode | bytes32 | Parent namehash of the name e.g. vitalik.xyz would be namehash('xyz') |
labelhash | bytes32 | Labelhash of the name, e.g. vitalik.xyz would be keccak256('vitalik') |
controller | address | Sets the owner in the registry to this address |
function setFuses(bytes32 node, uint16 ownerControlledFuses) public returns (uint32)
Sets fuses of a name
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the name |
ownerControlledFuses | uint16 | Owner-controlled fuses to burn |
Name | Type | Description |
---|---|---|
[0] | uint32 | Old fuses |
function extendExpiry(bytes32 parentNode, bytes32 labelhash, uint64 expiry) public returns (uint64)
Extends expiry for a name
Name | Type | Description |
---|---|---|
parentNode | bytes32 | Parent namehash of the name e.g. vitalik.xyz would be namehash('xyz') |
labelhash | bytes32 | Labelhash of the name, e.g. vitalik.xyz would be keccak256('vitalik') |
expiry | uint64 | When the name will expire in seconds since the Unix epoch |
Name | Type | Description |
---|---|---|
[0] | uint64 | New expiry |
function upgrade(bytes name, bytes extraData) public
Upgrades a domain of any kind. Could be a .eth name vitalik.eth, a DNSSEC name vitalik.xyz, or a subdomain
Can be called by the owner or an authorised caller
Name | Type | Description |
---|---|---|
name | bytes | The name to upgrade, in DNS format |
extraData | bytes | Extra data to pass to the upgrade contract |
function setChildFuses(bytes32 parentNode, bytes32 labelhash, uint32 fuses, uint64 expiry) public
/* @notice Sets fuses of a name that you own the parent of. Can also be called by the owner of a .eth name
Name | Type | Description |
---|---|---|
parentNode | bytes32 | Parent namehash of the name e.g. vitalik.xyz would be namehash('xyz') |
labelhash | bytes32 | Labelhash of the name, e.g. vitalik.xyz would be keccak256('vitalik') |
fuses | uint32 | Fuses to burn |
expiry | uint64 | When the name will expire in seconds since the Unix epoch |
function setSubnodeOwner(bytes32 parentNode, string label, address owner, uint32 fuses, uint64 expiry) public returns (bytes32 node)
Sets the subdomain owner in the registry and then wraps the subdomain
Name | Type | Description |
---|---|---|
parentNode | bytes32 | Parent namehash of the subdomain |
label | string | Label of the subdomain as a string |
owner | address | New owner in the wrapper |
fuses | uint32 | Initial fuses for the wrapped subdomain |
expiry | uint64 | When the name will expire in seconds since the Unix epoch |
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the subdomain |
function setSubnodeRecord(bytes32 parentNode, string label, address owner, address resolver, uint64 ttl, uint32 fuses, uint64 expiry) public returns (bytes32 node)
Sets the subdomain owner in the registry with records and then wraps the subdomain
Name | Type | Description |
---|---|---|
parentNode | bytes32 | parent namehash of the subdomain |
label | string | label of the subdomain as a string |
owner | address | new owner in the wrapper |
resolver | address | resolver contract in the registry |
ttl | uint64 | ttl in the registry |
fuses | uint32 | initial fuses for the wrapped subdomain |
expiry | uint64 | When the name will expire in seconds since the Unix epoch |
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the subdomain |
function setRecord(bytes32 node, address owner, address resolver, uint64 ttl) public
Sets records for the name in the ENS Registry
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the name to set a record for |
owner | address | New owner in the registry |
resolver | address | Resolver contract |
ttl | uint64 | Time to live in the registry |
function setResolver(bytes32 node, address resolver) public
Sets resolver contract in the registry
Name | Type | Description |
---|---|---|
node | bytes32 | namehash of the name |
resolver | address | the resolver contract |
function setTTL(bytes32 node, uint64 ttl) public
Sets TTL in the registry
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the name |
ttl | uint64 | TTL in the registry |
modifier operationAllowed(bytes32 node, uint32 fuseMask)
Allows an operation only if none of the specified fuses are burned.
Name | Type | Description |
---|---|---|
node | bytes32 | The namehash of the name to check fuses on. |
fuseMask | uint32 | A bitmask of fuses that must not be burned. |
function _checkCanCallSetSubnodeOwner(bytes32 parentNode, bytes32 subnode) internal view
Check whether a name can call setSubnodeOwner/setSubnodeRecord
Checks both CANNOT_CREATE_SUBDOMAIN and PARENT_CANNOT_CONTROL and whether not they have been burnt and checks whether the owner of the subdomain is 0x0 for creating or already exists for replacing a subdomain. If either conditions are true, then it is possible to call setSubnodeOwner
Name | Type | Description |
---|---|---|
parentNode | bytes32 | Namehash of the parent name to check |
subnode | bytes32 | Namehash of the subname to check |
function allFusesBurned(bytes32 node, uint32 fuseMask) public view returns (bool)
Checks all Fuses in the mask are burned for the node
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the name |
fuseMask | uint32 | The fuses you want to check |
Name | Type | Description |
---|---|---|
[0] | bool | Boolean of whether or not all the selected fuses are burned |
function isWrapped(bytes32 node) public view returns (bool)
Checks if a name is wrapped
Name | Type | Description |
---|---|---|
node | bytes32 | Namehash of the name |
Name | Type | Description |
---|---|---|
[0] | bool | Boolean of whether or not the name is wrapped |
function isWrapped(bytes32 parentNode, bytes32 labelhash) public view returns (bool)
Checks if a name is wrapped in a more gas efficient way
Name | Type | Description |
---|---|---|
parentNode | bytes32 | Namehash of the name |
labelhash | bytes32 | Namehash of the name |
Name | Type | Description |
---|---|---|
[0] | bool | Boolean of whether or not the name is wrapped |
function onERC721Received(address to, address, uint256 tokenId, bytes data) public returns (bytes4)
function _preTransferCheck(uint256 id, uint32 fuses, uint64 expiry) internal view returns (bool)
function _clearOwnerAndFuses(address owner, uint32 fuses, uint64 expiry) internal view returns (address, uint32)
function _makeNode(bytes32 node, bytes32 labelhash) private pure returns (bytes32)
function _addLabel(string label, bytes name) internal pure returns (bytes ret)
function _mint(bytes32 node, address owner, uint32 fuses, uint64 expiry) internal
function _wrap(bytes32 node, bytes name, address wrappedOwner, uint32 fuses, uint64 expiry) internal
function _storeNameAndWrap(bytes32 parentNode, bytes32 node, string label, address owner, uint32 fuses, uint64 expiry) internal
function _saveLabel(bytes32 parentNode, bytes32 node, string label) internal returns (bytes)
function _updateName(bytes32 parentNode, bytes32 node, string label, address owner, uint32 fuses, uint64 expiry) internal
function _checkParentFusesAndExpiry(bytes32 parentNode, bytes32 node, uint32 fuses, uint64 expiry) internal view returns (uint64)
function _checkParentFuses(bytes32 node, uint32 fuses, uint32 parentFuses) internal pure
function _normaliseExpiry(uint64 expiry, uint64 oldExpiry, uint64 maxExpiry) internal pure returns (uint64)
function _wrapETH2LD(string label, address wrappedOwner, uint32 fuses, uint64 expiry, address resolver) private
function _unwrap(bytes32 node, address owner) private
function _setFuses(bytes32 node, address owner, uint32 fuses, uint64 oldExpiry, uint64 expiry) internal
function _setData(bytes32 node, address owner, uint32 fuses, uint64 expiry) internal
function _canFusesBeBurned(bytes32 node, uint32 fuses) internal pure
function _checkFusesAreSettable(bytes32 node, uint32 fuses) internal pure
function _isWrapped(bytes32 node) internal view returns (bool)
function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data) public virtual
function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data) public virtual
function _updateNodeOwner(address from, address to, uint256 id) internal
function userNodeSet(address user) public view returns (bytes32[])
function userDomains(address user) public view returns (string[])
function _burn(uint256 tokenId) internal
bytes32 ETH_NAMEHASH
contract ENS ens
constructor(contract ENS _ens) public
function getController() internal view returns (contract Web3RegistrarController)
function rentPrice(string[] names, uint256 duration) external view returns (uint256 total)
function renewAll(string[] names, uint256 duration) external payable
function supportsInterface(bytes4 interfaceID) external pure returns (bool)
function priceInFiat(string name, uint256 expires, uint256 duration) external view returns (struct IPriceOracle.Price)
function isReserved(string label) external view returns (bool)
function isLabelValid(string label) external view returns (bool)
error CommitmentTooNew(bytes32 commitment)
error CommitmentTooOld(bytes32 commitment)
error NameNotAvailable(string name)
error DurationTooShort(uint256 duration)
error ResolverRequiredWhenDataSupplied()
error UnexpiredCommitmentExists(bytes32 commitment)
error InsufficientValue()
error Unauthorised(bytes32 node)
error MaxCommitmentAgeTooLow()
error MaxCommitmentAgeTooHigh()
A registrar controller for registering and renewing names at fixed cost.
uint256 MIN_REGISTRATION_DURATION
bytes32 ETH_NODE
uint64 MAX_EXPIRY
contract BaseRegistrarImplementation base
contract IFiatPriceOracle prices
uint256 minCommitmentAge
uint256 maxCommitmentAge
contract ReverseRegistrar reverseRegistrar
contract INameWrapper nameWrapper
mapping(bytes32 => uint256) commitments
event NameRegistered(string name, bytes32 label, address owner, uint256 baseCost, uint256 premium, uint256 expires)
event NameRenewed(string name, bytes32 label, uint256 cost, uint256 expires)
contract INameWhitelist nameWhitelist
uint256 validLen
enum LabelStatus {
Valid,
TooShort,
Reserved,
IllegalChar,
Locked,
Registered,
SoldOut
}
bytes32 ADMIN_ROLE
constructor(contract BaseRegistrarImplementation _base, contract IFiatPriceOracle _prices, uint256 _minCommitmentAge, uint256 _maxCommitmentAge, contract ReverseRegistrar _reverseRegistrar, contract INameWrapper _nameWrapper) public
function initialize(contract BaseRegistrarImplementation _base, contract IFiatPriceOracle _prices, uint256 _minCommitmentAge, uint256 _maxCommitmentAge, contract ReverseRegistrar _reverseRegistrar, contract INameWrapper _nameWrapper, address _admin) public
function _init(contract BaseRegistrarImplementation _base, contract IFiatPriceOracle _prices, uint256 _minCommitmentAge, uint256 _maxCommitmentAge, contract ReverseRegistrar _reverseRegistrar, contract INameWrapper _nameWrapper) internal
function rentPrice(string name, uint256 duration) public view returns (struct IPriceOracle.Price price)
function valid(string name) public view returns (bool)
function available(string name) public view returns (bool)
function makeCommitment(string name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] data, bool reverseRecord, uint16 ownerControlledFuses) public pure returns (bytes32)
function makeCommitment(string name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] data, bool reverseRecord, uint16 ownerControlledFuses, uint64 wrapperExpiry) public pure returns (bytes32)
function commit(bytes32 commitment) public
function register(string name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] data, bool reverseRecord, uint16 ownerControlledFuses, uint64 wrapperExpiry) public payable
function register(string name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] data, bool reverseRecord, uint16 ownerControlledFuses) public payable
function _register(string name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] data, bool reverseRecord, uint16 ownerControlledFuses) internal returns (uint256)
function renew(string name, uint256 duration) external payable
function withdraw() public
function supportsInterface(bytes4 interfaceID) public pure returns (bool)
function _consumeCommitment(string name, uint256 duration, bytes32 commitment) internal
function _setRecords(address resolverAddress, bytes32 label, bytes[] data) internal
function _setReverseRecord(string name, address resolver, address owner) internal
function rentPriceInFiat(string name, uint256 duration) public view returns (struct IPriceOracle.Price price)
function labelStatus(string _label) public view returns (enum Web3RegistrarController.LabelStatus)
function renewWithFiat(string name, uint256 duration, uint32 fuses, uint64 wrapperExpiry) public
function registerWithFiat(string name, address owner, uint256 duration, bytes32 secret, address resolver, bytes[] data, bool reverseRecord, uint16 fuses, uint64 wrapperExpiry) public
function setCommitmentAge(uint256 _minCommitmentAge, uint256 _maxCommitmentAge) public
function setNameWhitelist(contract INameWhitelist _nameWhitelist) public
function setPriceOracle(contract IFiatPriceOracle _prices) public
function setValidLen(uint256 _len) public
function addAdmin(address addr) public
function tokenCount() external view returns (uint256)
bytes ZERO_WIDTH_SPACE
string CHAR_WHITE_LIST
string EMOJI_WHITE_LIST
mapping(string => bool) whiteList
mapping(bytes32 => bool) specialNames
constructor() public
function checkIfZeroNotPresent(string _name) public pure returns (bool)
function checkContainBytes(string toCheck, bytes toFind) public pure returns (bool)
function isLabelValid(string _label) public view returns (bool)
function isInWhiteList(string toCheck) public view returns (bool)
function isReserved(string label) public view returns (bool)
function setSpecialName(bytes32 name, bool isSpecial) public
function setSpecialNameBatch(bytes32[] names, bool isSpecial) public
function setWhiteList(string char, bool isWhite) public
function setWhiteListBatch(string chars, bool isWhite) public
function keccak(string str) private pure returns (bytes32)
uint256 COIN_TYPE_CFX
constructor(contract ENS _ens, contract INameWrapper wrapperAddress, address _trustedETHController, address _trustedReverseRegistrar) public
function setAddr(bytes32 node, address a) external virtual
Sets the address associated with an ENS node. May only be called by the owner of that node in the ENS registry.
Name | Type | Description |
---|---|---|
node | bytes32 | The node to update. |
a | address | The address to set. |
function addr(bytes32 node) public view virtual returns (address payable)
Returns the address associated with an ENS node.
Name | Type | Description |
---|---|---|
node | bytes32 | The ENS node to query. |
Name | Type | Description |
---|---|---|
[0] | address payable | The associated address. |
contract ENS ens
contract IBaseRegistrar baseRegistrar
constructor(address _ens, address _base) public
function addr(bytes32 node) public view returns (address)
function addr(bytes32 node, uint256 coinType) public view returns (bytes)
function addrBatch(bytes32[] nodes) public view returns (address[])
function ownerOf(uint256 tokenId) public view returns (address)
function setENS(address _ens) public
function setBaseRegistrar(address _base) public
struct slice {
uint256 _len;
uint256 _ptr;
}
function toSlice(string self) internal pure returns (struct Strings.slice)
function keccak(struct Strings.slice self) internal pure returns (bytes32 ret)
function empty(struct Strings.slice self) internal pure returns (bool)
function rfindPtr(uint256 selflen, uint256 selfptr, uint256 needlelen, uint256 needleptr) private pure returns (uint256)
function rsplit(struct Strings.slice self, struct Strings.slice needle, struct Strings.slice token) internal pure returns (struct Strings.slice)
function namehash(string name) internal pure returns (bytes32 hash)
contract ENS ens
contract ReverseRegistrar registrar
bytes32 ADDR_REVERSE_NODE
constructor(contract ENS _ens) public
The constructor
takes ENS registry address
function getNames(address[] addresses) external view returns (string[] r)
Read only function to return ens name only if both forward and reverse resolution are set *
function node(address addr) private pure returns (bytes32)
function sha3HexAddress(address addr) private pure returns (bytes32 ret)
uint256 unlockTime
address payable owner
event Withdrawal(uint256 amount, uint256 when)
event NewPriceOracle(address oracle)
struct EnumerableStringSet.StringSet names
constructor(uint256 _unlockTime) public payable
function withdraw() public
function addName(string name) public
function removeName(string name) public
function containsName(string name) public view returns (bool)
function getNames() public view returns (string[])
struct Set {
string[] _values;
mapping(string => uint256) _indexes;
}
function _add(struct EnumerableStringSet.Set set, string value) private returns (bool)
_Add a value to a set. O(1).
Returns true if the value was added to the set, that is if it was not already present._
function _remove(struct EnumerableStringSet.Set set, string value) private returns (bool)
_Removes a value from a set. O(1).
Returns true if the value was removed from the set, that is if it was present._
function _contains(struct EnumerableStringSet.Set set, string value) private view returns (bool)
Returns true if the value is in the set. O(1).
function _length(struct EnumerableStringSet.Set set) private view returns (uint256)
Returns the number of values on the set. O(1).
function _at(struct EnumerableStringSet.Set set, uint256 index) private view returns (string)
_Returns the value stored at position index
in the set. O(1).
Note that there are no guarantees on the ordering of values inside the array, and it may change when more values are added or removed.
Requirements:
index
must be strictly less than {length}._
function _values(struct EnumerableStringSet.Set set) private view returns (string[])
_Return the entire set in an array
WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that this function has an unbounded cost, and using it as part of a state-changing function may render the function uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block._
function _values(struct EnumerableStringSet.Set set, uint256 start, uint256 limit) private view returns (string[])
struct StringSet {
struct EnumerableStringSet.Set _inner;
}
function add(struct EnumerableStringSet.StringSet set, string value) internal returns (bool)
_Add a value to a set. O(1).
Returns true if the value was added to the set, that is if it was not already present._
function remove(struct EnumerableStringSet.StringSet set, string value) internal returns (bool)
_Removes a value from a set. O(1).
Returns true if the value was removed from the set, that is if it was present._
function contains(struct EnumerableStringSet.StringSet set, string value) internal view returns (bool)
Returns true if the value is in the set. O(1).
function length(struct EnumerableStringSet.StringSet set) internal view returns (uint256)
Returns the number of values in the set. O(1).
function at(struct EnumerableStringSet.StringSet set, uint256 index) internal view returns (string)
_Returns the value stored at position index
in the set. O(1).
Note that there are no guarantees on the ordering of values inside the array, and it may change when more values are added or removed.
Requirements:
index
must be strictly less than {length}._
function values(struct EnumerableStringSet.StringSet set) internal view returns (string[])
_Return the entire set in an array
WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that this function has an unbounded cost, and using it as part of a state-changing function may render the function uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block._
function values(struct EnumerableStringSet.StringSet set, uint256 start, uint256 limit) internal view returns (string[])
constructor(address logic, bytes data) public
function implementation() public view returns (address)
function upgradeTo(address newImplementation) public
int256 value
constructor(int256 _value) public
function set(int256 _value) public
function latestAnswer() public view returns (int256)
function latestAnswer() external view returns (int256)
uint256 price1Letter
uint256 price2Letter
uint256 price3Letter
uint256 price4Letter
uint256 price5Letter
uint256 fiatPrice1Letter
uint256 fiatPrice2Letter
uint256 fiatPrice3Letter
uint256 fiatPrice4Letter
uint256 fiatPrice5Letter
contract AggregatorInterface usdOracle
event RentPriceChanged(uint256[] prices, uint8 priceType)
constructor(contract AggregatorInterface _usdOracle, uint256[] _rentPrices) public
function price(string name, uint256 expires, uint256 duration) external view returns (struct IPriceOracle.Price)
Returns the price to register or renew a name.
Name | Type | Description |
---|---|---|
name | string | The name being registered or renewed. |
expires | uint256 | When the name presently expires (0 if this is a new registration). |
duration | uint256 | How long the name is being registered or extended for, in seconds. |
Name | Type | Description |
---|---|---|
[0] | struct IPriceOracle.Price | base premium tuple of base price + premium price |
function priceInFiat(string name, uint256 expires, uint256 duration) external view returns (struct IPriceOracle.Price)
function premium(string name, uint256 expires, uint256 duration) external view returns (uint256)
Returns the pricing premium in wei.
function _premium(string name, uint256 expires, uint256 duration) internal view virtual returns (uint256)
Returns the pricing premium in internal base units.
function attoUSDToWei(uint256 amount) internal view returns (uint256)
function weiToAttoUSD(uint256 amount) internal view returns (uint256)
function supportsInterface(bytes4 interfaceID) public view virtual returns (bool)
function setRentPrice(uint256[] _rentPrices) public
function setFiatRentPrice(uint256[] _rentPrices) public