diff --git a/.pnp.cjs b/.pnp.cjs index 3df64fba..4f25b289 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -490,6 +490,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "@nodelib/fs.walk",\ "npm:1.2.8"\ ],\ + [\ + "@nomiclabs/hardhat-ethers",\ + [\ + "hardhat-deploy-ethers",\ + "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.3.0-beta.13"\ + ]\ + ],\ [\ "@nomiclabs/hardhat-truffle5",\ "virtual:cd804966a4af2a115ae98988b74c122bdd7fc9af5d9f9a5a62f576ef89ea18c25fbb8b994a1a65d60bf2e11d89eb0b2e6cc089c93112e3539943bc0642c881d5#npm:2.0.5"\ @@ -1510,6 +1517,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "delegates",\ "npm:1.0.0"\ ],\ + [\ + "delete-empty",\ + "npm:3.0.0"\ + ],\ [\ "delimit-stream",\ "npm:0.1.0"\ @@ -1638,6 +1649,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "enquirer",\ "npm:2.3.6"\ ],\ + [\ + "ens-contracts-main",\ + "https://github.com/ensdomains/ens-contracts.git#commit=43b483db7ae3b13b985b3600779aa4e65ca22964"\ + ],\ [\ "ens-contracts-namewrapper",\ "https://github.com/ensdomains/ens-contracts.git#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375"\ @@ -2086,6 +2101,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "hardhat",\ "npm:2.9.3"\ ],\ + [\ + "hardhat-abi-exporter",\ + "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:2.8.0"\ + ],\ [\ "hardhat-deploy",\ "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.11.4"\ @@ -3182,6 +3201,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "path-parse",\ "npm:1.0.7"\ ],\ + [\ + "path-starts-with",\ + "npm:2.0.0"\ + ],\ [\ "path-to-regexp",\ "npm:0.1.7"\ @@ -5037,6 +5060,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@ensdomains/ens-test-env", "workspace:packages/ens-test-env"],\ ["@ethersproject/abi", "npm:5.6.0"],\ ["@ethersproject/providers", "npm:5.6.2"],\ + ["@nomiclabs/hardhat-ethers", [\ + "hardhat-deploy-ethers",\ + "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.3.0-beta.13"\ + ]],\ ["@openzeppelin/contracts", "npm:4.5.0"],\ ["@swc/core", "npm:1.2.162"],\ ["@swc/jest", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.2.20"],\ @@ -5045,12 +5072,14 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@types/jest", "npm:27.4.1"],\ ["dns-packet", "npm:5.3.1"],\ ["dotenv", "npm:16.0.0"],\ + ["ens-contracts-main", "https://github.com/ensdomains/ens-contracts.git#commit=43b483db7ae3b13b985b3600779aa4e65ca22964"],\ ["ens-contracts-namewrapper", "https://github.com/ensdomains/ens-contracts.git#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375"],\ ["ens-contracts-universal", "https://github.com/ensdomains/ens-contracts.git#commit=ec2657e78811ff9fa09436209798a6135ecca9b7"],\ ["ethers", "npm:5.6.1"],\ ["graphql", "npm:16.3.0"],\ ["graphql-request", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:4.1.0"],\ ["hardhat", "npm:2.9.3"],\ + ["hardhat-abi-exporter", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:2.8.0"],\ ["hardhat-deploy", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.11.4"],\ ["jest", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:27.5.1"],\ ["jest-environment-node", "npm:27.5.1"],\ @@ -9510,6 +9539,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["delete-empty", [\ + ["npm:3.0.0", {\ + "packageLocation": "./.yarn/cache/delete-empty-npm-3.0.0-3c5b632650-1e2b030346.zip/node_modules/delete-empty/",\ + "packageDependencies": [\ + ["delete-empty", "npm:3.0.0"],\ + ["ansi-colors", "npm:4.1.1"],\ + ["minimist", "npm:1.2.6"],\ + ["path-starts-with", "npm:2.0.0"],\ + ["rimraf", "npm:2.7.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["delimit-stream", [\ ["npm:0.1.0", {\ "packageLocation": "./.yarn/cache/delimit-stream-npm-0.1.0-bbc01f709d-78e71f4889.zip/node_modules/delimit-stream/",\ @@ -9851,6 +9893,19 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["ens-contracts-main", [\ + ["https://github.com/ensdomains/ens-contracts.git#commit=43b483db7ae3b13b985b3600779aa4e65ca22964", {\ + "packageLocation": "./.yarn/cache/ens-contracts-main-https-7005d2358c-711f6e5565.zip/node_modules/ens-contracts-main/",\ + "packageDependencies": [\ + ["ens-contracts-main", "https://github.com/ensdomains/ens-contracts.git#commit=43b483db7ae3b13b985b3600779aa4e65ca22964"],\ + ["@ensdomains/buffer", "npm:0.0.13"],\ + ["@ensdomains/solsha1", "npm:0.0.3"],\ + ["@openzeppelin/contracts", "npm:4.5.0"],\ + ["dns-packet", "npm:5.3.1"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["ens-contracts-namewrapper", [\ ["https://github.com/ensdomains/ens-contracts.git#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375", {\ "packageLocation": "./.yarn/cache/ens-contracts-namewrapper-https-fba17cd56b-2de96c7734.zip/node_modules/ens-contracts-namewrapper/",\ @@ -11667,6 +11722,30 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["hardhat-abi-exporter", [\ + ["npm:2.8.0", {\ + "packageLocation": "./.yarn/cache/hardhat-abi-exporter-npm-2.8.0-94991dcfe6-d8657b0d4e.zip/node_modules/hardhat-abi-exporter/",\ + "packageDependencies": [\ + ["hardhat-abi-exporter", "npm:2.8.0"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:2.8.0", {\ + "packageLocation": "./.yarn/__virtual__/hardhat-abi-exporter-virtual-2b3560c0d0/0/cache/hardhat-abi-exporter-npm-2.8.0-94991dcfe6-d8657b0d4e.zip/node_modules/hardhat-abi-exporter/",\ + "packageDependencies": [\ + ["hardhat-abi-exporter", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:2.8.0"],\ + ["@ethersproject/abi", "npm:5.6.1"],\ + ["@types/hardhat", null],\ + ["delete-empty", "npm:3.0.0"],\ + ["hardhat", "npm:2.9.3"]\ + ],\ + "packagePeers": [\ + "@types/hardhat",\ + "hardhat"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["hardhat-deploy", [\ ["npm:0.11.4", {\ "packageLocation": "./.yarn/cache/hardhat-deploy-npm-0.11.4-f0c2bb7efd-0acce341b6.zip/node_modules/hardhat-deploy/",\ @@ -11715,6 +11794,32 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["hardhat-deploy-ethers", [\ + ["npm:0.3.0-beta.13", {\ + "packageLocation": "./.yarn/cache/hardhat-deploy-ethers-npm-0.3.0-beta.13-98c7c1196f-45206bf8d0.zip/node_modules/hardhat-deploy-ethers/",\ + "packageDependencies": [\ + ["hardhat-deploy-ethers", "npm:0.3.0-beta.13"]\ + ],\ + "linkType": "SOFT"\ + }],\ + ["virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.3.0-beta.13", {\ + "packageLocation": "./.yarn/__virtual__/hardhat-deploy-ethers-virtual-9a9b88bab5/0/cache/hardhat-deploy-ethers-npm-0.3.0-beta.13-98c7c1196f-45206bf8d0.zip/node_modules/hardhat-deploy-ethers/",\ + "packageDependencies": [\ + ["hardhat-deploy-ethers", "virtual:dbab5548d6c479b3d0fbae056bca9e1ff56916aea7763afdc9f1e6c586db7a0fc611c24fbb7ceb65db0555e200d7d546a786802dd5359ca981e1d851cccb800c#npm:0.3.0-beta.13"],\ + ["@types/ethers", null],\ + ["@types/hardhat", null],\ + ["ethers", "npm:5.6.1"],\ + ["hardhat", "npm:2.9.3"]\ + ],\ + "packagePeers": [\ + "@types/ethers",\ + "@types/hardhat",\ + "ethers",\ + "hardhat"\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["has", [\ ["npm:1.0.3", {\ "packageLocation": "./.yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip/node_modules/has/",\ @@ -14218,6 +14323,13 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["minimist", "npm:1.2.5"]\ ],\ "linkType": "HARD"\ + }],\ + ["npm:1.2.6", {\ + "packageLocation": "./.yarn/cache/minimist-npm-1.2.6-f4cee4b4af-d15428cd1e.zip/node_modules/minimist/",\ + "packageDependencies": [\ + ["minimist", "npm:1.2.6"]\ + ],\ + "linkType": "HARD"\ }]\ ]],\ ["minipass", [\ @@ -15194,6 +15306,15 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "linkType": "HARD"\ }]\ ]],\ + ["path-starts-with", [\ + ["npm:2.0.0", {\ + "packageLocation": "./.yarn/cache/path-starts-with-npm-2.0.0-7154de8f73-c780e5feb5.zip/node_modules/path-starts-with/",\ + "packageDependencies": [\ + ["path-starts-with", "npm:2.0.0"]\ + ],\ + "linkType": "HARD"\ + }]\ + ]],\ ["path-to-regexp", [\ ["npm:0.1.7", {\ "packageLocation": "./.yarn/cache/path-to-regexp-npm-0.1.7-2605347373-69a14ea24d.zip/node_modules/path-to-regexp/",\ diff --git a/.yarn/cache/delete-empty-npm-3.0.0-3c5b632650-1e2b030346.zip b/.yarn/cache/delete-empty-npm-3.0.0-3c5b632650-1e2b030346.zip new file mode 100644 index 00000000..0123246d Binary files /dev/null and b/.yarn/cache/delete-empty-npm-3.0.0-3c5b632650-1e2b030346.zip differ diff --git a/.yarn/cache/ens-contracts-main-https-7005d2358c-711f6e5565.zip b/.yarn/cache/ens-contracts-main-https-7005d2358c-711f6e5565.zip new file mode 100644 index 00000000..23290d07 Binary files /dev/null and b/.yarn/cache/ens-contracts-main-https-7005d2358c-711f6e5565.zip differ diff --git a/.yarn/cache/hardhat-abi-exporter-npm-2.8.0-94991dcfe6-d8657b0d4e.zip b/.yarn/cache/hardhat-abi-exporter-npm-2.8.0-94991dcfe6-d8657b0d4e.zip new file mode 100644 index 00000000..11b66711 Binary files /dev/null and b/.yarn/cache/hardhat-abi-exporter-npm-2.8.0-94991dcfe6-d8657b0d4e.zip differ diff --git a/.yarn/cache/hardhat-deploy-ethers-npm-0.3.0-beta.13-98c7c1196f-45206bf8d0.zip b/.yarn/cache/hardhat-deploy-ethers-npm-0.3.0-beta.13-98c7c1196f-45206bf8d0.zip new file mode 100644 index 00000000..69d71ed9 Binary files /dev/null and b/.yarn/cache/hardhat-deploy-ethers-npm-0.3.0-beta.13-98c7c1196f-45206bf8d0.zip differ diff --git a/.yarn/cache/minimist-npm-1.2.6-f4cee4b4af-d15428cd1e.zip b/.yarn/cache/minimist-npm-1.2.6-f4cee4b4af-d15428cd1e.zip new file mode 100644 index 00000000..e7466c58 Binary files /dev/null and b/.yarn/cache/minimist-npm-1.2.6-f4cee4b4af-d15428cd1e.zip differ diff --git a/.yarn/cache/path-starts-with-npm-2.0.0-7154de8f73-c780e5feb5.zip b/.yarn/cache/path-starts-with-npm-2.0.0-7154de8f73-c780e5feb5.zip new file mode 100644 index 00000000..eb88d4b4 Binary files /dev/null and b/.yarn/cache/path-starts-with-npm-2.0.0-7154de8f73-c780e5feb5.zip differ diff --git a/package.json b/package.json index 9d869799..f6a94b56 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,9 @@ "ts-node": "^10.7.0", "typescript": "^4.6.2" }, + "resolutions": { + "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers@0.3.0-beta.13" + }, "dependencies": { "ethers": "^5.6.1" } diff --git a/packages/ensjs/contracts/ReverseRegistrar.sol b/packages/ensjs/contracts/ReverseRegistrar.sol new file mode 100644 index 00000000..09cf584a --- /dev/null +++ b/packages/ensjs/contracts/ReverseRegistrar.sol @@ -0,0 +1,3 @@ +// SPDX-License-Identifier: UNLICENSED +pragma solidity >0.0.0; +import 'ens-contracts-main/contracts/registry/ReverseRegistrar.sol'; diff --git a/packages/ensjs/deploy/02_ReverseRegistrar.ts b/packages/ensjs/deploy/02_ReverseRegistrar.ts new file mode 100644 index 00000000..db7c4aa1 --- /dev/null +++ b/packages/ensjs/deploy/02_ReverseRegistrar.ts @@ -0,0 +1,65 @@ +import { namehash, solidityKeccak256 } from 'ethers/lib/utils' +import { ethers } from 'hardhat' +import { DeployFunction } from 'hardhat-deploy/types' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { ENSRegistry__factory } from '../src/generated/factories/ENSRegistry__factory' +import { Root__factory } from '../src/generated/factories/Root__factory' + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { deployments, getNamedAccounts } = hre + const { deploy } = deployments + + const { deployer } = await getNamedAccounts() + + const registryAddress = '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' + + ethers.provider = new ethers.providers.JsonRpcProvider( + 'http://localhost:8545', + ) + + const root = Root__factory.connect( + '0x31e789Eb325aB116997942f7809731197a3dc059', + ethers.provider.getSigner('0xa303ddC620aa7d1390BACcc8A495508B183fab59'), + ) + + const registry = ENSRegistry__factory.connect( + registryAddress, + ethers.provider.getSigner('0xa303ddC620aa7d1390BACcc8A495508B183fab59'), + ) + + await deploy('ReverseRegistrar', { + from: deployer, + args: [registryAddress], + }) + + const reverseRegistrarAddress = (await deployments.get('ReverseRegistrar')) + .address + + const tx1 = await root.setSubnodeOwner( + solidityKeccak256(['string'], ['reverse']), + '0xa303ddC620aa7d1390BACcc8A495508B183fab59', + { + from: '0xa303ddC620aa7d1390BACcc8A495508B183fab59', + }, + ) + + await tx1?.wait() + + const tx = await registry.setSubnodeOwner( + namehash('reverse'), + solidityKeccak256(['string'], ['addr']), + reverseRegistrarAddress, + { + from: '0xa303ddC620aa7d1390BACcc8A495508B183fab59', + }, + ) + + await tx?.wait() + + console.log( + 'Deployed ReverseRegistrar, address:', + (await deployments.get('ReverseRegistrar')).address, + ) +} + +export default func diff --git a/packages/ensjs/deploy/02_PublicResolver.ts b/packages/ensjs/deploy/03_PublicResolver.ts similarity index 66% rename from packages/ensjs/deploy/02_PublicResolver.ts rename to packages/ensjs/deploy/03_PublicResolver.ts index 2ac7adbd..28d09014 100644 --- a/packages/ensjs/deploy/02_PublicResolver.ts +++ b/packages/ensjs/deploy/03_PublicResolver.ts @@ -1,15 +1,18 @@ +import { ethers } from 'hardhat' import { DeployFunction } from 'hardhat-deploy/types' import { HardhatRuntimeEnvironment } from 'hardhat/types' const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { deployments, getNamedAccounts } = hre - const { deploy, get } = deployments + const { deploy, get, execute } = deployments const { deployer } = await getNamedAccounts() + const ReverseRegistrar = await ethers.getContract('ReverseRegistrar') + const registryAddress = '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e' const controllerAddress = '0x283Af0B28c62C092C9727F1Ee09c02CA627EB7F5' - const reverseRegisrarAddress = '0x084b1c3C81545d370f3634392De611CaaBFf8148' + const reverseRegistrarAddress = ReverseRegistrar.address const wrapperAddress = (await get('NameWrapper')).address await deploy('PublicResolver', { @@ -18,10 +21,18 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { registryAddress, wrapperAddress, controllerAddress, - reverseRegisrarAddress, + reverseRegistrarAddress, ], }) + const tx = await ReverseRegistrar.setDefaultResolver( + ( + await get('PublicResolver') + ).address, + ) + await tx.wait() + console.log(tx) + console.log( 'Deployed PublicResolver, address:', (await deployments.get('PublicResolver')).address, diff --git a/packages/ensjs/deploy/03_UniversalResolver.ts b/packages/ensjs/deploy/04_UniversalResolver.ts similarity index 100% rename from packages/ensjs/deploy/03_UniversalResolver.ts rename to packages/ensjs/deploy/04_UniversalResolver.ts diff --git a/packages/ensjs/deploy/04_DoNotCallOnChainUniversalResolverProxy.ts b/packages/ensjs/deploy/05_DoNotCallOnChainUniversalResolverProxy.ts similarity index 100% rename from packages/ensjs/deploy/04_DoNotCallOnChainUniversalResolverProxy.ts rename to packages/ensjs/deploy/05_DoNotCallOnChainUniversalResolverProxy.ts diff --git a/packages/ensjs/ens-test-env.config.js b/packages/ensjs/ens-test-env.config.js index 2d669a43..54e89f7a 100644 --- a/packages/ensjs/ens-test-env.config.js +++ b/packages/ensjs/ens-test-env.config.js @@ -6,6 +6,7 @@ module.exports = { network: 'ropsten', forkRpcUrl: process.env.FORK_RPC_URL, secretWords: 'test test test test test test test test test test test junk', + unlockedAccounts: ['0xa303ddC620aa7d1390BACcc8A495508B183fab59'], }, archive: { subgraphId: 'QmXxAE7Urtv6TPa8o8XmPwLVQNbH6r35hRKHP63udTxTNa', diff --git a/packages/ensjs/hardhat.config.ts b/packages/ensjs/hardhat.config.ts index 2ca3855c..305d57c6 100644 --- a/packages/ensjs/hardhat.config.ts +++ b/packages/ensjs/hardhat.config.ts @@ -1,4 +1,6 @@ +import '@nomiclabs/hardhat-ethers' import 'dotenv/config' +import 'hardhat-abi-exporter' import 'hardhat-deploy' import { HardhatUserConfig } from 'hardhat/config' @@ -30,6 +32,20 @@ const config: HardhatUserConfig = { namedAccounts: { deployer: 0, }, + abiExporter: { + path: './src/ABIs', + clear: true, + flat: true, + only: [ + 'StaticMetadataService', + 'NameWrapper', + 'ReverseRegistrar', + 'PublicResolver', + 'UniversalResolver', + 'DoNotCallOnChainUniversalResolverProxy', + ], + except: ['INameWrapper', 'IReverseRegistrar', 'NameResolver'], + }, } export default config diff --git a/packages/ensjs/package.json b/packages/ensjs/package.json index 171c67a7..33cfdc55 100644 --- a/packages/ensjs/package.json +++ b/packages/ensjs/package.json @@ -14,6 +14,7 @@ "license": "MIT", "scripts": { "generate-types": "ts-node scripts/runTypechain.ts", + "generate-abis": "hardhat export-abi", "start": "ts-node --files src/index.test.ts", "test": "jest --run-in-band src/tests", "test:specific": "ts-node --files ", @@ -36,6 +37,7 @@ "@ensdomains/ens-test-env": "workspace:*", "@ethersproject/abi": "^5.6.0", "@ethersproject/providers": "^5.6.2", + "@nomiclabs/hardhat-ethers": "^2.0.5", "@openzeppelin/contracts": "^4.5.0", "@swc/core": "^1.2.162", "@swc/jest": "^0.2.20", @@ -43,9 +45,11 @@ "@types/bn.js": "^5.1.0", "@types/jest": "^27.4.1", "dotenv": "^16.0.0", + "ens-contracts-main": "github:ensdomains/ens-contracts#head=master&commit=43b483db7ae3b13b985b3600779aa4e65ca22964", "ens-contracts-namewrapper": "github:ensdomains/ens-contracts#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375", "ens-contracts-universal": "github:ensdomains/ens-contracts#head=feature/record-proxy&commit=ec2657e78811ff9fa09436209798a6135ecca9b7", "hardhat": "^2.9.3", + "hardhat-abi-exporter": "^2.8.0", "hardhat-deploy": "^0.11.4", "jest": "^27.5.1", "jest-environment-node": "^27.5.1", diff --git a/packages/ensjs/src/ABIs/DNCOCURP.json b/packages/ensjs/src/ABIs/DNCOCURP.json deleted file mode 100644 index 84239ed0..00000000 --- a/packages/ensjs/src/ABIs/DNCOCURP.json +++ /dev/null @@ -1 +0,0 @@ -[{"type":"constructor","payable":false,"inputs":[{"type":"address","name":"_resolver"}]},{"type":"event","anonymous":false,"name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}]},{"type":"function","name":"isOwner","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address","name":"addr"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"owner","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"reverse","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes","name":"reverseNode"},{"type":"tuple[]","name":"calls","components":[{"type":"address","name":"target"},{"type":"bytes","name":"data"},{"type":"uint8","name":"dataType"},{"type":"uint256[]","name":"locations"}]}],"outputs":[{"type":"string","name":"name"},{"type":"bytes[]","name":"returnData"}]},{"type":"function","name":"setUniversalResolver","constant":false,"payable":false,"inputs":[{"type":"address","name":"newUniversalResolver"}],"outputs":[]},{"type":"function","name":"transferOwnership","constant":false,"payable":false,"inputs":[{"type":"address","name":"newOwner"}],"outputs":[]},{"type":"function","name":"universalResolver","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]}] \ No newline at end of file diff --git a/packages/ensjs/src/ABIs/DoNotCallOnChainUniversalResolverProxy.json b/packages/ensjs/src/ABIs/DoNotCallOnChainUniversalResolverProxy.json new file mode 100644 index 00000000..c6266448 --- /dev/null +++ b/packages/ensjs/src/ABIs/DoNotCallOnChainUniversalResolverProxy.json @@ -0,0 +1,154 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_resolver", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "reverseNode", + "type": "bytes" + }, + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + }, + { + "internalType": "enum DoNotCallOnChainUniversalResolverProxy.ReverseCallDataType", + "name": "dataType", + "type": "uint8" + }, + { + "internalType": "uint256[]", + "name": "locations", + "type": "uint256[]" + } + ], + "internalType": "struct DoNotCallOnChainUniversalResolverProxy.ReverseCall[]", + "name": "calls", + "type": "tuple[]" + } + ], + "name": "reverse", + "outputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "bytes[]", + "name": "returnData", + "type": "bytes[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newUniversalResolver", + "type": "address" + } + ], + "name": "setUniversalResolver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "universalResolver", + "outputs": [ + { + "internalType": "contract UniversalResolver", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/ensjs/src/ABIs/Multicall.json b/packages/ensjs/src/ABIs/Multicall.json deleted file mode 100644 index 332ac091..00000000 --- a/packages/ensjs/src/ABIs/Multicall.json +++ /dev/null @@ -1,260 +0,0 @@ -[ - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Call[]", - "name": "calls", - "type": "tuple[]" - } - ], - "name": "aggregate", - "outputs": [ - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, - { "internalType": "bytes[]", "name": "returnData", "type": "bytes[]" } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bool", "name": "allowFailure", "type": "bool" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Call3[]", - "name": "calls", - "type": "tuple[]" - } - ], - "name": "aggregate3", - "outputs": [ - { - "components": [ - { "internalType": "bool", "name": "success", "type": "bool" }, - { "internalType": "bytes", "name": "returnData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Result[]", - "name": "returnData", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bool", "name": "allowFailure", "type": "bool" }, - { "internalType": "uint256", "name": "value", "type": "uint256" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Call3Value[]", - "name": "calls", - "type": "tuple[]" - } - ], - "name": "aggregate3Value", - "outputs": [ - { - "components": [ - { "internalType": "bool", "name": "success", "type": "bool" }, - { "internalType": "bytes", "name": "returnData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Result[]", - "name": "returnData", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Call[]", - "name": "calls", - "type": "tuple[]" - } - ], - "name": "blockAndAggregate", - "outputs": [ - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, - { "internalType": "bytes32", "name": "blockHash", "type": "bytes32" }, - { - "components": [ - { "internalType": "bool", "name": "success", "type": "bool" }, - { "internalType": "bytes", "name": "returnData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Result[]", - "name": "returnData", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "getBasefee", - "outputs": [ - { "internalType": "uint256", "name": "basefee", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } - ], - "name": "getBlockHash", - "outputs": [ - { "internalType": "bytes32", "name": "blockHash", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getBlockNumber", - "outputs": [ - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getChainId", - "outputs": [ - { "internalType": "uint256", "name": "chainid", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentBlockCoinbase", - "outputs": [ - { "internalType": "address", "name": "coinbase", "type": "address" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentBlockDifficulty", - "outputs": [ - { "internalType": "uint256", "name": "difficulty", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentBlockGasLimit", - "outputs": [ - { "internalType": "uint256", "name": "gaslimit", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentBlockTimestamp", - "outputs": [ - { "internalType": "uint256", "name": "timestamp", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "address", "name": "addr", "type": "address" } - ], - "name": "getEthBalance", - "outputs": [ - { "internalType": "uint256", "name": "balance", "type": "uint256" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getLastBlockHash", - "outputs": [ - { "internalType": "bytes32", "name": "blockHash", "type": "bytes32" } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bool", "name": "requireSuccess", "type": "bool" }, - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Call[]", - "name": "calls", - "type": "tuple[]" - } - ], - "name": "tryAggregate", - "outputs": [ - { - "components": [ - { "internalType": "bool", "name": "success", "type": "bool" }, - { "internalType": "bytes", "name": "returnData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Result[]", - "name": "returnData", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { "internalType": "bool", "name": "requireSuccess", "type": "bool" }, - { - "components": [ - { "internalType": "address", "name": "target", "type": "address" }, - { "internalType": "bytes", "name": "callData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Call[]", - "name": "calls", - "type": "tuple[]" - } - ], - "name": "tryBlockAndAggregate", - "outputs": [ - { "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, - { "internalType": "bytes32", "name": "blockHash", "type": "bytes32" }, - { - "components": [ - { "internalType": "bool", "name": "success", "type": "bool" }, - { "internalType": "bytes", "name": "returnData", "type": "bytes" } - ], - "internalType": "struct Multicall3.Result[]", - "name": "returnData", - "type": "tuple[]" - } - ], - "stateMutability": "payable", - "type": "function" - } -] diff --git a/packages/ensjs/src/ABIs/NameWrapper.json b/packages/ensjs/src/ABIs/NameWrapper.json index 504c04ce..d8f4d9ec 100644 --- a/packages/ensjs/src/ABIs/NameWrapper.json +++ b/packages/ensjs/src/ABIs/NameWrapper.json @@ -1 +1,1244 @@ -[{"type":"constructor","payable":false,"inputs":[{"type":"address","name":"_ens"},{"type":"address","name":"_registrar"},{"type":"address","name":"_metadataService"}]},{"type":"error","name":"IncompatibleParent","inputs":[]},{"type":"error","name":"IncorrectTargetOwner","inputs":[{"type":"address","name":"owner"}]},{"type":"error","name":"IncorrectTokenType","inputs":[]},{"type":"error","name":"LabelMismatch","inputs":[{"type":"bytes32","name":"labelHash"},{"type":"bytes32","name":"expectedLabelhash"}]},{"type":"error","name":"LabelTooLong","inputs":[{"type":"string","name":"label"}]},{"type":"error","name":"LabelTooShort","inputs":[{"type":"string","name":"label"}]},{"type":"error","name":"NameNotFound","inputs":[]},{"type":"error","name":"OperationProhibited","inputs":[{"type":"bytes32","name":"node"}]},{"type":"error","name":"Unauthorised","inputs":[{"type":"bytes32","name":"node"},{"type":"address","name":"addr"}]},{"type":"error","name":"UnauthorisedEthWrap","inputs":[{"type":"bytes32","name":"label"},{"type":"address","name":"addr"}]},{"type":"event","anonymous":false,"name":"ApprovalForAll","inputs":[{"type":"address","name":"account","indexed":true},{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"approved","indexed":false}]},{"type":"event","anonymous":false,"name":"ControllerChanged","inputs":[{"type":"address","name":"controller","indexed":true},{"type":"bool","name":"active","indexed":false}]},{"type":"event","anonymous":false,"name":"FusesBurned","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"uint96","name":"fuses","indexed":false}]},{"type":"event","anonymous":false,"name":"NameUnwrapped","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"address","name":"owner","indexed":false}]},{"type":"event","anonymous":false,"name":"NameWrapped","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes","name":"name","indexed":false},{"type":"address","name":"owner","indexed":false},{"type":"uint96","name":"fuses","indexed":false}]},{"type":"event","anonymous":false,"name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}]},{"type":"event","anonymous":false,"name":"TransferBatch","inputs":[{"type":"address","name":"operator","indexed":true},{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256[]","name":"ids","indexed":false},{"type":"uint256[]","name":"values","indexed":false}]},{"type":"event","anonymous":false,"name":"TransferSingle","inputs":[{"type":"address","name":"operator","indexed":true},{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"id","indexed":false},{"type":"uint256","name":"value","indexed":false}]},{"type":"event","anonymous":false,"name":"URI","inputs":[{"type":"string","name":"value","indexed":false},{"type":"uint256","name":"id","indexed":true}]},{"type":"function","name":"_tokens","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"uint256"}],"outputs":[{"type":"uint256"}]},{"type":"function","name":"allFusesBurned","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint96","name":"fuseMask"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"balanceOf","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address","name":"account"},{"type":"uint256","name":"id"}],"outputs":[{"type":"uint256"}]},{"type":"function","name":"balanceOfBatch","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address[]","name":"accounts"},{"type":"uint256[]","name":"ids"}],"outputs":[{"type":"uint256[]"}]},{"type":"function","name":"burnFuses","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint96","name":"_fuses"}],"outputs":[]},{"type":"function","name":"controllers","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"ens","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"getData","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"uint256","name":"tokenId"}],"outputs":[{"type":"address","name":"owner"},{"type":"uint96","name":"fuses"}]},{"type":"function","name":"getFuses","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[{"type":"uint96","name":"fuses"},{"type":"uint8","name":"vulnerability"},{"type":"bytes32","name":"vulnerableNode"}]},{"type":"function","name":"isApprovedForAll","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address","name":"account"},{"type":"address","name":"operator"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"isTokenOwnerOrApproved","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"address","name":"addr"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"metadataService","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"names","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32"}],"outputs":[{"type":"bytes"}]},{"type":"function","name":"onERC721Received","constant":false,"payable":false,"inputs":[{"type":"address","name":"to"},{"type":"address"},{"type":"uint256","name":"tokenId"},{"type":"bytes","name":"data"}],"outputs":[{"type":"bytes4"}]},{"type":"function","name":"owner","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"ownerOf","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"uint256","name":"id"}],"outputs":[{"type":"address"}]},{"type":"function","name":"registerAndWrapETH2LD","constant":false,"payable":false,"inputs":[{"type":"string","name":"label"},{"type":"address","name":"wrappedOwner"},{"type":"uint256","name":"duration"},{"type":"address","name":"resolver"},{"type":"uint96","name":"_fuses"}],"outputs":[{"type":"uint256","name":"expires"}]},{"type":"function","name":"registrar","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"renew","constant":false,"payable":false,"inputs":[{"type":"uint256","name":"tokenId"},{"type":"uint256","name":"duration"}],"outputs":[{"type":"uint256","name":"expires"}]},{"type":"function","name":"renounceOwnership","constant":false,"payable":false,"inputs":[],"outputs":[]},{"type":"function","name":"safeBatchTransferFrom","constant":false,"payable":false,"inputs":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256[]","name":"ids"},{"type":"uint256[]","name":"amounts"},{"type":"bytes","name":"data"}],"outputs":[]},{"type":"function","name":"safeTransferFrom","constant":false,"payable":false,"inputs":[{"type":"address","name":"from"},{"type":"address","name":"to"},{"type":"uint256","name":"id"},{"type":"uint256","name":"amount"},{"type":"bytes","name":"data"}],"outputs":[]},{"type":"function","name":"setApprovalForAll","constant":false,"payable":false,"inputs":[{"type":"address","name":"operator"},{"type":"bool","name":"approved"}],"outputs":[]},{"type":"function","name":"setController","constant":false,"payable":false,"inputs":[{"type":"address","name":"controller"},{"type":"bool","name":"active"}],"outputs":[]},{"type":"function","name":"setMetadataService","constant":false,"payable":false,"inputs":[{"type":"address","name":"_newMetadataService"}],"outputs":[]},{"type":"function","name":"setRecord","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"address","name":"owner"},{"type":"address","name":"resolver"},{"type":"uint64","name":"ttl"}],"outputs":[]},{"type":"function","name":"setResolver","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"address","name":"resolver"}],"outputs":[]},{"type":"function","name":"setSubnodeOwner","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"parentNode"},{"type":"bytes32","name":"label"},{"type":"address","name":"owner"}],"outputs":[{"type":"bytes32"}]},{"type":"function","name":"setSubnodeOwnerAndWrap","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"parentNode"},{"type":"string","name":"label"},{"type":"address","name":"newOwner"},{"type":"uint96","name":"_fuses"}],"outputs":[{"type":"bytes32","name":"node"}]},{"type":"function","name":"setSubnodeRecord","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"parentNode"},{"type":"bytes32","name":"label"},{"type":"address","name":"owner"},{"type":"address","name":"resolver"},{"type":"uint64","name":"ttl"}],"outputs":[]},{"type":"function","name":"setSubnodeRecordAndWrap","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"parentNode"},{"type":"string","name":"label"},{"type":"address","name":"newOwner"},{"type":"address","name":"resolver"},{"type":"uint64","name":"ttl"},{"type":"uint96","name":"_fuses"}],"outputs":[]},{"type":"function","name":"setTTL","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint64","name":"ttl"}],"outputs":[]},{"type":"function","name":"supportsInterface","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes4","name":"interfaceId"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"transferOwnership","constant":false,"payable":false,"inputs":[{"type":"address","name":"newOwner"}],"outputs":[]},{"type":"function","name":"unwrap","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"parentNode"},{"type":"bytes32","name":"label"},{"type":"address","name":"newController"}],"outputs":[]},{"type":"function","name":"unwrapETH2LD","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"label"},{"type":"address","name":"newRegistrant"},{"type":"address","name":"newController"}],"outputs":[]},{"type":"function","name":"uri","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"uint256","name":"tokenId"}],"outputs":[{"type":"string"}]},{"type":"function","name":"wrap","constant":false,"payable":false,"inputs":[{"type":"bytes","name":"name"},{"type":"address","name":"wrappedOwner"},{"type":"uint96","name":"_fuses"},{"type":"address","name":"resolver"}],"outputs":[]},{"type":"function","name":"wrapETH2LD","constant":false,"payable":false,"inputs":[{"type":"string","name":"label"},{"type":"address","name":"wrappedOwner"},{"type":"uint96","name":"_fuses"},{"type":"address","name":"resolver"}],"outputs":[]}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "contract ENS", + "name": "_ens", + "type": "address" + }, + { + "internalType": "contract IBaseRegistrar", + "name": "_registrar", + "type": "address" + }, + { + "internalType": "contract IMetadataService", + "name": "_metadataService", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "IncompatibleParent", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "IncorrectTargetOwner", + "type": "error" + }, + { + "inputs": [], + "name": "IncorrectTokenType", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "labelHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "expectedLabelhash", + "type": "bytes32" + } + ], + "name": "LabelMismatch", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "LabelTooLong", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + } + ], + "name": "LabelTooShort", + "type": "error" + }, + { + "inputs": [], + "name": "NameNotFound", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "OperationProhibited", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "Unauthorised", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "UnauthorisedEthWrap", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "ControllerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "fuses", + "type": "uint96" + } + ], + "name": "FusesBurned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "NameUnwrapped", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint96", + "name": "fuses", + "type": "uint96" + } + ], + "name": "NameWrapped", + "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": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "values", + "type": "uint256[]" + } + ], + "name": "TransferBatch", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "TransferSingle", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "URI", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "_tokens", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint96", + "name": "fuseMask", + "type": "uint96" + } + ], + "name": "allFusesBurned", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint96", + "name": "_fuses", + "type": "uint96" + } + ], + "name": "burnFuses", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "controllers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ens", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getData", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint96", + "name": "fuses", + "type": "uint96" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "getFuses", + "outputs": [ + { + "internalType": "uint96", + "name": "fuses", + "type": "uint96" + }, + { + "internalType": "enum INameWrapper.NameSafety", + "name": "vulnerability", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "vulnerableNode", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "isTokenOwnerOrApproved", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "metadataService", + "outputs": [ + { + "internalType": "contract IMetadataService", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "names", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "onERC721Received", + "outputs": [ + { + "internalType": "bytes4", + "name": "", + "type": "bytes4" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "ownerOf", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "internalType": "address", + "name": "wrappedOwner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "duration", + "type": "uint256" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_fuses", + "type": "uint96" + } + ], + "name": "registerAndWrapETH2LD", + "outputs": [ + { + "internalType": "uint256", + "name": "expires", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "registrar", + "outputs": [ + { + "internalType": "contract IBaseRegistrar", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "duration", + "type": "uint256" + } + ], + "name": "renew", + "outputs": [ + { + "internalType": "uint256", + "name": "expires", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeBatchTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "internalType": "bool", + "name": "active", + "type": "bool" + } + ], + "name": "setController", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IMetadataService", + "name": "_newMetadataService", + "type": "address" + } + ], + "name": "setMetadataService", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl", + "type": "uint64" + } + ], + "name": "setRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "setResolver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "parentNode", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "setSubnodeOwner", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "parentNode", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_fuses", + "type": "uint96" + } + ], + "name": "setSubnodeOwnerAndWrap", + "outputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "parentNode", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl", + "type": "uint64" + } + ], + "name": "setSubnodeRecord", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "parentNode", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "internalType": "address", + "name": "newOwner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + }, + { + "internalType": "uint64", + "name": "ttl", + "type": "uint64" + }, + { + "internalType": "uint96", + "name": "_fuses", + "type": "uint96" + } + ], + "name": "setSubnodeRecordAndWrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "ttl", + "type": "uint64" + } + ], + "name": "setTTL", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "parentNode", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "newController", + "type": "address" + } + ], + "name": "unwrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "label", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "newRegistrant", + "type": "address" + }, + { + "internalType": "address", + "name": "newController", + "type": "address" + } + ], + "name": "unwrapETH2LD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "address", + "name": "wrappedOwner", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_fuses", + "type": "uint96" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "wrap", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "label", + "type": "string" + }, + { + "internalType": "address", + "name": "wrappedOwner", + "type": "address" + }, + { + "internalType": "uint96", + "name": "_fuses", + "type": "uint96" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "wrapETH2LD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/ensjs/src/ABIs/PublicResolver.json b/packages/ensjs/src/ABIs/PublicResolver.json index ea254caf..d5b95e85 100644 --- a/packages/ensjs/src/ABIs/PublicResolver.json +++ b/packages/ensjs/src/ABIs/PublicResolver.json @@ -1 +1,875 @@ -[{"type":"constructor","payable":false,"inputs":[{"type":"address","name":"_ens"},{"type":"address","name":"wrapperAddress"},{"type":"address","name":"_trustedETHController"},{"type":"address","name":"_trustedReverseRegistrar"}]},{"type":"event","anonymous":false,"name":"ABIChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"uint256","name":"contentType","indexed":true}]},{"type":"event","anonymous":false,"name":"AddrChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"address","name":"a","indexed":false}]},{"type":"event","anonymous":false,"name":"AddressChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"uint256","name":"coinType","indexed":false},{"type":"bytes","name":"newAddress","indexed":false}]},{"type":"event","anonymous":false,"name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"approved","indexed":false}]},{"type":"event","anonymous":false,"name":"ContenthashChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes","name":"hash","indexed":false}]},{"type":"event","anonymous":false,"name":"DNSRecordChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes","name":"name","indexed":false},{"type":"uint16","name":"resource","indexed":false},{"type":"bytes","name":"record","indexed":false}]},{"type":"event","anonymous":false,"name":"DNSRecordDeleted","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes","name":"name","indexed":false},{"type":"uint16","name":"resource","indexed":false}]},{"type":"event","anonymous":false,"name":"DNSZoneCleared","inputs":[{"type":"bytes32","name":"node","indexed":true}]},{"type":"event","anonymous":false,"name":"DNSZonehashChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes","name":"lastzonehash","indexed":false},{"type":"bytes","name":"zonehash","indexed":false}]},{"type":"event","anonymous":false,"name":"InterfaceChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes4","name":"interfaceID","indexed":true},{"type":"address","name":"implementer","indexed":false}]},{"type":"event","anonymous":false,"name":"NameChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"string","name":"name","indexed":false}]},{"type":"event","anonymous":false,"name":"PubkeyChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"bytes32","name":"x","indexed":false},{"type":"bytes32","name":"y","indexed":false}]},{"type":"event","anonymous":false,"name":"TextChanged","inputs":[{"type":"bytes32","name":"node","indexed":true},{"type":"string","name":"indexedKey","indexed":true},{"type":"string","name":"key","indexed":false}]},{"type":"function","name":"ABI","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint256","name":"contentTypes"}],"outputs":[{"type":"uint256"},{"type":"bytes"}]},{"type":"function","name":"addr","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[{"type":"address"}]},{"type":"function","name":"addr","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint256","name":"coinType"}],"outputs":[{"type":"bytes"}]},{"type":"function","name":"clearDNSZone","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[]},{"type":"function","name":"contenthash","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[{"type":"bytes"}]},{"type":"function","name":"dnsRecord","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes32","name":"name"},{"type":"uint16","name":"resource"}],"outputs":[{"type":"bytes"}]},{"type":"function","name":"hasDNSRecords","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes32","name":"name"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"interfaceImplementer","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes4","name":"interfaceID"}],"outputs":[{"type":"address"}]},{"type":"function","name":"isApprovedForAll","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"address","name":"account"},{"type":"address","name":"operator"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"multicall","constant":false,"payable":false,"inputs":[{"type":"bytes[]","name":"data"}],"outputs":[{"type":"bytes[]","name":"results"}]},{"type":"function","name":"name","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[{"type":"string"}]},{"type":"function","name":"pubkey","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[{"type":"bytes32","name":"x"},{"type":"bytes32","name":"y"}]},{"type":"function","name":"setABI","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint256","name":"contentType"},{"type":"bytes","name":"data"}],"outputs":[]},{"type":"function","name":"setAddr","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"uint256","name":"coinType"},{"type":"bytes","name":"a"}],"outputs":[]},{"type":"function","name":"setAddr","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"address","name":"a"}],"outputs":[]},{"type":"function","name":"setApprovalForAll","constant":false,"payable":false,"inputs":[{"type":"address","name":"operator"},{"type":"bool","name":"approved"}],"outputs":[]},{"type":"function","name":"setContenthash","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes","name":"hash"}],"outputs":[]},{"type":"function","name":"setDNSRecords","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes","name":"data"}],"outputs":[]},{"type":"function","name":"setInterface","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes4","name":"interfaceID"},{"type":"address","name":"implementer"}],"outputs":[]},{"type":"function","name":"setName","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"string","name":"newName"}],"outputs":[]},{"type":"function","name":"setPubkey","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes32","name":"x"},{"type":"bytes32","name":"y"}],"outputs":[]},{"type":"function","name":"setText","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"string","name":"key"},{"type":"string","name":"value"}],"outputs":[]},{"type":"function","name":"setZonehash","constant":false,"payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"bytes","name":"hash"}],"outputs":[]},{"type":"function","name":"supportsInterface","constant":true,"stateMutability":"pure","payable":false,"inputs":[{"type":"bytes4","name":"interfaceID"}],"outputs":[{"type":"bool"}]},{"type":"function","name":"text","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"},{"type":"string","name":"key"}],"outputs":[{"type":"string"}]},{"type":"function","name":"zonehash","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes32","name":"node"}],"outputs":[{"type":"bytes"}]}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "contract ENS", + "name": "_ens", + "type": "address" + }, + { + "internalType": "contract INameWrapper", + "name": "wrapperAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_trustedETHController", + "type": "address" + }, + { + "internalType": "address", + "name": "_trustedReverseRegistrar", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "contentType", + "type": "uint256" + } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "a", + "type": "address" + } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "newAddress", + "type": "bytes" + } + ], + "name": "AddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "ApprovalForAll", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "hash", + "type": "bytes" + } + ], + "name": "ContenthashChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "resource", + "type": "uint16" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "record", + "type": "bytes" + } + ], + "name": "DNSRecordChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint16", + "name": "resource", + "type": "uint16" + } + ], + "name": "DNSRecordDeleted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "DNSZoneCleared", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "lastzonehash", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "zonehash", + "type": "bytes" + } + ], + "name": "DNSZonehashChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + }, + { + "indexed": false, + "internalType": "address", + "name": "implementer", + "type": "address" + } + ], + "name": "InterfaceChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "name": "PubkeyChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "string", + "name": "indexedKey", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "TextChanged", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "contentTypes", + "type": "uint256" + } + ], + "name": "ABI", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "addr", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "clearDNSZone", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "contenthash", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + }, + { + "internalType": "uint16", + "name": "resource", + "type": "uint16" + } + ], + "name": "dnsRecord", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "name", + "type": "bytes32" + } + ], + "name": "hasDNSRecords", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "interfaceImplementer", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "isApprovedForAll", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "pubkey", + "outputs": [ + { + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "contentType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "setABI", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "coinType", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "a", + "type": "bytes" + } + ], + "name": "setAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "a", + "type": "address" + } + ], + "name": "setAddr", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "setApprovalForAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "hash", + "type": "bytes" + } + ], + "name": "setContenthash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "setDNSRecords", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + }, + { + "internalType": "address", + "name": "implementer", + "type": "address" + } + ], + "name": "setInterface", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "newName", + "type": "string" + } + ], + "name": "setName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "x", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "y", + "type": "bytes32" + } + ], + "name": "setPubkey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "key", + "type": "string" + }, + { + "internalType": "string", + "name": "value", + "type": "string" + } + ], + "name": "setText", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "hash", + "type": "bytes" + } + ], + "name": "setZonehash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceID", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "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" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "zonehash", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/ensjs/src/ABIs/ReverseRegistrar.json b/packages/ensjs/src/ABIs/ReverseRegistrar.json new file mode 100644 index 00000000..a6d2736c --- /dev/null +++ b/packages/ensjs/src/ABIs/ReverseRegistrar.json @@ -0,0 +1,323 @@ +[ + { + "inputs": [ + { + "internalType": "contract ENS", + "name": "ensAddr", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "ControllerChanged", + "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": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "ReverseClaimed", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "claim", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "claimForAddr", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "claimWithResolver", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "controllers", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultResolver", + "outputs": [ + { + "internalType": "contract NameResolver", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ens", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + } + ], + "name": "node", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "controller", + "type": "address" + }, + { + "internalType": "bool", + "name": "enabled", + "type": "bool" + } + ], + "name": "setController", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "resolver", + "type": "address" + } + ], + "name": "setDefaultResolver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setName", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "addr", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "resolver", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "setNameForAddr", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/packages/ensjs/src/ABIs/StaticMetadataService.json b/packages/ensjs/src/ABIs/StaticMetadataService.json index 510b1af8..d0ed0235 100644 --- a/packages/ensjs/src/ABIs/StaticMetadataService.json +++ b/packages/ensjs/src/ABIs/StaticMetadataService.json @@ -1 +1,32 @@ -[{"type":"constructor","payable":false,"inputs":[{"type":"string","name":"_metaDataUri"}]},{"type":"function","name":"uri","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"uint256"}],"outputs":[{"type":"string"}]}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "string", + "name": "_metaDataUri", + "type": "string" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "uri", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/ensjs/src/ABIs/UniversalResolver.json b/packages/ensjs/src/ABIs/UniversalResolver.json index dafc5130..ec727d7b 100644 --- a/packages/ensjs/src/ABIs/UniversalResolver.json +++ b/packages/ensjs/src/ABIs/UniversalResolver.json @@ -1 +1,177 @@ -[{"type":"constructor","payable":false,"inputs":[{"type":"address","name":"_registry"}]},{"type":"error","name":"OffchainLookup","inputs":[{"type":"address","name":"sender"},{"type":"string[]","name":"urls"},{"type":"bytes","name":"callData"},{"type":"bytes4","name":"callbackFunction"},{"type":"bytes","name":"extraData"}]},{"type":"function","name":"findResolver","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes","name":"name"}],"outputs":[{"type":"address"},{"type":"bytes32"}]},{"type":"function","name":"registry","constant":true,"stateMutability":"view","payable":false,"inputs":[],"outputs":[{"type":"address"}]},{"type":"function","name":"resolve","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes","name":"name"},{"type":"bytes","name":"data"}],"outputs":[{"type":"bytes"},{"type":"address"}]},{"type":"function","name":"resolveCallback","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes","name":"response"},{"type":"bytes","name":"extraData"}],"outputs":[{"type":"bytes"}]},{"type":"function","name":"reverse","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes","name":"reverseNode"}],"outputs":[{"type":"string"},{"type":"bytes"}]},{"type":"function","name":"supportsInterface","constant":true,"stateMutability":"view","payable":false,"inputs":[{"type":"bytes4","name":"interfaceId"}],"outputs":[{"type":"bool"}]}] \ No newline at end of file +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_registry", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "string[]", + "name": "urls", + "type": "string[]" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + }, + { + "internalType": "bytes4", + "name": "callbackFunction", + "type": "bytes4" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "OffchainLookup", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + } + ], + "name": "findResolver", + "outputs": [ + { + "internalType": "contract Resolver", + "name": "", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "registry", + "outputs": [ + { + "internalType": "contract ENS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "name", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "resolve", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + }, + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "response", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "extraData", + "type": "bytes" + } + ], + "name": "resolveCallback", + "outputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "reverseNode", + "type": "bytes" + } + ], + "name": "reverse", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/packages/ensjs/src/contracts/DNCOCURP.ts b/packages/ensjs/src/contracts/DNCOCURP.ts deleted file mode 100644 index f5909f49..00000000 --- a/packages/ensjs/src/contracts/DNCOCURP.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ethers } from 'ethers' -import { DNCOCURP__factory } from '../generated/factories/DNCOCURP__factory' - -const defaultAddress = '0xf178d75267cd7EA9DfB6F82Bb1f6e7B8edb43E43' - -export default (provider: ethers.providers.JsonRpcProvider, address?: string) => - DNCOCURP__factory.connect(address || defaultAddress, provider) diff --git a/packages/ensjs/src/contracts/doNotCallOnChainUniversalResolverProxy.ts b/packages/ensjs/src/contracts/doNotCallOnChainUniversalResolverProxy.ts new file mode 100644 index 00000000..b7d807fb --- /dev/null +++ b/packages/ensjs/src/contracts/doNotCallOnChainUniversalResolverProxy.ts @@ -0,0 +1,10 @@ +import { ethers } from 'ethers' +import { DoNotCallOnChainUniversalResolverProxy__factory } from '../generated/factories/DoNotCallOnChainUniversalResolverProxy__factory' + +const defaultAddress = '0x17ED1CF9A6E57e3E9fC0832bee4a965eB6ee12E6' + +export default (provider: ethers.providers.JsonRpcProvider, address?: string) => + DoNotCallOnChainUniversalResolverProxy__factory.connect( + address || defaultAddress, + provider, + ) diff --git a/packages/ensjs/src/contracts/index.ts b/packages/ensjs/src/contracts/index.ts index 9661d93d..22caa569 100644 --- a/packages/ensjs/src/contracts/index.ts +++ b/packages/ensjs/src/contracts/index.ts @@ -1,6 +1,6 @@ import { ethers } from 'ethers' import type { BaseRegistrarImplementation } from '../generated/BaseRegistrarImplementation' -import type { DNCOCURP } from '../generated/DNCOCURP' +import type { DoNotCallOnChainUniversalResolverProxy } from '../generated/DoNotCallOnChainUniversalResolverProxy' import type { ENSRegistry } from '../generated/ENSRegistry' import type { Multicall } from '../generated/Multicall' import type { NameWrapper } from '../generated/NameWrapper' @@ -44,7 +44,10 @@ export default class ContractManager { public getRegistry = this.generateContractGetter('registry') public getReverseRegistrar = this.generateContractGetter('reverseRegistrar') - public getDNCOCURP = this.generateContractGetter('DNCOCURP') + public getDNCOCURP = + this.generateContractGetter( + 'doNotCallOnChainUniversalResolverProxy', + ) public getNameWrapper = this.generateContractGetter('nameWrapper') public getBaseRegistrar = diff --git a/packages/ensjs/src/contracts/publicResolver.ts b/packages/ensjs/src/contracts/publicResolver.ts index 692c576c..216f44c9 100644 --- a/packages/ensjs/src/contracts/publicResolver.ts +++ b/packages/ensjs/src/contracts/publicResolver.ts @@ -1,7 +1,7 @@ import { ethers } from 'ethers' import { PublicResolver__factory } from '../generated/factories/PublicResolver__factory' -const defaultAddress = '0xAEfF4f4d8e2cB51854BEa2244B3C5Fb36b41C7fC' +const defaultAddress = '0x9e6c745CAEdA0AB8a7AD0f393ef90dcb7C70074A' export default (provider: ethers.providers.JsonRpcProvider, address?: string) => PublicResolver__factory.connect(address || defaultAddress, provider) diff --git a/packages/ensjs/src/contracts/reverseRegistrar.ts b/packages/ensjs/src/contracts/reverseRegistrar.ts index 8043418b..ea8d1c94 100644 --- a/packages/ensjs/src/contracts/reverseRegistrar.ts +++ b/packages/ensjs/src/contracts/reverseRegistrar.ts @@ -1,7 +1,7 @@ import { ethers } from 'ethers' import { ReverseRegistrar__factory } from '../generated/factories/ReverseRegistrar__factory' -const defaultAddress = '0x6F628b68b30Dc3c17f345c9dbBb1E483c2b7aE5c' +const defaultAddress = '0xAEfF4f4d8e2cB51854BEa2244B3C5Fb36b41C7fC' export default (provider: ethers.providers.JsonRpcProvider, address?: string) => ReverseRegistrar__factory.connect(address || defaultAddress, provider) diff --git a/packages/ensjs/src/contracts/universalResolver.ts b/packages/ensjs/src/contracts/universalResolver.ts index 54c589c3..5a346345 100644 --- a/packages/ensjs/src/contracts/universalResolver.ts +++ b/packages/ensjs/src/contracts/universalResolver.ts @@ -1,7 +1,7 @@ import { ethers } from 'ethers' import { UniversalResolver__factory } from '../generated/factories/UniversalResolver__factory' -const defaultAddress = '0x9e6c745CAEdA0AB8a7AD0f393ef90dcb7C70074A' +const defaultAddress = '0x454b1F7d4C741A2f86AF7eF19b44B2A6EE179443' export default (provider: ethers.providers.JsonRpcProvider, address?: string) => UniversalResolver__factory.connect(address || defaultAddress, provider) diff --git a/packages/ensjs/src/functions/setName.ts b/packages/ensjs/src/functions/setName.ts index 06acdc22..80c95d53 100644 --- a/packages/ensjs/src/functions/setName.ts +++ b/packages/ensjs/src/functions/setName.ts @@ -3,10 +3,12 @@ import { ENSArgs } from '..' export default async function ( { contracts, provider }: ENSArgs<'contracts' | 'provider'>, name: string, + address?: string, + resolver?: string, ) { - const address = await provider?.getSigner().getAddress() + const signerAddress = await provider?.getSigner().getAddress() - if (!address) { + if (!signerAddress) { throw new Error('No signer found') } @@ -14,5 +16,16 @@ export default async function ( provider?.getSigner()!, ) + if (address) { + const publicResolver = await contracts?.getPublicResolver() + + return reverseRegistrar?.setNameForAddr( + address, + signerAddress, + resolver || publicResolver!.address, + name, + ) + } + return reverseRegistrar?.setName(name) } diff --git a/packages/ensjs/src/generated/DNCOCURP.ts b/packages/ensjs/src/generated/DoNotCallOnChainUniversalResolverProxy.ts similarity index 86% rename from packages/ensjs/src/generated/DNCOCURP.ts rename to packages/ensjs/src/generated/DoNotCallOnChainUniversalResolverProxy.ts index cc0fb45f..1973847b 100644 --- a/packages/ensjs/src/generated/DNCOCURP.ts +++ b/packages/ensjs/src/generated/DoNotCallOnChainUniversalResolverProxy.ts @@ -26,7 +26,29 @@ import type { OnEvent, } from "./common"; -export interface DNCOCURPInterface extends utils.Interface { +export declare namespace DoNotCallOnChainUniversalResolverProxy { + export type ReverseCallStruct = { + target: string; + data: BytesLike; + dataType: BigNumberish; + locations: BigNumberish[]; + }; + + export type ReverseCallStructOutput = [ + string, + string, + number, + BigNumber[] + ] & { + target: string; + data: string; + dataType: number; + locations: BigNumber[]; + }; +} + +export interface DoNotCallOnChainUniversalResolverProxyInterface + extends utils.Interface { functions: { "isOwner(address)": FunctionFragment; "owner()": FunctionFragment; @@ -52,12 +74,7 @@ export interface DNCOCURPInterface extends utils.Interface { functionFragment: "reverse", values: [ BytesLike, - { - target: string; - data: BytesLike; - dataType: BigNumberish; - locations: BigNumberish[]; - }[] + DoNotCallOnChainUniversalResolverProxy.ReverseCallStruct[] ] ): string; encodeFunctionData( @@ -108,12 +125,12 @@ export type OwnershipTransferredEvent = TypedEvent< export type OwnershipTransferredEventFilter = TypedEventFilter; -export interface DNCOCURP extends BaseContract { +export interface DoNotCallOnChainUniversalResolverProxy extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; - interface: DNCOCURPInterface; + interface: DoNotCallOnChainUniversalResolverProxyInterface; queryFilter( event: TypedEventFilter, @@ -141,12 +158,7 @@ export interface DNCOCURP extends BaseContract { reverse( reverseNode: BytesLike, - calls: { - target: string; - data: BytesLike; - dataType: BigNumberish; - locations: BigNumberish[]; - }[], + calls: DoNotCallOnChainUniversalResolverProxy.ReverseCallStruct[], overrides?: CallOverrides ): Promise<[string, string[]] & { name: string; returnData: string[] }>; @@ -169,12 +181,7 @@ export interface DNCOCURP extends BaseContract { reverse( reverseNode: BytesLike, - calls: { - target: string; - data: BytesLike; - dataType: BigNumberish; - locations: BigNumberish[]; - }[], + calls: DoNotCallOnChainUniversalResolverProxy.ReverseCallStruct[], overrides?: CallOverrides ): Promise<[string, string[]] & { name: string; returnData: string[] }>; @@ -197,12 +204,7 @@ export interface DNCOCURP extends BaseContract { reverse( reverseNode: BytesLike, - calls: { - target: string; - data: BytesLike; - dataType: BigNumberish; - locations: BigNumberish[]; - }[], + calls: DoNotCallOnChainUniversalResolverProxy.ReverseCallStruct[], overrides?: CallOverrides ): Promise<[string, string[]] & { name: string; returnData: string[] }>; @@ -237,12 +239,7 @@ export interface DNCOCURP extends BaseContract { reverse( reverseNode: BytesLike, - calls: { - target: string; - data: BytesLike; - dataType: BigNumberish; - locations: BigNumberish[]; - }[], + calls: DoNotCallOnChainUniversalResolverProxy.ReverseCallStruct[], overrides?: CallOverrides ): Promise; @@ -269,12 +266,7 @@ export interface DNCOCURP extends BaseContract { reverse( reverseNode: BytesLike, - calls: { - target: string; - data: BytesLike; - dataType: BigNumberish; - locations: BigNumberish[]; - }[], + calls: DoNotCallOnChainUniversalResolverProxy.ReverseCallStruct[], overrides?: CallOverrides ): Promise; diff --git a/packages/ensjs/src/generated/ReverseRegistrar.ts b/packages/ensjs/src/generated/ReverseRegistrar.ts index 2cdfc7c0..a9aed108 100644 --- a/packages/ensjs/src/generated/ReverseRegistrar.ts +++ b/packages/ensjs/src/generated/ReverseRegistrar.ts @@ -12,7 +12,11 @@ import type { Signer, utils, } from "ethers"; -import type { FunctionFragment, Result } from "@ethersproject/abi"; +import type { + FunctionFragment, + Result, + EventFragment, +} from "@ethersproject/abi"; import type { Listener, Provider } from "@ethersproject/providers"; import type { TypedEventFilter, @@ -23,62 +27,166 @@ import type { export interface ReverseRegistrarInterface extends utils.Interface { functions: { - "ADDR_REVERSE_NODE()": FunctionFragment; "claim(address)": FunctionFragment; + "claimForAddr(address,address,address)": FunctionFragment; "claimWithResolver(address,address)": FunctionFragment; + "controllers(address)": FunctionFragment; "defaultResolver()": FunctionFragment; "ens()": FunctionFragment; "node(address)": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setController(address,bool)": FunctionFragment; + "setDefaultResolver(address)": FunctionFragment; "setName(string)": FunctionFragment; + "setNameForAddr(address,address,address,string)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; }; getFunction( nameOrSignatureOrTopic: - | "ADDR_REVERSE_NODE" | "claim" + | "claimForAddr" | "claimWithResolver" + | "controllers" | "defaultResolver" | "ens" | "node" + | "owner" + | "renounceOwnership" + | "setController" + | "setDefaultResolver" | "setName" + | "setNameForAddr" + | "transferOwnership" ): FunctionFragment; + encodeFunctionData(functionFragment: "claim", values: [string]): string; encodeFunctionData( - functionFragment: "ADDR_REVERSE_NODE", - values?: undefined + functionFragment: "claimForAddr", + values: [string, string, string] ): string; - encodeFunctionData(functionFragment: "claim", values: [string]): string; encodeFunctionData( functionFragment: "claimWithResolver", values: [string, string] ): string; + encodeFunctionData(functionFragment: "controllers", values: [string]): string; encodeFunctionData( functionFragment: "defaultResolver", values?: undefined ): string; encodeFunctionData(functionFragment: "ens", values?: undefined): string; encodeFunctionData(functionFragment: "node", values: [string]): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setController", + values: [string, boolean] + ): string; + encodeFunctionData( + functionFragment: "setDefaultResolver", + values: [string] + ): string; encodeFunctionData(functionFragment: "setName", values: [string]): string; + encodeFunctionData( + functionFragment: "setNameForAddr", + values: [string, string, string, string] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; decodeFunctionResult( - functionFragment: "ADDR_REVERSE_NODE", + functionFragment: "claimForAddr", data: BytesLike ): Result; - decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result; decodeFunctionResult( functionFragment: "claimWithResolver", data: BytesLike ): Result; + decodeFunctionResult( + functionFragment: "controllers", + data: BytesLike + ): Result; decodeFunctionResult( functionFragment: "defaultResolver", data: BytesLike ): Result; decodeFunctionResult(functionFragment: "ens", data: BytesLike): Result; decodeFunctionResult(functionFragment: "node", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setController", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setDefaultResolver", + data: BytesLike + ): Result; decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setNameForAddr", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; - events: {}; + events: { + "ControllerChanged(address,bool)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "ReverseClaimed(address,bytes32)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ControllerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ReverseClaimed"): EventFragment; +} + +export interface ControllerChangedEventObject { + controller: string; + enabled: boolean; +} +export type ControllerChangedEvent = TypedEvent< + [string, boolean], + ControllerChangedEventObject +>; + +export type ControllerChangedEventFilter = + TypedEventFilter; + +export interface OwnershipTransferredEventObject { + previousOwner: string; + newOwner: string; } +export type OwnershipTransferredEvent = TypedEvent< + [string, string], + OwnershipTransferredEventObject +>; + +export type OwnershipTransferredEventFilter = + TypedEventFilter; + +export interface ReverseClaimedEventObject { + addr: string; + node: string; +} +export type ReverseClaimedEvent = TypedEvent< + [string, string], + ReverseClaimedEventObject +>; + +export type ReverseClaimedEventFilter = TypedEventFilter; export interface ReverseRegistrar extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; @@ -107,117 +215,300 @@ export interface ReverseRegistrar extends BaseContract { removeListener: OnEvent; functions: { - ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise<[string]>; - claim( owner: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + claimForAddr( + addr: string, + owner: string, + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + claimWithResolver( owner: string, resolver: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + controllers(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + defaultResolver(overrides?: CallOverrides): Promise<[string]>; ens(overrides?: CallOverrides): Promise<[string]>; node(addr: string, overrides?: CallOverrides): Promise<[string]>; + owner(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setController( + controller: string, + enabled: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDefaultResolver( + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + setName( name: string, overrides?: Overrides & { from?: string | Promise } ): Promise; - }; - ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; + setNameForAddr( + addr: string, + owner: string, + resolver: string, + name: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; claim( owner: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + claimForAddr( + addr: string, + owner: string, + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + claimWithResolver( owner: string, resolver: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + controllers(arg0: string, overrides?: CallOverrides): Promise; + defaultResolver(overrides?: CallOverrides): Promise; ens(overrides?: CallOverrides): Promise; node(addr: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setController( + controller: string, + enabled: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDefaultResolver( + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + setName( name: string, overrides?: Overrides & { from?: string | Promise } ): Promise; - callStatic: { - ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; + setNameForAddr( + addr: string, + owner: string, + resolver: string, + name: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + callStatic: { claim(owner: string, overrides?: CallOverrides): Promise; + claimForAddr( + addr: string, + owner: string, + resolver: string, + overrides?: CallOverrides + ): Promise; + claimWithResolver( owner: string, resolver: string, overrides?: CallOverrides ): Promise; + controllers(arg0: string, overrides?: CallOverrides): Promise; + defaultResolver(overrides?: CallOverrides): Promise; ens(overrides?: CallOverrides): Promise; node(addr: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + setController( + controller: string, + enabled: boolean, + overrides?: CallOverrides + ): Promise; + + setDefaultResolver( + resolver: string, + overrides?: CallOverrides + ): Promise; + setName(name: string, overrides?: CallOverrides): Promise; + + setNameForAddr( + addr: string, + owner: string, + resolver: string, + name: string, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; }; - filters: {}; + filters: { + "ControllerChanged(address,bool)"( + controller?: string | null, + enabled?: null + ): ControllerChangedEventFilter; + ControllerChanged( + controller?: string | null, + enabled?: null + ): ControllerChangedEventFilter; + + "OwnershipTransferred(address,address)"( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + OwnershipTransferred( + previousOwner?: string | null, + newOwner?: string | null + ): OwnershipTransferredEventFilter; + + "ReverseClaimed(address,bytes32)"( + addr?: string | null, + node?: BytesLike | null + ): ReverseClaimedEventFilter; + ReverseClaimed( + addr?: string | null, + node?: BytesLike | null + ): ReverseClaimedEventFilter; + }; estimateGas: { - ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; - claim( owner: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + claimForAddr( + addr: string, + owner: string, + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + claimWithResolver( owner: string, resolver: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + controllers(arg0: string, overrides?: CallOverrides): Promise; + defaultResolver(overrides?: CallOverrides): Promise; ens(overrides?: CallOverrides): Promise; node(addr: string, overrides?: CallOverrides): Promise; + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setController( + controller: string, + enabled: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDefaultResolver( + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + setName( name: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + + setNameForAddr( + addr: string, + owner: string, + resolver: string, + name: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; }; populateTransaction: { - ADDR_REVERSE_NODE(overrides?: CallOverrides): Promise; - claim( owner: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + claimForAddr( + addr: string, + owner: string, + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + claimWithResolver( owner: string, resolver: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + controllers( + arg0: string, + overrides?: CallOverrides + ): Promise; + defaultResolver(overrides?: CallOverrides): Promise; ens(overrides?: CallOverrides): Promise; @@ -227,9 +518,39 @@ export interface ReverseRegistrar extends BaseContract { overrides?: CallOverrides ): Promise; + owner(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setController( + controller: string, + enabled: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDefaultResolver( + resolver: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + setName( name: string, overrides?: Overrides & { from?: string | Promise } ): Promise; + + setNameForAddr( + addr: string, + owner: string, + resolver: string, + name: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; }; } diff --git a/packages/ensjs/src/generated/factories/DNCOCURP__factory.ts b/packages/ensjs/src/generated/factories/DoNotCallOnChainUniversalResolverProxy__factory.ts similarity index 62% rename from packages/ensjs/src/generated/factories/DNCOCURP__factory.ts rename to packages/ensjs/src/generated/factories/DoNotCallOnChainUniversalResolverProxy__factory.ts index f76e4610..3c0f3f17 100644 --- a/packages/ensjs/src/generated/factories/DNCOCURP__factory.ts +++ b/packages/ensjs/src/generated/factories/DoNotCallOnChainUniversalResolverProxy__factory.ts @@ -4,162 +4,183 @@ import { Contract, Signer, utils } from "ethers"; import type { Provider } from "@ethersproject/providers"; -import type { DNCOCURP, DNCOCURPInterface } from "../DNCOCURP"; +import type { + DoNotCallOnChainUniversalResolverProxy, + DoNotCallOnChainUniversalResolverProxyInterface, +} from "../DoNotCallOnChainUniversalResolverProxy"; const _abi = [ { - type: "constructor", - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "_resolver", + type: "address", }, ], + stateMutability: "nonpayable", + type: "constructor", }, { - type: "event", anonymous: false, - name: "OwnershipTransferred", inputs: [ { - type: "address", - name: "previousOwner", indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", }, { - type: "address", - name: "newOwner", indexed: true, + internalType: "address", + name: "newOwner", + type: "address", }, ], + name: "OwnershipTransferred", + type: "event", }, { - type: "function", - name: "isOwner", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "addr", + type: "address", }, ], + name: "isOwner", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "owner", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "owner", outputs: [ { + internalType: "address", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "reverse", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes", + internalType: "bytes", name: "reverseNode", + type: "bytes", }, { - type: "tuple[]", - name: "calls", components: [ { - type: "address", + internalType: "address", name: "target", + type: "address", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, { - type: "uint8", + internalType: + "enum DoNotCallOnChainUniversalResolverProxy.ReverseCallDataType", name: "dataType", + type: "uint8", }, { - type: "uint256[]", + internalType: "uint256[]", name: "locations", + type: "uint256[]", }, ], + internalType: + "struct DoNotCallOnChainUniversalResolverProxy.ReverseCall[]", + name: "calls", + type: "tuple[]", }, ], + name: "reverse", outputs: [ { - type: "string", + internalType: "string", name: "name", + type: "string", }, { - type: "bytes[]", + internalType: "bytes[]", name: "returnData", + type: "bytes[]", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "setUniversalResolver", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "newUniversalResolver", + type: "address", }, ], + name: "setUniversalResolver", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "transferOwnership", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "newOwner", + type: "address", }, ], + name: "transferOwnership", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "universalResolver", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "universalResolver", outputs: [ { + internalType: "contract UniversalResolver", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, ]; -export class DNCOCURP__factory { +export class DoNotCallOnChainUniversalResolverProxy__factory { static readonly abi = _abi; - static createInterface(): DNCOCURPInterface { - return new utils.Interface(_abi) as DNCOCURPInterface; + static createInterface(): DoNotCallOnChainUniversalResolverProxyInterface { + return new utils.Interface( + _abi + ) as DoNotCallOnChainUniversalResolverProxyInterface; } static connect( address: string, signerOrProvider: Signer | Provider - ): DNCOCURP { - return new Contract(address, _abi, signerOrProvider) as DNCOCURP; + ): DoNotCallOnChainUniversalResolverProxy { + return new Contract( + address, + _abi, + signerOrProvider + ) as DoNotCallOnChainUniversalResolverProxy; } } diff --git a/packages/ensjs/src/generated/factories/NameWrapper__factory.ts b/packages/ensjs/src/generated/factories/NameWrapper__factory.ts index d5ae8005..73c8e35f 100644 --- a/packages/ensjs/src/generated/factories/NameWrapper__factory.ts +++ b/packages/ensjs/src/generated/factories/NameWrapper__factory.ts @@ -8,1129 +8,1246 @@ import type { NameWrapper, NameWrapperInterface } from "../NameWrapper"; const _abi = [ { - type: "constructor", - payable: false, inputs: [ { - type: "address", + internalType: "contract ENS", name: "_ens", + type: "address", }, { - type: "address", + internalType: "contract IBaseRegistrar", name: "_registrar", + type: "address", }, { - type: "address", + internalType: "contract IMetadataService", name: "_metadataService", + type: "address", }, ], + stateMutability: "nonpayable", + type: "constructor", }, { - type: "error", - name: "IncompatibleParent", inputs: [], + name: "IncompatibleParent", + type: "error", }, { - type: "error", - name: "IncorrectTargetOwner", inputs: [ { - type: "address", + internalType: "address", name: "owner", + type: "address", }, ], + name: "IncorrectTargetOwner", + type: "error", }, { - type: "error", - name: "IncorrectTokenType", inputs: [], + name: "IncorrectTokenType", + type: "error", }, { - type: "error", - name: "LabelMismatch", inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "labelHash", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "expectedLabelhash", + type: "bytes32", }, ], + name: "LabelMismatch", + type: "error", }, { - type: "error", - name: "LabelTooLong", inputs: [ { - type: "string", + internalType: "string", name: "label", + type: "string", }, ], + name: "LabelTooLong", + type: "error", }, { - type: "error", - name: "LabelTooShort", inputs: [ { - type: "string", + internalType: "string", name: "label", + type: "string", }, ], + name: "LabelTooShort", + type: "error", }, { - type: "error", - name: "NameNotFound", inputs: [], + name: "NameNotFound", + type: "error", }, { - type: "error", - name: "OperationProhibited", inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "OperationProhibited", + type: "error", }, { - type: "error", - name: "Unauthorised", inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "addr", + type: "address", }, ], + name: "Unauthorised", + type: "error", }, { - type: "error", - name: "UnauthorisedEthWrap", inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "label", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "addr", + type: "address", }, ], + name: "UnauthorisedEthWrap", + type: "error", }, { - type: "event", anonymous: false, - name: "ApprovalForAll", inputs: [ { - type: "address", - name: "account", indexed: true, + internalType: "address", + name: "account", + type: "address", }, { - type: "address", - name: "operator", indexed: true, + internalType: "address", + name: "operator", + type: "address", }, { - type: "bool", - name: "approved", indexed: false, + internalType: "bool", + name: "approved", + type: "bool", }, ], + name: "ApprovalForAll", + type: "event", }, { - type: "event", anonymous: false, - name: "ControllerChanged", inputs: [ { - type: "address", - name: "controller", indexed: true, + internalType: "address", + name: "controller", + type: "address", }, { - type: "bool", - name: "active", indexed: false, + internalType: "bool", + name: "active", + type: "bool", }, ], + name: "ControllerChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "FusesBurned", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "uint96", - name: "fuses", indexed: false, + internalType: "uint96", + name: "fuses", + type: "uint96", }, ], + name: "FusesBurned", + type: "event", }, { - type: "event", anonymous: false, - name: "NameUnwrapped", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "address", - name: "owner", indexed: false, + internalType: "address", + name: "owner", + type: "address", }, ], + name: "NameUnwrapped", + type: "event", }, { - type: "event", anonymous: false, - name: "NameWrapped", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes", - name: "name", indexed: false, + internalType: "bytes", + name: "name", + type: "bytes", }, { - type: "address", - name: "owner", indexed: false, + internalType: "address", + name: "owner", + type: "address", }, { - type: "uint96", - name: "fuses", indexed: false, + internalType: "uint96", + name: "fuses", + type: "uint96", }, ], + name: "NameWrapped", + type: "event", }, { - type: "event", anonymous: false, - name: "OwnershipTransferred", inputs: [ { - type: "address", - name: "previousOwner", indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", }, { - type: "address", - name: "newOwner", indexed: true, + internalType: "address", + name: "newOwner", + type: "address", }, ], + name: "OwnershipTransferred", + type: "event", }, { - type: "event", anonymous: false, - name: "TransferBatch", inputs: [ { - type: "address", - name: "operator", indexed: true, + internalType: "address", + name: "operator", + type: "address", }, { - type: "address", - name: "from", indexed: true, + internalType: "address", + name: "from", + type: "address", }, { - type: "address", - name: "to", indexed: true, + internalType: "address", + name: "to", + type: "address", }, { - type: "uint256[]", - name: "ids", indexed: false, + internalType: "uint256[]", + name: "ids", + type: "uint256[]", }, { - type: "uint256[]", - name: "values", indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", }, ], + name: "TransferBatch", + type: "event", }, { - type: "event", anonymous: false, - name: "TransferSingle", inputs: [ { - type: "address", - name: "operator", indexed: true, + internalType: "address", + name: "operator", + type: "address", }, { - type: "address", - name: "from", indexed: true, + internalType: "address", + name: "from", + type: "address", }, { - type: "address", - name: "to", indexed: true, + internalType: "address", + name: "to", + type: "address", }, { - type: "uint256", - name: "id", indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", }, { - type: "uint256", - name: "value", indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", }, ], + name: "TransferSingle", + type: "event", }, { - type: "event", anonymous: false, - name: "URI", inputs: [ { - type: "string", - name: "value", indexed: false, + internalType: "string", + name: "value", + type: "string", }, { - type: "uint256", - name: "id", indexed: true, + internalType: "uint256", + name: "id", + type: "uint256", }, ], + name: "URI", + type: "event", }, { - type: "function", - name: "_tokens", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { + internalType: "uint256", + name: "", type: "uint256", }, ], + name: "_tokens", outputs: [ { + internalType: "uint256", + name: "", type: "uint256", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "allFusesBurned", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint96", + internalType: "uint96", name: "fuseMask", + type: "uint96", }, ], + name: "allFusesBurned", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "balanceOf", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "account", + type: "address", }, { - type: "uint256", + internalType: "uint256", name: "id", + type: "uint256", }, ], + name: "balanceOf", outputs: [ { + internalType: "uint256", + name: "", type: "uint256", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "balanceOfBatch", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "address[]", + internalType: "address[]", name: "accounts", + type: "address[]", }, { - type: "uint256[]", + internalType: "uint256[]", name: "ids", + type: "uint256[]", }, ], + name: "balanceOfBatch", outputs: [ { + internalType: "uint256[]", + name: "", type: "uint256[]", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "burnFuses", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint96", + internalType: "uint96", name: "_fuses", + type: "uint96", }, ], + name: "burnFuses", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "controllers", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { + internalType: "address", + name: "", type: "address", }, ], + name: "controllers", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "ens", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "ens", outputs: [ { + internalType: "contract ENS", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "getData", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "uint256", + internalType: "uint256", name: "tokenId", + type: "uint256", }, ], + name: "getData", outputs: [ { - type: "address", + internalType: "address", name: "owner", + type: "address", }, { - type: "uint96", + internalType: "uint96", name: "fuses", + type: "uint96", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "getFuses", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "getFuses", outputs: [ { - type: "uint96", + internalType: "uint96", name: "fuses", + type: "uint96", }, { - type: "uint8", + internalType: "enum INameWrapper.NameSafety", name: "vulnerability", + type: "uint8", }, { - type: "bytes32", + internalType: "bytes32", name: "vulnerableNode", + type: "bytes32", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "isApprovedForAll", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "account", + type: "address", }, { - type: "address", + internalType: "address", name: "operator", + type: "address", }, ], + name: "isApprovedForAll", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "isTokenOwnerOrApproved", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "addr", + type: "address", }, ], + name: "isTokenOwnerOrApproved", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "metadataService", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "metadataService", outputs: [ { + internalType: "contract IMetadataService", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "names", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { + internalType: "bytes32", + name: "", type: "bytes32", }, ], + name: "names", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "onERC721Received", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "to", + type: "address", }, { + internalType: "address", + name: "", type: "address", }, { - type: "uint256", + internalType: "uint256", name: "tokenId", + type: "uint256", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, ], + name: "onERC721Received", outputs: [ { + internalType: "bytes4", + name: "", type: "bytes4", }, ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "owner", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "owner", outputs: [ { + internalType: "address", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "ownerOf", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "uint256", + internalType: "uint256", name: "id", + type: "uint256", }, ], + name: "ownerOf", outputs: [ { + internalType: "address", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "registerAndWrapETH2LD", - constant: false, - payable: false, inputs: [ { - type: "string", + internalType: "string", name: "label", + type: "string", }, { - type: "address", + internalType: "address", name: "wrappedOwner", + type: "address", }, { - type: "uint256", + internalType: "uint256", name: "duration", + type: "uint256", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, { - type: "uint96", + internalType: "uint96", name: "_fuses", + type: "uint96", }, ], + name: "registerAndWrapETH2LD", outputs: [ { - type: "uint256", + internalType: "uint256", name: "expires", + type: "uint256", }, ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "registrar", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "registrar", outputs: [ { + internalType: "contract IBaseRegistrar", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "renew", - constant: false, - payable: false, inputs: [ { - type: "uint256", + internalType: "uint256", name: "tokenId", + type: "uint256", }, { - type: "uint256", + internalType: "uint256", name: "duration", + type: "uint256", }, ], + name: "renew", outputs: [ { - type: "uint256", + internalType: "uint256", name: "expires", + type: "uint256", }, ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "renounceOwnership", - constant: false, - payable: false, inputs: [], + name: "renounceOwnership", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "safeBatchTransferFrom", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "from", + type: "address", }, { - type: "address", + internalType: "address", name: "to", + type: "address", }, { - type: "uint256[]", + internalType: "uint256[]", name: "ids", + type: "uint256[]", }, { - type: "uint256[]", + internalType: "uint256[]", name: "amounts", + type: "uint256[]", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, ], + name: "safeBatchTransferFrom", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "safeTransferFrom", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "from", + type: "address", }, { - type: "address", + internalType: "address", name: "to", + type: "address", }, { - type: "uint256", + internalType: "uint256", name: "id", + type: "uint256", }, { - type: "uint256", + internalType: "uint256", name: "amount", + type: "uint256", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, ], + name: "safeTransferFrom", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setApprovalForAll", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "operator", + type: "address", }, { - type: "bool", + internalType: "bool", name: "approved", + type: "bool", }, ], + name: "setApprovalForAll", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setController", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "controller", + type: "address", }, { - type: "bool", + internalType: "bool", name: "active", + type: "bool", }, ], + name: "setController", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setMetadataService", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "contract IMetadataService", name: "_newMetadataService", + type: "address", }, ], + name: "setMetadataService", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setRecord", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "owner", + type: "address", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, { - type: "uint64", + internalType: "uint64", name: "ttl", + type: "uint64", }, ], + name: "setRecord", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setResolver", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, ], + name: "setResolver", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setSubnodeOwner", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "parentNode", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "label", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "owner", + type: "address", }, ], + name: "setSubnodeOwner", outputs: [ { + internalType: "bytes32", + name: "", type: "bytes32", }, ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setSubnodeOwnerAndWrap", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "parentNode", + type: "bytes32", }, { - type: "string", + internalType: "string", name: "label", + type: "string", }, { - type: "address", + internalType: "address", name: "newOwner", + type: "address", }, { - type: "uint96", + internalType: "uint96", name: "_fuses", + type: "uint96", }, ], + name: "setSubnodeOwnerAndWrap", outputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setSubnodeRecord", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "parentNode", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "label", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "owner", + type: "address", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, { - type: "uint64", + internalType: "uint64", name: "ttl", + type: "uint64", }, ], + name: "setSubnodeRecord", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setSubnodeRecordAndWrap", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "parentNode", + type: "bytes32", }, { - type: "string", + internalType: "string", name: "label", + type: "string", }, { - type: "address", + internalType: "address", name: "newOwner", + type: "address", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, { - type: "uint64", + internalType: "uint64", name: "ttl", + type: "uint64", }, { - type: "uint96", + internalType: "uint96", name: "_fuses", + type: "uint96", }, ], + name: "setSubnodeRecordAndWrap", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setTTL", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint64", + internalType: "uint64", name: "ttl", + type: "uint64", }, ], + name: "setTTL", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "supportsInterface", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes4", + internalType: "bytes4", name: "interfaceId", + type: "bytes4", }, ], + name: "supportsInterface", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "transferOwnership", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "newOwner", + type: "address", }, ], + name: "transferOwnership", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "unwrap", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "parentNode", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "label", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "newController", + type: "address", }, ], + name: "unwrap", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "unwrapETH2LD", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "label", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "newRegistrant", + type: "address", }, { - type: "address", + internalType: "address", name: "newController", + type: "address", }, ], + name: "unwrapETH2LD", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "uri", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "uint256", + internalType: "uint256", name: "tokenId", + type: "uint256", }, ], + name: "uri", outputs: [ { + internalType: "string", + name: "", type: "string", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "wrap", - constant: false, - payable: false, inputs: [ { - type: "bytes", + internalType: "bytes", name: "name", + type: "bytes", }, { - type: "address", + internalType: "address", name: "wrappedOwner", + type: "address", }, { - type: "uint96", + internalType: "uint96", name: "_fuses", + type: "uint96", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, ], + name: "wrap", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "wrapETH2LD", - constant: false, - payable: false, inputs: [ { - type: "string", + internalType: "string", name: "label", + type: "string", }, { - type: "address", + internalType: "address", name: "wrappedOwner", + type: "address", }, { - type: "uint96", + internalType: "uint96", name: "_fuses", + type: "uint96", }, { - type: "address", + internalType: "address", name: "resolver", + type: "address", }, ], + name: "wrapETH2LD", outputs: [], + stateMutability: "nonpayable", + type: "function", }, ]; diff --git a/packages/ensjs/src/generated/factories/PublicResolver__factory.ts b/packages/ensjs/src/generated/factories/PublicResolver__factory.ts index b72f0d13..b675af00 100644 --- a/packages/ensjs/src/generated/factories/PublicResolver__factory.ts +++ b/packages/ensjs/src/generated/factories/PublicResolver__factory.ts @@ -11,799 +11,877 @@ import type { const _abi = [ { - type: "constructor", - payable: false, inputs: [ { - type: "address", + internalType: "contract ENS", name: "_ens", + type: "address", }, { - type: "address", + internalType: "contract INameWrapper", name: "wrapperAddress", + type: "address", }, { - type: "address", + internalType: "address", name: "_trustedETHController", + type: "address", }, { - type: "address", + internalType: "address", name: "_trustedReverseRegistrar", + type: "address", }, ], + stateMutability: "nonpayable", + type: "constructor", }, { - type: "event", anonymous: false, - name: "ABIChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "uint256", - name: "contentType", indexed: true, + internalType: "uint256", + name: "contentType", + type: "uint256", }, ], + name: "ABIChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "AddrChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "address", - name: "a", indexed: false, + internalType: "address", + name: "a", + type: "address", }, ], + name: "AddrChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "AddressChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "uint256", - name: "coinType", indexed: false, + internalType: "uint256", + name: "coinType", + type: "uint256", }, { - type: "bytes", - name: "newAddress", indexed: false, + internalType: "bytes", + name: "newAddress", + type: "bytes", }, ], + name: "AddressChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "ApprovalForAll", inputs: [ { - type: "address", - name: "owner", indexed: true, + internalType: "address", + name: "owner", + type: "address", }, { - type: "address", - name: "operator", indexed: true, + internalType: "address", + name: "operator", + type: "address", }, { - type: "bool", - name: "approved", indexed: false, + internalType: "bool", + name: "approved", + type: "bool", }, ], + name: "ApprovalForAll", + type: "event", }, { - type: "event", anonymous: false, - name: "ContenthashChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes", - name: "hash", indexed: false, + internalType: "bytes", + name: "hash", + type: "bytes", }, ], + name: "ContenthashChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "DNSRecordChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes", - name: "name", indexed: false, + internalType: "bytes", + name: "name", + type: "bytes", }, { - type: "uint16", - name: "resource", indexed: false, + internalType: "uint16", + name: "resource", + type: "uint16", }, { - type: "bytes", - name: "record", indexed: false, + internalType: "bytes", + name: "record", + type: "bytes", }, ], + name: "DNSRecordChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "DNSRecordDeleted", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes", - name: "name", indexed: false, + internalType: "bytes", + name: "name", + type: "bytes", }, { - type: "uint16", - name: "resource", indexed: false, + internalType: "uint16", + name: "resource", + type: "uint16", }, ], + name: "DNSRecordDeleted", + type: "event", }, { - type: "event", anonymous: false, - name: "DNSZoneCleared", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, ], + name: "DNSZoneCleared", + type: "event", }, { - type: "event", anonymous: false, - name: "DNSZonehashChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes", - name: "lastzonehash", indexed: false, + internalType: "bytes", + name: "lastzonehash", + type: "bytes", }, { - type: "bytes", - name: "zonehash", indexed: false, + internalType: "bytes", + name: "zonehash", + type: "bytes", }, ], + name: "DNSZonehashChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "InterfaceChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes4", - name: "interfaceID", indexed: true, + internalType: "bytes4", + name: "interfaceID", + type: "bytes4", }, { - type: "address", - name: "implementer", indexed: false, + internalType: "address", + name: "implementer", + type: "address", }, ], + name: "InterfaceChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "NameChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "string", - name: "name", indexed: false, + internalType: "string", + name: "name", + type: "string", }, ], + name: "NameChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "PubkeyChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "bytes32", - name: "x", indexed: false, + internalType: "bytes32", + name: "x", + type: "bytes32", }, { - type: "bytes32", - name: "y", indexed: false, + internalType: "bytes32", + name: "y", + type: "bytes32", }, ], + name: "PubkeyChanged", + type: "event", }, { - type: "event", anonymous: false, - name: "TextChanged", inputs: [ { - type: "bytes32", - name: "node", indexed: true, + internalType: "bytes32", + name: "node", + type: "bytes32", }, { - type: "string", - name: "indexedKey", indexed: true, + internalType: "string", + name: "indexedKey", + type: "string", }, { - type: "string", - name: "key", indexed: false, + internalType: "string", + name: "key", + type: "string", }, ], + name: "TextChanged", + type: "event", }, { - type: "function", - name: "ABI", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint256", + internalType: "uint256", name: "contentTypes", + type: "uint256", }, ], + name: "ABI", outputs: [ { + internalType: "uint256", + name: "", type: "uint256", }, { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "addr", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "addr", outputs: [ { + internalType: "address payable", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "addr", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint256", + internalType: "uint256", name: "coinType", + type: "uint256", }, ], + name: "addr", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "clearDNSZone", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "clearDNSZone", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "contenthash", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "contenthash", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "dnsRecord", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "name", + type: "bytes32", }, { - type: "uint16", + internalType: "uint16", name: "resource", + type: "uint16", }, ], + name: "dnsRecord", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "hasDNSRecords", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "name", + type: "bytes32", }, ], + name: "hasDNSRecords", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "interfaceImplementer", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes4", + internalType: "bytes4", name: "interfaceID", + type: "bytes4", }, ], + name: "interfaceImplementer", outputs: [ { + internalType: "address", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "isApprovedForAll", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "account", + type: "address", }, { - type: "address", + internalType: "address", name: "operator", + type: "address", }, ], + name: "isApprovedForAll", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "multicall", - constant: false, - payable: false, inputs: [ { - type: "bytes[]", + internalType: "bytes[]", name: "data", + type: "bytes[]", }, ], + name: "multicall", outputs: [ { - type: "bytes[]", + internalType: "bytes[]", name: "results", + type: "bytes[]", }, ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "name", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "name", outputs: [ { + internalType: "string", + name: "", type: "string", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "pubkey", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "pubkey", outputs: [ { - type: "bytes32", + internalType: "bytes32", name: "x", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "y", + type: "bytes32", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "setABI", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint256", + internalType: "uint256", name: "contentType", + type: "uint256", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, ], + name: "setABI", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setAddr", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "uint256", + internalType: "uint256", name: "coinType", + type: "uint256", }, { - type: "bytes", + internalType: "bytes", name: "a", + type: "bytes", }, ], + name: "setAddr", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setAddr", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "address", + internalType: "address", name: "a", + type: "address", }, ], + name: "setAddr", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setApprovalForAll", - constant: false, - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "operator", + type: "address", }, { - type: "bool", + internalType: "bool", name: "approved", + type: "bool", }, ], + name: "setApprovalForAll", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setContenthash", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes", + internalType: "bytes", name: "hash", + type: "bytes", }, ], + name: "setContenthash", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setDNSRecords", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, ], + name: "setDNSRecords", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setInterface", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes4", + internalType: "bytes4", name: "interfaceID", + type: "bytes4", }, { - type: "address", + internalType: "address", name: "implementer", + type: "address", }, ], + name: "setInterface", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setName", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "string", + internalType: "string", name: "newName", + type: "string", }, ], + name: "setName", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setPubkey", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "x", + type: "bytes32", }, { - type: "bytes32", + internalType: "bytes32", name: "y", + type: "bytes32", }, ], + name: "setPubkey", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setText", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "string", + internalType: "string", name: "key", + type: "string", }, { - type: "string", + internalType: "string", name: "value", + type: "string", }, ], + name: "setText", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setZonehash", - constant: false, - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "bytes", + internalType: "bytes", name: "hash", + type: "bytes", }, ], + name: "setZonehash", outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "supportsInterface", - constant: true, - stateMutability: "pure", - payable: false, inputs: [ { - type: "bytes4", + internalType: "bytes4", name: "interfaceID", + type: "bytes4", }, ], + name: "supportsInterface", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "pure", + type: "function", }, { - type: "function", - name: "text", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, { - type: "string", + internalType: "string", name: "key", + type: "string", }, ], + name: "text", outputs: [ { + internalType: "string", + name: "", type: "string", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "zonehash", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes32", + internalType: "bytes32", name: "node", + type: "bytes32", }, ], + name: "zonehash", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, ]; diff --git a/packages/ensjs/src/generated/factories/ReverseRegistrar__factory.ts b/packages/ensjs/src/generated/factories/ReverseRegistrar__factory.ts index 5c0c5891..3ec3a647 100644 --- a/packages/ensjs/src/generated/factories/ReverseRegistrar__factory.ts +++ b/packages/ensjs/src/generated/factories/ReverseRegistrar__factory.ts @@ -17,20 +17,76 @@ const _abi = [ name: "ensAddr", type: "address", }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ { - internalType: "contract Resolver", - name: "resolverAddr", + indexed: true, + internalType: "address", + name: "controller", type: "address", }, + { + indexed: false, + internalType: "bool", + name: "enabled", + type: "bool", + }, ], - payable: false, - stateMutability: "nonpayable", - type: "constructor", + name: "ControllerChanged", + type: "event", }, { - constant: true, - inputs: [], - name: "ADDR_REVERSE_NODE", + 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: "bytes32", + name: "node", + type: "bytes32", + }, + ], + name: "ReverseClaimed", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "claim", outputs: [ { internalType: "bytes32", @@ -38,20 +94,28 @@ const _abi = [ type: "bytes32", }, ], - payable: false, - stateMutability: "view", + stateMutability: "nonpayable", type: "function", }, { - constant: false, inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, { internalType: "address", name: "owner", type: "address", }, + { + internalType: "address", + name: "resolver", + type: "address", + }, ], - name: "claim", + name: "claimForAddr", outputs: [ { internalType: "bytes32", @@ -59,12 +123,10 @@ const _abi = [ type: "bytes32", }, ], - payable: false, stateMutability: "nonpayable", type: "function", }, { - constant: false, inputs: [ { internalType: "address", @@ -85,27 +147,42 @@ const _abi = [ type: "bytes32", }, ], - payable: false, stateMutability: "nonpayable", type: "function", }, { - constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "controllers", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { inputs: [], name: "defaultResolver", outputs: [ { - internalType: "contract Resolver", + internalType: "contract NameResolver", name: "", type: "address", }, ], - payable: false, stateMutability: "view", type: "function", }, { - constant: true, inputs: [], name: "ens", outputs: [ @@ -115,12 +192,10 @@ const _abi = [ type: "address", }, ], - payable: false, stateMutability: "view", type: "function", }, { - constant: true, inputs: [ { internalType: "address", @@ -136,12 +211,61 @@ const _abi = [ type: "bytes32", }, ], - payable: false, stateMutability: "pure", type: "function", }, { - constant: false, + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "controller", + type: "address", + }, + { + internalType: "bool", + name: "enabled", + type: "bool", + }, + ], + name: "setController", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "resolver", + type: "address", + }, + ], + name: "setDefaultResolver", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { inputs: [ { internalType: "string", @@ -157,7 +281,53 @@ const _abi = [ type: "bytes32", }, ], - payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "resolver", + type: "address", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + ], + name: "setNameForAddr", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], stateMutability: "nonpayable", type: "function", }, diff --git a/packages/ensjs/src/generated/factories/StaticMetadataService__factory.ts b/packages/ensjs/src/generated/factories/StaticMetadataService__factory.ts index 50672c7e..a01f9be0 100644 --- a/packages/ensjs/src/generated/factories/StaticMetadataService__factory.ts +++ b/packages/ensjs/src/generated/factories/StaticMetadataService__factory.ts @@ -11,31 +11,34 @@ import type { const _abi = [ { - type: "constructor", - payable: false, inputs: [ { - type: "string", + internalType: "string", name: "_metaDataUri", + type: "string", }, ], + stateMutability: "nonpayable", + type: "constructor", }, { - type: "function", - name: "uri", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { + internalType: "uint256", + name: "", type: "uint256", }, ], + name: "uri", outputs: [ { + internalType: "string", + name: "", type: "string", }, ], + stateMutability: "view", + type: "function", }, ]; diff --git a/packages/ensjs/src/generated/factories/UniversalResolver__factory.ts b/packages/ensjs/src/generated/factories/UniversalResolver__factory.ts index 5c0afcc7..385f9bf6 100644 --- a/packages/ensjs/src/generated/factories/UniversalResolver__factory.ts +++ b/packages/ensjs/src/generated/factories/UniversalResolver__factory.ts @@ -11,160 +11,179 @@ import type { const _abi = [ { - type: "constructor", - payable: false, inputs: [ { - type: "address", + internalType: "address", name: "_registry", + type: "address", }, ], + stateMutability: "nonpayable", + type: "constructor", }, { - type: "error", - name: "OffchainLookup", inputs: [ { - type: "address", + internalType: "address", name: "sender", + type: "address", }, { - type: "string[]", + internalType: "string[]", name: "urls", + type: "string[]", }, { - type: "bytes", + internalType: "bytes", name: "callData", + type: "bytes", }, { - type: "bytes4", + internalType: "bytes4", name: "callbackFunction", + type: "bytes4", }, { - type: "bytes", + internalType: "bytes", name: "extraData", + type: "bytes", }, ], + name: "OffchainLookup", + type: "error", }, { - type: "function", - name: "findResolver", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes", + internalType: "bytes", name: "name", + type: "bytes", }, ], + name: "findResolver", outputs: [ { + internalType: "contract Resolver", + name: "", type: "address", }, { + internalType: "bytes32", + name: "", type: "bytes32", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "registry", - constant: true, - stateMutability: "view", - payable: false, inputs: [], + name: "registry", outputs: [ { + internalType: "contract ENS", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "resolve", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes", + internalType: "bytes", name: "name", + type: "bytes", }, { - type: "bytes", + internalType: "bytes", name: "data", + type: "bytes", }, ], + name: "resolve", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, { + internalType: "address", + name: "", type: "address", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "resolveCallback", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes", + internalType: "bytes", name: "response", + type: "bytes", }, { - type: "bytes", + internalType: "bytes", name: "extraData", + type: "bytes", }, ], + name: "resolveCallback", outputs: [ { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "reverse", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes", + internalType: "bytes", name: "reverseNode", + type: "bytes", }, ], + name: "reverse", outputs: [ { + internalType: "string", + name: "", type: "string", }, { + internalType: "bytes", + name: "", type: "bytes", }, ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "supportsInterface", - constant: true, - stateMutability: "view", - payable: false, inputs: [ { - type: "bytes4", + internalType: "bytes4", name: "interfaceId", + type: "bytes4", }, ], + name: "supportsInterface", outputs: [ { + internalType: "bool", + name: "", type: "bool", }, ], + stateMutability: "view", + type: "function", }, ]; diff --git a/packages/ensjs/src/generated/factories/index.ts b/packages/ensjs/src/generated/factories/index.ts index 2bd862e0..96ee8906 100644 --- a/packages/ensjs/src/generated/factories/index.ts +++ b/packages/ensjs/src/generated/factories/index.ts @@ -1,9 +1,9 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export { DNCOCURP__factory } from "./DNCOCURP__factory"; -export { Multicall__factory } from "./Multicall__factory"; +export { DoNotCallOnChainUniversalResolverProxy__factory } from "./DoNotCallOnChainUniversalResolverProxy__factory"; export { NameWrapper__factory } from "./NameWrapper__factory"; export { PublicResolver__factory } from "./PublicResolver__factory"; +export { ReverseRegistrar__factory } from "./ReverseRegistrar__factory"; export { StaticMetadataService__factory } from "./StaticMetadataService__factory"; export { UniversalResolver__factory } from "./UniversalResolver__factory"; diff --git a/packages/ensjs/src/generated/index.ts b/packages/ensjs/src/generated/index.ts index 9211c6a3..89e0361a 100644 --- a/packages/ensjs/src/generated/index.ts +++ b/packages/ensjs/src/generated/index.ts @@ -1,16 +1,16 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export type { DNCOCURP } from "./DNCOCURP"; -export type { Multicall } from "./Multicall"; +export type { DoNotCallOnChainUniversalResolverProxy } from "./DoNotCallOnChainUniversalResolverProxy"; export type { NameWrapper } from "./NameWrapper"; export type { PublicResolver } from "./PublicResolver"; +export type { ReverseRegistrar } from "./ReverseRegistrar"; export type { StaticMetadataService } from "./StaticMetadataService"; export type { UniversalResolver } from "./UniversalResolver"; export * as factories from "./factories"; -export { DNCOCURP__factory } from "./factories/DNCOCURP__factory"; -export { Multicall__factory } from "./factories/Multicall__factory"; +export { DoNotCallOnChainUniversalResolverProxy__factory } from "./factories/DoNotCallOnChainUniversalResolverProxy__factory"; export { NameWrapper__factory } from "./factories/NameWrapper__factory"; export { PublicResolver__factory } from "./factories/PublicResolver__factory"; +export { ReverseRegistrar__factory } from "./factories/ReverseRegistrar__factory"; export { StaticMetadataService__factory } from "./factories/StaticMetadataService__factory"; export { UniversalResolver__factory } from "./factories/UniversalResolver__factory"; diff --git a/packages/ensjs/src/tests/getHistory.test.ts b/packages/ensjs/src/tests/getHistory.test.ts index 0a1a9f73..f55b66ab 100644 --- a/packages/ensjs/src/tests/getHistory.test.ts +++ b/packages/ensjs/src/tests/getHistory.test.ts @@ -5,6 +5,7 @@ let ENSInstance: ENS beforeAll(async () => { ;({ ENSInstance } = await setup()) + jest.setTimeout(20000) }) describe('getHistory', () => { diff --git a/packages/ensjs/src/tests/getName.test.ts b/packages/ensjs/src/tests/getName.test.ts index df906098..b43373bf 100644 --- a/packages/ensjs/src/tests/getName.test.ts +++ b/packages/ensjs/src/tests/getName.test.ts @@ -35,7 +35,7 @@ describe('getName', () => { }) it('should return with a false match for a name with no forward resolution', async () => { const tx = await ENSInstance.setName('jefflau.eth') - await tx.wait() + await tx?.wait() const result = await ENSInstance.getName(accounts[0]) expect(result).toBeTruthy() diff --git a/packages/ensjs/src/tests/setName.test.ts b/packages/ensjs/src/tests/setName.test.ts index 0f2318cf..79e61e41 100644 --- a/packages/ensjs/src/tests/setName.test.ts +++ b/packages/ensjs/src/tests/setName.test.ts @@ -21,7 +21,7 @@ describe('setName', () => { it('should return a transaction for a name and set successfully', async () => { const tx = await ENSInstance.setName('fleek.eth') expect(tx).toBeTruthy() - await tx.wait() + await tx?.wait() const universalResolver = await ENSInstance.contracts!.getUniversalResolver()! diff --git a/yarn.lock b/yarn.lock index e2b8cd24..6b55d0f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -507,6 +507,7 @@ __metadata: "@ensdomains/ens-test-env": "workspace:*" "@ethersproject/abi": ^5.6.0 "@ethersproject/providers": ^5.6.2 + "@nomiclabs/hardhat-ethers": ^2.0.5 "@openzeppelin/contracts": ^4.5.0 "@swc/core": ^1.2.162 "@swc/jest": ^0.2.20 @@ -515,12 +516,14 @@ __metadata: "@types/jest": ^27.4.1 dns-packet: ^5.3.1 dotenv: ^16.0.0 + ens-contracts-main: "github:ensdomains/ens-contracts#head=master&commit=43b483db7ae3b13b985b3600779aa4e65ca22964" ens-contracts-namewrapper: "github:ensdomains/ens-contracts#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375" ens-contracts-universal: "github:ensdomains/ens-contracts#head=feature/record-proxy&commit=ec2657e78811ff9fa09436209798a6135ecca9b7" ethers: ^5.6.1 graphql: ^16.3.0 graphql-request: ^4.1.0 hardhat: ^2.9.3 + hardhat-abi-exporter: ^2.8.0 hardhat-deploy: ^0.11.4 jest: ^27.5.1 jest-environment-node: ^27.5.1 @@ -696,7 +699,7 @@ __metadata: languageName: node linkType: hard -"@ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.4.0": +"@ethersproject/abi@npm:^5.1.2, @ethersproject/abi@npm:^5.4.0, @ethersproject/abi@npm:^5.5.0": version: 5.6.1 resolution: "@ethersproject/abi@npm:5.6.1" dependencies: @@ -1508,6 +1511,16 @@ __metadata: languageName: node linkType: hard +"@nomiclabs/hardhat-ethers@npm:hardhat-deploy-ethers@0.3.0-beta.13": + version: 0.3.0-beta.13 + resolution: "hardhat-deploy-ethers@npm:0.3.0-beta.13" + peerDependencies: + ethers: ^5.0.0 + hardhat: ^2.0.0 + checksum: 45206bf8d088cda08822ecf79d73e4027d8a4777cc23c3ef94568e316c45b8597130d72826fb2417edd32fe4b3dc54097161bef577663769b5c47b8262b983bb + languageName: node + linkType: hard + "@nomiclabs/hardhat-truffle5@npm:^2.0.0": version: 2.0.5 resolution: "@nomiclabs/hardhat-truffle5@npm:2.0.5" @@ -2619,7 +2632,7 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:4.1.1, ansi-colors@npm:^4.1.1": +"ansi-colors@npm:4.1.1, ansi-colors@npm:^4.1.0, ansi-colors@npm:^4.1.1": version: 4.1.1 resolution: "ansi-colors@npm:4.1.1" checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 @@ -4307,6 +4320,20 @@ __metadata: languageName: node linkType: hard +"delete-empty@npm:^3.0.0": + version: 3.0.0 + resolution: "delete-empty@npm:3.0.0" + dependencies: + ansi-colors: ^4.1.0 + minimist: ^1.2.0 + path-starts-with: ^2.0.0 + rimraf: ^2.6.2 + bin: + delete-empty: bin/cli.js + checksum: 1e2b030346683f49b12460b91d7e1793fc61e9aa0be152a1b31317363632e92426be270f8d635b89d3915ae7da753dcfa6e3bd200f62edf21eaa876ef4443fd2 + languageName: node + linkType: hard + "delimit-stream@npm:0.1.0": version: 0.1.0 resolution: "delimit-stream@npm:0.1.0" @@ -4599,6 +4626,18 @@ __metadata: languageName: node linkType: hard +"ens-contracts-main@github:ensdomains/ens-contracts#head=master&commit=43b483db7ae3b13b985b3600779aa4e65ca22964": + version: 0.0.9 + resolution: "ens-contracts-main@https://github.com/ensdomains/ens-contracts.git#commit=43b483db7ae3b13b985b3600779aa4e65ca22964" + dependencies: + "@ensdomains/buffer": ^0.0.13 + "@ensdomains/solsha1": 0.0.3 + "@openzeppelin/contracts": ^4.1.0 + dns-packet: ^5.3.0 + checksum: 711f6e55655c56f77380526b20e7a6c9c490e722d27d59534bb2f002515b4f56de893482fe9bd4409a5774980736ebdd96c93913220eea22b164027dbc4f0888 + languageName: node + linkType: hard + "ens-contracts-namewrapper@github:ensdomains/ens-contracts#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375": version: 0.0.9 resolution: "ens-contracts-namewrapper@https://github.com/ensdomains/ens-contracts.git#commit=9b42c4b57e76aa4041847579c0bd5c3ca3cf6375" @@ -6135,6 +6174,18 @@ __metadata: languageName: node linkType: hard +"hardhat-abi-exporter@npm:^2.8.0": + version: 2.8.0 + resolution: "hardhat-abi-exporter@npm:2.8.0" + dependencies: + "@ethersproject/abi": ^5.5.0 + delete-empty: ^3.0.0 + peerDependencies: + hardhat: ^2.0.0 + checksum: d8657b0d4ed55e1de0a18d8e70b8de38cf1f8c85e4162cdfe499b74d75f17992359c0c621d1b920f5a666eed2bd26c0a63d8c18ba60d1660f49c9fed378afe62 + languageName: node + linkType: hard + "hardhat-deploy@npm:^0.11.4": version: 0.11.4 resolution: "hardhat-deploy@npm:0.11.4" @@ -8437,6 +8488,13 @@ __metadata: languageName: node linkType: hard +"minimist@npm:^1.2.0": + version: 1.2.6 + resolution: "minimist@npm:1.2.6" + checksum: d15428cd1e11eb14e1233bcfb88ae07ed7a147de251441d61158619dfb32c4d7e9061d09cab4825fdee18ecd6fce323228c8c47b5ba7cd20af378ca4048fb3fb + languageName: node + linkType: hard + "minimist@npm:^1.2.5": version: 1.2.5 resolution: "minimist@npm:1.2.5" @@ -9336,6 +9394,13 @@ __metadata: languageName: node linkType: hard +"path-starts-with@npm:^2.0.0": + version: 2.0.0 + resolution: "path-starts-with@npm:2.0.0" + checksum: c780e5feb53f37a0cc78c446181aac2d1e4554e5693bbc4ad03c99157b9411ade26a3503dcd5b3b8f0fd56d36daa60ce5a8c24d66b54a400c812fe11eb5bcab9 + languageName: node + linkType: hard + "path-to-regexp@npm:0.1.7": version: 0.1.7 resolution: "path-to-regexp@npm:0.1.7" @@ -9904,7 +9969,7 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:^2.2.8": +"rimraf@npm:^2.2.8, rimraf@npm:^2.6.2": version: 2.7.1 resolution: "rimraf@npm:2.7.1" dependencies: