OffchainResolver
Git Source (opens in a new tab)
Inherits: IExtendedResolver, IERC165, Ownable
Implements an ENS resolver that directs all queries to a CCIP read gateway. Callers must implement EIP 3668 and ENSIP 10.
State Variables
url
string public url;
signers
mapping(address => bool) public signers;
Functions
constructor
constructor(string memory _url, address[] memory _signers);
makeSignatureHash
function makeSignatureHash(address target, uint64 expires, bytes memory request, bytes memory result)
external
pure
returns (bytes32);
resolve
Resolves a name, as specified by ENSIP 10 (wildcard).
function resolve(bytes calldata name, bytes calldata data) external view override returns (bytes memory);
Parameters
Name | Type | Description |
---|---|---|
name | bytes | The DNS-encoded name to resolve. |
data | bytes | The ABI encoded data for the underlying resolution function (Eg, addr(bytes32), text(bytes32,string), etc). |
Returns
Name | Type | Description |
---|---|---|
<none> | bytes | The return data, ABI encoded identically to the underlying function. |
updateSigners
function updateSigners(address[] calldata _signers, bool[] calldata _isSigner) external onlyOwner;
updateUrl
function updateUrl(string calldata _url) external onlyOwner;
resolveWithProof
Callback used by CCIP read compatible clients to verify and parse the response.
function resolveWithProof(bytes calldata response, bytes calldata extraData) external view returns (bytes memory);
supportsInterface
function supportsInterface(bytes4 interfaceID) public pure returns (bool);
Events
NewSigners
event NewSigners(address indexed signer, bool isSigner);
UpdateUrl
event UpdateUrl(string url);
Errors
OffchainLookup
error OffchainLookup(address sender, string[] urls, bytes callData, bytes4 callbackFunction, bytes extraData);