abi

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// https://github.com/ensdomains/offchain-resolver/blob/main/packages/contracts/contracts/OffchainResolver.sol
	// resolve(bytes,bytes)
	IResolverService = mustParseABI(`[
		{
			"inputs": [
				{
					"internalType": "bytes",
					"name": "name",
					"type": "bytes"
				},
				{
					"internalType": "bytes",
					"name": "data",
					"type": "bytes"
				}
			],
			"name": "resolve",
			"outputs": [
				{
					"internalType": "bytes",
					"name": "result",
					"type": "bytes"
				},
				{
					"internalType": "uint64",
					"name": "expires",
					"type": "uint64"
				},
				{
					"internalType": "bytes",
					"name": "sig",
					"type": "bytes"
				}
			],
			"stateMutability": "view",
			"type": "function"
		}
	]`)

	// EIP-137
	// https://github.com/ensdomains/ens-contracts/blob/v0.0.8/contracts/resolvers/profiles/IAddrResolver.sol
	// addr(bytes32)
	IAddrResolver = mustParseABI(`[
		{
			"inputs": [
				{
					"internalType": "bytes32",
					"name": "node",
					"type": "bytes32"
				}
			],
			"name": "addr",
			"outputs": [
				{
					"internalType": "address payable",
					"name": "",
					"type": "address"
				}
			],
			"stateMutability": "view",
			"type": "function"
		}
	]`)

	// EIP-2304
	// https://github.com/ensdomains/ens-contracts/blob/v0.0.8/contracts/resolvers/profiles/IAddressResolver.sol
	// addr(bytes32,uint256)
	IMulticoinAddrResolver = mustParseABI(`[
		{
			"inputs": [
				{
					"internalType": "bytes32",
					"name": "node",
					"type": "bytes32"
				},
				{
					"internalType": "uint256",
					"name": "coinType",
					"type": "uint256"
				}
			],
			"name": "addr",
			"outputs": [
				{
					"internalType": "bytes",
					"name": "",
					"type": "bytes"
				}
			],
			"stateMutability": "view",
			"type": "function"
		}
	]`)

	// EIP-634
	// https://github.com/ensdomains/ens-contracts/blob/v0.0.8/contracts/resolvers/profiles/ITextResolver.sol
	// text(bytes32,string)
	ITextResolver = mustParseABI(`[
		{
			"inputs": [
				{
					"internalType": "bytes32",
					"name": "node",
					"type": "bytes32"
				},
				{
					"internalType": "string",
					"name": "key",
					"type": "string"
				}
			],
			"name": "text",
			"outputs": [
				{
					"internalType": "string",
					"name": "",
					"type": "string"
				}
			],
			"stateMutability": "view",
			"type": "function"
		}
	]`)
)
View Source
var (
	SelectorResolve       = mustGetSelector(IResolverService, "resolve")
	SelectorAddr          = mustGetSelector(IAddrResolver, "addr")
	SelectorMulticoinAddr = mustGetSelector(IMulticoinAddrResolver, "addr")
	SelectorText          = mustGetSelector(ITextResolver, "text")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL