From e7fe77641e1c3f0deebf2eae0197751c753c175c Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 2 Dec 2024 13:21:47 +0800 Subject: [PATCH 01/22] replace canEditRecordsWhenWrapped with resolverStatus isAuthorized --- .../input/ProfileEditor/ProfileEditor-flow.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 8a8e72bc2..4f774c17b 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -181,6 +181,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr const resolverStatus = useResolverStatus({ name, }) + console.log('resolverStatus', resolverStatus) const chainId = useChainId() @@ -233,11 +234,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr setView('addRecord') } - const canEditRecordsWhenWrapped = match(isWrapped) - .with(true, () => - getResolverWrapperAwareness({ chainId, resolverAddress: profile?.resolverAddress }), - ) - .otherwise(() => true) + const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized if (isLoading || resolverStatus.isLoading || !isRecordsUpdated) return From 825dcb7337dcff31c9a3fce179c7c67030ab6e1a Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 2 Dec 2024 13:32:01 +0800 Subject: [PATCH 02/22] fix lint error --- .../input/ProfileEditor/ProfileEditor-flow.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 4f774c17b..0add5800e 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -29,7 +29,8 @@ import { ProfileEditorForm, useProfileEditorForm } from '@app/hooks/useProfileEd import { createTransactionItem, TransactionItem } from '@app/transaction-flow/transaction' import TransactionLoader from '@app/transaction-flow/TransactionLoader' import type { TransactionDialogPassthrough } from '@app/transaction-flow/types' -import { getResolverWrapperAwareness } from '@app/utils/utils' + +// import { getResolverWrapperAwareness } from '@app/utils/utils' import ResolverWarningOverlay from './ResolverWarningOverlay' import { WrappedAvatarButton } from './WrappedAvatarButton' From ab296bcff4b9993166bad9364d9ed55b9bbfa19a Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 2 Dec 2024 13:34:24 +0800 Subject: [PATCH 03/22] fix lint errors --- .../input/ProfileEditor/ProfileEditor-flow.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 0add5800e..6d9b001f9 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -4,7 +4,8 @@ import { Control, useWatch } from 'react-hook-form' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { match } from 'ts-pattern' -import { useChainId } from 'wagmi' + +// import { useChainId } from 'wagmi' import { Button, Dialog, mq, PlusSVG } from '@ensdomains/thorin' @@ -184,7 +185,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr }) console.log('resolverStatus', resolverStatus) - const chainId = useChainId() + // const chainId = useChainId() const handleCreateTransaction = useCallback( async (form: ProfileEditorForm) => { From 74849504eb846b732bff3810e10d9b99a1172098 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 2 Dec 2024 14:22:58 +0800 Subject: [PATCH 04/22] test with no known resolvers --- src/constants/resolverAddressData.ts | 85 ++++++++++++++-------------- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/src/constants/resolverAddressData.ts b/src/constants/resolverAddressData.ts index eecb73d9d..954ab36e7 100644 --- a/src/constants/resolverAddressData.ts +++ b/src/constants/resolverAddressData.ts @@ -212,48 +212,49 @@ export const KNOWN_RESOLVER_DATA: KnownResolverData = { ], ...(process.env.NEXT_PUBLIC_ETH_NODE === 'anvil' ? { - '1337': [ - { - address: deploymentAddresses.PublicResolver, - deployer: 'ENS Labs', - tag: 'latest', - isNameWrapperAware: true, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - RESOLVER_INTERFACE_IDS.VersionableResolver, - ], - }, - { - address: '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750', - deployer: 'dummy', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [], - }, - { - address: deploymentAddresses.LegacyPublicResolver, - deployer: 'ENS Labs', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [ - RESOLVER_INTERFACE_IDS.AddressResolver, - RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - RESOLVER_INTERFACE_IDS.NameResolver, - RESOLVER_INTERFACE_IDS.AbiResolver, - RESOLVER_INTERFACE_IDS.TextResolver, - RESOLVER_INTERFACE_IDS.ContentHashResolver, - RESOLVER_INTERFACE_IDS.DnsRecordResolver, - RESOLVER_INTERFACE_IDS.InterfaceResolver, - ], - }, - ], + '1337': [], + // '1337': [ + // { + // address: deploymentAddresses.PublicResolver, + // deployer: 'ENS Labs', + // tag: 'latest', + // isNameWrapperAware: true, + // supportedInterfaces: [ + // RESOLVER_INTERFACE_IDS.AddressResolver, + // RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, + // RESOLVER_INTERFACE_IDS.NameResolver, + // RESOLVER_INTERFACE_IDS.AbiResolver, + // RESOLVER_INTERFACE_IDS.TextResolver, + // RESOLVER_INTERFACE_IDS.ContentHashResolver, + // RESOLVER_INTERFACE_IDS.DnsRecordResolver, + // RESOLVER_INTERFACE_IDS.InterfaceResolver, + // RESOLVER_INTERFACE_IDS.VersionableResolver, + // ], + // }, + // { + // address: '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750', + // deployer: 'dummy', + // tag: null, + // isNameWrapperAware: false, + // supportedInterfaces: [], + // }, + // { + // address: deploymentAddresses.LegacyPublicResolver, + // deployer: 'ENS Labs', + // tag: null, + // isNameWrapperAware: false, + // supportedInterfaces: [ + // RESOLVER_INTERFACE_IDS.AddressResolver, + // RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, + // RESOLVER_INTERFACE_IDS.NameResolver, + // RESOLVER_INTERFACE_IDS.AbiResolver, + // RESOLVER_INTERFACE_IDS.TextResolver, + // RESOLVER_INTERFACE_IDS.ContentHashResolver, + // RESOLVER_INTERFACE_IDS.DnsRecordResolver, + // RESOLVER_INTERFACE_IDS.InterfaceResolver, + // ], + // }, + // ], } : {}), } From 92b93e206cf166e4e7997cb67d8d577db4f63f3d Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Tue, 3 Dec 2024 10:40:15 +0800 Subject: [PATCH 05/22] Update useResolverStatus.ts --- src/hooks/resolver/useResolverStatus.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hooks/resolver/useResolverStatus.ts b/src/hooks/resolver/useResolverStatus.ts index 90c703b53..76ccc754d 100644 --- a/src/hooks/resolver/useResolverStatus.ts +++ b/src/hooks/resolver/useResolverStatus.ts @@ -94,7 +94,8 @@ export const useResolverStatus = ({ hasResolver: !!profileResolverAddress && profileResolverAddress !== emptyAddress, hasLatestResolver: resolverType.data?.type === 'latest', isNameWrapperAware: profileResolverAddress - ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) + ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) || + resolverIsAuthorised.data?.isAuthorised : false, hasProfile: profileHasRecords(profile), } From 94b1dca488fbfed34b0039178ac3b793a3f71f73 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Mon, 9 Dec 2024 10:18:27 +0800 Subject: [PATCH 06/22] add old resolver. Add ability to detect interfaces resolver supports in profile editor. --- deploy/.contracts/NoMulticallResolver.json | 456 ++++++++++++++++++ deploy/.contracts/NoTextResolver.json | 170 +++++++ deploy/.contracts/OldResolver.json | 170 +++++++ deploy/00_deploy_legacy_resolvers.ts | 78 +++ e2e/specs/stateless/profileEditor.spec.ts | 74 +++ pnpm-lock.yaml | 130 ++++- .../steps/Profile/AddProfileRecordView.tsx | 38 +- src/constants/profileRecordOptions.test.ts | 8 + src/constants/profileRecordOptions.ts | 51 +- src/constants/resolverAddressData.ts | 2 +- src/constants/supportedOtherRecordKeys.ts | 5 + src/hooks/resolver/useResolver.ts | 28 ++ src/hooks/resolver/useResolverStatus.ts | 2 + .../ProfileEditor/ProfileEditor-flow.tsx | 68 ++- .../hooks/useProfileEditorReducer.ts | 108 +++++ 15 files changed, 1344 insertions(+), 44 deletions(-) create mode 100644 deploy/.contracts/NoMulticallResolver.json create mode 100644 deploy/.contracts/NoTextResolver.json create mode 100644 deploy/.contracts/OldResolver.json create mode 100644 deploy/00_deploy_legacy_resolvers.ts create mode 100644 src/constants/profileRecordOptions.test.ts create mode 100644 src/hooks/resolver/useResolver.ts create mode 100644 src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts diff --git a/deploy/.contracts/NoMulticallResolver.json b/deploy/.contracts/NoMulticallResolver.json new file mode 100644 index 000000000..b7aa097b2 --- /dev/null +++ b/deploy/.contracts/NoMulticallResolver.json @@ -0,0 +1,456 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [ + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } + ], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" }, + { "internalType": "string", "name": "value", "type": "string" } + ], + "name": "setText", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } + ], + "name": "interfaceImplementer", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "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" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "setContenthash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" } + ], + "name": "addr", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "setAuthorisation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "text", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "contentType", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" } + ], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" }, + { "internalType": "bytes", "name": "a", "type": "bytes" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" } + ], + "name": "contenthash", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" } + ], + "name": "pubkey", + "outputs": [ + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "a", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }, + { "internalType": "address", "name": "implementer", "type": "address" } + ], + "name": "setInterface", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" } + ], + "name": "addr", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "authorisations", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "contract ENS", "name": "_ens", "type": "address" } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isAuthorised", + "type": "bool" + } + ], + "name": "AuthorisationChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "indexedKey", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "TextChanged", + "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": false, + "internalType": "string", + "name": "name", + "type": "string" + } + ], + "name": "NameChanged", + "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": "bytes", + "name": "hash", + "type": "bytes" + } + ], + "name": "ContenthashChanged", + "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": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "contentType", + "type": "uint256" + } + ], + "name": "ABIChanged", + "type": "event" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b506040516124e33803806124e38339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061244e806100956000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063623195b0116100ad578063c869023311610071578063c869023314610968578063d5fa2b00146109b1578063e59d895d146109ff578063f1cb7e0614610a76578063f86bc87914610b2757610121565b8063623195b01461063b578063691f3431146106c8578063773722131461076f5780638b95dd71146107f2578063bc1c58d1146108c157610121565b806329cd62ea116100f457806329cd62ea146103b2578063304e6ade146103f45780633b3b57de146104775780633e9ce794146104e557806359d1d43c1461053f57610121565b806301ffc9a71461012657806310f13a8c1461018b578063124a319c146102635780632203ab56146102fa575b600080fd5b6101716004803603602081101561013c57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610bad565b604051808215151515815260200191505060405180910390f35b610261600480360360608110156101a157600080fd5b8101908080359060200190929190803590602001906401000000008111156101c857600080fd5b8201836020820111156101da57600080fd5b803590602001918460018302840111640100000000831117156101fc57600080fd5b90919293919293908035906020019064010000000081111561021d57600080fd5b82018360208201111561022f57600080fd5b8035906020019184600183028401116401000000008311171561025157600080fd5b9091929391929390505050610c0e565b005b6102b86004803603604081101561027957600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d09565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103306004803603604081101561031057600080fd5b810190808035906020019092919080359060200190929190505050611206565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561037657808201518184015260208101905061035b565b50505050905090810190601f1680156103a35780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6103f2600480360360608110156103c857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611355565b005b6104756004803603604081101561040a57600080fd5b81019080803590602001909291908035906020019064010000000081111561043157600080fd5b82018360208201111561044357600080fd5b8035906020019184600183028401116401000000008311171561046557600080fd5b90919293919293905050506113ed565b005b6104a36004803603602081101561048d57600080fd5b810190808035906020019092919050505061148d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053d600480360360608110156104fb57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506114c4565b005b6105c06004803603604081101561055557600080fd5b81019080803590602001909291908035906020019064010000000081111561057c57600080fd5b82018360208201111561058e57600080fd5b803590602001918460018302840111640100000000831117156105b057600080fd5b90919293919293905050506115d8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106005780820151818401526020810190506105e5565b50505050905090810190601f16801561062d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106c66004803603606081101561065157600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561068257600080fd5b82018360208201111561069457600080fd5b803590602001918460018302840111640100000000831117156106b657600080fd5b90919293919293905050506116b4565b005b6106f4600480360360208110156106de57600080fd5b8101908080359060200190929190505050611741565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610734578082015181840152602081019050610719565b50505050905090810190601f1680156107615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107f06004803603604081101561078557600080fd5b8101908080359060200190929190803590602001906401000000008111156107ac57600080fd5b8201836020820111156107be57600080fd5b803590602001918460018302840111640100000000831117156107e057600080fd5b90919293919293905050506117f6565b005b6108bf6004803603606081101561080857600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561083957600080fd5b82018360208201111561084b57600080fd5b8035906020019184600183028401116401000000008311171561086d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611896565b005b6108ed600480360360208110156108d757600080fd5b8101908080359060200190929190505050611a03565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561092d578082015181840152602081019050610912565b50505050905090810190601f16801561095a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6109946004803603602081101561097e57600080fd5b8101908080359060200190929190505050611ab8565b604051808381526020018281526020019250505060405180910390f35b6109fd600480360360408110156109c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611af2565b005b610a7460048036036060811015610a1557600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b1e565b005b610aac60048036036040811015610a8c57600080fd5b810190808035906020019092919080359060200190929190505050611c5c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610aec578082015181840152602081019050610ad1565b50505050905090810190601f168015610b195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b9360048036036060811015610b3d57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d23565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c075750610c0682611d5f565b5b9050919050565b84610c1881611dc0565b610c2157600080fd5b828260066000898152602001908152602001600020878760405180838380828437808301925050509250505090815260200160405180910390209190610c68929190612250565b50857fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550868688886040518080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a2505050505050565b600080600360008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610dce5780915050611200565b6000610dd98561148d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610e1b57600092505050611200565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610f3c5780518252602082019150602081019050602083039250610f19565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610f9c576040519150601f19603f3d011682016040523d82523d6000602084013e610fa1565b606091505b5091509150811580610fb4575060208151105b80610ffb5750600060f81b81601f81518110610fcc57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561100d576000945050505050611200565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106111235780518252602082019150602081019050602083039250611100565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611183576040519150601f19603f3d011682016040523d82523d6000602084013e611188565b606091505b50809250819350505081158061119f575060208151105b806111e65750600060f81b81601f815181106111b757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156111f8576000945050505050611200565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b8481116113325760008582161415801561126757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156113265780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113145780601f106112e957610100808354040283529160200191611314565b820191906000526020600020905b8154815290600101906020018083116112f757829003601f168201915b5050505050905093509350505061134e565b600181901b9050611227565b5060006040518060200160405280600081525081915092509250505b9250929050565b8261135f81611dc0565b61136857600080fd5b604051806040016040528084815260200183815250600560008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b826113f781611dc0565b61140057600080fd5b82826002600087815260200190815260200160002091906114229291906122d0565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b6000606061149c83603c611c5c565b90506000815114156114b25760009150506114bf565b6114bb81611f4c565b9150505b919050565b806008600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b606060066000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116a65780601f1061167b576101008083540402835291602001916116a6565b820191906000526020600020905b81548152906001019060200180831161168957829003601f168201915b505050505090509392505050565b836116be81611dc0565b6116c757600080fd5b6000846001860316146116d957600080fd5b82826000808881526020019081526020016000206000878152602001908152602001600020919061170b9291906122d0565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600460008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117ea5780601f106117bf576101008083540402835291602001916117ea565b820191906000526020600020905b8154815290600101906020018083116117cd57829003601f168201915b50505050509050919050565b8261180081611dc0565b61180957600080fd5b828260046000878152602001908152602001600020919061182b929190612250565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b826118a081611dc0565b6118a957600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156119135780820151818401526020810190506118f8565b50505050905090810190601f1680156119405780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c8314156119c457837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261198284611f4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b8160016000868152602001908152602001600020600085815260200190815260200160002090805190602001906119fc929190612350565b5050505050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611aac5780601f10611a8157610100808354040283529160200191611aac565b820191906000526020600020905b815481529060010190602001808311611a8f57829003601f168201915b50505050509050919050565b6000806005600084815260200190815260200160002060000154600560008581526020019081526020016000206001015491509150915091565b81611afc81611dc0565b611b0557600080fd5b611b1983603c611b1485611f6f565b611896565b505050565b82611b2881611dc0565b611b3157600080fd5b81600360008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d165780601f10611ceb57610100808354040283529160200191611d16565b820191906000526020600020905b815481529060010190602001808311611cf957829003601f168201915b5050505050905092915050565b6008602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611db95750611db882611fba565b5b9050919050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611e3657600080fd5b505afa158015611e4a573d6000803e3d6000fd5b505050506040513d6020811015611e6057600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480611f4457506008600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b60006014825114611f5c57600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015611fa55781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061201457506120138261201b565b5b9050919050565b600060405180806123f660249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061208657506120858261208d565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806120e757506120e6826120ee565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612187575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061219757506121968261219e565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806121f857506121f7826121ff565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061229157803560ff19168380011785556122bf565b828001600101855582156122bf579182015b828111156122be5782358255916020019190600101906122a3565b5b5090506122cc91906123d0565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061231157803560ff191683800117855561233f565b8280016001018555821561233f579182015b8281111561233e578235825591602001919060010190612323565b5b50905061234c91906123d0565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061239157805160ff19168380011785556123bf565b828001600101855582156123bf579182015b828111156123be5782518255916020019190600101906123a3565b5b5090506123cc91906123d0565b5090565b6123f291905b808211156123ee5760008160009055506001016123d6565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820ad8f8a41d6a908b475138c4e12dbb403d590d1a66cd707d281b6f5adf64a8b9b64736f6c634300050b0032" +} diff --git a/deploy/.contracts/NoTextResolver.json b/deploy/.contracts/NoTextResolver.json new file mode 100644 index 000000000..a70b5c960 --- /dev/null +++ b/deploy/.contracts/NoTextResolver.json @@ -0,0 +1,170 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [{ "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentTypes", "type": "uint256" } + ], + "name": "ABI", + "outputs": [ + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "content", + "outputs": [{ "name": "ret", "type": "bytes32" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "name": "ret", "type": "address" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "name": "ret", "type": "string" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "hash", "type": "bytes32" } + ], + "name": "setContent", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "addr", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [{ "name": "ensAddr", "type": "address" }], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "a", "type": "address" } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "hash", "type": "bytes32" } + ], + "name": "ContentChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "name", "type": "string" } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": true, "name": "contentType", "type": "uint256" } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "x", "type": "bytes32" }, + { "indexed": false, "name": "y", "type": "bytes32" } + ], + "name": "PubkeyChanged", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000c57fe5b604051602080610dc583398101604052515b60008054600160a060020a031916600160a060020a0383161790555b505b610d7a8061004b6000396000f300606060405236156100ac5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100ae5780632203ab56146100df57806329cd62ea146101815780632dff69411461019c5780633b3b57de146101c1578063623195b0146101f0578063691f34311461024c57806377372213146102df578063c3d014d614610338578063c869023314610350578063d5fa2b001461037c575bfe5b34156100b657fe5b6100cb600160e060020a03196004351661039d565b604080519115158252519081900360200190f35b34156100e757fe5b6100f56004356024356104d8565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360008314610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561018957fe5b61019a6004356024356044356105ef565b005b34156101a457fe5b6101af6004356106e6565b60408051918252519081900360200190f35b34156101c957fe5b6101d46004356106ff565b60408051600160a060020a039092168252519081900360200190f35b34156101f857fe5b604080516020600460443581810135601f810184900484028501840190955284845261019a94823594602480359560649492939190920191819084018382808284375094965061071d95505050505050565b005b341561025457fe5b61025f600435610816565b6040805160208082528351818301528351919283929083019185019080838382156102a5575b8051825260208311156102a557601f199092019160209182019101610285565b505050905090810190601f1680156102d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102e757fe5b60408051602060046024803582810135601f810185900485028601850190965285855261019a95833595939460449493929092019181908401838280828437509496506108c195505050505050565b005b341561034057fe5b61019a600435602435610a19565b005b341561035857fe5b610363600435610af1565b6040805192835260208301919091528051918290030190f35b341561038457fe5b61019a600435600160a060020a0360243516610b10565b005b6000600160e060020a031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806104005750600160e060020a031982167fd8389dc500000000000000000000000000000000000000000000000000000000145b806104345750600160e060020a031982167f691f343100000000000000000000000000000000000000000000000000000000145b806104685750600160e060020a031982167f2203ab5600000000000000000000000000000000000000000000000000000000145b8061049c5750600160e060020a031982167fc869023300000000000000000000000000000000000000000000000000000000145b806104d05750600160e060020a031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b90505b919050565b60006104e2610c0b565b60008481526001602081905260409091209092505b8383116105e257828416158015906105305750600083815260058201602052604081205460026000196101006001841615020190911604115b156105d657600083815260058201602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b505050505091506105e7565b5b6002909202916104f7565b600092505b509250929050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561064957fe5b6102c65a03f1151561065757fe5b505060405151600160a060020a03169190911490506106765760006000fd5b604080518082018252848152602080820185815260008881526001835284902092516003840155516004909201919091558151858152908101849052815186927f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46928290030190a25b5b50505050565b600081815260016020819052604090912001545b919050565b600081815260016020526040902054600160a060020a03165b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561077757fe5b6102c65a03f1151561078557fe5b505060405151600160a060020a03169190911490506107a45760006000fd5b60001983018316156107b65760006000fd5b6000848152600160209081526040808320868452600501825290912083516107e092850190610c1d565b50604051839085907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35b5b50505050565b61081e610c0b565b6000828152600160208181526040928390206002908101805485516000199582161561010002959095011691909104601f81018390048302840183019094528383529192908301828280156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505090505b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561091b57fe5b6102c65a03f1151561092957fe5b505060405151600160a060020a03169190911490506109485760006000fd5b6000838152600160209081526040909120835161096d92600290920191850190610c1d565b50604080516020808252845181830152845186937fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f79387939092839283019185019080838382156109d9575b8051825260208311156109d957601f1990920191602091820191016109b9565b505050905090810190601f168015610a055780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b5b505050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610a7357fe5b6102c65a03f11515610a8157fe5b505060405151600160a060020a0316919091149050610aa05760006000fd5b6000838152600160208181526040928390209091018490558151848152915185927f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc92908290030190a25b5b505050565b600081815260016020526040902060038101546004909101545b915091565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610b6a57fe5b6102c65a03f11515610b7857fe5b505060405151600160a060020a0316919091149050610b975760006000fd5b600083815260016020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386169081179091558251908152915185927f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd292908290030190a25b5b505050565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b610d4b91905b80821115610c985760008155600101610d33565b5090565b905600a165627a7a72305820f05b42978350d3945a3fe885ef530e3f8ecbfcdb822550779dfcf0b06b00754f0029000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b" +} diff --git a/deploy/.contracts/OldResolver.json b/deploy/.contracts/OldResolver.json new file mode 100644 index 000000000..75cd964d8 --- /dev/null +++ b/deploy/.contracts/OldResolver.json @@ -0,0 +1,170 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [{ "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentTypes", "type": "uint256" } + ], + "name": "ABI", + "outputs": [ + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "content", + "outputs": [{ "name": "ret", "type": "bytes32" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "name": "ret", "type": "address" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "name": "ret", "type": "string" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "hash", "type": "bytes32" } + ], + "name": "setContent", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "addr", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [{ "name": "ensAddr", "type": "address" }], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "a", "type": "address" } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "hash", "type": "bytes32" } + ], + "name": "ContentChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "name", "type": "string" } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": true, "name": "contentType", "type": "uint256" } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "x", "type": "bytes32" }, + { "indexed": false, "name": "y", "type": "bytes32" } + ], + "name": "PubkeyChanged", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000c57fe5b604051602080610dc583398101604052515b60008054600160a060020a031916600160a060020a0383161790555b505b610d7a8061004b6000396000f300606060405236156100ac5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100ae5780632203ab56146100df57806329cd62ea146101815780632dff69411461019c5780633b3b57de146101c1578063623195b0146101f0578063691f34311461024c57806377372213146102df578063c3d014d614610338578063c869023314610350578063d5fa2b001461037c575bfe5b34156100b657fe5b6100cb600160e060020a03196004351661039d565b604080519115158252519081900360200190f35b34156100e757fe5b6100f56004356024356104d8565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360008314610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561018957fe5b61019a6004356024356044356105ef565b005b34156101a457fe5b6101af6004356106e6565b60408051918252519081900360200190f35b34156101c957fe5b6101d46004356106ff565b60408051600160a060020a039092168252519081900360200190f35b34156101f857fe5b604080516020600460443581810135601f810184900484028501840190955284845261019a94823594602480359560649492939190920191819084018382808284375094965061071d95505050505050565b005b341561025457fe5b61025f600435610816565b6040805160208082528351818301528351919283929083019185019080838382156102a5575b8051825260208311156102a557601f199092019160209182019101610285565b505050905090810190601f1680156102d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102e757fe5b60408051602060046024803582810135601f810185900485028601850190965285855261019a95833595939460449493929092019181908401838280828437509496506108c195505050505050565b005b341561034057fe5b61019a600435602435610a19565b005b341561035857fe5b610363600435610af1565b6040805192835260208301919091528051918290030190f35b341561038457fe5b61019a600435600160a060020a0360243516610b10565b005b6000600160e060020a031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806104005750600160e060020a031982167fd8389dc500000000000000000000000000000000000000000000000000000000145b806104345750600160e060020a031982167f691f343100000000000000000000000000000000000000000000000000000000145b806104685750600160e060020a031982167f2203ab5600000000000000000000000000000000000000000000000000000000145b8061049c5750600160e060020a031982167fc869023300000000000000000000000000000000000000000000000000000000145b806104d05750600160e060020a031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b90505b919050565b60006104e2610c0b565b60008481526001602081905260409091209092505b8383116105e257828416158015906105305750600083815260058201602052604081205460026000196101006001841615020190911604115b156105d657600083815260058201602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b505050505091506105e7565b5b6002909202916104f7565b600092505b509250929050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561064957fe5b6102c65a03f1151561065757fe5b505060405151600160a060020a03169190911490506106765760006000fd5b604080518082018252848152602080820185815260008881526001835284902092516003840155516004909201919091558151858152908101849052815186927f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46928290030190a25b5b50505050565b600081815260016020819052604090912001545b919050565b600081815260016020526040902054600160a060020a03165b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561077757fe5b6102c65a03f1151561078557fe5b505060405151600160a060020a03169190911490506107a45760006000fd5b60001983018316156107b65760006000fd5b6000848152600160209081526040808320868452600501825290912083516107e092850190610c1d565b50604051839085907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35b5b50505050565b61081e610c0b565b6000828152600160208181526040928390206002908101805485516000199582161561010002959095011691909104601f81018390048302840183019094528383529192908301828280156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505090505b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561091b57fe5b6102c65a03f1151561092957fe5b505060405151600160a060020a03169190911490506109485760006000fd5b6000838152600160209081526040909120835161096d92600290920191850190610c1d565b50604080516020808252845181830152845186937fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f79387939092839283019185019080838382156109d9575b8051825260208311156109d957601f1990920191602091820191016109b9565b505050905090810190601f168015610a055780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b5b505050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610a7357fe5b6102c65a03f11515610a8157fe5b505060405151600160a060020a0316919091149050610aa05760006000fd5b6000838152600160208181526040928390209091018490558151848152915185927f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc92908290030190a25b5b505050565b600081815260016020526040902060038101546004909101545b915091565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610b6a57fe5b6102c65a03f11515610b7857fe5b505060405151600160a060020a0316919091149050610b975760006000fd5b600083815260016020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386169081179091558251908152915185927f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd292908290030190a25b5b505050565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b610d4b91905b80821115610c985760008155600101610d33565b5090565b905600a165627a7a72305820f05b42978350d3945a3fe885ef530e3f8ecbfcdb822550779dfcf0b06b00754f0029" +} diff --git a/deploy/00_deploy_legacy_resolvers.ts b/deploy/00_deploy_legacy_resolvers.ts new file mode 100644 index 000000000..fc79d1da9 --- /dev/null +++ b/deploy/00_deploy_legacy_resolvers.ts @@ -0,0 +1,78 @@ +/* eslint-disable import/no-extraneous-dependencies */ +import fs from 'fs/promises' +import { ethers } from 'hardhat' +import { DeployFunction } from 'hardhat-deploy/types' +import { HardhatRuntimeEnvironment } from 'hardhat/types' +import { resolve } from 'path' +import { namehash } from 'viem' + +const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const { getNamedAccounts, deployments } = hre + const allNamedAccts = await getNamedAccounts() + + const registry = await ethers.getContract('ENSRegistry') + + await deployments.deploy('NoMulticallResolver', { + from: allNamedAccts.deployer, + contract: JSON.parse( + await fs.readFile(resolve(__dirname, './.contracts/NoMulticallResolver.json'), { + encoding: 'utf8', + }), + ), + args: [registry.address], + }) + + await deployments.deploy('OldResolver', { + from: allNamedAccts.deployer, + contract: JSON.parse( + await fs.readFile(resolve(__dirname, './.contracts/OldResolver.json'), { + encoding: 'utf8', + }), + ), + args: [registry.address], + }) + + await deployments.deploy('NoTextResolver', { + from: allNamedAccts.deployer, + contract: JSON.parse( + await fs.readFile(resolve(__dirname, './.contracts/NoTextResolver.json'), { + encoding: 'utf8', + }), + ), + args: [registry.address], + }) + // const resolver = await ethers.getContract('NoMulticallResolver') + + // for (const { namedOwner, name, addr } of names) { + // const owner = allNamedAccts[namedOwner] + // const _resolver = resolver.connect(await ethers.getSigner(owner)) + // const _registry = registry.connect(await ethers.getSigner(owner)) + + // const tx = await _registry.setResolver(namehash(name), resolver.address) + // console.log( + // `Setting resolver for ${name} to ${resolver.address} (tx: ${tx.hash})...`, + // ) + // await tx.wait() + + // for (const { key, value } of addr) { + // const tx2 = await _resolver['setAddr(bytes32,uint256,bytes)']( + // namehash(name), + // key, + // value, + // { + // gasLimit: 100000, + // }, + // ) + // console.log(`Setting address for ${key} to ${value} (tx: ${tx.hash})...`) + // await tx2.wait() + // } + // } + + return true +} + +func.id = 'deploy-legacy-resolvers' +func.tags = ['deploy-legacy-resolvers'] +func.runAtTheEnd = true + +module.exports = func diff --git a/e2e/specs/stateless/profileEditor.spec.ts b/e2e/specs/stateless/profileEditor.spec.ts index 823c9cdb6..c08f96b36 100644 --- a/e2e/specs/stateless/profileEditor.spec.ts +++ b/e2e/specs/stateless/profileEditor.spec.ts @@ -20,6 +20,12 @@ const ownedResolverAddress = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.OwnedResolver || '' const invalidResolverAddress = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NameWrapper || '' +const noMulticallResolverAddress = + JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NoMulticallResolverAddress || '' +const oldestResolverAddress = + JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.OldesResolver || '' +const noTextResolverAddress = + JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NoTextResolver || '' const dummyABI = { test: 'test', @@ -147,6 +153,7 @@ test.describe('migrations', () => { const profilePage = makePageObject('ProfilePage') await profilePage.editProfileButton.click() + await page.pause() await expect(page.getByText('Registry out of date')).toBeVisible() await expect(page.getByTestId('warning-overlay-next-button')).toHaveAttribute( 'href', @@ -155,6 +162,7 @@ test.describe('migrations', () => { }) test('should force a name without a resolver to update their resolver', async ({ + page, login, makeName, makePageObject, @@ -182,6 +190,7 @@ test.describe('migrations', () => { await login.connect() await profilePage.editProfileButton.click() + await page.pause() await expect(profilePage.profileEditor.locator('text=No resolver set')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -195,6 +204,7 @@ test.describe('migrations', () => { test('should force a name with an unauthorised resolver to update their resolver', async ({ login, + page, makeName, makePageObject, }) => { @@ -217,6 +227,7 @@ test.describe('migrations', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() + await page.pause() await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -228,6 +239,7 @@ test.describe('migrations', () => { test('should force a name with an invalid resolver to update their resolver', async ({ login, + page, makeName, makePageObject, }) => { @@ -250,6 +262,7 @@ test.describe('migrations', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() + await page.pause() await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -261,6 +274,7 @@ test.describe('migrations', () => { test('should force a wrapped name with a resolver that is not name wrapper aware to migrate update their resolver', async ({ login, + page, makeName, makePageObject, }) => { @@ -281,6 +295,7 @@ test.describe('migrations', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() + await page.pause() await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -629,6 +644,65 @@ test.describe('migrations', () => { await expect(page.getByText('No Content Hash')).toBeVisible() await expect(page.getByText('No ABI')).toBeVisible() }) + + test('old resolver', async ({ page, login, accounts, makeName, makePageObject }) => { + const name = await makeName({ + label: 'unwrapped', + type: 'legacy', + owner: 'user', + resolver: noTextResolverAddress, + records: await makeRecords(), + }) + + // Add records to latest resolver + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: newResolver, + records: await makeRecords({ + texts: [{ key: 'description', value: 'New profile' }], + coins: [{ coin: 'eth', value: createAccounts().getAddress('user2') }], + contentHash: 'bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162', + abi: await encodeAbi({ encodeAs: 'cbor', data: { test2: 'test2' } }), + }), + }) + + const morePage = makePageObject('MorePage') + const recordsPage = makePageObject('RecordsPage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + + await morePage.goto(name) + await login.connect() + + // await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + await page.pause() + + await expect(page.getByText('Resolver out of sync')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await page.getByTestId('migrate-profile-selector-reset').check() + await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await expect(page.getByText('Reset profile')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + + await recordsPage.goto(name) + + await expect(page.getByTestId('text-amount')).toHaveText('0 Records') + await expect(page.getByTestId('address-amount')).toHaveText('0 Records') + await expect(page.getByText('No Content Hash')).toBeVisible() + await expect(page.getByText('No ABI')).toBeVisible() + }) }) test.describe('unwrapped', () => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8be54304d..51859ab5b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -430,6 +430,84 @@ importers: specifier: ^1.0.0-pre.53 version: 1.0.0-pre.53 + .yalc/@ensdomains/ens-test-env: + dependencies: + '@ethersproject/wallet': + specifier: ^5.6.0 + version: 5.7.0 + ansi-colors: + specifier: ^4.1.1 + version: 4.1.3 + cli-progress: + specifier: ^3.10.0 + version: 3.12.0 + commander: + specifier: ^9.3.0 + version: 9.5.0 + concurrently: + specifier: ^7.1.0 + version: 7.6.0 + docker-compose: + specifier: ^0.24.7 + version: 0.24.8 + dotenv: + specifier: ^16.0.1 + version: 16.4.5 + js-yaml: + specifier: ^4.1.0 + version: 4.1.0 + lz4: + specifier: ^0.6.5 + version: 0.6.5 + progress-stream: + specifier: ^2.0.0 + version: 2.0.0 + tar-fs: + specifier: ^2.1.1 + version: 2.1.1 + viem: + specifier: ^2.21.37 + version: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + wait-on: + specifier: ^6.0.1 + version: 6.0.1 + + .yalc/@ensdomains/ensjs: + dependencies: + '@adraffy/ens-normalize': + specifier: 1.10.1 + version: 1.10.1 + '@ensdomains/address-encoder': + specifier: 1.1.1 + version: 1.1.1 + '@ensdomains/content-hash': + specifier: 3.1.0-rc.1 + version: 3.1.0-rc.1 + '@ensdomains/dnsprovejs': + specifier: ^0.5.1 + version: 0.5.1 + abitype: + specifier: ^1.0.0 + version: 1.0.6(typescript@5.4.5)(zod@3.23.8) + dns-packet: + specifier: ^5.3.1 + version: 5.6.1 + graphql: + specifier: ^16.3.0 + version: 16.8.1 + graphql-request: + specifier: 6.1.0 + version: 6.1.0(encoding@0.1.13)(graphql@16.8.1) + pako: + specifier: ^2.1.0 + version: 2.1.0 + ts-pattern: + specifier: ^5.4.0 + version: 5.5.0 + viem: + specifier: ^2.9.2 + version: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) + packages: '@adobe/css-tools@4.3.3': @@ -11823,9 +11901,9 @@ snapshots: '@ensdomains/address-encoder@1.1.1': dependencies: - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.9 '@ensdomains/buffer@0.1.1': {} @@ -11880,7 +11958,7 @@ snapshots: '@ensdomains/ensjs@2.1.0(bufferutil@4.0.8)(utf-8-validate@5.0.10)': dependencies: - '@babel/runtime': 7.24.6 + '@babel/runtime': 7.25.0 '@ensdomains/address-encoder': 0.1.9 '@ensdomains/ens': 0.4.5 '@ensdomains/resolver': 0.2.4 @@ -12734,8 +12812,8 @@ snapshots: '@metamask/utils@8.4.0': dependencies: '@ethereumjs/tx': 4.2.0 - '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@noble/hashes': 1.5.0 + '@scure/base': 1.1.9 '@types/debug': 4.1.12 debug: 4.3.4(supports-color@5.5.0) pony-cause: 2.1.11 @@ -13516,19 +13594,19 @@ snapshots: dependencies: '@noble/hashes': 1.2.0 '@noble/secp256k1': 1.7.1 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip32@1.3.3': dependencies: '@noble/curves': 1.3.0 '@noble/hashes': 1.3.3 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip32@1.4.0': dependencies: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip32@1.5.0': dependencies: @@ -13539,17 +13617,17 @@ snapshots: '@scure/bip39@1.1.1': dependencies: '@noble/hashes': 1.2.0 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip39@1.2.2': dependencies: '@noble/hashes': 1.3.3 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip39@1.3.0': dependencies: '@noble/hashes': 1.4.0 - '@scure/base': 1.1.6 + '@scure/base': 1.1.9 '@scure/bip39@1.4.0': dependencies: @@ -13919,7 +13997,7 @@ snapshots: '@swc/helpers@0.5.2': dependencies: - tslib: 2.6.2 + tslib: 2.6.3 '@szmarczak/http-timer@4.0.6': dependencies: @@ -15670,7 +15748,7 @@ snapshots: capnp-ts@0.7.0: dependencies: debug: 4.3.6 - tslib: 2.6.2 + tslib: 2.6.3 transitivePeerDependencies: - supports-color @@ -17095,7 +17173,7 @@ snapshots: ethereum-bloom-filters@1.1.0: dependencies: - '@noble/hashes': 1.4.0 + '@noble/hashes': 1.5.0 ethereum-cryptography@0.1.3: dependencies: @@ -19028,7 +19106,7 @@ snapshots: media-query-parser@2.0.2: dependencies: - '@babel/runtime': 7.24.6 + '@babel/runtime': 7.25.0 media-typer@0.3.0: {} @@ -19289,7 +19367,7 @@ snapshots: stoppable: 1.1.0 undici: 5.28.4 workerd: 1.20240512.0 - ws: 8.17.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) youch: 3.3.3 zod: 3.23.8 transitivePeerDependencies: @@ -20426,7 +20504,7 @@ snapshots: dependencies: react: 18.3.1 react-style-singleton: 2.2.1(@types/react@18.2.21)(react@18.3.1) - tslib: 2.6.2 + tslib: 2.6.3 optionalDependencies: '@types/react': 18.2.21 @@ -20435,7 +20513,7 @@ snapshots: react: 18.3.1 react-remove-scroll-bar: 2.3.6(@types/react@18.2.21)(react@18.3.1) react-style-singleton: 2.2.1(@types/react@18.2.21)(react@18.3.1) - tslib: 2.6.2 + tslib: 2.6.3 use-callback-ref: 1.3.2(@types/react@18.2.21)(react@18.3.1) use-sidecar: 1.1.2(@types/react@18.2.21)(react@18.3.1) optionalDependencies: @@ -20452,7 +20530,7 @@ snapshots: get-nonce: 1.0.1 invariant: 2.2.4 react: 18.3.1 - tslib: 2.6.2 + tslib: 2.6.3 optionalDependencies: '@types/react': 18.2.21 @@ -20774,7 +20852,7 @@ snapshots: rtl-css-js@1.16.1: dependencies: - '@babel/runtime': 7.24.6 + '@babel/runtime': 7.25.0 run-async@2.4.1: {} @@ -21039,7 +21117,7 @@ snapshots: snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.6.3 socket.io-client@4.7.5(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: @@ -21971,7 +22049,7 @@ snapshots: use-callback-ref@1.3.2(@types/react@18.2.21)(react@18.3.1): dependencies: react: 18.3.1 - tslib: 2.6.2 + tslib: 2.6.3 optionalDependencies: '@types/react': 18.2.21 @@ -21984,7 +22062,7 @@ snapshots: dependencies: detect-node-es: 1.1.0 react: 18.3.1 - tslib: 2.6.2 + tslib: 2.6.3 optionalDependencies: '@types/react': 18.2.21 @@ -22680,8 +22758,8 @@ snapshots: webauthn-p256@0.0.5: dependencies: - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 + '@noble/curves': 1.6.0 + '@noble/hashes': 1.5.0 webextension-polyfill@0.10.0: {} diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx index 08b89c3fe..feff39d41 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx @@ -3,14 +3,14 @@ import { Control, useWatch } from 'react-hook-form' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' -import { Button, Dialog, MagnifyingGlassSimpleSVG, mq, ScrollBox } from '@ensdomains/thorin' +import { Button, Dialog, Helper, MagnifyingGlassSimpleSVG, mq, ScrollBox } from '@ensdomains/thorin' import DismissDialogButton from '@app/components/@atoms/DismissDialogButton/DismissDialogButton' import { Spacer } from '@app/components/@atoms/Spacer' import { DialogFooterWithBorder } from '@app/components/@molecules/DialogComponentVariants/DialogFooterWithBorder' import { DialogInput } from '@app/components/@molecules/DialogComponentVariants/DialogInput' import { - grouped as options, + getGroupedProfileRecordsForInterfaces, ProfileRecord, ProfileRecordGroup, } from '@app/constants/profileRecordOptions' @@ -111,12 +111,25 @@ const DismissButtonWrapper = styled.div( type Props = { control: Control + hasTextInterface?: boolean + hasAddressInterface?: boolean + hasContenthashInterface?: boolean + hasAbiInterface?: boolean onAdd?: (records: ProfileRecord[]) => void onClose?: () => void showDismiss?: boolean } -export const AddProfileRecordView = ({ control, onAdd, onClose, showDismiss }: Props) => { +export const AddProfileRecordView = ({ + control, + hasTextInterface = true, + hasAddressInterface = true, + hasContenthashInterface = true, + hasAbiInterface = true, + onAdd, + onClose, + showDismiss, +}: Props) => { const { t, i18n } = useTranslation('register') const currentRecords = useWatch({ control, name: 'records' }) @@ -125,6 +138,12 @@ export const AddProfileRecordView = ({ control, onAdd, onClose, showDismiss }: P const [search, setSearch] = useState('') const filteredOptions = useMemo(() => { + const options = getGroupedProfileRecordsForInterfaces({ + textResolver: hasTextInterface, + addressResolver: hasAddressInterface, + contentHashResolver: hasContenthashInterface, + abiResolver: hasAbiInterface, + }) if (!i18n.isInitialized || !search) return options const matchSearch = (s: string) => s.toLowerCase().indexOf(search.toLocaleLowerCase()) !== -1 return options.map((option) => { @@ -150,7 +169,15 @@ export const AddProfileRecordView = ({ control, onAdd, onClose, showDismiss }: P items, } }) - }, [search, t, i18n]) + }, [ + search, + t, + i18n, + hasTextInterface, + hasAddressInterface, + hasContenthashInterface, + hasAbiInterface, + ]) // Tracks when to skip updating the sidebar while options grid is scrolling const shouldSkipObserverUpdateRef = useRef() @@ -307,6 +334,9 @@ export const AddProfileRecordView = ({ control, onAdd, onClose, showDismiss }: P
+ + Your custom resolver doesn't support all records + {filteredOptions.map((option) => { const showLabel = !['address', 'website'].includes(option.group) if (option.items.length === 0 && option.group !== 'other') return null diff --git a/src/constants/profileRecordOptions.test.ts b/src/constants/profileRecordOptions.test.ts new file mode 100644 index 000000000..acc042fd9 --- /dev/null +++ b/src/constants/profileRecordOptions.test.ts @@ -0,0 +1,8 @@ +import { describe, it, expect } from "vitest"; +import { getGroupedProfileRecordsForInterfaces } from "./profileRecordOptions"; + +describe('getGroupedProfileRecordsForInterfaces', () => { + it('', () => { + + }) +}) \ No newline at end of file diff --git a/src/constants/profileRecordOptions.ts b/src/constants/profileRecordOptions.ts index 532a53265..06a73c9fc 100644 --- a/src/constants/profileRecordOptions.ts +++ b/src/constants/profileRecordOptions.ts @@ -4,7 +4,10 @@ import coinsWithIcons from '@app/constants/coinsWithIcons.json' import coinsWithoutIcons from '@app/constants/coinsWithoutIcons.json' import { supportedContentHashKeys } from '@app/constants/supportedContentHashKeys' import { supportedGeneralRecordKeys } from '@app/constants/supportedGeneralRecordKeys' -import { supportedOtherRecordKeys } from '@app/constants/supportedOtherRecordKeys' +import { + getSupportedOtherRecordKeysForInterfaces, + supportedOtherRecordKeys, +} from '@app/constants/supportedOtherRecordKeys' import { supportedSocialRecordKeys } from '@app/constants/supportedSocialRecordKeys' export type ProfileRecordGroup = @@ -118,3 +121,49 @@ export const sortValues: { [key: string]: { [key: string]: number } } = { return acc }, {}), } + +export const getGroupedProfileRecordsForInterfaces = ( + interfaces: + | { + textResolver: boolean + addressResolver: boolean + abiResolver: boolean + contentHashResolver: boolean + } + | undefined, +) => { + const { + textResolver = true, + addressResolver = true, + abiResolver = true, + contentHashResolver = true, + } = interfaces || {} + if (textResolver && addressResolver && abiResolver && contentHashResolver) return grouped + return [ + { + group: 'general', + items: textResolver ? general : [], + }, + { + group: 'social', + items: textResolver ? social : [], + }, + { + group: 'address', + items: addressResolver ? address : [], + }, + { + group: 'website', + items: contentHashResolver ? website : [], + }, + { + group: 'other', + items: other.filter( + ({ type }) => + (type === 'abi' && abiResolver) || + (type === 'contenthash' && contentHashResolver) || + (type === 'text' && textResolver), + ), + }, + ] as const +} diff --git a/src/constants/resolverAddressData.ts b/src/constants/resolverAddressData.ts index 954ab36e7..be538289c 100644 --- a/src/constants/resolverAddressData.ts +++ b/src/constants/resolverAddressData.ts @@ -4,7 +4,7 @@ import { Address } from 'viem' import { deploymentAddresses } from './chains' import { RESOLVER_INTERFACE_IDS, ResolverInterfaceId } from './resolverInterfaceIds' -type KnownResolverItem = { +export type KnownResolverItem = { address: Address deployer: string tag: 'latest' | 'outdated' | null diff --git a/src/constants/supportedOtherRecordKeys.ts b/src/constants/supportedOtherRecordKeys.ts index 4e8730a6c..89bad73dd 100644 --- a/src/constants/supportedOtherRecordKeys.ts +++ b/src/constants/supportedOtherRecordKeys.ts @@ -1 +1,6 @@ export const supportedOtherRecordKeys = ['abi'] as const + +export const getSupportedOtherRecordKeysForInterfaces = (interfaces?: { abiResolver: boolean }) => { + const { abiResolver = true } = interfaces || {} + return abiResolver ? supportedOtherRecordKeys : [] +} diff --git a/src/hooks/resolver/useResolver.ts b/src/hooks/resolver/useResolver.ts new file mode 100644 index 000000000..a7c0e030a --- /dev/null +++ b/src/hooks/resolver/useResolver.ts @@ -0,0 +1,28 @@ +import { Hash } from 'viem' +import { useChainId } from 'wagmi' + +import { KNOWN_RESOLVER_DATA, KnownResolverItem } from '@app/constants/resolverAddressData' + +import { useResolverHasInterfaces } from '../useResolverHasInterfaces' + +type Resolver = KnownResolverItem + +export const useResolver = ({ resolverAddress }: { resolverAddress?: Hash }) => { + const chainId = useChainId() + const knownResolver = KNOWN_RESOLVER_DATA[chainId]?.find((r) => r.address === resolverAddress) + + const interfaces = useResolverHasInterfaces({ + resolverAddress: resolverAddress!, + interfaceNames: [ + 'AbiResolver', + 'AddressResolver', + 'MultiCoinAddressResolver', + 'ContentHashResolver', + 'TextResolver', + ], + enabled: !knownResolver && !!resolverAddress, + }) + + if (knownResolver) return knownResolver + return {} +} diff --git a/src/hooks/resolver/useResolverStatus.ts b/src/hooks/resolver/useResolverStatus.ts index 76ccc754d..8317c4d61 100644 --- a/src/hooks/resolver/useResolverStatus.ts +++ b/src/hooks/resolver/useResolverStatus.ts @@ -81,6 +81,7 @@ export const useResolverStatus = ({ hasResolver: false, hasLatestResolver: false, hasValidResolver: false, + isKnownResolver: false, isAuthorized: false, isNameWrapperAware: false, hasProfile: false, @@ -93,6 +94,7 @@ export const useResolverStatus = ({ ...defaultResults, hasResolver: !!profileResolverAddress && profileResolverAddress !== emptyAddress, hasLatestResolver: resolverType.data?.type === 'latest', + isKnownResolver: resolverType.data?.type !== 'custom', isNameWrapperAware: profileResolverAddress ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) || resolverIsAuthorised.data?.isAuthorised diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 6d9b001f9..71dcc5132 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -27,10 +27,12 @@ import { useResolverStatus } from '@app/hooks/resolver/useResolverStatus' import { useIsWrapped } from '@app/hooks/useIsWrapped' import { useProfile } from '@app/hooks/useProfile' import { ProfileEditorForm, useProfileEditorForm } from '@app/hooks/useProfileEditorForm' +import { useResolverHasInterfaces } from '@app/hooks/useResolverHasInterfaces' import { createTransactionItem, TransactionItem } from '@app/transaction-flow/transaction' import TransactionLoader from '@app/transaction-flow/TransactionLoader' import type { TransactionDialogPassthrough } from '@app/transaction-flow/types' +import { useProfileEditorReducer } from './hooks/useProfileEditorReducer' // import { getResolverWrapperAwareness } from '@app/utils/utils' import ResolverWarningOverlay from './ResolverWarningOverlay' @@ -145,6 +147,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr isDirtyForRecordAtIndex, hasErrors, } = useProfileEditorForm(existingRecords) + console.log('profileRecords', profileRecords, 'isLoading', isLoading) // Update profile records if transaction data exists const [isRecordsUpdated, setIsRecordsUpdated] = useState(false) @@ -185,6 +188,15 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr }) console.log('resolverStatus', resolverStatus) + const { data: interfacesData } = useResolverHasInterfaces({ + resolverAddress: profile?.resolverAddress!, + interfaceNames: ['TextResolver', 'AddressResolver', 'AbiResolver', 'ContentHashResolver'], + enabled: !!profile?.resolverAddress, + }) + const [hasTextInterface, hasAddressInterface, hasAbiInterface, hasContenthashInterface] = + interfacesData || [] + console.log(interfacesData) + // const chainId = useChainId() const handleCreateTransaction = useCallback( @@ -211,21 +223,19 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr const [avatarSrc, setAvatarSrc] = useState() const [avatarFile, setAvatarFile] = useState() + const hasOutdatedKnownResolver = + !resolverStatus.isLoading && + !resolverStatus.data?.hasLatestResolver && + !!resolverStatus.data?.isKnownResolver && + transactions.length === 0 + console.log('hasOutdatedKnownResolver', hasOutdatedKnownResolver, resolverStatus) + const hasNotMigratedProfile = !isProfileLoading && profile?.isMigrated === false + const shouldShowResolverWarning = hasOutdatedKnownResolver || hasNotMigratedProfile useEffect(() => { - if ( - !resolverStatus.isLoading && - !resolverStatus.data?.hasLatestResolver && - transactions.length === 0 - ) { - setView('warning') - } - }, [resolverStatus.isLoading, resolverStatus.data?.hasLatestResolver, transactions.length]) - - useEffect(() => { - if (!isProfileLoading && profile?.isMigrated === false) { + if (shouldShowResolverWarning) { setView('warning') } - }, [isProfileLoading, profile?.isMigrated]) + }, [shouldShowResolverWarning]) const handleDeleteRecord = (record: ProfileRecord, index: number) => { removeRecordAtIndex(index) @@ -237,6 +247,36 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr } const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized + console.log('canEditRecordsWhenWrapped', canEditRecordsWhenWrapped) + + console.log('resolverStatus', resolverStatus.isLoading) + const isLoading_ = isLoading || resolverStatus.isLoading + const [editorState, editorDispatch] = useProfileEditorReducer( + { + profile, + resolverStatus: resolverStatus.data, + isWrapped, + isLoading: isLoading_, + }, + {}, + ) + const view_ = editorState.flow[editorState.currentIndex] + console.log('editorState', editorState.flow[editorState.currentIndex]) + + const shouldInitializeEditorState = !isLoading_ && view_ === 'loading' + useEffect(() => { + if (shouldInitializeEditorState) + editorDispatch({ + type: 'init', + payload: { + profile, + resolverStatus: resolverStatus.data, + isWrapped, + isLoading: isLoading_, + }, + }) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [shouldInitializeEditorState]) if (isLoading || resolverStatus.isLoading || !isRecordsUpdated) return @@ -366,6 +406,10 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr .with('addRecord', () => ( { addRecords(newRecords) setView('editor') diff --git a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts new file mode 100644 index 000000000..fc1561835 --- /dev/null +++ b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts @@ -0,0 +1,108 @@ +import { useReducer } from 'react' +import { match, P } from 'ts-pattern' + +import type { useResolverStatus } from '@app/hooks/resolver/useResolverStatus' +import type { useProfile } from '@app/hooks/useProfile' + +type View = + | 'loading' + | 'migrateRegistry' + | 'noResolver' + | 'resolverNotNameWrapperAware' + | 'editor' + | 'upload' + | 'nft' + | 'addRecord' + +type State = { + flow: View[] + currentIndex: number +} + +type InitialData = { + resolverStatus: ReturnType['data'] + profile: ReturnType['data'] + isWrapped: boolean + isLoading: boolean +} + +const initializer = + (deps: any) => + ({ profile, resolverStatus, isWrapped, isLoading }: InitialData): State => { + const defaultState: State = { + flow: ['loading'], + currentIndex: 0, + } + + console.log('initializer', profile, resolverStatus, isLoading) + + if (isLoading || !profile || !resolverStatus) return defaultState + return match({ + profile, + resolverStatus, + isWrapped, + isLoading, + }) + .with( + { + profile: { isMigrated: false }, + }, + () => ({ ...defaultState, flow: ['migrateRegistry'] }), + ) + .with({ resolverStatus: { hasResolver: false } }, () => ({ + ...defaultState, + flow: ['noResolver'], + })) + .with({ resolverStatus: { isNameWrapperAware: false }, isWrapped: true }, () => ({ + ...defaultState, + flow: ['resolverNotNameWrapperAware'], + })) + .with( + { resolverStatus: { hasValidResolver: false } }, + { + resolverStatus: { isAuthorized: false }, + }, + () => ({ + ...defaultState, + flow: ['invalidResolver'], + }), + ) + .otherwise(() => ({ + ...defaultState, + flow: ['editor'], + })) + } + +type BaseAction = { + type: 'init' | 'increment' | 'decrement' | 'appendViews' + payload?: unknown +} + +type InitAction = BaseAction & { type: 'init'; payload: InitialData } +type IncrementAction = BaseAction & { type: 'increment'; payload: never } +type DecrementAction = BaseAction & { type: 'decrement'; payload: never } +type AppendViewsAction = BaseAction & { type: 'appendViews'; payload: View[] } + +type Action = InitAction | IncrementAction | DecrementAction | AppendViewsAction + +const reducer = (deps: any) => (state: any, action: Action) => { + const { type, payload } = action + switch (type) { + case 'init': + return initializer(deps)(payload) + case 'increment': + if (state.currentIndex >= state.flow.length - 1) return state + return { ...state, currentIndex: state.currentIndex + 1 } + case 'decrement': + if (state.currentIndex <= 0) return state + return { ...state, currentIndex: state.currentIndex - 1 } + case 'appendViews': + return { ...state, flow: [...state.flow, ...(payload as View[])] } + default: + return state + } +} + +export const useProfileEditorReducer = (initialState: InitialData, deps: {}) => { + return useReducer(reducer(deps), initialState, initializer(deps)) +} From 19ffe324123dab09121e03b604a31ae22863d6a5 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Wed, 11 Dec 2024 14:18:21 +0800 Subject: [PATCH 07/22] add legacy resolvers for testing --- deploy/.contracts/CustomResolver.json | 500 ++++++++++++++++++ deploy/.contracts/CustomResolver1.json | 5 + ...extResolver.json => LegacyResolverV1.json} | 0 deploy/.contracts/LegacyResolverV2.json | 170 ++++++ deploy/.contracts/LegacyResolverV3.json | 4 + deploy/.contracts/LegacyResolverV4.json | 4 + deploy/.contracts/LegacyResolverV5.json | 397 ++++++++++++++ deploy/00_deploy_legacy_resolvers.ts | 50 +- e2e/specs/stateless/profileEditor.spec.ts | 113 +++- src/constants/resolverAddressData.ts | 105 ++-- src/hooks/resolver/useResolverStatus.ts | 4 + src/hooks/resolver/useResolverType.ts | 1 + .../ProfileEditor/ProfileEditor-flow.tsx | 208 +++++++- .../hooks/useProfileEditorReducer.ts | 60 ++- .../views/ResolverOutOfDateView.tsx | 6 - .../views/TransferOrResetProfileView.tsx | 18 +- 16 files changed, 1539 insertions(+), 106 deletions(-) create mode 100644 deploy/.contracts/CustomResolver.json create mode 100644 deploy/.contracts/CustomResolver1.json rename deploy/.contracts/{NoTextResolver.json => LegacyResolverV1.json} (100%) create mode 100644 deploy/.contracts/LegacyResolverV2.json create mode 100644 deploy/.contracts/LegacyResolverV3.json create mode 100644 deploy/.contracts/LegacyResolverV4.json create mode 100644 deploy/.contracts/LegacyResolverV5.json diff --git a/deploy/.contracts/CustomResolver.json b/deploy/.contracts/CustomResolver.json new file mode 100644 index 000000000..cc434f5f6 --- /dev/null +++ b/deploy/.contracts/CustomResolver.json @@ -0,0 +1,500 @@ +{ + "abi": [ + { + "inputs": [ + { "internalType": "address[]", "name": "_signers", "type": "address[]" }, + { "internalType": "address", "name": "ens", "type": "address" }, + { "internalType": "address", "name": "nameWrapper", "type": "address" }, + { "internalType": "address", "name": "_fallbackResolver", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "inputs": [], "name": "ECDSAInvalidSignature", "type": "error" }, + { + "inputs": [{ "internalType": "uint256", "name": "length", "type": "uint256" }], + "name": "ECDSAInvalidSignatureLength", + "type": "error" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "s", "type": "bytes32" }], + "name": "ECDSAInvalidSignatureS", + "type": "error" + }, + { + "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": "address", "name": "owner", "type": "address" }], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [{ "internalType": "address", "name": "account", "type": "address" }], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "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": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": false, "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "ContenthashChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": false, "internalType": "address", "name": "newResolver", "type": "address" } + ], + "name": "FallbackResolverSet", + "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": false, "internalType": "string[]", "name": "urls", "type": "string[]" } + ], + "name": "OffchainUrlsChanged", + "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": false, "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": false, "internalType": "uint256", "name": "prevType", "type": "uint256" }, + { "indexed": false, "internalType": "uint256", "name": "newType", "type": "uint256" } + ], + "name": "ResolutionConfigChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "resolutionType", + "type": "uint256" + }, + { "indexed": false, "internalType": "string[]", "name": "urls", "type": "string[]" } + ], + "name": "ResolutionUrlsChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": false, "internalType": "address", "name": "signer", "type": "address" }, + { "indexed": false, "internalType": "bool", "name": "removed", "type": "bool" } + ], + "name": "SignerChanged", + "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" }, + { "indexed": false, "internalType": "string", "name": "value", "type": "string" } + ], + "name": "TextChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": false, "internalType": "uint64", "name": "newVersion", "type": "uint64" } + ], + "name": "VersionChanged", + "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": "clearRecords", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "name": "configs", + "outputs": [ + { "internalType": "bool", "name": "resolveOffchain", "type": "bool" }, + { "internalType": "uint256", "name": "resolutionType", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "contenthash", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "defaultFallbackResolver", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "name": "fallbackResolvers", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "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": "_signers", "type": "address[]" }, + { "internalType": "bool", "name": "remove", "type": "bool" } + ], + "name": "modifyOffchainSigners", + "outputs": [], + "stateMutability": "nonpayable", + "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": "nodehash", "type": "bytes32" }, + { "internalType": "bytes[]", "name": "data", "type": "bytes[]" } + ], + "name": "multicallWithNodeCheck", + "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": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "name": "recordVersions", + "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "name": "resolutionUrls", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "dnsName", "type": "bytes" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "resolve", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes", "name": "response", "type": "bytes" }, + { "internalType": "bytes", "name": "extraData", "type": "bytes" } + ], + "name": "resolveWithProof", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "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": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "setContenthash", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "_fallbackResolver", "type": "address" }], + "name": "setDefaultFallbackResolver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "hash", "type": "bytes32" }, + { "internalType": "bool", "name": "value", "type": "bool" } + ], + "name": "setEmptyResponse", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "fallbackResolver", "type": "address" } + ], + "name": "setFallbackResolver", + "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": "uint256", "name": "newResolutionType", "type": "uint256" } + ], + "name": "setResolutionType", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "resolutionType", "type": "uint256" }, + { "internalType": "string[]", "name": "urls", "type": "string[]" } + ], + "name": "setResolutionUrls", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "resolutionType", "type": "uint256" }, + { "internalType": "bool", "name": "supported", "type": "bool" } + ], + "name": "setSupportedResolutionType", + "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": "bytes4", "name": "interfaceId", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "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": "address", "name": "newOwner", "type": "address" }], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x604060c0815234620002945762003421803803806200001e81620002af565b928339810190608081830312620002945780516001600160401b039190828111620002945781019280601f850112156200029457835193602093851162000299578460051b90848062000073818501620002af565b809881520192820101928311620002945784809101915b8383106200027957509050620000a391508201620002d5565b90620000bf6060620000b7878401620002d5565b9201620002d5565b933315620002615760078054336001600160a01b031980831682179093556000956001600160a01b03958693909284929183167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08a80a3166080521660a052835b87835182101562000194575080846200013c60019386620002ea565b5116865260088752888620805460ff1916831790557f70f1a3dba165402559aaa92407aa69ed152f584fde0bc213bcf1c47acef771b68986620001808488620002ea565b51168151908152888a820152a10162000120565b828589896001858b7f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5638152600b8452600d8282209460ff199585878254161790557f569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd8352838320858782541617905561270f835252818120838582541617905561210581528181208385825416179055600a81522091825416179055169060095416176009555161310b9081620003168239608051818181612342015261270f015260a051816127800152f35b8551631e4fbdf760e01b815260006004820152602490fd5b81906200028684620002d5565b81520191019084906200008a565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b038111838210176200029957604052565b51906001600160a01b03821682036200029457565b8051821015620002ff5760209160051b010190565b634e487b7160e01b600052603260045260246000fdfe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a71461024757806310f13a8c14610242578063124a319c1461023d5780632203ab56146102385780632931570214610233578063304e6ade1461022e578063341e9393146102295780633603d758146102245780633b3b57de1461021f57806359d1d43c1461021a578063623195b014610215578063691f343114610210578063715018a61461020b5780637357c5671461020657806377372213146102015780637d85f6e2146101fc5780638b95dd71146101f75780638da5cb5b146101f25780638ed91c46146101ed5780639061b923146101e8578063a4c28248146101e3578063ac9650d8146101de578063aea9467d146101d9578063b9288916146101d4578063bc1c58d1146101cf578063bd47daa3146101ca578063c315b474146101c5578063ce8f6078146101c0578063d5fa2b00146101bb578063d700ff33146101b6578063e32954eb146101b1578063e59d895d146101ac578063f1cb7e06146101a7578063f2fde38b146101a25763f4d4d2f81461019d57600080fd5b6119c0565b611934565b6118d7565b611813565b6116fe565b6116c9565b6115cb565b611591565b61153a565b61139d565b61134e565b61131a565b6112d3565b6111f1565b611046565b610fdb565b610fb2565b610f89565b610e7f565b610dc9565b610ca1565b610c05565b610b45565b610adb565b610a1c565b6109a1565b610972565b6108c5565b6107bc565b61064a565b6105cc565b610584565b6104da565b6103f4565b61027f565b600435906001600160e01b03198216820361026357565b600080fd5b602435906001600160e01b03198216820361026357565b34610263576020366003190112610263576102ca6001600160e01b03196102a461024c565b16639061b92360e01b81149081156102ce575b5060405190151581529081906020820190565b0390f35b631674750f60e21b8114915081156102e8575b50386102b7565b63691f343160e01b811491508115610302575b50386102e1565b6304928c6760e21b81149150811561031c575b50386102fb565b63bc1c58d160e01b811491508115610336575b5038610315565b631d9dabef60e11b8114915081156103b6575b8115610357575b503861032f565b631101d5ab60e11b811491508115610371575b5038610350565b63d700ff3360e01b81149150811561038b575b503861036a565b634fbf043360e01b8114915081156103a5575b5038610384565b6301ffc9a760e01b1490503861039e565b6378e5bf0360e11b81149150610349565b9181601f84011215610263578235916001600160401b038311610263576020838186019501011161026357565b34610263576060366003190112610263576001600160401b03600435602435828111610263576104289036906004016103c7565b604492919235848111610263576104439036906004016103c7565b91909361044f846126e7565b15610263576104d47f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a1936000978689528860205260408920541688526006602052604088208689526020526104bd818860408b20602060405180928a8a83378a820190815203019020611b40565b6104c78484611c0e565b9660405194859485611c44565b0390a380f35b346102635760403660031901126102635760206105006104f8610268565b600435611ce4565b6040516001600160a01b039091168152f35b919082519283825260005b84811061053e575050826000602080949584010152601f8019910116010190565b60208183018101518483018201520161051d565b90604061056a92603c81528160208201520190610512565b90565b60409061056a939281528160208201520190610512565b34610263576040366003190112610263576105a3602435600435611ecc565b906102ca6040519283928361056d565b8015150361026357565b602435906105ca826105b3565b565b34610263576040366003190112610263576106156024356105ec816105b3565b6105f4612685565b600435600052600d60205260406000209060ff801983541691151516179055565b005b9060406003198301126102635760043591602435906001600160401b03821161026357610646916004016103c7565b9091565b346102635761065836610617565b9091610663816126e7565b1561026357600091818352602093836020526001600160401b03806040862054168552600360205260408520848652602052604085209083116107b7576106b4836106ae835461146a565b83611afb565b8495601f84116001146107295750610706838087987fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d757897989161071e575b508160011b916000199060031b1c19161790565b90555b61071860405192839283612007565b0390a280f35b9050840135386106f2565b601f1984169661073e83600052602060002090565b9187905b89821061079f575050847fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d757896979810610785575b5050600183811b019055610709565b830135600019600386901b60f8161c191690553880610776565b80600184958294958901358155019401920190610742565b610ba6565b34610263576040366003190112610263576004356024356107e46107df836126e7565b612018565b80600052600d60205260ff6040600020541615610874578161086f60016108367ffb370bde575cc90b84f91138780a4144849a157773e7bc467236da4842345e4295600052600c602052604060002090565b01549280600161085085600052600c602052604060002090565b0155604051938493846040919493926060820195825260208201520152565b0390a1005b60405162461bcd60e51b8152602060048201526024808201527f556e737570706f72746564207265736f6c7574696f6e20747970652070726f766044820152631a59195960e21b6064820152608490fd5b34610263576020366003190112610263576004356108e2816126e7565b156102635760009080825281602052604082208054906001600160401b038083169181831461096d577fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db44493826001610718950116906001600160401b03191617905583855284602052604085205416604051918291829190916001600160401b036020820193169052565b612064565b3461026357602036600319011261026357602061050060043561207a565b90602061056a928181520190610512565b3461026357610a06610a0d6102ca6109b836610617565b600094919492808452602095869185835260409586916001600160401b03838320541682526006855282822090825284522083865194859384378201908152030190208251958680926114a4565b0385610bbc565b51928284938452830190610512565b34610263576060366003190112610263576001600160401b0360243560043560443583811161026357610a539036906004016103c7565b610a5c836126e7565b1561026357600019840184811161096d57841661026357610ab491600095848752866020526040872054168652600160205260408620848752602052610aaf856040882090600052602052604060002090565b611f6a565b7faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe38380a380f35b346102635760208060031936011261026357610b2a90610b3160406004356000908082528185526001600160401b038383205416825260058552828220908252845220604051938480926114a4565b0383610bbc565b6102ca604051928284938452830190610512565b3461026357600080600319360112610ba357610b5f612685565b600780546001600160a01b0319811690915581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b038211176107b757604052565b6001600160401b0381116107b75760051b60200190565b6001600160a01b0381160361026357565b34610263576040366003190112610263576004356001600160401b038111610263573660238201121561026357806004013590610c4182610bdd565b90610c4f6040519283610bbc565b8282526020926024602084019160051b8301019136831161026357602401905b828210610c885761061584610c826105bd565b906120f5565b8480918335610c9681610bf4565b815201910190610c6f565b3461026357610caf36610617565b9091610cba816126e7565b1561026357600091818352602093836020526001600160401b03806040862054168552600560205260408520848652602052604085209083116107b757610d05836106ae835461146a565b8495601f8411600114610d565750610706838087987fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f797989161071e57508160011b916000199060031b1c19161790565b601f19841696610d6b83600052602060002090565b9187905b898210610db1575050847fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f796979810610785575050600183811b019055610709565b80600184958294958901358155019401920190610d6f565b3461026357604036600319011261026357610615602435610de9816105b3565b610df1612685565b600435600052600b60205260406000209060ff801983541691151516179055565b6001600160401b0381116107b757601f01601f191660200190565b929192610e3982610e12565b91610e476040519384610bbc565b829481845281830111610263578281602093846000960137010152565b9080601f830112156102635781602061056a93359101610e2d565b34610263576060366003190112610263576001600160401b0360243560043560443583811161026357610eb6903690600401610e64565b90610ec0816126e7565b1561026357610f439281610f3e927f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75260405180610efe88878361056d565b0390a2603c8214610f46575b6000958187528660205260408720541686526002602052604086209086526020526040852090600052602052604060002090565b612247565b80f35b807f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd26020610f7387612805565b6040516001600160a01b039091168152a2610f0a565b34610263576000366003190112610263576007546040516001600160a01b039091168152602090f35b34610263576000366003190112610263576009546040516001600160a01b039091168152602090f35b34610263576040366003190112610263576001600160401b036004358181116102635761100c903690600401610e64565b90602435908111610263576102ca9161102c611032923690600401610e64565b90612310565b604051918291602083526020830190610512565b346102635760403660031901126102635760043560243561106681610bf4565b6110726107df836126e7565b6000828152600a60205260409020546001600160a01b0382811691161461110d57816110ec826110cd7f90e6a2cff4e717c36e6aa27f1da038ed159ffb4bb9a028ac97b4e706c156562795600052600a602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b604080519182526001600160a01b039092166020820152908190810161086f565b60405162461bcd60e51b815260206004820152602260248201527f53616d652066616c6c6261636b207265736f6c76657220616c72656164792073604482015261195d60f21b6064820152608490fd5b9181601f84011215610263578235916001600160401b038311610263576020808501948460051b01011161026357565b6020808201906020835283518092526040830192602060408460051b8301019501936000915b8483106111c35750505050505090565b90919293949584806111e1600193603f198682030187528a51610512565b98019301930191949392906111b3565b3461026357602080600319360112610263576004356001600160401b0381116102635761122290369060040161115d565b9161122c83610bdd565b9260409161123d6040519586610bbc565b818552601f1961124c83610bdd565b0160005b8181106112c45750505060005b81811061127257604051806102ca878261118d565b806000806112836001948689612b28565b90611292885180938193611ad6565b0390305af46112a86112a2611c8e565b91611acf565b6112b28288612233565b526112bd8187612233565b500161125d565b60608782018401528201611250565b34610263576020366003190112610263576004356112f081610bf4565b6112f8612685565b600980546001600160a01b0319166001600160a01b0392909216919091179055005b3461026357602036600319011261026357600435600052600a602052602060018060a01b0360406000205416604051908152f35b346102635760208060031936011261026357610b2a90610b3160406004356000908082528185526001600160401b038383205416825260038552828220908252845220604051938480926114a4565b34610263576040366003190112610263576001600160401b03602480358281116102635736602382011215610263578060040135916113db83610bdd565b926113e96040519485610bbc565b8084526020946024602086019260051b850101933685116102635760248101925b85841061141d57610615876004356123ef565b8335838111610263578201366043820112156102635788916114498392369060448a8201359101610e2d565b81520193019261140a565b634e487b7160e01b600052603260045260246000fd5b90600182811c9216801561149a575b602083101461148457565b634e487b7160e01b600052602260045260246000fd5b91607f1691611479565b8054600093926114b38261146a565b9182825260209360019160018116908160001461151b57506001146114da575b5050505050565b90939495506000929192528360002092846000945b838610611507575050505001019038808080806114d3565b8054858701830152940193859082016114ef565b60ff19168685015250505090151560051b0101915038808080806114d3565b34610263576040366003190112610263576024356000906004358252600e60205260408220805482101561158d5761158691602084611032936102ca96522001604051928380926114a4565b0382610bbc565b8280fd5b3461026357602036600319011261026357600435600052600c602052604080600020600160ff825416910154825191151582526020820152f35b346102635760408060031936011261026357600435906024356115ed81610bf4565b6115f6836126e7565b1561026357611603612c00565b9060601b6020820152611615836126e7565b1561026357610f3e82847f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752610f439551806116508782610552565b0390a2847f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2602061168086612805565b84516001600160a01b039091168152a2600094808652856020526001600160401b038287205416865260026020528186209086526020528420603c600052602052604060002090565b3461026357602036600319011261026357600435600052600060205260206001600160401b0360406000205416604051908152f35b3461026357604080600319360112610263576004356024356001600160401b0381116102635761173290369060040161115d565b61173e81949294610bdd565b9361174c6040519586610bbc565b818552601f1961175b83610bdd565b0160005b8181106118025750508315159360005b83811061178457604051806102ca898261118d565b600190866117d6575b60008061179b838888612b28565b906117aa8a5180938193611ad6565b0390305af46117ba6112a2611c8e565b6117c4828a612233565b526117cf8189612233565b500161176f565b6117fd836117f76117f16117eb858a8a612b28565b90612b69565b90612b7a565b14612b97565b61178d565b806060602080938a0101520161175f565b346102635760603660031901126102635760043561182f610268565b906044359061183d82610bf4565b611846816126e7565b15610263577f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa60206000948386528582526001600160401b036040872054168652600482526040862084875282526118b8856110cd8360408a209063ffffffff60e01b16600052602052604060002090565b6040516001600160a01b0390951685526001600160e01b03191693a380f35b346102635760408060031936011261026357610a06906102ca60043591610a0d8160008581526020958187526001600160401b038383205416825260028752828220908252865281812060243582528652208251958680926114a4565b346102635760203660031901126102635760043561195181610bf4565b611959612685565b6001600160a01b039081169081156119a757600780546001600160a01b031981168417909155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b604051631e4fbdf760e01b815260006004820152602490fd5b34610263576040366003190112610263576001600160401b03600435818111610263576119f19036906004016103c7565b9060243583811161026357611a0a9036906004016103c7565b9390928201906060838303126102635782358181116102635782611a2f918501610e64565b9360208401359180831691828403610263576040860135918211610263576102ca97611a8f88611ab796611a7e611a9495611a75611abe9b611a9d99611ac39e01610e64565b95810190612c5c565b9091906001600160a01b0316612ec5565b612f42565b91421115612c92565b6001600160a01b0316600090815260086020526040902090565b5460ff1690565b612639565b60405191829182610990565b1561026357565b908092918237016000815290565b818110611aef575050565b60008155600101611ae4565b9190601f8111611b0a57505050565b6105ca926000526020600020906020601f840160051c83019310611b36575b601f0160051c0190611ae4565b9091508190611b29565b9092916001600160401b0381116107b757611b6581611b5f845461146a565b84611afb565b6000601f8211600114611ba6578190611b97939495600092611b9b575b50508160011b916000199060031b1c19161790565b9055565b013590503880611b82565b601f19821694611bbb84600052602060002090565b91805b878110611bf6575083600195969710611bdc575b505050811b019055565b0135600019600384901b60f8161c19169055388080611bd2565b90926020600181928686013581550194019101611bbe565b81604051928392833781016000815203902090565b908060209392818452848401376000828201840152601f01601f1916010190565b9290611c5d9061056a9593604086526040860191611c23565b926020818503910152611c23565b60405190602082018281106001600160401b038211176107b75760405260008252565b3d15611cb9573d90611c9f82610e12565b91611cad6040519384610bbc565b82523d6000602084013e565b606090565b8051601f1015611cce57603f0190565b611454565b908151811015611cce570160200190565b90611d64611d5782611d3f85611d30611d17611d0a836000526000602052604060002090565b546001600160401b031690565b6001600160401b03166000526004602052604060002090565b90600052602052604060002090565b9063ffffffff60e01b16600052602052604060002090565b546001600160a01b031690565b6001600160a01b039290838116611ec55750611d82611d8e9161207a565b6001600160a01b031690565b91821615611ebe576040516301ffc9a760e01b6020820181815260248084018390528352929091601f199190611dc5604482610bbc565b6000809581925190885afa611dd8611c8e565b9015908115611eb1575b8115611e91575b50611e8957604051602081019384526001600160e01b03199190911660248201526044918201815283928392909190611e229082610bbc565b5190855afa611e2f611c8e565b9015908115611e7c575b8115611e4e575b50611e49575090565b905090565b6001600160f81b03199150611e7490611e6690611cbe565b516001600160f81b03191690565b161538611e40565b9050602081511090611e39565b505050905090565b6001600160f81b03199150611ea990611e6690611cbe565b161538611de9565b9050602081511090611de2565b5050600090565b9250505090565b91906000928084526020846020526040906001600160401b038287205416865260019260016020528287209087526020528186209060015b85811115611f1a5750505050505061056a611c6b565b858116151580611f50575b611f3057841b611f04565b808852919052948190209051925061056a915082906115869082906114a4565b50808852828252611f638489205461146a565b1515611f25565b9092916001600160401b0381116107b757611f8981611b5f845461146a565b6000601f8211600114611fba578190611b97939495600092611b9b5750508160011b916000199060031b1c19161790565b601f19821694611fcf84600052602060002090565b91805b878110611fef575083600195969710611bdc57505050811b019055565b90926020600181928686013581550194019101611fd2565b91602061056a938181520191611c23565b1561201f57565b60405162461bcd60e51b815260206004820152601d60248201527f4e6f207065726d697373696f6e7320746f206d6f64696679206e616d650000006044820152606490fd5b634e487b7160e01b600052601160045260246000fd5b600090808252816020526001600160401b03604083205416825260026020526040822090825260205260408120603c82526020526115866120c460408320604051928380926114a4565b8051156120d55761056a9150612805565b5090565b60001981019190821161096d57565b9190820391821161096d57565b91906120ff612685565b60005b835181101561222d57600190821561219a5761213e612134611a9d6121278489612233565b516001600160a01b031690565b805460ff19169055565b7f70f1a3dba165402559aaa92407aa69ed152f584fde0bc213bcf1c47acef771b661219061216f6121278489612233565b604080516001600160a01b0390921682526001602083015290918291820190565b0390a15b01612102565b6121c9828060a01b036121ad8388612233565b51166001600160a01b0316600090815260086020526040902090565b805460ff1916831790557f70f1a3dba165402559aaa92407aa69ed152f584fde0bc213bcf1c47acef771b66122256122046121278489612233565b604080516001600160a01b0390921682526000602083015290918291820190565b0390a1612194565b50509050565b8051821015611cce5760209160051b010190565b91909182516001600160401b0381116107b75761226881611b5f845461146a565b602080601f83116001146122a657508190611b9793949560009261229b5750508160011b916000199060031b1c19161790565b015190503880611b82565b90601f198316956122bc85600052602060002090565b926000905b8882106122f8575050836001959697106122df57505050811b019055565b015160001960f88460031b161c19169055388080611bd2565b806001859682949686015181550195019301906122c1565b909161231d600083612864565b604051630178b8bf60e01b8152600481018290526001600160a01b03906020816024817f000000000000000000000000000000000000000000000000000000000000000086165afa9081156123ea576000916123bb575b5016151580612396575b612389575050612a59565b61056a92509290926129cb565b506123b660ff6123b083600052600c602052604060002090565b54161590565b61237e565b6123dd915060203d6020116123e3575b6123d58183610bbc565b8101906126b1565b38612374565b503d6123cb565b6126c6565b91906123f9612685565b6000928084526020600e6020526040852094835191600160401b83116107b757865483885580841061249f575b5061243d6020869893980192600052602060002090565b96915b83831061248357505050507f0df0b0cbb9f439eba06faac70607df7d7c1ec883582b7501d2e73b28e5262ffc92935061247e60405192839283612622565b0390a1565b600182826124938394518c612520565b01980192019196612440565b878352836020842091820191015b8181106124ba5750612426565b806124c76001925461146a565b806124d4575b50016124ad565b601f9081811184146124ec5750508481555b386124cd565b8361250e9261250085600052602060002090565b920160051c82019101611ae4565b600081815260208120818355556124e6565b91909182516001600160401b0381116107b75761254181611b5f845461146a565b602080601f831160011461257457508190611b9793949560009261229b5750508160011b916000199060031b1c19161790565b90601f1983169561258a85600052602060002090565b926000905b8882106125ad575050836001959697106122df57505050811b019055565b8060018596829496860151815501950193019061258f565b90808251908181526020809101926020808460051b8301019501936000915b8483106125f45750505050505090565b9091929394958480612612600193601f198682030187528a51610512565b98019301930191949392906125e4565b60409061056a9392815281602082015201906125c5565b1561264057565b60405162461bcd60e51b815260206004820152601c60248201527f5369676e61747572653a20496e76616c6964207369676e6174757265000000006044820152606490fd5b6007546001600160a01b0316330361269957565b60405163118cdaa760e01b8152336004820152602490fd5b90816020910312610263575161056a81610bf4565b6040513d6000823e3d90fd5b90816020910312610263575161056a816105b3565b6040516302571be360e01b8152600481018290526001600160a01b03919060209081816024817f000000000000000000000000000000000000000000000000000000000000000088165afa9081156123ea576000916127e8575b5083163314918215612755575b5050905090565b6040516341415eab60e01b8152600481019190915233602482015290929091508290829060449082907f0000000000000000000000000000000000000000000000000000000000000000165afa9182156123ea576000926127bb575b505080388061274e565b6127da9250803d106127e1575b6127d28183610bbc565b8101906126d2565b38806127b1565b503d6127c8565b6127ff9150823d84116123e3576123d58183610bbc565b38612741565b6014815103610263576020015160601c90565b1561281f57565b60405162461bcd60e51b815260206004820152601d60248201527f6e616d65686173683a204a756e6b20617420656e64206f66206e616d650000006044820152606490fd5b9081518110156129235761289561288f6001600160f81b03196128878486611cd3565b511660f81c90565b60ff1690565b908115612915576128c26128bd6128b5846128af85612cea565b87612f58565b935b83612cf8565b612cea565b9082156128fa57506128d49192612864565b6040805160208101928352808201939093528252906128f4606082610bbc565b51902090565b91505061290a61291092516120d9565b14612818565b600090565b6128c26128bd6000936128b7565b60405162461bcd60e51b815260206004820152601e60248201527f726561644c6162656c3a20496e646578206f7574206f6620626f756e647300006044820152606490fd5b1561296f57565b60405162461bcd60e51b815260206004820152602e60248201527f436f756c64206e6f74207175657279207468652066616c6c6261636b2072657360448201526d1bdb1d995c8818dbdb9d1c9858dd60921b6064820152608490fd5b9060208101906000918280835183305afa936129e5611c8e565b9480612a3c575b612a35578352600a602052604083205492935083926001600160a01b0390811680612a2d575060095416915b51915afa61056a612a27611c8e565b91612968565b905091612a18565b5050505090565b50845160208601208452600b60205260ff604085205416156129ec565b90612a6382612d05565b8015612b1f575b600052602091600e6020526040926040600020805491612a8983610bdd565b95612a976040519788610bbc565b83875260208701926000526020600020906000935b858510612afc578888888251612de45760405162461bcd60e51b8152602060048201526018602482015277139bc81c995cdbdd5b1d1a5bdb881d5c9b1cc8199bdd5b9960421b6044820152606490fd5b60018481928451612b1181611586818a6114a4565b815201930194019391612aac565b5061270f612a6a565b9190811015611cce5760051b81013590601e19813603018212156102635701908135916001600160401b038311610263576020018236038113610263579190565b906024116102635760040190602090565b359060208110612b88575090565b6000199060200360031b1b1690565b15612b9e57565b60405162461bcd60e51b815260206004820152603460248201527f6d756c746963616c6c3a20416c6c207265636f726473206d7573742068617665604482015273040c240dac2e8c6d0d2dcce40dcc2dacad0c2e6d60631b6064820152608490fd5b60405190604082018281106001600160401b038211176107b7576040526014825260203681840137565b90612c3482610e12565b612c416040519182610bbc565b8281528092612c52601f1991610e12565b0190602036910137565b91906040838203126102635782356001600160401b03811161026357602091612c86918501610e64565b92013561056a81610bf4565b15612c9957565b60405162461bcd60e51b8152602060048201526024808201527f5369676e617475726556657269666965723a205369676e6174757265206578706044820152631a5c995960e21b6064820152608490fd5b906001820180921161096d57565b9190820180921161096d57565b600090612d128282612864565b805b612d1d57505090565b808352602091600c8352600192836040862001541515600014612d57575050612d52919250600052600c602052604060002090565b015490565b90809392505115611cce57612d72849184015160f81c612cea565b91612d86612d818486516120e8565b612c2a565b9282825b612da1575b505050612d9b91612864565b80612d14565b9091928451821015612dde57508281612dc7611e66612dc1849587612cf8565b89611cd3565b881a612dd38288611cd3565b530186939291612d8a565b92612d8f565b612e1b612e919392612ea4612ec193612e2d6040938451958693639061b92360e01b60208601528660248601526064850190610512565b83810360231901604485015290610512565b0391612e41601f1993848101865285610bbc565b612e6c81519382602086015284612e5b6060820188610512565b308583015203908101855284610bbc565b51630556f18360e41b815230600482015260a0602482015295869560a48701906125c5565b6003199384878303016044880152610512565b631e9a9a5f60e31b60648601528481039092016084850152610512565b0390fd5b92909160208151910120906020815191012090604051926020840194601960f81b86526bffffffffffffffffffffffff199060601b1660228501526001600160401b0360c01b9060c01b166036840152603e830152605e820152605e8152608081018181106001600160401b038211176107b75760405251902090565b61056a91612f4f91612f72565b90929192612fce565b9082810180821161096d5782511061026357016020012090565b8151919060418303612fa357612f9c92506020820151906060604084015193015160001a9061305b565b9192909190565b505060009160029190565b60041115612fb857565b634e487b7160e01b600052602160045260246000fd5b612fd781612fae565b80612fe0575050565b612fe981612fae565b600181036130035760405163f645eedf60e01b8152600490fd5b61300c81612fae565b6002810361302d5760405163fce698f760e01b815260048101839052602490fd5b80613039600392612fae565b146130415750565b6040516335e2f38360e21b81526004810191909152602490fd5b91906fa2a8918ca85bafe22016d0b997e4df60600160ff1b0384116130c957926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa156123ea5780516001600160a01b038116156130c057918190565b50809160019190565b5050506000916003919056fea2646970667358221220fc06b184e314ff943d6c11b9e3d1cabe7bdfd0b88e4e8e5da353c804e0cab27d64736f6c63430008180033000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e000000000000000000000000d4416b13d2b3a9abae7acd5d6c2bbdbe25686401000000000000000000000000231b0ee14048e9dccd1d247744d114a4eb5e8e630000000000000000000000000000000000000000000000000000000000000001000000000000000000000000740bdb3d297f951ad44bef7216ddd2cda339940b" +} diff --git a/deploy/.contracts/CustomResolver1.json b/deploy/.contracts/CustomResolver1.json new file mode 100644 index 000000000..95018fa86 --- /dev/null +++ b/deploy/.contracts/CustomResolver1.json @@ -0,0 +1,5 @@ +{ + "abi": [{"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":false,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":true,"internalType":"bool","name":"approved","type":"bool"}],"name":"Approved","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"},{"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"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"TextChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"uint64","name":"newVersion","type":"uint64"}],"name":"VersionChanged","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"},{"internalType":"address","name":"delegate","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearRecords","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":"owner","type":"address"},{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"delegate","type":"address"}],"name":"isApprovedFor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"nodehash","type":"bytes32"},{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicallWithNodeCheck","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":"","type":"bytes32"}],"name":"recordVersions","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"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":"view","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"}], + "bytecode": "0x6101006040523480156200001257600080fd5b50604051620032943803806200329483398101604081905262000035916200017a565b6040516302571be360e01b81527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e26004820152849033906000906001600160a01b038416906302571be390602401602060405180830381865afa158015620000a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c79190620001e2565b604051630f41a04d60e11b81526001600160a01b03848116600483015291925090821690631e83409a906024016020604051808303816000875af115801562000114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013a919062000209565b5050506001600160a01b039485166080525091831660a052821660c0521660e05262000223565b6001600160a01b03811681146200017757600080fd5b50565b600080600080608085870312156200019157600080fd5b84516200019e8162000161565b6020860151909450620001b18162000161565b6040860151909350620001c48162000161565b6060860151909250620001d78162000161565b939692955090935050565b600060208284031215620001f557600080fd5b8151620002028162000161565b9392505050565b6000602082840312156200021c57600080fd5b5051919050565b60805160a05160c05160e0516130306200026460003960006117d7015260006117a50152600081816118af01526119150152600061183801526130306000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638b95dd7111610104578063c8690233116100a2578063e32954eb11610071578063e32954eb14610504578063e59d895d14610517578063e985e9c51461052a578063f1cb7e061461056657600080fd5b8063c869023314610442578063ce3decdc1461049b578063d5fa2b00146104ae578063d700ff33146104c157600080fd5b8063a8fa5682116100de578063a8fa5682146103b8578063a9784b3e146103cb578063ac9650d81461040f578063bc1c58d11461042f57600080fd5b80638b95dd711461037f578063a22cb46514610392578063a4b91a01146103a557600080fd5b80633603d7581161017c5780635c98042b1161014b5780635c98042b14610333578063623195b014610346578063691f343114610359578063773722131461036c57600080fd5b80633603d758146102a15780633b3b57de146102b45780634cbf6ba4146102c757806359d1d43c1461031357600080fd5b8063124a319c116101b8578063124a319c1461022f5780632203ab561461025a57806329cd62ea1461027b578063304e6ade1461028e57600080fd5b806301ffc9a7146101df5780630af179d71461020757806310f13a8c1461021c575b600080fd5b6101f26101ed366004612529565b610579565b60405190151581526020015b60405180910390f35b61021a610215366004612586565b61058a565b005b61021a61022a3660046125d2565b610794565b61024261023d36600461264c565b610861565b6040516001600160a01b0390911681526020016101fe565b61026d610268366004612678565b610b0d565b6040516101fe9291906126ea565b61021a610289366004612703565b610c44565b61021a61029c366004612586565b610cdf565b61021a6102af36600461272f565b610d5b565b6102426102c236600461272f565b610dfe565b6101f26102d5366004612678565b6000828152602081815260408083205467ffffffffffffffff1683526006825280832094835293815283822092825291909152205461ffff16151590565b610326610321366004612586565b610e30565b6040516101fe9190612748565b61032661034136600461272f565b610f10565b61021a61035436600461275b565b610fcf565b61032661036736600461272f565b61106c565b61021a61037a366004612586565b6110a6565b61021a61038d3660046127c4565b611122565b61021a6103a03660046128ad565b611202565b61021a6103b33660046128d9565b6112f1565b6103266103c6366004612917565b6113be565b6101f26103d9366004612957565b6001600160a01b039283166000908152600c60209081526040808320948352938152838220929094168152925290205460ff1690565b61042261041d3660046129d3565b61140c565b6040516101fe9190612a15565b61032661043d36600461272f565b61141a565b61048661045036600461272f565b6000818152602081815260408083205467ffffffffffffffff168352600982528083209383529290522080546001909101549091565b604080519283526020830191909152016101fe565b61021a6104a9366004612586565b611454565b61021a6104bc366004612a77565b611597565b6104eb6104cf36600461272f565b60006020819052908152604090205467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101fe565b610422610512366004612aa7565b6115be565b61021a610525366004612ae6565b6115d3565b6101f2610538366004612b1b565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b610326610574366004612678565b611692565b60006105848261175a565b92915050565b8261059481611798565b61059d57600080fd5b600084815260208181526040808320548151601f870184900484028101840190925285825283926060928392859267ffffffffffffffff9091169183916106039183918d908d908190840183828082843760009201919091525092939250506119ff9050565b90505b8051516020820151101561072d578661ffff1660000361066b578060400151965061063081611a60565b9450846040516020016106439190612b49565b60405160208183030381529060405280519060200120925061066481611a81565b935061071f565b600061067682611a60565b9050816040015161ffff168861ffff1614158061069a57506106988682611a9d565b155b1561071d576106f68c878a8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505060208801518d91506106ed908290612b7b565b8b51158a611abb565b81604001519750816020015196508095508580519060200120935061071a82611a81565b94505b505b61072881611d28565b610606565b50835115610788576107888a85888c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061077f91508290508f612b7b565b89511588611abb565b50505050505050505050565b8461079e81611798565b6107a757600080fd5b6000868152602081815260408083205467ffffffffffffffff168352600a8252808320898452909152908190209051849184916107e79089908990612b8e565b90815260200160405180910390209182610802929190612c26565b508484604051610813929190612b8e565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a1878787876040516108519493929190612d0f565b60405180910390a3505050505050565b6000828152602081815260408083205467ffffffffffffffff1683526007825280832085845282528083206001600160e01b0319851684529091528120546001600160a01b031680156108b5579050610584565b60006108c085610dfe565b90506001600160a01b0381166108db57600092505050610584565b6040516301ffc9a760e01b602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b179052516109489190612b49565b600060405180830381855afa9150503d8060008114610983576040519150601f19603f3d011682016040523d82523d6000602084013e610988565b606091505b509150915081158061099b575060208151105b806109dd575080601f815181106109b4576109b4612d41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b156109ef576000945050505050610584565b6040516001600160e01b0319871660248201526001600160a01b0384169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b17905251610a5a9190612b49565b600060405180830381855afa9150503d8060008114610a95576040519150601f19603f3d011682016040523d82523d6000602084013e610a9a565b606091505b509092509050811580610aae575060208151105b80610af0575080601f81518110610ac757610ac7612d41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b15610b02576000945050505050610584565b509095945050505050565b6000828152602081815260408083205467ffffffffffffffff168352600180835281842086855290925282206060915b848111610c245780851615801590610b6d575060008181526020839052604081208054610b6990612b9e565b9050115b15610c1c5780826000838152602001908152602001600020808054610b9190612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612b9e565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b50505050509050935093505050610c3d565b60011b610b3d565b5060006040518060200160405280600081525092509250505b9250929050565b82610c4e81611798565b610c5757600080fd5b604080518082018252848152602080820185815260008881528083528481205467ffffffffffffffff1681526009835284812089825283528490209251835551600190920191909155815185815290810184905285917f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e4691015b60405180910390a250505050565b82610ce981611798565b610cf257600080fd5b6000848152602081815260408083205467ffffffffffffffff168352600382528083208784529091529020610d28838583612c26565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d75788484604051610cd1929190612d57565b80610d6581611798565b610d6e57600080fd5b6000828152602081905260408120805467ffffffffffffffff1691610d9283612d6b565b82546101009290920a67ffffffffffffffff818102199093169183160217909155600084815260208181526040918290205491519190921681528492507fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db444910160405180910390a25050565b600080610e0c83603c611692565b90508051600003610e205750600092915050565b610e2981611e10565b9392505050565b6000838152602081815260408083205467ffffffffffffffff168352600a825280832086845290915290819020905160609190610e709085908590612b8e565b90815260200160405180910390208054610e8990612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb590612b9e565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b505050505090509392505050565b6000818152602081815260408083205467ffffffffffffffff168352600482528083208484529091529020805460609190610f4a90612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7690612b9e565b8015610fc35780601f10610f9857610100808354040283529160200191610fc3565b820191906000526020600020905b815481529060010190602001808311610fa657829003601f168201915b50505050509050919050565b83610fd981611798565b610fe257600080fd5b83610fee600182612b7b565b1615610ff957600080fd5b6000858152602081815260408083205467ffffffffffffffff1683526001825280832088845282528083208784529091529020611037838583612c26565b50604051849086907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35050505050565b6000818152602081815260408083205467ffffffffffffffff168352600882528083208484529091529020805460609190610f4a90612b9e565b826110b081611798565b6110b957600080fd5b6000848152602081815260408083205467ffffffffffffffff1683526008825280832087845290915290206110ef838583612c26565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051610cd1929190612d57565b8261112c81611798565b61113557600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040516111679291906126ea565b60405180910390a2603c83036111be57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd26111a284611e10565b6040516001600160a01b03909116815260200160405180910390a25b6000848152602081815260408083205467ffffffffffffffff16835260028252808320878452825280832086845290915290206111fb8382612d92565b5050505050565b6001600160a01b03821633036112855760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03821633036113495760405162461bcd60e51b815260206004820181905260248201527f53657474696e672064656c65676174652073746174757320666f722073656c66604482015260640161127c565b336000818152600c6020908152604080832087845282528083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519384529286917ff0ddb3b04746704017f9aa8bd728fcc2c1d11675041205350018915f5e4750a0910160405180910390a4505050565b6000838152602081815260408083205467ffffffffffffffff168352600582528083208684528252808320858452825280832061ffff851684529091529020805460609190610e8990612b9e565b6060610e2960008484611e38565b6000818152602081815260408083205467ffffffffffffffff168352600382528083208484529091529020805460609190610f4a90612b9e565b8261145e81611798565b61146757600080fd5b6000848152602081815260408083205467ffffffffffffffff1680845260048352818420888552909252822080549192916114a190612b9e565b80601f01602080910402602001604051908101604052809291908181526020018280546114cd90612b9e565b801561151a5780601f106114ef5761010080835404028352916020019161151a565b820191906000526020600020905b8154815290600101906020018083116114fd57829003601f168201915b5050505067ffffffffffffffff841660009081526004602090815260408083208b845290915290209192506115529050858783612c26565b50857f8f15ed4b723ef428f250961da8315675b507046737e19319fc1a4d81bfe87f8582878760405161158793929190612e52565b60405180910390a2505050505050565b816115a181611798565b6115aa57600080fd5b6115b983603c61038d85612011565b505050565b60606115cb848484611e38565b949350505050565b826115dd81611798565b6115e657600080fd5b6000848152602081815260408083205467ffffffffffffffff1683526007825280832087845282528083206001600160e01b031987168085529083529281902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038716908117909155905190815286917f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa910160405180910390a350505050565b6000828152602081815260408083205467ffffffffffffffff16835260028252808320858452825280832084845290915290208054606091906116d490612b9e565b80601f016020809104026020016040519081016040528092919081815260200182805461170090612b9e565b801561174d5780601f106117225761010080835404028352916020019161174d565b820191906000526020600020905b81548152906001019060200180831161173057829003601f168201915b5050505050905092915050565b60006001600160e01b031982167f59d1d43c00000000000000000000000000000000000000000000000000000000148061058457506105848261204a565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117f95750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561180657506001919050565b6040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906302571be390602401602060405180830381865afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab9190612e82565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03160361198b576040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015611964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119889190612e82565b90505b6001600160a01b0381163314806119c557506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff165b80610e2957506001600160a01b0381166000908152600c60209081526040808320868452825280832033845290915290205460ff16610e29565b611a4d6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b82815260c0810182905261058481611d28565b6020810151815160609161058491611a789082612088565b845191906120e2565b60a081015160c082015160609161058491611a78908290612b7b565b600081518351148015610e295750610e298360008460008751612159565b865160208801206000611acf8787876120e2565b90508315611bf95767ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c16845290915290208054611b1a90612b9e565b159050611b795767ffffffffffffffff831660009081526006602090815260408083208d845282528083208584529091528120805461ffff1691611b5d83612e9f565b91906101000a81548161ffff021916908361ffff160217905550505b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c1684529091528120611bba916124b6565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a604051611bec929190612ebd565b60405180910390a2610788565b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c16845290915290208054611c3c90612b9e565b9050600003611c9d5767ffffffffffffffff831660009081526006602090815260408083208d845282528083208584529091528120805461ffff1691611c8183612ee3565b91906101000a81548161ffff021916908361ffff160217905550505b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c1684529091529020611cdf8282612d92565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a84604051611d1493929190612efa565b60405180910390a250505050505050505050565b60c08101516020820181905281515111611d3f5750565b6000611d5382600001518360200151612088565b8260200151611d629190612f29565b8251909150611d71908261217c565b61ffff166040830152611d85600282612f29565b8251909150611d94908261217c565b61ffff166060830152611da8600282612f29565b8251909150611db790826121a4565b63ffffffff166080830152611dcd600482612f29565b8251909150600090611ddf908361217c565b61ffff169050611df0600283612f29565b60a084018190529150611e038183612f29565b60c0909301929092525050565b60008151601414611e2057600080fd5b50602001516c01000000000000000000000000900490565b60608167ffffffffffffffff811115611e5357611e536127ae565b604051908082528060200260200182016040528015611e8657816020015b6060815260200190600190039081611e715790505b50905060005b82811015612009578415611f51576000848483818110611eae57611eae612d41565b9050602002810190611ec09190612f3c565b611ecf91602491600491612f83565b611ed891612fad565b9050858114611f4f5760405162461bcd60e51b815260206004820152603460248201527f6d756c746963616c6c3a20416c6c207265636f726473206d757374206861766560448201527f2061206d61746368696e67206e616d6568617368000000000000000000000000606482015260840161127c565b505b60008030868685818110611f6757611f67612d41565b9050602002810190611f799190612f3c565b604051611f87929190612b8e565b600060405180830381855af49150503d8060008114611fc2576040519150601f19603f3d011682016040523d82523d6000602084013e611fc7565b606091505b509150915081611fd657600080fd5b80848481518110611fe957611fe9612d41565b60200260200101819052505050808061200190612fcb565b915050611e8c565b509392505050565b6040805160148082528183019092526060916020820181803683375050506c010000000000000000000000009290920260208301525090565b60006001600160e01b031982167fc86902330000000000000000000000000000000000000000000000000000000014806105845750610584826121ce565b6000815b8351811061209c5761209c612fe4565b60006120a8858361220c565b60ff1690506120b8816001612f29565b6120c29083612f29565b9150806000036120d257506120d8565b5061208c565b6115cb8382612b7b565b82516060906120f18385612f29565b11156120fc57600080fd5b60008267ffffffffffffffff811115612117576121176127ae565b6040519080825280601f01601f191660200182016040528015612141576020820181803683370190505b50905060208082019086860101610b02828287612230565b6000612166848484612286565b612171878785612286565b149695505050505050565b815160009061218c836002612f29565b111561219757600080fd5b50016002015161ffff1690565b81516000906121b4836004612f29565b11156121bf57600080fd5b50016004015163ffffffff1690565b60006001600160e01b031982167f691f34310000000000000000000000000000000000000000000000000000000014806105845750610584826122aa565b600082828151811061222057612220612d41565b016020015160f81c905092915050565b602081106122685781518352612247602084612f29565b9250612254602083612f29565b9150612261602082612b7b565b9050612230565b905182516020929092036101000a6000190180199091169116179052565b82516000906122958385612f29565b11156122a057600080fd5b5091016020012090565b60006001600160e01b031982167f124a319c00000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167fa8fa568200000000000000000000000000000000000000000000000000000000148061234657506001600160e01b031982167f5c98042b00000000000000000000000000000000000000000000000000000000145b8061058457506105848260006001600160e01b031982167fbc1c58d100000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806123ec57506001600160e01b031982167ff1cb7e0600000000000000000000000000000000000000000000000000000000145b8061058457506105848260006001600160e01b031982167f2203ab5600000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167fd700ff3300000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167f4fbf043300000000000000000000000000000000000000000000000000000000148061058457506301ffc9a760e01b6001600160e01b0319831614610584565b5080546124c290612b9e565b6000825580601f106124d2575050565b601f0160209004906000526020600020908101906124f091906124f3565b50565b5b8082111561250857600081556001016124f4565b5090565b80356001600160e01b03198116811461252457600080fd5b919050565b60006020828403121561253b57600080fd5b610e298261250c565b60008083601f84011261255657600080fd5b50813567ffffffffffffffff81111561256e57600080fd5b602083019150836020828501011115610c3d57600080fd5b60008060006040848603121561259b57600080fd5b83359250602084013567ffffffffffffffff8111156125b957600080fd5b6125c586828701612544565b9497909650939450505050565b6000806000806000606086880312156125ea57600080fd5b85359450602086013567ffffffffffffffff8082111561260957600080fd5b61261589838a01612544565b9096509450604088013591508082111561262e57600080fd5b5061263b88828901612544565b969995985093965092949392505050565b6000806040838503121561265f57600080fd5b8235915061266f6020840161250c565b90509250929050565b6000806040838503121561268b57600080fd5b50508035926020909101359150565b60005b838110156126b557818101518382015260200161269d565b50506000910152565b600081518084526126d681602086016020860161269a565b601f01601f19169290920160200192915050565b8281526040602082015260006115cb60408301846126be565b60008060006060848603121561271857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561274157600080fd5b5035919050565b602081526000610e2960208301846126be565b6000806000806060858703121561277157600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561279657600080fd5b6127a287828801612544565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156127d957600080fd5b8335925060208401359150604084013567ffffffffffffffff808211156127ff57600080fd5b818601915086601f83011261281357600080fd5b813581811115612825576128256127ae565b604051601f8201601f19908116603f0116810190838211818310171561284d5761284d6127ae565b8160405282815289602084870101111561286657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6001600160a01b03811681146124f057600080fd5b8035801515811461252457600080fd5b600080604083850312156128c057600080fd5b82356128cb81612888565b915061266f6020840161289d565b6000806000606084860312156128ee57600080fd5b83359250602084013561290081612888565b915061290e6040850161289d565b90509250925092565b60008060006060848603121561292c57600080fd5b8335925060208401359150604084013561ffff8116811461294c57600080fd5b809150509250925092565b60008060006060848603121561296c57600080fd5b833561297781612888565b925060208401359150604084013561294c81612888565b60008083601f8401126129a057600080fd5b50813567ffffffffffffffff8111156129b857600080fd5b6020830191508360208260051b8501011115610c3d57600080fd5b600080602083850312156129e657600080fd5b823567ffffffffffffffff8111156129fd57600080fd5b612a098582860161298e565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612a6a57603f19888603018452612a588583516126be565b94509285019290850190600101612a3c565b5092979650505050505050565b60008060408385031215612a8a57600080fd5b823591506020830135612a9c81612888565b809150509250929050565b600080600060408486031215612abc57600080fd5b83359250602084013567ffffffffffffffff811115612ada57600080fd5b6125c58682870161298e565b600080600060608486031215612afb57600080fd5b83359250612b0b6020850161250c565b9150604084013561294c81612888565b60008060408385031215612b2e57600080fd5b8235612b3981612888565b91506020830135612a9c81612888565b60008251612b5b81846020870161269a565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058457610584612b65565b8183823760009101908152919050565b600181811c90821680612bb257607f821691505b602082108103612bd257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156115b957600081815260208120601f850160051c81016020861015612bff5750805b601f850160051c820191505b81811015612c1e57828155600101612c0b565b505050505050565b67ffffffffffffffff831115612c3e57612c3e6127ae565b612c5283612c4c8354612b9e565b83612bd8565b6000601f841160018114612c865760008515612c6e5750838201355b600019600387901b1c1916600186901b1783556111fb565b600083815260209020601f19861690835b82811015612cb75786850135825560209485019460019092019101612c97565b5086821015612cd45760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612d23604083018688612ce6565b8281036020840152612d36818587612ce6565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b6020815260006115cb602083018486612ce6565b600067ffffffffffffffff808316818103612d8857612d88612b65565b6001019392505050565b815167ffffffffffffffff811115612dac57612dac6127ae565b612dc081612dba8454612b9e565b84612bd8565b602080601f831160018114612df55760008415612ddd5750858301515b600019600386901b1c1916600185901b178555612c1e565b600085815260208120601f198616915b82811015612e2457888601518255948401946001909101908401612e05565b5085821015612e425787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000612e6560408301866126be565b8281036020840152612e78818587612ce6565b9695505050505050565b600060208284031215612e9457600080fd5b8151610e2981612888565b600061ffff821680612eb357612eb3612b65565b6000190192915050565b604081526000612ed060408301856126be565b905061ffff831660208301529392505050565b600061ffff808316818103612d8857612d88612b65565b606081526000612f0d60608301866126be565b61ffff851660208401528281036040840152612e7881856126be565b8082018082111561058457610584612b65565b6000808335601e19843603018112612f5357600080fd5b83018035915067ffffffffffffffff821115612f6e57600080fd5b602001915036819003821315610c3d57600080fd5b60008085851115612f9357600080fd5b83861115612fa057600080fd5b5050820193919092039150565b8035602083101561058457600019602084900360031b1b1692915050565b600060018201612fdd57612fdd612b65565b5060010190565b634e487b7160e01b600052600160045260246000fdfea26469706673582212200cadfbfa7a3500543d3cccaa88637fe3e6de9643115ee2aba8968d512f3c914864736f6c6343000811003300000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e0000000000000000000000006d372ba84722826a29ea564d1dafbff4e87db67a000000000000000000000000e077c349814d07c470e5f8edb984de4576bcc62000000000000000000000000022d350a65ef25f9596dcdb8a3a5212fa5bad345f" + +} diff --git a/deploy/.contracts/NoTextResolver.json b/deploy/.contracts/LegacyResolverV1.json similarity index 100% rename from deploy/.contracts/NoTextResolver.json rename to deploy/.contracts/LegacyResolverV1.json diff --git a/deploy/.contracts/LegacyResolverV2.json b/deploy/.contracts/LegacyResolverV2.json new file mode 100644 index 000000000..a70b5c960 --- /dev/null +++ b/deploy/.contracts/LegacyResolverV2.json @@ -0,0 +1,170 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [{ "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentTypes", "type": "uint256" } + ], + "name": "ABI", + "outputs": [ + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "content", + "outputs": [{ "name": "ret", "type": "bytes32" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "name": "ret", "type": "address" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "name": "ret", "type": "string" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "hash", "type": "bytes32" } + ], + "name": "setContent", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "addr", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [{ "name": "ensAddr", "type": "address" }], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "a", "type": "address" } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "hash", "type": "bytes32" } + ], + "name": "ContentChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "name", "type": "string" } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": true, "name": "contentType", "type": "uint256" } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "x", "type": "bytes32" }, + { "indexed": false, "name": "y", "type": "bytes32" } + ], + "name": "PubkeyChanged", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000c57fe5b604051602080610dc583398101604052515b60008054600160a060020a031916600160a060020a0383161790555b505b610d7a8061004b6000396000f300606060405236156100ac5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100ae5780632203ab56146100df57806329cd62ea146101815780632dff69411461019c5780633b3b57de146101c1578063623195b0146101f0578063691f34311461024c57806377372213146102df578063c3d014d614610338578063c869023314610350578063d5fa2b001461037c575bfe5b34156100b657fe5b6100cb600160e060020a03196004351661039d565b604080519115158252519081900360200190f35b34156100e757fe5b6100f56004356024356104d8565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360008314610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561018957fe5b61019a6004356024356044356105ef565b005b34156101a457fe5b6101af6004356106e6565b60408051918252519081900360200190f35b34156101c957fe5b6101d46004356106ff565b60408051600160a060020a039092168252519081900360200190f35b34156101f857fe5b604080516020600460443581810135601f810184900484028501840190955284845261019a94823594602480359560649492939190920191819084018382808284375094965061071d95505050505050565b005b341561025457fe5b61025f600435610816565b6040805160208082528351818301528351919283929083019185019080838382156102a5575b8051825260208311156102a557601f199092019160209182019101610285565b505050905090810190601f1680156102d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102e757fe5b60408051602060046024803582810135601f810185900485028601850190965285855261019a95833595939460449493929092019181908401838280828437509496506108c195505050505050565b005b341561034057fe5b61019a600435602435610a19565b005b341561035857fe5b610363600435610af1565b6040805192835260208301919091528051918290030190f35b341561038457fe5b61019a600435600160a060020a0360243516610b10565b005b6000600160e060020a031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806104005750600160e060020a031982167fd8389dc500000000000000000000000000000000000000000000000000000000145b806104345750600160e060020a031982167f691f343100000000000000000000000000000000000000000000000000000000145b806104685750600160e060020a031982167f2203ab5600000000000000000000000000000000000000000000000000000000145b8061049c5750600160e060020a031982167fc869023300000000000000000000000000000000000000000000000000000000145b806104d05750600160e060020a031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b90505b919050565b60006104e2610c0b565b60008481526001602081905260409091209092505b8383116105e257828416158015906105305750600083815260058201602052604081205460026000196101006001841615020190911604115b156105d657600083815260058201602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b505050505091506105e7565b5b6002909202916104f7565b600092505b509250929050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561064957fe5b6102c65a03f1151561065757fe5b505060405151600160a060020a03169190911490506106765760006000fd5b604080518082018252848152602080820185815260008881526001835284902092516003840155516004909201919091558151858152908101849052815186927f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46928290030190a25b5b50505050565b600081815260016020819052604090912001545b919050565b600081815260016020526040902054600160a060020a03165b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561077757fe5b6102c65a03f1151561078557fe5b505060405151600160a060020a03169190911490506107a45760006000fd5b60001983018316156107b65760006000fd5b6000848152600160209081526040808320868452600501825290912083516107e092850190610c1d565b50604051839085907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35b5b50505050565b61081e610c0b565b6000828152600160208181526040928390206002908101805485516000199582161561010002959095011691909104601f81018390048302840183019094528383529192908301828280156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505090505b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561091b57fe5b6102c65a03f1151561092957fe5b505060405151600160a060020a03169190911490506109485760006000fd5b6000838152600160209081526040909120835161096d92600290920191850190610c1d565b50604080516020808252845181830152845186937fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f79387939092839283019185019080838382156109d9575b8051825260208311156109d957601f1990920191602091820191016109b9565b505050905090810190601f168015610a055780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b5b505050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610a7357fe5b6102c65a03f11515610a8157fe5b505060405151600160a060020a0316919091149050610aa05760006000fd5b6000838152600160208181526040928390209091018490558151848152915185927f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc92908290030190a25b5b505050565b600081815260016020526040902060038101546004909101545b915091565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610b6a57fe5b6102c65a03f11515610b7857fe5b505060405151600160a060020a0316919091149050610b975760006000fd5b600083815260016020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386169081179091558251908152915185927f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd292908290030190a25b5b505050565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b610d4b91905b80821115610c985760008155600101610d33565b5090565b905600a165627a7a72305820f05b42978350d3945a3fe885ef530e3f8ecbfcdb822550779dfcf0b06b00754f0029000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b" +} diff --git a/deploy/.contracts/LegacyResolverV3.json b/deploy/.contracts/LegacyResolverV3.json new file mode 100644 index 000000000..aae2dfb3d --- /dev/null +++ b/deploy/.contracts/LegacyResolverV3.json @@ -0,0 +1,4 @@ +{ + "abi": [{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"setAuthorisation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"AuthorisationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"}],"name":"TextChanged","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":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","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":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","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":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"}], + "bytecode": "0x608060405234801561001057600080fd5b506040516124e33803806124e38339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061244e806100956000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063623195b0116100ad578063c869023311610071578063c869023314610968578063d5fa2b00146109b1578063e59d895d146109ff578063f1cb7e0614610a76578063f86bc87914610b2757610121565b8063623195b01461063b578063691f3431146106c8578063773722131461076f5780638b95dd71146107f2578063bc1c58d1146108c157610121565b806329cd62ea116100f457806329cd62ea146103b2578063304e6ade146103f45780633b3b57de146104775780633e9ce794146104e557806359d1d43c1461053f57610121565b806301ffc9a71461012657806310f13a8c1461018b578063124a319c146102635780632203ab56146102fa575b600080fd5b6101716004803603602081101561013c57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610bad565b604051808215151515815260200191505060405180910390f35b610261600480360360608110156101a157600080fd5b8101908080359060200190929190803590602001906401000000008111156101c857600080fd5b8201836020820111156101da57600080fd5b803590602001918460018302840111640100000000831117156101fc57600080fd5b90919293919293908035906020019064010000000081111561021d57600080fd5b82018360208201111561022f57600080fd5b8035906020019184600183028401116401000000008311171561025157600080fd5b9091929391929390505050610c0e565b005b6102b86004803603604081101561027957600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d09565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103306004803603604081101561031057600080fd5b810190808035906020019092919080359060200190929190505050611206565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561037657808201518184015260208101905061035b565b50505050905090810190601f1680156103a35780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6103f2600480360360608110156103c857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611355565b005b6104756004803603604081101561040a57600080fd5b81019080803590602001909291908035906020019064010000000081111561043157600080fd5b82018360208201111561044357600080fd5b8035906020019184600183028401116401000000008311171561046557600080fd5b90919293919293905050506113ed565b005b6104a36004803603602081101561048d57600080fd5b810190808035906020019092919050505061148d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053d600480360360608110156104fb57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506114c4565b005b6105c06004803603604081101561055557600080fd5b81019080803590602001909291908035906020019064010000000081111561057c57600080fd5b82018360208201111561058e57600080fd5b803590602001918460018302840111640100000000831117156105b057600080fd5b90919293919293905050506115d8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106005780820151818401526020810190506105e5565b50505050905090810190601f16801561062d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106c66004803603606081101561065157600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561068257600080fd5b82018360208201111561069457600080fd5b803590602001918460018302840111640100000000831117156106b657600080fd5b90919293919293905050506116b4565b005b6106f4600480360360208110156106de57600080fd5b8101908080359060200190929190505050611741565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610734578082015181840152602081019050610719565b50505050905090810190601f1680156107615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107f06004803603604081101561078557600080fd5b8101908080359060200190929190803590602001906401000000008111156107ac57600080fd5b8201836020820111156107be57600080fd5b803590602001918460018302840111640100000000831117156107e057600080fd5b90919293919293905050506117f6565b005b6108bf6004803603606081101561080857600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561083957600080fd5b82018360208201111561084b57600080fd5b8035906020019184600183028401116401000000008311171561086d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611896565b005b6108ed600480360360208110156108d757600080fd5b8101908080359060200190929190505050611a03565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561092d578082015181840152602081019050610912565b50505050905090810190601f16801561095a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6109946004803603602081101561097e57600080fd5b8101908080359060200190929190505050611ab8565b604051808381526020018281526020019250505060405180910390f35b6109fd600480360360408110156109c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611af2565b005b610a7460048036036060811015610a1557600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b1e565b005b610aac60048036036040811015610a8c57600080fd5b810190808035906020019092919080359060200190929190505050611c5c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610aec578082015181840152602081019050610ad1565b50505050905090810190601f168015610b195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b9360048036036060811015610b3d57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d23565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c075750610c0682611d5f565b5b9050919050565b84610c1881611dc0565b610c2157600080fd5b828260066000898152602001908152602001600020878760405180838380828437808301925050509250505090815260200160405180910390209190610c68929190612250565b50857fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550868688886040518080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a2505050505050565b600080600360008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610dce5780915050611200565b6000610dd98561148d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610e1b57600092505050611200565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610f3c5780518252602082019150602081019050602083039250610f19565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610f9c576040519150601f19603f3d011682016040523d82523d6000602084013e610fa1565b606091505b5091509150811580610fb4575060208151105b80610ffb5750600060f81b81601f81518110610fcc57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561100d576000945050505050611200565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106111235780518252602082019150602081019050602083039250611100565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611183576040519150601f19603f3d011682016040523d82523d6000602084013e611188565b606091505b50809250819350505081158061119f575060208151105b806111e65750600060f81b81601f815181106111b757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156111f8576000945050505050611200565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b8481116113325760008582161415801561126757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156113265780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113145780601f106112e957610100808354040283529160200191611314565b820191906000526020600020905b8154815290600101906020018083116112f757829003601f168201915b5050505050905093509350505061134e565b600181901b9050611227565b5060006040518060200160405280600081525081915092509250505b9250929050565b8261135f81611dc0565b61136857600080fd5b604051806040016040528084815260200183815250600560008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b826113f781611dc0565b61140057600080fd5b82826002600087815260200190815260200160002091906114229291906122d0565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b6000606061149c83603c611c5c565b90506000815114156114b25760009150506114bf565b6114bb81611f4c565b9150505b919050565b806008600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b606060066000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116a65780601f1061167b576101008083540402835291602001916116a6565b820191906000526020600020905b81548152906001019060200180831161168957829003601f168201915b505050505090509392505050565b836116be81611dc0565b6116c757600080fd5b6000846001860316146116d957600080fd5b82826000808881526020019081526020016000206000878152602001908152602001600020919061170b9291906122d0565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600460008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117ea5780601f106117bf576101008083540402835291602001916117ea565b820191906000526020600020905b8154815290600101906020018083116117cd57829003601f168201915b50505050509050919050565b8261180081611dc0565b61180957600080fd5b828260046000878152602001908152602001600020919061182b929190612250565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b826118a081611dc0565b6118a957600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156119135780820151818401526020810190506118f8565b50505050905090810190601f1680156119405780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c8314156119c457837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261198284611f4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b8160016000868152602001908152602001600020600085815260200190815260200160002090805190602001906119fc929190612350565b5050505050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611aac5780601f10611a8157610100808354040283529160200191611aac565b820191906000526020600020905b815481529060010190602001808311611a8f57829003601f168201915b50505050509050919050565b6000806005600084815260200190815260200160002060000154600560008581526020019081526020016000206001015491509150915091565b81611afc81611dc0565b611b0557600080fd5b611b1983603c611b1485611f6f565b611896565b505050565b82611b2881611dc0565b611b3157600080fd5b81600360008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d165780601f10611ceb57610100808354040283529160200191611d16565b820191906000526020600020905b815481529060010190602001808311611cf957829003601f168201915b5050505050905092915050565b6008602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611db95750611db882611fba565b5b9050919050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611e3657600080fd5b505afa158015611e4a573d6000803e3d6000fd5b505050506040513d6020811015611e6057600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480611f4457506008600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b60006014825114611f5c57600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015611fa55781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061201457506120138261201b565b5b9050919050565b600060405180806123f660249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061208657506120858261208d565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806120e757506120e6826120ee565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612187575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061219757506121968261219e565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806121f857506121f7826121ff565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061229157803560ff19168380011785556122bf565b828001600101855582156122bf579182015b828111156122be5782358255916020019190600101906122a3565b5b5090506122cc91906123d0565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061231157803560ff191683800117855561233f565b8280016001018555821561233f579182015b8281111561233e578235825591602001919060010190612323565b5b50905061234c91906123d0565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061239157805160ff19168380011785556123bf565b828001600101855582156123bf579182015b828111156123be5782518255916020019190600101906123a3565b5b5090506123cc91906123d0565b5090565b6123f291905b808211156123ee5760008160009055506001016123d6565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820ad8f8a41d6a908b475138c4e12dbb403d590d1a66cd707d281b6f5adf64a8b9b64736f6c634300050b0032000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b" +} diff --git a/deploy/.contracts/LegacyResolverV4.json b/deploy/.contracts/LegacyResolverV4.json new file mode 100644 index 000000000..97e4cb904 --- /dev/null +++ b/deploy/.contracts/LegacyResolverV4.json @@ -0,0 +1,4 @@ +{ + "abi": [{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"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":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"AuthorisationChanged","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":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"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearDNSZone","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"setAuthorisation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}], + "bytecode": "0x608060405234801561001057600080fd5b5060405161342e38038061342e8339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613399806100956000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063623195b0116100c3578063bc1c58d11161007c578063bc1c58d114610aad578063c869023314610b54578063d5fa2b0014610b9d578063e59d895d14610beb578063f1cb7e0614610c62578063f86bc87914610d135761014d565b8063623195b01461073a578063691f3431146107c7578063773722131461086e5780638b95dd71146108f1578063a8fa5682146109c0578063ad5780af14610a7f5761014d565b806329cd62ea1161011557806329cd62ea14610461578063304e6ade146104a35780633b3b57de146105265780633e9ce794146105945780634cbf6ba4146105ee57806359d1d43c1461063e5761014d565b806301ffc9a7146101525780630af179d7146101b757806310f13a8c1461023a578063124a319c146103125780632203ab56146103a9575b600080fd5b61019d6004803603602081101561016857600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d99565b604051808215151515815260200191505060405180910390f35b610238600480360360408110156101cd57600080fd5b8101908080359060200190929190803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b9091929391929390505050610dfa565b005b6103106004803603606081101561025057600080fd5b81019080803590602001909291908035906020019064010000000081111561027757600080fd5b82018360208201111561028957600080fd5b803590602001918460018302840111640100000000831117156102ab57600080fd5b9091929391929390803590602001906401000000008111156102cc57600080fd5b8201836020820111156102de57600080fd5b8035906020019184600183028401116401000000008311171561030057600080fd5b9091929391929390505050611073565b005b6103676004803603604081101561032857600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611159565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103df600480360360408110156103bf57600080fd5b810190808035906020019092919080359060200190929190505050611656565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6104a16004803603606081101561047757600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506117a5565b005b610524600480360360408110156104b957600080fd5b8101908080359060200190929190803590602001906401000000008111156104e057600080fd5b8201836020820111156104f257600080fd5b8035906020019184600183028401116401000000008311171561051457600080fd5b909192939192939050505061183d565b005b6105526004803603602081101561053c57600080fd5b81019080803590602001909291905050506118dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ec600480360360608110156105aa57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611914565b005b6106246004803603604081101561060457600080fd5b810190808035906020019092919080359060200190929190505050611a28565b604051808215151515815260200191505060405180910390f35b6106bf6004803603604081101561065457600080fd5b81019080803590602001909291908035906020019064010000000081111561067b57600080fd5b82018360208201111561068d57600080fd5b803590602001918460018302840111640100000000831117156106af57600080fd5b9091929391929390505050611a90565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106ff5780820151818401526020810190506106e4565b50505050905090810190601f16801561072c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107c56004803603606081101561075057600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561078157600080fd5b82018360208201111561079357600080fd5b803590602001918460018302840111640100000000831117156107b557600080fd5b9091929391929390505050611b6c565b005b6107f3600480360360208110156107dd57600080fd5b8101908080359060200190929190505050611bf9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610833578082015181840152602081019050610818565b50505050905090810190601f1680156108605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108ef6004803603604081101561088457600080fd5b8101908080359060200190929190803590602001906401000000008111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460018302840111640100000000831117156108df57600080fd5b9091929391929390505050611cae565b005b6109be6004803603606081101561090757600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561093857600080fd5b82018360208201111561094a57600080fd5b8035906020019184600183028401116401000000008311171561096c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611d4e565b005b610a04600480360360608110156109d657600080fd5b810190808035906020019092919080359060200190929190803561ffff169060200190929190505050611ebb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a44578082015181840152602081019050610a29565b50505050905090810190601f168015610a715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610aab60048036036020811015610a9557600080fd5b8101908080359060200190929190505050611fc0565b005b610ad960048036036020811015610ac357600080fd5b8101908080359060200190929190505050612027565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b19578082015181840152602081019050610afe565b50505050905090810190601f168015610b465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b8060048036036020811015610b6a57600080fd5b81019080803590602001909291905050506120dc565b604051808381526020018281526020019250505060405180910390f35b610be960048036036040811015610bb357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612116565b005b610c6060048036036060811015610c0157600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612142565b005b610c9860048036036040811015610c7857600080fd5b810190808035906020019092919080359060200190929190505050612280565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610cd8578082015181840152602081019050610cbd565b50505050905090810190601f168015610d055780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610d7f60048036036060811015610d2957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612347565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610df35750610df282612383565b5b9050919050565b82610e04816123e4565b610e0d57600080fd5b600080905060008090506060806000610e24613108565b610e7c60008a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061257090919063ffffffff16565b90505b610e888161259a565b6110005760008661ffff161415610f2f5780604001519550610ea9816125b0565b9350836040516020018082805190602001908083835b60208310610ee25780518252602082019150602081019050602083039250610ebf565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001209150610f28816125e7565b9250610ff2565b6060610f3a826125b0565b9050816040015161ffff168761ffff16141580610f675750610f65818661261790919063ffffffff16565b155b15610ff057610fc98b86898d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508a8b88602001510360008b511461263e565b816040015196508160200151955080945084805190602001209250610fed826125e7565b93505b505b610ffb81612abf565b610e7f565b50600083511115611068576110678984878b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505088898e8e905003600089511461263e565b5b505050505050505050565b8461107d816123e4565b61108657600080fd5b8282600960008981526020019081526020016000208787604051808383808284378083019250505092505050908152602001604051809103902091906110cd929190613153565b5084846040518083838082843780830192505050925050506040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a3505050505050565b600080600660008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461121e5780915050611650565b6000611229856118dd565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561126b57600092505050611650565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061138c5780518252602082019150602081019050602083039250611369565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b5091509150811580611404575060208151105b8061144b5750600060f81b81601f8151811061141c57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561145d576000945050505050611650565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106115735780518252602082019150602081019050602083039250611550565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146115d3576040519150601f19603f3d011682016040523d82523d6000602084013e6115d8565b606091505b5080925081935050508115806115ef575060208151105b806116365750600060f81b81601f8151811061160757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b15611648576000945050505050611650565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b848111611782576000858216141580156116b757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156117765780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117645780601f1061173957610100808354040283529160200191611764565b820191906000526020600020905b81548152906001019060200180831161174757829003601f168201915b5050505050905093509350505061179e565b600181901b9050611677565b5060006040518060200160405280600081525081915092509250505b9250929050565b826117af816123e4565b6117b857600080fd5b604051806040016040528084815260200183815250600860008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b82611847816123e4565b61185057600080fd5b82826002600087815260200190815260200160002091906118729291906131d3565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b600060606118ec83603c612280565b905060008151141561190257600091505061190f565b61190b81612bd3565b9150505b919050565b80600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b60008060056000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060009054906101000a900461ffff1661ffff161415905092915050565b606060096000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b5e5780601f10611b3357610100808354040283529160200191611b5e565b820191906000526020600020905b815481529060010190602001808311611b4157829003601f168201915b505050505090509392505050565b83611b76816123e4565b611b7f57600080fd5b600084600186031614611b9157600080fd5b828260008088815260200190815260200160002060008781526020019081526020016000209190611bc39291906131d3565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600760008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ca25780601f10611c7757610100808354040283529160200191611ca2565b820191906000526020600020905b815481529060010190602001808311611c8557829003601f168201915b50505050509050919050565b82611cb8816123e4565b611cc157600080fd5b8282600760008781526020019081526020016000209190611ce3929190613153565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b82611d58816123e4565b611d6157600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611dcb578082015181840152602081019050611db0565b50505050905090810190601f168015611df85780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c831415611e7c57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2611e3a84612bd3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b816001600086815260200190815260200160002060008581526020019081526020016000209080519060200190611eb4929190613253565b5050505050565b606060046000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060008361ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fb25780601f10611f8757610100808354040283529160200191611fb2565b820191906000526020600020905b815481529060010190602001808311611f9557829003601f168201915b505050505090509392505050565b80611fca816123e4565b611fd357600080fd5b6003600083815260200190815260200160002060008154809291906001019190505550817fb757169b8492ca2f1c6619d9d76ce22803035c3b1d5f6930dffe7b127c1a198360405160405180910390a25050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120d05780601f106120a5576101008083540402835291602001916120d0565b820191906000526020600020905b8154815290600101906020018083116120b357829003601f168201915b50505050509050919050565b6000806008600084815260200190815260200160002060000154600860008581526020019081526020016000206001015491509150915091565b81612120816123e4565b61212957600080fd5b61213d83603c61213885612bf6565b611d4e565b505050565b8261214c816123e4565b61215557600080fd5b81600660008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561233a5780601f1061230f5761010080835404028352916020019161233a565b820191906000526020600020905b81548152906001019060200180831161231d57829003601f168201915b5050505050905092915050565b600b602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123dd57506123dc82612c41565b5b9050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561245a57600080fd5b505afa15801561246e573d6000803e3d6000fd5b505050506040513d602081101561248457600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806125685750600b600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b612578613108565b828160000181905250818160c001818152505061259481612abf565b92915050565b6000816000015151826020015110159050919050565b60606125e082602001516125cc84600001518560200151612ca2565b8460000151612cfd9092919063ffffffff16565b9050919050565b60606126108260a001518360a001518460c00151038460000151612cfd9092919063ffffffff16565b9050919050565b60008151835114801561263657506126358360008460008751612d70565b5b905092915050565b6000600360008981526020019081526020016000205490506000878051906020012090506060612679868689612cfd9092919063ffffffff16565b90508315612861576000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900490501461275557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff16809291906001900391906101000a81548161ffff021916908361ffff160217905550505b600460008b81526020019081526020016000206000848152602001908152602001600020600083815260200190815260200160002060008961ffff1661ffff16815260200190815260200160002060006127af91906132d3565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a60405180806020018361ffff1661ffff168152602001828103825284818151815260200191508051906020019080838360005b83811015612821578082015181840152602081019050612806565b50505050905090810190601f16801561284e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2612ab3565b6000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff168152602001908152602001600020805460018160011615610100020316600290049050141561293557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff168092919060010191906101000a81548161ffff021916908361ffff160217905550505b80600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000209080519060200190612997929190613253565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a8460405180806020018461ffff1661ffff16815260200180602001838103835286818151815260200191508051906020019080838360005b83811015612a0f5780820151818401526020810190506129f4565b50505050905090810190601f168015612a3c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612a75578082015181840152602081019050612a5a565b50505050905090810190601f168015612aa25780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a25b50505050505050505050565b8060c00151816020018181525050806000015151816020015110612ae257612bd0565b6000612af682600001518360200151612ca2565b8260200151019050612b15818360000151612d9490919063ffffffff16565b826040019061ffff16908161ffff1681525050600281019050612b45818360000151612d9490919063ffffffff16565b826060019061ffff16908161ffff1681525050600281019050612b75818360000151612dba90919063ffffffff16565b826080019063ffffffff16908163ffffffff16815250506004810190506000612bab828460000151612d9490919063ffffffff16565b61ffff169050600282019150818360a00181815250508082018360c001818152505050505b50565b60006014825114612be357600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015612c2c5781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612c9b5750612c9a82612de2565b5b9050919050565b6000808290505b600115612cf15783518110612cba57fe5b6000612ccf8286612e5490919063ffffffff16565b60ff16905060018101820191506000811415612ceb5750612cf1565b50612ca9565b82810391505092915050565b606083518284011115612d0f57600080fd5b6060826040519080825280601f01601f191660200182016040528015612d445781602001600182028038833980820191505090505b5090506000806020830191508560208801019050612d63828287612e78565b8293505050509392505050565b6000612d7d848484612ec1565b612d88878785612ec1565b14905095945050505050565b60008251600283011115612da757600080fd5b61ffff8260028501015116905092915050565b60008251600483011115612dcd57600080fd5b63ffffffff8260048501015116905092915050565b6000604051808061334160249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612e4d5750612e4c82612ee4565b5b9050919050565b6000828281518110612e6257fe5b602001015160f81c60f81b60f81c905092915050565b5b60208110612e9c5781518352602083019250602082019150602081039050612e79565b60006001826020036101000a0390508019835116818551168181178652505050505050565b600083518284011115612ed357600080fd5b818360208601012090509392505050565b600063a8fa568260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f3e5750612f3d82612f45565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f9f5750612f9e82612fa6565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061303f575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061304f575061304e82613056565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806130b057506130af826130b7565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061319457803560ff19168380011785556131c2565b828001600101855582156131c2579182015b828111156131c15782358255916020019190600101906131a6565b5b5090506131cf919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061321457803560ff1916838001178555613242565b82800160010185558215613242579182015b82811115613241578235825591602001919060010190613226565b5b50905061324f919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061329457805160ff19168380011785556132c2565b828001600101855582156132c2579182015b828111156132c15782518255916020019190600101906132a6565b5b5090506132cf919061331b565b5090565b50805460018160011615610100020316600290046000825580601f106132f95750613318565b601f016020900490600052602060002090810190613317919061331b565b5b50565b61333d91905b80821115613339576000816000905550600101613321565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820e37e49339c407f277a18b1276335d80f06f86465250ddd0bb061d5fb5f0892b264736f6c6343000510003200000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e" +} diff --git a/deploy/.contracts/LegacyResolverV5.json b/deploy/.contracts/LegacyResolverV5.json new file mode 100644 index 000000000..7f76234b9 --- /dev/null +++ b/deploy/.contracts/LegacyResolverV5.json @@ -0,0 +1,397 @@ +{ + "abi": [ + { + "inputs": [{ "internalType": "contract ENS", "name": "_ens", "type": "address" }], + "payable": false, + "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": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, + { "indexed": false, "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "AuthorisationChanged", + "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": 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" + }, + { + "constant": true, + "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" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" } + ], + "name": "addr", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "authorisations", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "clearDNSZone", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "contenthash", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "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" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "name", "type": "bytes32" } + ], + "name": "hasDNSRecords", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } + ], + "name": "interfaceImplementer", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "contentType", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" }, + { "internalType": "bytes", "name": "a", "type": "bytes" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "a", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "setAuthorisation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "setContenthash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "setDNSRecords", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }, + { "internalType": "address", "name": "implementer", "type": "address" } + ], + "name": "setInterface", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" }, + { "internalType": "string", "name": "value", "type": "string" } + ], + "name": "setText", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "text", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x608060405234801561001057600080fd5b5060405161342e38038061342e8339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613399806100956000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063623195b0116100c3578063bc1c58d11161007c578063bc1c58d114610aad578063c869023314610b54578063d5fa2b0014610b9d578063e59d895d14610beb578063f1cb7e0614610c62578063f86bc87914610d135761014d565b8063623195b01461073a578063691f3431146107c7578063773722131461086e5780638b95dd71146108f1578063a8fa5682146109c0578063ad5780af14610a7f5761014d565b806329cd62ea1161011557806329cd62ea14610461578063304e6ade146104a35780633b3b57de146105265780633e9ce794146105945780634cbf6ba4146105ee57806359d1d43c1461063e5761014d565b806301ffc9a7146101525780630af179d7146101b757806310f13a8c1461023a578063124a319c146103125780632203ab56146103a9575b600080fd5b61019d6004803603602081101561016857600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d99565b604051808215151515815260200191505060405180910390f35b610238600480360360408110156101cd57600080fd5b8101908080359060200190929190803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b9091929391929390505050610dfa565b005b6103106004803603606081101561025057600080fd5b81019080803590602001909291908035906020019064010000000081111561027757600080fd5b82018360208201111561028957600080fd5b803590602001918460018302840111640100000000831117156102ab57600080fd5b9091929391929390803590602001906401000000008111156102cc57600080fd5b8201836020820111156102de57600080fd5b8035906020019184600183028401116401000000008311171561030057600080fd5b9091929391929390505050611073565b005b6103676004803603604081101561032857600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611159565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103df600480360360408110156103bf57600080fd5b810190808035906020019092919080359060200190929190505050611656565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6104a16004803603606081101561047757600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506117a5565b005b610524600480360360408110156104b957600080fd5b8101908080359060200190929190803590602001906401000000008111156104e057600080fd5b8201836020820111156104f257600080fd5b8035906020019184600183028401116401000000008311171561051457600080fd5b909192939192939050505061183d565b005b6105526004803603602081101561053c57600080fd5b81019080803590602001909291905050506118dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ec600480360360608110156105aa57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611914565b005b6106246004803603604081101561060457600080fd5b810190808035906020019092919080359060200190929190505050611a28565b604051808215151515815260200191505060405180910390f35b6106bf6004803603604081101561065457600080fd5b81019080803590602001909291908035906020019064010000000081111561067b57600080fd5b82018360208201111561068d57600080fd5b803590602001918460018302840111640100000000831117156106af57600080fd5b9091929391929390505050611a90565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106ff5780820151818401526020810190506106e4565b50505050905090810190601f16801561072c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107c56004803603606081101561075057600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561078157600080fd5b82018360208201111561079357600080fd5b803590602001918460018302840111640100000000831117156107b557600080fd5b9091929391929390505050611b6c565b005b6107f3600480360360208110156107dd57600080fd5b8101908080359060200190929190505050611bf9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610833578082015181840152602081019050610818565b50505050905090810190601f1680156108605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108ef6004803603604081101561088457600080fd5b8101908080359060200190929190803590602001906401000000008111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460018302840111640100000000831117156108df57600080fd5b9091929391929390505050611cae565b005b6109be6004803603606081101561090757600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561093857600080fd5b82018360208201111561094a57600080fd5b8035906020019184600183028401116401000000008311171561096c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611d4e565b005b610a04600480360360608110156109d657600080fd5b810190808035906020019092919080359060200190929190803561ffff169060200190929190505050611ebb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a44578082015181840152602081019050610a29565b50505050905090810190601f168015610a715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610aab60048036036020811015610a9557600080fd5b8101908080359060200190929190505050611fc0565b005b610ad960048036036020811015610ac357600080fd5b8101908080359060200190929190505050612027565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b19578082015181840152602081019050610afe565b50505050905090810190601f168015610b465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b8060048036036020811015610b6a57600080fd5b81019080803590602001909291905050506120dc565b604051808381526020018281526020019250505060405180910390f35b610be960048036036040811015610bb357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612116565b005b610c6060048036036060811015610c0157600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612142565b005b610c9860048036036040811015610c7857600080fd5b810190808035906020019092919080359060200190929190505050612280565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610cd8578082015181840152602081019050610cbd565b50505050905090810190601f168015610d055780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610d7f60048036036060811015610d2957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612347565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610df35750610df282612383565b5b9050919050565b82610e04816123e4565b610e0d57600080fd5b600080905060008090506060806000610e24613108565b610e7c60008a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061257090919063ffffffff16565b90505b610e888161259a565b6110005760008661ffff161415610f2f5780604001519550610ea9816125b0565b9350836040516020018082805190602001908083835b60208310610ee25780518252602082019150602081019050602083039250610ebf565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001209150610f28816125e7565b9250610ff2565b6060610f3a826125b0565b9050816040015161ffff168761ffff16141580610f675750610f65818661261790919063ffffffff16565b155b15610ff057610fc98b86898d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508a8b88602001510360008b511461263e565b816040015196508160200151955080945084805190602001209250610fed826125e7565b93505b505b610ffb81612abf565b610e7f565b50600083511115611068576110678984878b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505088898e8e905003600089511461263e565b5b505050505050505050565b8461107d816123e4565b61108657600080fd5b8282600960008981526020019081526020016000208787604051808383808284378083019250505092505050908152602001604051809103902091906110cd929190613153565b5084846040518083838082843780830192505050925050506040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a3505050505050565b600080600660008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461121e5780915050611650565b6000611229856118dd565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561126b57600092505050611650565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061138c5780518252602082019150602081019050602083039250611369565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b5091509150811580611404575060208151105b8061144b5750600060f81b81601f8151811061141c57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561145d576000945050505050611650565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106115735780518252602082019150602081019050602083039250611550565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146115d3576040519150601f19603f3d011682016040523d82523d6000602084013e6115d8565b606091505b5080925081935050508115806115ef575060208151105b806116365750600060f81b81601f8151811061160757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b15611648576000945050505050611650565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b848111611782576000858216141580156116b757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156117765780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117645780601f1061173957610100808354040283529160200191611764565b820191906000526020600020905b81548152906001019060200180831161174757829003601f168201915b5050505050905093509350505061179e565b600181901b9050611677565b5060006040518060200160405280600081525081915092509250505b9250929050565b826117af816123e4565b6117b857600080fd5b604051806040016040528084815260200183815250600860008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b82611847816123e4565b61185057600080fd5b82826002600087815260200190815260200160002091906118729291906131d3565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b600060606118ec83603c612280565b905060008151141561190257600091505061190f565b61190b81612bd3565b9150505b919050565b80600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b60008060056000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060009054906101000a900461ffff1661ffff161415905092915050565b606060096000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b5e5780601f10611b3357610100808354040283529160200191611b5e565b820191906000526020600020905b815481529060010190602001808311611b4157829003601f168201915b505050505090509392505050565b83611b76816123e4565b611b7f57600080fd5b600084600186031614611b9157600080fd5b828260008088815260200190815260200160002060008781526020019081526020016000209190611bc39291906131d3565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600760008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ca25780601f10611c7757610100808354040283529160200191611ca2565b820191906000526020600020905b815481529060010190602001808311611c8557829003601f168201915b50505050509050919050565b82611cb8816123e4565b611cc157600080fd5b8282600760008781526020019081526020016000209190611ce3929190613153565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b82611d58816123e4565b611d6157600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611dcb578082015181840152602081019050611db0565b50505050905090810190601f168015611df85780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c831415611e7c57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2611e3a84612bd3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b816001600086815260200190815260200160002060008581526020019081526020016000209080519060200190611eb4929190613253565b5050505050565b606060046000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060008361ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fb25780601f10611f8757610100808354040283529160200191611fb2565b820191906000526020600020905b815481529060010190602001808311611f9557829003601f168201915b505050505090509392505050565b80611fca816123e4565b611fd357600080fd5b6003600083815260200190815260200160002060008154809291906001019190505550817fb757169b8492ca2f1c6619d9d76ce22803035c3b1d5f6930dffe7b127c1a198360405160405180910390a25050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120d05780601f106120a5576101008083540402835291602001916120d0565b820191906000526020600020905b8154815290600101906020018083116120b357829003601f168201915b50505050509050919050565b6000806008600084815260200190815260200160002060000154600860008581526020019081526020016000206001015491509150915091565b81612120816123e4565b61212957600080fd5b61213d83603c61213885612bf6565b611d4e565b505050565b8261214c816123e4565b61215557600080fd5b81600660008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561233a5780601f1061230f5761010080835404028352916020019161233a565b820191906000526020600020905b81548152906001019060200180831161231d57829003601f168201915b5050505050905092915050565b600b602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123dd57506123dc82612c41565b5b9050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561245a57600080fd5b505afa15801561246e573d6000803e3d6000fd5b505050506040513d602081101561248457600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806125685750600b600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b612578613108565b828160000181905250818160c001818152505061259481612abf565b92915050565b6000816000015151826020015110159050919050565b60606125e082602001516125cc84600001518560200151612ca2565b8460000151612cfd9092919063ffffffff16565b9050919050565b60606126108260a001518360a001518460c00151038460000151612cfd9092919063ffffffff16565b9050919050565b60008151835114801561263657506126358360008460008751612d70565b5b905092915050565b6000600360008981526020019081526020016000205490506000878051906020012090506060612679868689612cfd9092919063ffffffff16565b90508315612861576000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900490501461275557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff16809291906001900391906101000a81548161ffff021916908361ffff160217905550505b600460008b81526020019081526020016000206000848152602001908152602001600020600083815260200190815260200160002060008961ffff1661ffff16815260200190815260200160002060006127af91906132d3565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a60405180806020018361ffff1661ffff168152602001828103825284818151815260200191508051906020019080838360005b83811015612821578082015181840152602081019050612806565b50505050905090810190601f16801561284e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2612ab3565b6000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff168152602001908152602001600020805460018160011615610100020316600290049050141561293557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff168092919060010191906101000a81548161ffff021916908361ffff160217905550505b80600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000209080519060200190612997929190613253565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a8460405180806020018461ffff1661ffff16815260200180602001838103835286818151815260200191508051906020019080838360005b83811015612a0f5780820151818401526020810190506129f4565b50505050905090810190601f168015612a3c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612a75578082015181840152602081019050612a5a565b50505050905090810190601f168015612aa25780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a25b50505050505050505050565b8060c00151816020018181525050806000015151816020015110612ae257612bd0565b6000612af682600001518360200151612ca2565b8260200151019050612b15818360000151612d9490919063ffffffff16565b826040019061ffff16908161ffff1681525050600281019050612b45818360000151612d9490919063ffffffff16565b826060019061ffff16908161ffff1681525050600281019050612b75818360000151612dba90919063ffffffff16565b826080019063ffffffff16908163ffffffff16815250506004810190506000612bab828460000151612d9490919063ffffffff16565b61ffff169050600282019150818360a00181815250508082018360c001818152505050505b50565b60006014825114612be357600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015612c2c5781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612c9b5750612c9a82612de2565b5b9050919050565b6000808290505b600115612cf15783518110612cba57fe5b6000612ccf8286612e5490919063ffffffff16565b60ff16905060018101820191506000811415612ceb5750612cf1565b50612ca9565b82810391505092915050565b606083518284011115612d0f57600080fd5b6060826040519080825280601f01601f191660200182016040528015612d445781602001600182028038833980820191505090505b5090506000806020830191508560208801019050612d63828287612e78565b8293505050509392505050565b6000612d7d848484612ec1565b612d88878785612ec1565b14905095945050505050565b60008251600283011115612da757600080fd5b61ffff8260028501015116905092915050565b60008251600483011115612dcd57600080fd5b63ffffffff8260048501015116905092915050565b6000604051808061334160249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612e4d5750612e4c82612ee4565b5b9050919050565b6000828281518110612e6257fe5b602001015160f81c60f81b60f81c905092915050565b5b60208110612e9c5781518352602083019250602082019150602081039050612e79565b60006001826020036101000a0390508019835116818551168181178652505050505050565b600083518284011115612ed357600080fd5b818360208601012090509392505050565b600063a8fa568260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f3e5750612f3d82612f45565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f9f5750612f9e82612fa6565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061303f575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061304f575061304e82613056565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806130b057506130af826130b7565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061319457803560ff19168380011785556131c2565b828001600101855582156131c2579182015b828111156131c15782358255916020019190600101906131a6565b5b5090506131cf919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061321457803560ff1916838001178555613242565b82800160010185558215613242579182015b82811115613241578235825591602001919060010190613226565b5b50905061324f919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061329457805160ff19168380011785556132c2565b828001600101855582156132c2579182015b828111156132c15782518255916020019190600101906132a6565b5b5090506132cf919061331b565b5090565b50805460018160011615610100020316600290046000825580601f106132f95750613318565b601f016020900490600052602060002090810190613317919061331b565b5b50565b61333d91905b80821115613339576000816000905550600101613321565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820e37e49339c407f277a18b1276335d80f06f86465250ddd0bb061d5fb5f0892b264736f6c6343000510003200000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e" +} diff --git a/deploy/00_deploy_legacy_resolvers.ts b/deploy/00_deploy_legacy_resolvers.ts index fc79d1da9..190cd3eda 100644 --- a/deploy/00_deploy_legacy_resolvers.ts +++ b/deploy/00_deploy_legacy_resolvers.ts @@ -4,43 +4,71 @@ import { ethers } from 'hardhat' import { DeployFunction } from 'hardhat-deploy/types' import { HardhatRuntimeEnvironment } from 'hardhat/types' import { resolve } from 'path' -import { namehash } from 'viem' const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const { getNamedAccounts, deployments } = hre const allNamedAccts = await getNamedAccounts() + const { owner, deployer} = allNamedAccts - const registry = await ethers.getContract('ENSRegistry') + const registry = await ethers.getContract('ENSRegistry', owner) + const nameWrapper = await ethers.getContract('NameWrapper', owner) + const ethController = await ethers.getContract('ETHRegistrarController', owner) + const reverseRegistrar = await ethers.getContract('ReverseRegistrar', owner) - await deployments.deploy('NoMulticallResolver', { - from: allNamedAccts.deployer, + await deployments.deploy('LegacyResolverV1', { + from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/NoMulticallResolver.json'), { + await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV1.json'), { encoding: 'utf8', }), ), args: [registry.address], }) - await deployments.deploy('OldResolver', { - from: allNamedAccts.deployer, + await deployments.deploy('LegacyResolverV2', { + from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/OldResolver.json'), { + await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV2.json'), { encoding: 'utf8', }), ), args: [registry.address], }) - await deployments.deploy('NoTextResolver', { - from: allNamedAccts.deployer, + await deployments.deploy('LegacyResolverV3', { + from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/NoTextResolver.json'), { + await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV3.json'), { encoding: 'utf8', }), ), args: [registry.address], }) + + await deployments.deploy('LegacyResolverV4', { + from: deployer, + contract: JSON.parse( + await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV4.json'), { + encoding: 'utf8', + }), + ), + args: [registry.address], + }) + + // console.log('Deploying CustomResolver...') + // console.log('>>', registry.address, nameWrapper.address, ethController.address, reverseRegistrar.address) + // await deployments.deploy('CustomResolver', { + // from: allNamedAccts.deployer, + // contract: JSON.parse( + // await fs.readFile(resolve(__dirname, './.contracts/CustomResolver1.json'), { + // encoding: 'utf8', + // }), + // ), + // args: [registry.address, nameWrapper.address, ethController.address, reverseRegistrar.address], + // gas: 5000000, + // }) + + console.log('Finished deploying legacy resolvers') // const resolver = await ethers.getContract('NoMulticallResolver') // for (const { namedOwner, name, addr } of names) { diff --git a/e2e/specs/stateless/profileEditor.spec.ts b/e2e/specs/stateless/profileEditor.spec.ts index c08f96b36..93f16f68f 100644 --- a/e2e/specs/stateless/profileEditor.spec.ts +++ b/e2e/specs/stateless/profileEditor.spec.ts @@ -16,6 +16,8 @@ dotenv.config({ path: '.env.local' }) const oldResolver = testClient.chain.contracts.legacyPublicResolver.address const newResolver = testClient.chain.contracts.publicResolver.address + +const contractAddresses = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}') const ownedResolverAddress = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.OwnedResolver || '' const invalidResolverAddress = @@ -24,8 +26,12 @@ const noMulticallResolverAddress = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NoMulticallResolverAddress || '' const oldestResolverAddress = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.OldesResolver || '' -const noTextResolverAddress = - JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NoTextResolver || '' +const customResolver = + JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.CustomResolver || '' + +const resolverV4Address = contractAddresses.LegacyResolverV4 || '' +const resolverV5Address = contractAddresses.LegacyResolverV5 || '' +const outdatedResolverAddress = contractAddresses.LegacyResolverV4 || '' const dummyABI = { test: 'test', @@ -140,6 +146,107 @@ test.describe('profile', () => { }) }) +test.describe('legacy resolvers', () => { + test('should force a name with an outdated resolver to upgrade', async ({ + page, + login, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'outdated-resolver', + type: 'legacy', + owner: 'user', + resolver: outdatedResolverAddress, + }) + + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') + + await profilePage.goto(name) + await login.connect() + + await profilePage.editProfileButton.click() + await page.pause() + await expect(profilePage.profileEditor.locator('text=No resolver set')).toBeVisible() + + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await transactionModal.autoComplete() + + await morePage.goto(name) + + await morePage.resolver.click() + await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + }) + + test('should be able to update records with resolver v4', async ({ + page, + login, + makeName, + makePageObject, + }) => { + test.slow() + const name = await makeName({ + label: 'unwrapped', + type: 'legacy', + resolver: resolverV4Address, + records: await makeRecords(), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') + const transactionModal = makePageObject('TransactionModal') + + await morePage.goto(name) + await login.connect() + + await page.pause() + await expect(morePage.resolver.getByText(resolverV4Address)).toBeVisible() + + await profilePage.goto(name) + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + + await profilePage.editProfileButton.click() + + await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() + + // Update records + await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) + await profilePage.profileEditorInput('description').fill('new name') + + // Add records + await profilePage.profileEditorAddInputs(['location', 'bnb']) + await profilePage.profileEditorInput('location').fill('L1 chain') + await profilePage.profileEditorInput('bnb').fill('bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl') + + await profilePage.profileEditor.getByTestId('profile-submit-button').click() + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(oldResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('new name') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user2'), + ) + await expect(recordsPage.getRecordValue('address', 'bnb')).toHaveText( + 'bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl', + ) + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + }) +}) + test.describe('migrations', () => { test('should force a name on the old registry to go to update registry', async ({ page, @@ -650,7 +757,7 @@ test.describe('migrations', () => { label: 'unwrapped', type: 'legacy', owner: 'user', - resolver: noTextResolverAddress, + resolver: customResolver, records: await makeRecords(), }) diff --git a/src/constants/resolverAddressData.ts b/src/constants/resolverAddressData.ts index be538289c..151f36e6b 100644 --- a/src/constants/resolverAddressData.ts +++ b/src/constants/resolverAddressData.ts @@ -212,49 +212,60 @@ export const KNOWN_RESOLVER_DATA: KnownResolverData = { ], ...(process.env.NEXT_PUBLIC_ETH_NODE === 'anvil' ? { - '1337': [], - // '1337': [ - // { - // address: deploymentAddresses.PublicResolver, - // deployer: 'ENS Labs', - // tag: 'latest', - // isNameWrapperAware: true, - // supportedInterfaces: [ - // RESOLVER_INTERFACE_IDS.AddressResolver, - // RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - // RESOLVER_INTERFACE_IDS.NameResolver, - // RESOLVER_INTERFACE_IDS.AbiResolver, - // RESOLVER_INTERFACE_IDS.TextResolver, - // RESOLVER_INTERFACE_IDS.ContentHashResolver, - // RESOLVER_INTERFACE_IDS.DnsRecordResolver, - // RESOLVER_INTERFACE_IDS.InterfaceResolver, - // RESOLVER_INTERFACE_IDS.VersionableResolver, - // ], - // }, - // { - // address: '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750', - // deployer: 'dummy', - // tag: null, - // isNameWrapperAware: false, - // supportedInterfaces: [], - // }, - // { - // address: deploymentAddresses.LegacyPublicResolver, - // deployer: 'ENS Labs', - // tag: null, - // isNameWrapperAware: false, - // supportedInterfaces: [ - // RESOLVER_INTERFACE_IDS.AddressResolver, - // RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, - // RESOLVER_INTERFACE_IDS.NameResolver, - // RESOLVER_INTERFACE_IDS.AbiResolver, - // RESOLVER_INTERFACE_IDS.TextResolver, - // RESOLVER_INTERFACE_IDS.ContentHashResolver, - // RESOLVER_INTERFACE_IDS.DnsRecordResolver, - // RESOLVER_INTERFACE_IDS.InterfaceResolver, - // ], - // }, - // ], + '1337': [ + { + address: deploymentAddresses.PublicResolver, + deployer: 'ENS Labs', + tag: 'latest', + isNameWrapperAware: true, + supportedInterfaces: [ + RESOLVER_INTERFACE_IDS.AddressResolver, + RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, + RESOLVER_INTERFACE_IDS.NameResolver, + RESOLVER_INTERFACE_IDS.AbiResolver, + RESOLVER_INTERFACE_IDS.TextResolver, + RESOLVER_INTERFACE_IDS.ContentHashResolver, + RESOLVER_INTERFACE_IDS.DnsRecordResolver, + RESOLVER_INTERFACE_IDS.InterfaceResolver, + RESOLVER_INTERFACE_IDS.VersionableResolver, + ], + }, + { + address: '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750', + deployer: 'Custom ', + tag: null, + isNameWrapperAware: false, + supportedInterfaces: [], + }, + { + address: deploymentAddresses.LegacyPublicResolver, + deployer: 'ENS Labs', + tag: null, + isNameWrapperAware: false, + supportedInterfaces: [ + RESOLVER_INTERFACE_IDS.AddressResolver, + RESOLVER_INTERFACE_IDS.MultiCoinAddressResolver, + RESOLVER_INTERFACE_IDS.NameResolver, + RESOLVER_INTERFACE_IDS.AbiResolver, + RESOLVER_INTERFACE_IDS.TextResolver, + RESOLVER_INTERFACE_IDS.ContentHashResolver, + RESOLVER_INTERFACE_IDS.DnsRecordResolver, + RESOLVER_INTERFACE_IDS.InterfaceResolver, + ], + }, + { + address: deploymentAddresses.LegacyResolverV1, + deployer: 'ENS Labs', + tag: 'outdated', + isNameWrapperAware: false, + supportedInterfaces: [ + RESOLVER_INTERFACE_IDS.AddressResolver, + RESOLVER_INTERFACE_IDS.NameResolver, + RESOLVER_INTERFACE_IDS.AbiResolver, + RESOLVER_INTERFACE_IDS.InterfaceResolver, + ], + }, + ], } : {}), } @@ -265,5 +276,9 @@ export const getKnownResolverData = ({ }: { chainId: number resolverAddress: string -}): KnownResolverItem | undefined => - KNOWN_RESOLVER_DATA[chainId]?.find((data) => data.address === resolverAddress) +}): KnownResolverItem | undefined => { + console.log(KNOWN_RESOLVER_DATA[chainId]) + return KNOWN_RESOLVER_DATA[chainId]?.find( + (data) => data.address?.toLowerCase() === resolverAddress?.toLowerCase(), + ) +} diff --git a/src/hooks/resolver/useResolverStatus.ts b/src/hooks/resolver/useResolverStatus.ts index 8317c4d61..2942fc1d0 100644 --- a/src/hooks/resolver/useResolverStatus.ts +++ b/src/hooks/resolver/useResolverStatus.ts @@ -45,6 +45,8 @@ export const useResolverStatus = ({ enabled: enabled && !internalProfile.isLoading, }) + console.log('resolverType', resolverType) + const resolverIsAuthorised = useResolverIsAuthorised({ name, enabled: enabled && !resolverType.isLoading && resolverType.data?.type !== 'latest', @@ -82,6 +84,7 @@ export const useResolverStatus = ({ hasLatestResolver: false, hasValidResolver: false, isKnownResolver: false, + isOutdatedResolver: false, isAuthorized: false, isNameWrapperAware: false, hasProfile: false, @@ -95,6 +98,7 @@ export const useResolverStatus = ({ hasResolver: !!profileResolverAddress && profileResolverAddress !== emptyAddress, hasLatestResolver: resolverType.data?.type === 'latest', isKnownResolver: resolverType.data?.type !== 'custom', + isOutdatedResolver: resolverType.data?.type === 'outdated', isNameWrapperAware: profileResolverAddress ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) || resolverIsAuthorised.data?.isAuthorised diff --git a/src/hooks/resolver/useResolverType.ts b/src/hooks/resolver/useResolverType.ts index 65e2e112a..6ded3ccd3 100644 --- a/src/hooks/resolver/useResolverType.ts +++ b/src/hooks/resolver/useResolverType.ts @@ -58,6 +58,7 @@ export const useResolverType = ({ name, enabled: enabled_ = true }: UseResolverT const data = useMemo(() => { if (!enabled || isLoading) return + console.log('>>>>>', chainId, resolverAddress) const knownResolverData = getKnownResolverData({ chainId, resolverAddress }) if (!knownResolverData) { return { type: 'custom', isWildcard, tone: 'greySecondary' } as const diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 71dcc5132..0fcc1e9e1 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -28,14 +28,27 @@ import { useIsWrapped } from '@app/hooks/useIsWrapped' import { useProfile } from '@app/hooks/useProfile' import { ProfileEditorForm, useProfileEditorForm } from '@app/hooks/useProfileEditorForm' import { useResolverHasInterfaces } from '@app/hooks/useResolverHasInterfaces' +import { makeIntroItem } from '@app/transaction-flow/intro' import { createTransactionItem, TransactionItem } from '@app/transaction-flow/transaction' import TransactionLoader from '@app/transaction-flow/TransactionLoader' import type { TransactionDialogPassthrough } from '@app/transaction-flow/types' import { useProfileEditorReducer } from './hooks/useProfileEditorReducer' +import type { View } from './hooks/useProfileEditorReducer' // import { getResolverWrapperAwareness } from '@app/utils/utils' import ResolverWarningOverlay from './ResolverWarningOverlay' +import { InvalidResolverView } from './views/InvalidResolverView' +import { MigrateProfileSelectorView } from './views/MigrateProfileSelectorView.tsx' +import { MigrateProfileWarningView } from './views/MigrateProfileWarningView' +import { MigrateRegistryView } from './views/MigrateRegistryView' +import { NoResolverView } from './views/NoResolverView' +import { ResetProfileView } from './views/ResetProfileView' +import { ResolverNotNameWrapperAwareView } from './views/ResolverNotNameWrapperAwareView' +import { ResolverOutOfDateView } from './views/ResolverOutOfDateView' +import { ResolverOutOfSyncView } from './views/ResolverOutOfSyncView' +import { TransferOrResetProfileView } from './views/TransferOrResetProfileView' +import { UpdateResolverOrResetProfileView } from './views/UpdateResolverOrResetProfileView' import { WrappedAvatarButton } from './WrappedAvatarButton' const AvatarWrapper = styled.div( @@ -73,6 +86,8 @@ export type Props = { onDismiss?: () => void } & TransactionDialogPassthrough +type SelectedProfile = 'latest' | 'current' | 'reset' + const SubmitButton = ({ control, previousRecords, @@ -246,6 +261,105 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr setView('addRecord') } + const handleUpdateResolver = () => { + dispatch({ + name: 'setTransactions', + payload: [ + createTransactionItem('updateResolver', { + name, + contract: isWrapped ? 'nameWrapper' : 'registry', + resolverAddress, + }), + ], + }) + dispatch({ + name: 'setFlowStage', + payload: 'transaction', + }) + } + + const handleMigrateProfile = () => { + dispatch({ + name: 'startFlow', + key: `migrate-profile-${name}`, + payload: { + intro: { + title: ['input.profileEditor.intro.migrateProfile.title', { ns: 'transactionFlow' }], + content: makeIntroItem('GenericWithDescription', { + description: t('input.profileEditor.intro.migrateProfile.description', { + ns: 'transactionFlow', + }), + }), + }, + transactions: [ + createTransactionItem('migrateProfile', { + name, + }), + createTransactionItem('updateResolver', { + name, + contract: isWrapped ? 'nameWrapper' : 'registry', + resolverAddress, + }), + ], + }, + }) + } + + const handleResetProfile = () => { + dispatch({ + name: 'startFlow', + key: `reset-profile-${name}`, + payload: { + intro: { + title: ['input.profileEditor.intro.resetProfile.title', { ns: 'transactionFlow' }], + content: makeIntroItem('GenericWithDescription', { + description: t('input.profileEditor.intro.resetProfile.description'), + }), + }, + transactions: [ + createTransactionItem('resetProfile', { + name, + resolverAddress, + }), + createTransactionItem('updateResolver', { + name, + contract: isWrapped ? 'nameWrapper' : 'registry', + resolverAddress, + }), + ], + }, + }) + } + + const handleMigrateCurrentProfileToLatest = async () => { + dispatch({ + name: 'startFlow', + key: `migrate-profile-with-reset-${name}`, + payload: { + intro: { + title: [ + 'input.profileEditor.intro.migrateCurrentProfile.title', + { ns: 'transactionFlow' }, + ], + content: makeIntroItem('GenericWithDescription', { + description: t('input.profileEditor.intro.migrateCurrentProfile.description'), + }), + }, + transactions: [ + createTransactionItem('migrateProfileWithReset', { + name, + resolverAddress: profile?.resolverAddress!, + }), + createTransactionItem('updateResolver', { + name, + contract: isWrapped ? 'nameWrapper' : 'registry', + resolverAddress, + }), + ], + }, + }) + } + const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized console.log('canEditRecordsWhenWrapped', canEditRecordsWhenWrapped) @@ -258,10 +372,12 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr isWrapped, isLoading: isLoading_, }, - {}, + { + onDismiss, + }, ) - const view_ = editorState.flow[editorState.currentIndex] - console.log('editorState', editorState.flow[editorState.currentIndex]) + const view_ = editorState.stack[editorState.stack.length - 1] + console.log('editorState', view_) const shouldInitializeEditorState = !isLoading_ && view_ === 'loading' useEffect(() => { @@ -282,7 +398,8 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr return ( <> - {match(view) + {match(view_) + .with('loading', () => ) .with('editor', () => ( <> @@ -447,6 +564,89 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr }} /> )) + .with('migrateRegistry', () => ) + .with('invalidResolver', () => ( + {}} onCancel={onDismiss} /> + )) + .with('migrateProfileSelector', () => ( + {}} + onBack={() => {}} + onNext={() => {}} + /> + )) + .with('migrateProfileWarningView', () => ( + { + editorDispatch({ type: 'popView' }) + }} + onNext={() => {}} + /> + )) + .with('noResolver', () => ( + { + editorDispatch({ type: 'popView' }) + }} + onConfirm={() => {}} + /> + )) + .with('resetProfile', () => ( + { + editorDispatch({ type: 'popView' }) + }} + onNext={() => {}} + /> + )) + .with('resolverNotNameWrapperAware', () => ( + {}} + onCancel={onDismiss} + onNext={() => {}} + /> + )) + .with('resolverOutOfDate', () => ( + { + editorDispatch({ type: 'popView' }) + }} + onConfirm={() => { + if (resolverStatus.data?.hasProfile) + editorDispatch({ type: 'pushView', payload: 'transferOrResetProfile' }) + else handleUpdateResolver() + }} + /> + )) + .with('resolverOutOfSync', () => ( + {}} onCancel={onDismiss} onNext={() => {}} /> + )) + .with('transferOrResetProfile', () => ( + { + editorDispatch({ type: 'popView' }) + }} + onNext={(selectedProfile: SelectedProfile) => { + if (selectedProfile === 'reset') handleUpdateResolver() + else handleMigrateProfile() + }} + /> + )) + .with('updateResolverOrResetProfile', () => ( + {}} + onBack={() => {}} + onNext={() => {}} + /> + )) .exhaustive()} ) diff --git a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts index fc1561835..577ba3ca4 100644 --- a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts +++ b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts @@ -1,10 +1,10 @@ import { useReducer } from 'react' -import { match, P } from 'ts-pattern' +import { match } from 'ts-pattern' import type { useResolverStatus } from '@app/hooks/resolver/useResolverStatus' import type { useProfile } from '@app/hooks/useProfile' -type View = +export type View = | 'loading' | 'migrateRegistry' | 'noResolver' @@ -13,10 +13,16 @@ type View = | 'upload' | 'nft' | 'addRecord' + | 'resolverOutOfDate' + | 'transferOrResetProfile' + | 'invalidResolver' type State = { - flow: View[] - currentIndex: number + stack: View[] +} + +type Dependencies = { + onDismiss?: () => void } type InitialData = { @@ -30,8 +36,7 @@ const initializer = (deps: any) => ({ profile, resolverStatus, isWrapped, isLoading }: InitialData): State => { const defaultState: State = { - flow: ['loading'], - currentIndex: 0, + stack: ['loading'] as const, } console.log('initializer', profile, resolverStatus, isLoading) @@ -47,15 +52,19 @@ const initializer = { profile: { isMigrated: false }, }, - () => ({ ...defaultState, flow: ['migrateRegistry'] }), + () => ({ ...defaultState, stack: ['migrateRegistry'] as View[] }), ) + .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ + ...defaultState, + stack: ['resolverOutOfDate'] as View[], + })) .with({ resolverStatus: { hasResolver: false } }, () => ({ ...defaultState, - flow: ['noResolver'], + stack: ['noResolver'] as View[], })) .with({ resolverStatus: { isNameWrapperAware: false }, isWrapped: true }, () => ({ ...defaultState, - flow: ['resolverNotNameWrapperAware'], + stack: ['resolverNotNameWrapperAware'] as View[], })) .with( { resolverStatus: { hasValidResolver: false } }, @@ -64,45 +73,44 @@ const initializer = }, () => ({ ...defaultState, - flow: ['invalidResolver'], + stack: ['invalidResolver'] as View[], }), ) .otherwise(() => ({ ...defaultState, - flow: ['editor'], + stack: ['editor'] as View[], })) } type BaseAction = { - type: 'init' | 'increment' | 'decrement' | 'appendViews' + type: 'init' | 'increment' | 'decrement' | 'pushView' | 'popView' payload?: unknown } type InitAction = BaseAction & { type: 'init'; payload: InitialData } -type IncrementAction = BaseAction & { type: 'increment'; payload: never } -type DecrementAction = BaseAction & { type: 'decrement'; payload: never } -type AppendViewsAction = BaseAction & { type: 'appendViews'; payload: View[] } +type IncrementAction = BaseAction & { type: 'pushView'; payload: View } +type DecrementAction = BaseAction & { type: 'popView'; payload?: never } -type Action = InitAction | IncrementAction | DecrementAction | AppendViewsAction +type Action = InitAction | IncrementAction | DecrementAction -const reducer = (deps: any) => (state: any, action: Action) => { +const reducer = (deps: Dependencies) => (state: any, action: Action) => { const { type, payload } = action switch (type) { case 'init': return initializer(deps)(payload) - case 'increment': - if (state.currentIndex >= state.flow.length - 1) return state - return { ...state, currentIndex: state.currentIndex + 1 } - case 'decrement': - if (state.currentIndex <= 0) return state - return { ...state, currentIndex: state.currentIndex - 1 } - case 'appendViews': - return { ...state, flow: [...state.flow, ...(payload as View[])] } + case 'pushView': + return { ...state, stack: [...state.stack, payload] } + case 'popView': { + const poopedStack = state.stack.slice(0, -1) + if (poopedStack.length > 0) return { ...state, stack: poopedStack } + deps.onDismiss?.() + return state + } default: return state } } -export const useProfileEditorReducer = (initialState: InitialData, deps: {}) => { +export const useProfileEditorReducer = (initialState: InitialData, deps: Dependencies) => { return useReducer(reducer(deps), initialState, initializer(deps)) } diff --git a/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfDateView.tsx b/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfDateView.tsx index 7a407f914..9f2491cba 100644 --- a/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfDateView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfDateView.tsx @@ -28,12 +28,6 @@ export const ResolverOutOfDateView = ({ onConfirm, onCancel, onSkip }: Props) => {t('input.profileEditor.warningOverlay.action.learnMoreResolvers')} - void - onNext: () => void + onNext: (profile: SelectedProfile) => void onBack: () => void } -export const TransferOrResetProfileView = ({ - selected, - onChangeSelected, - onNext, - onBack, -}: Props) => { +export const TransferOrResetProfileView = ({ onNext, onBack }: Props) => { const { t } = useTranslation('transactionFlow') + const [selected, setSelected] = useState('latest') + return ( <> onChangeSelected(e.currentTarget.checked ? 'latest' : 'reset')} + onChange={(e) => setSelected(e.currentTarget.checked ? 'latest' : 'reset')} /> } trailing={ - } From 5df21904df45ea60bc4a4d0543345691f988b2eb Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Wed, 5 Feb 2025 18:02:39 +0800 Subject: [PATCH 08/22] add additional resolvers and tests --- deploy/.contracts/CustomLegacyResolver.json | 406 ++++ .../CustomNameWrapperAwareResolver.json | 1662 +++++++++++++++++ deploy/.contracts/LegacyResolverV1.json | 371 +++- deploy/.contracts/LegacyResolverV4.json | 4 - ...esolverV2.json => OutdatedResolverV1.json} | 0 deploy/.contracts/OutdatedResolverV2.json | 170 ++ ...esolverV3.json => OutdatedResolverV3.json} | 322 +++- deploy/00_deploy_legacy_resolvers.ts | 18 +- e2e/specs/stateless/profileEditor.spec.ts | 1311 +++++++------ .../generators/wrappedNameGenerator.ts | 7 + pnpm-lock.yaml | 79 +- .../steps/Profile/AddProfileRecordView.tsx | 15 +- .../pages/profile/[name]/tabs/ProfileTab.tsx | 2 + src/constants/resolverAddressData.ts | 11 +- src/hooks/resolver/useResolverIsAuthorised.ts | 2 + .../ProfileEditor/ProfileEditor-flow.tsx | 96 +- .../hooks/useProfileEditorReducer.ts | 11 +- .../views/MigrateProfileSelectorView.tsx.tsx | 22 +- .../views/ResolverNotNameWrapperAwareView.tsx | 23 +- .../views/ResolverOutOfDateView.tsx | 1 - 20 files changed, 3736 insertions(+), 797 deletions(-) create mode 100644 deploy/.contracts/CustomLegacyResolver.json create mode 100644 deploy/.contracts/CustomNameWrapperAwareResolver.json delete mode 100644 deploy/.contracts/LegacyResolverV4.json rename deploy/.contracts/{LegacyResolverV2.json => OutdatedResolverV1.json} (100%) create mode 100644 deploy/.contracts/OutdatedResolverV2.json rename deploy/.contracts/{LegacyResolverV3.json => OutdatedResolverV3.json} (63%) diff --git a/deploy/.contracts/CustomLegacyResolver.json b/deploy/.contracts/CustomLegacyResolver.json new file mode 100644 index 000000000..60c7b13cc --- /dev/null +++ b/deploy/.contracts/CustomLegacyResolver.json @@ -0,0 +1,406 @@ +{ + "abi": [ + { + "inputs": [{ "internalType": "contract ENS", "name": "_ens", "type": "address" }], + "payable": false, + "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": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, + { "indexed": false, "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "AuthorisationChanged", + "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": 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" + }, + { + "constant": true, + "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" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" } + ], + "name": "addr", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "authorisations", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "clearDNSZone", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "contenthash", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "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" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "name", "type": "bytes32" } + ], + "name": "hasDNSRecords", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } + ], + "name": "interfaceImplementer", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bytes[]", "name": "data", "type": "bytes[]" }], + "name": "multicall", + "outputs": [{ "internalType": "bytes[]", "name": "results", "type": "bytes[]" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "contentType", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" }, + { "internalType": "bytes", "name": "a", "type": "bytes" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "a", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "setAuthorisation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "setContenthash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "setDNSRecords", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }, + { "internalType": "address", "name": "implementer", "type": "address" } + ], + "name": "setInterface", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" }, + { "internalType": "string", "name": "value", "type": "string" } + ], + "name": "setText", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "text", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "bytecode": "0x60806040523480156200001157600080fd5b5060405162002abe38038062002abe83398101604081905262000034916200006d565b600a80546001600160a01b0319166001600160a01b0392909216919091179055620000d6565b80516200006781620000bc565b92915050565b6000602082840312156200008057600080fd5b60006200008e84846200005a565b949350505050565b60006200006782620000b0565b6000620000678262000096565b6001600160a01b031690565b620000c781620000a3565b8114620000d357600080fd5b50565b6129d880620000e66000396000f3fe608060405234801561001057600080fd5b50600436106101985760003560e01c8063691f3431116100e3578063bc1c58d11161008c578063e59d895d11610066578063e59d895d14610387578063f1cb7e061461039a578063f86bc879146103ad57610198565b8063bc1c58d114610340578063c869023314610353578063d5fa2b001461037457610198565b8063a8fa5682116100bd578063a8fa5682146102fa578063ac9650d81461030d578063ad5780af1461032d57610198565b8063691f3431146102c157806377372213146102d45780638b95dd71146102e757610198565b8063304e6ade116101455780634cbf6ba41161011f5780634cbf6ba41461027b57806359d1d43c1461028e578063623195b0146102ae57610198565b8063304e6ade146102425780633b3b57de146102555780633e9ce7941461026857610198565b8063124a319c11610176578063124a319c146101ee5780632203ab561461020e57806329cd62ea1461022f57610198565b806301ffc9a71461019d5780630af179d7146101c657806310f13a8c146101db575b600080fd5b6101b06101ab366004612504565b6103c0565b6040516101bd9190612730565b60405180910390f35b6101d96101d4366004612364565b61041e565b005b6101d96101e93660046123ba565b61060b565b6102016101fc366004612302565b6106b8565b6040516101bd9190612703565b61022161021c36600461224c565b6109f7565b6040516101bd9291906127f3565b6101d961023d36600461227c565b610b16565b6101d9610250366004612364565b610b96565b610201610263366004612164565b610bf5565b6101d9610276366004612209565b610c2a565b6101b061028936600461224c565b610ccf565b6102a161029c366004612364565b610d01565b6040516101bd9190612787565b6101d96102bc366004612441565b610dc3565b6102a16102cf366004612164565b610e3e565b6101d96102e2366004612364565b610edf565b6101d96102f53660046124a9565b610f3e565b6102a16103083660046122bf565b611003565b61032061031b366004612122565b611090565b6040516101bd919061271f565b6101d961033b366004612164565b6111d4565b6102a161034e366004612164565b611227565b610366610361366004612164565b61128f565b6040516101bd92919061274c565b6101d9610382366004612182565b6112a9565b6101d9610395366004612332565b6112d0565b6102a16103a836600461224c565b61139d565b6101b06103bb3660046121bc565b611446565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f59d1d43c00000000000000000000000000000000000000000000000000000000148061041657506104168261146c565b90505b919050565b82610428816114c2565b61043157600080fd5b60008060608082610440611e30565b61048a60008a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929392505063ffffffff6115d1169050565b90505b610496816115ec565b6105ae5761ffff86166104ee57806040015195506104b3816115fa565b9350836040516020016104c691906126ec565b6040516020818303038152906040528051906020012091506104e781611621565b92506105a0565b60606104f9826115fa565b9050816040015161ffff168761ffff161415806105235750610521858263ffffffff61164216565b155b1561059e576105778b86898d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505050602087015189518c918290039015611660565b81604001519650816020015195508094508480519060200120925061059b82611621565b93505b505b6105a9816118c7565b61048d565b50825115610600576106008984878b8b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505088518b9250828f03915015611660565b505050505050505050565b84610615816114c2565b61061e57600080fd5b82826009600089815260200190815260200160002087876040516106439291906126df565b90815260405190819003602001902061065d929091611e7b565b50848460405161066e9291906126df565b6040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a755087876040516106a8929190612775565b60405180910390a3505050505050565b60008281526006602090815260408083207fffffffff000000000000000000000000000000000000000000000000000000008516845290915281205473ffffffffffffffffffffffffffffffffffffffff1680156107175790506109f1565b600061072285610bf5565b905073ffffffffffffffffffffffffffffffffffffffff811661074a576000925050506109f1565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240161077d9190612767565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000179052516107fe91906126ec565b600060405180830381855afa9150503d8060008114610839576040519150601f19603f3d011682016040523d82523d6000602084013e61083e565b606091505b5091509150811580610851575060208151105b8061088d575080601f8151811061086457fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b1561089f5760009450505050506109f1565b8273ffffffffffffffffffffffffffffffffffffffff16866040516024016108c79190612767565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a7000000000000000000000000000000000000000000000000000000001790525161094891906126ec565b600060405180830381855afa9150503d8060008114610983576040519150601f19603f3d011682016040523d82523d6000602084013e610988565b606091505b50909250905081158061099c575060208151105b806109d8575080601f815181106109af57fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b156109ea5760009450505050506109f1565b5090925050505b92915050565b600082815260208190526040812060609060015b848111610af85780851615801590610a4357506000818152602083905260409020546002600019610100600184161502019091160415155b15610af0576000818152602083815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845284939192839190830182828015610ade5780601f10610ab357610100808354040283529160200191610ade565b820191906000526020600020905b815481529060010190602001808311610ac157829003601f168201915b50505050509050935093505050610b0f565b60011b610a0b565b505060408051602081019091526000808252925090505b9250929050565b82610b20816114c2565b610b2957600080fd5b6040805180820182528481526020808201858152600088815260089092529083902091518255516001909101555184907f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e4690610b88908690869061274c565b60405180910390a250505050565b82610ba0816114c2565b610ba957600080fd5b6000848152600260205260409020610bc2908484611e7b565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d75788484604051610b88929190612775565b60006060610c0483603c61139d565b9050805160001415610c1a576000915050610419565b610c238161199a565b9392505050565b6000838152600b602090815260408083203380855290835281842073ffffffffffffffffffffffffffffffffffffffff871680865293529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515151790555190919085907fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df90610cc2908690612730565b60405180910390a4505050565b600091825260056020908152604080842060038352818520548552825280842092845291905290205461ffff16151590565b6060600960008581526020019081526020016000208383604051610d269291906126df565b9081526040805160209281900383018120805460026001821615610100026000190190911604601f81018590048502830185019093528282529092909190830182828015610db55780601f10610d8a57610100808354040283529160200191610db5565b820191906000526020600020905b815481529060010190602001808311610d9857829003601f168201915b505050505090509392505050565b83610dcd816114c2565b610dd657600080fd5b6000198401841615610de757600080fd5b6000858152602081815260408083208784529091529020610e09908484611e7b565b50604051849086907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35050505050565b60008181526007602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610ed35780601f10610ea857610100808354040283529160200191610ed3565b820191906000526020600020905b815481529060010190602001808311610eb657829003601f168201915b50505050509050919050565b82610ee9816114c2565b610ef257600080fd5b6000848152600760205260409020610f0b908484611e7b565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051610b88929190612775565b82610f48816114c2565b610f5157600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af7528484604051610f839291906127f3565b60405180910390a2603c831415610fd557837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2610fbf8461199a565b604051610fcc9190612711565b60405180910390a25b600084815260016020908152604080832086845282529091208351610ffc92850190611f17565b5050505050565b6000838152600460209081526040808320600383528184205484528252808320858452825280832061ffff8516845282529182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845260609392830182828015610db55780601f10610d8a57610100808354040283529160200191610db5565b6040805182815260208084028201019091526060908280156110c657816020015b60608152602001906001900390816110b15790505b50905060005b828110156111cd5760006060308686858181106110e557fe5b6020028201905080357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe13684900301811261111f57600080fd5b9091016020810191503567ffffffffffffffff81111561113e57600080fd5b3681900382131561114e57600080fd5b60405161115c9291906126df565b600060405180830381855af49150503d8060008114611197576040519150601f19603f3d011682016040523d82523d6000602084013e61119c565b606091505b5091509150816111ab57600080fd5b808484815181106111b857fe5b602090810291909101015250506001016110cc565b5092915050565b806111de816114c2565b6111e757600080fd5b600082815260036020526040808220805460010190555183917fb757169b8492ca2f1c6619d9d76ce22803035c3b1d5f6930dffe7b127c1a198391a25050565b600081815260026020818152604092839020805484516001821615610100026000190190911693909304601f81018390048302840183019094528383526060939091830182828015610ed35780601f10610ea857610100808354040283529160200191610ed3565b600090815260086020526040902080546001909101549091565b816112b3816114c2565b6112bc57600080fd5b6112cb83603c6102f5856119c2565b505050565b826112da816114c2565b6112e357600080fd5b60008481526006602090815260408083207fffffffff00000000000000000000000000000000000000000000000000000000871680855292529182902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055905185907f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa9061138f908690612703565b60405180910390a350505050565b600082815260016020818152604080842085855282529283902080548451600294821615610100026000190190911693909304601f810183900483028401830190945283835260609390918301828280156114395780601f1061140e57610100808354040283529160200191611439565b820191906000526020600020905b81548152906001019060200180831161141c57829003601f168201915b5050505050905092915050565b600b60209081526000938452604080852082529284528284209052825290205460ff1681565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fc86902330000000000000000000000000000000000000000000000000000000014806104165750610416826119fb565b600a546040517f02571be3000000000000000000000000000000000000000000000000000000008152600091829173ffffffffffffffffffffffffffffffffffffffff909116906302571be39061151d90869060040161273e565b60206040518083038186803b15801561153557600080fd5b505afa158015611549573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061156d91908101906120fc565b905073ffffffffffffffffffffffffffffffffffffffff8116331480610c2357506000838152600b6020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452825280832033845290915290205460ff16915050919050565b6115d9611e30565b82815260c081018290526109f1816118c7565b805151602090910151101590565b60208101518151606091610416916116129082611a51565b8451919063ffffffff611a9816565b60a081015160c082015182516060926104169281900363ffffffff611a9816565b600081518351148015610c235750610c238360008460008751611afa565b600087815260036020908152604090912054875191880191909120606061168e87878763ffffffff611a9816565b905083156117a85760008a81526004602090815260408083208684528252808320858452825280832061ffff8c16845290915290205460026000196101006001841615020190911604156117335760008a81526005602090815260408083208684528252808320858452909152902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000811661ffff918216600019019091161790555b60008a81526004602090815260408083208684528252808320858452825280832061ffff8c168452909152812061176991611f85565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a60405161179b929190612798565b60405180910390a26118bb565b60008a81526004602090815260408083208684528252808320858452825280832061ffff8c168452909152902054600260001961010060018416150201909116046118425760008a815260056020908152604080832086845282528083208584529091529020805461ffff808216600101167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00009091161790555b60008a81526004602090815260408083208684528252808320858452825280832061ffff8c1684528252909120825161187d92840190611f17565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a846040516118b2939291906127b8565b60405180910390a25b50505050505050505050565b60c081015160208201819052815151116118e057611997565b60006118f482600001518360200151611a51565b602083015183519101915061190f908263ffffffff611b1d16565b61ffff166040830152815160029190910190611931908263ffffffff611b1d16565b61ffff166060830152815160029190910190611953908263ffffffff611b3d16565b63ffffffff908116608084015282516004929092019160009161197991908490611b1d16565b600283810160a086015261ffff9190911690920190910160c0830152505b50565b600081516014146119aa57600080fd5b50602001516c01000000000000000000000000900490565b6040805160148082528183019092526060916020820181803883395050506c010000000000000000000000009290920260208301525090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f691f3431000000000000000000000000000000000000000000000000000000001480610416575061041682611b5f565b6000815b83518110611a5f57fe5b6000611a71858363ffffffff611bc416565b60ff1691820160010191905080611a885750611a8e565b50611a55565b9190910392915050565b606083518284011115611aaa57600080fd5b6060826040519080825280601f01601f191660200182016040528015611ad7576020820181803883390190505b50905060208082019086860101611aef828287611be2565b509095945050505050565b6000611b07848484611c3e565b611b12878785611c3e565b149695505050505050565b60008251826002011115611b3057600080fd5b50016002015161ffff1690565b60008251826004011115611b5057600080fd5b50016004015163ffffffff1690565b6000604051611b6d906126f8565b60405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610416575061041682611c5a565b6000828281518110611bd257fe5b016020015160f81c905092915050565b5b60208110611c205781518352602092830192909101907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe001611be3565b905182516020929092036101000a6000190180199091169116179052565b600083518284011115611c5057600080fd5b5091016020012090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167fa8fa568200000000000000000000000000000000000000000000000000000000148061041657506104168260007fffffffff0000000000000000000000000000000000000000000000000000000082167fbc1c58d100000000000000000000000000000000000000000000000000000000148061041657506104168260007fffffffff0000000000000000000000000000000000000000000000000000000082167f3b3b57de000000000000000000000000000000000000000000000000000000001480611d8f57507fffffffff0000000000000000000000000000000000000000000000000000000082167ff1cb7e0600000000000000000000000000000000000000000000000000000000145b8061041657506104168260007fffffffff0000000000000000000000000000000000000000000000000000000082167f2203ab5600000000000000000000000000000000000000000000000000000000148061041657507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610416565b6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611eda578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555611f07565b82800160010185558215611f07579182015b82811115611f07578235825591602001919060010190611eec565b50611f13929150611fc5565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f5857805160ff1916838001178555611f07565b82800160010185558215611f07579182015b82811115611f07578251825591602001919060010190611f6a565b50805460018160011615610100020316600290046000825580601f10611fab5750611997565b601f01602090049060005260206000209081019061199791905b611fdf91905b80821115611f135760008155600101611fcb565b90565b80356109f18161295d565b80516109f18161295d565b60008083601f84011261200a57600080fd5b50813567ffffffffffffffff81111561202257600080fd5b602083019150836020820283011115610b0f57600080fd5b80356109f181612971565b80356109f18161297a565b80356109f181612983565b60008083601f84011261206d57600080fd5b50813567ffffffffffffffff81111561208557600080fd5b602083019150836001820283011115610b0f57600080fd5b600082601f8301126120ae57600080fd5b81356120c16120bc8261283a565b612813565b915080825260208301602083018583830111156120dd57600080fd5b6120e88382846128f9565b50505092915050565b80356109f18161298c565b60006020828403121561210e57600080fd5b600061211a8484611fed565b949350505050565b6000806020838503121561213557600080fd5b823567ffffffffffffffff81111561214c57600080fd5b61215885828601611ff8565b92509250509250929050565b60006020828403121561217657600080fd5b600061211a8484612045565b6000806040838503121561219557600080fd5b60006121a18585612045565b92505060206121b285828601611fe2565b9150509250929050565b6000806000606084860312156121d157600080fd5b60006121dd8686612045565b93505060206121ee86828701611fe2565b92505060406121ff86828701611fe2565b9150509250925092565b60008060006060848603121561221e57600080fd5b600061222a8686612045565b935050602061223b86828701611fe2565b92505060406121ff8682870161203a565b6000806040838503121561225f57600080fd5b600061226b8585612045565b92505060206121b285828601612045565b60008060006060848603121561229157600080fd5b600061229d8686612045565b93505060206122ae86828701612045565b92505060406121ff86828701612045565b6000806000606084860312156122d457600080fd5b60006122e08686612045565b93505060206122f186828701612045565b92505060406121ff868287016120f1565b6000806040838503121561231557600080fd5b60006123218585612045565b92505060206121b285828601612050565b60008060006060848603121561234757600080fd5b60006123538686612045565b93505060206121ee86828701612050565b60008060006040848603121561237957600080fd5b60006123858686612045565b935050602084013567ffffffffffffffff8111156123a257600080fd5b6123ae8682870161205b565b92509250509250925092565b6000806000806000606086880312156123d257600080fd5b60006123de8888612045565b955050602086013567ffffffffffffffff8111156123fb57600080fd5b6124078882890161205b565b9450945050604086013567ffffffffffffffff81111561242657600080fd5b6124328882890161205b565b92509250509295509295909350565b6000806000806060858703121561245757600080fd5b60006124638787612045565b945050602061247487828801612045565b935050604085013567ffffffffffffffff81111561249157600080fd5b61249d8782880161205b565b95989497509550505050565b6000806000606084860312156124be57600080fd5b60006124ca8686612045565b93505060206124db86828701612045565b925050604084013567ffffffffffffffff8111156124f857600080fd5b6121ff8682870161209d565b60006020828403121561251657600080fd5b600061211a8484612050565b6000610c23838361261a565b612537816128e8565b82525050565b61253781612893565b600061255182612886565b61255b818561288a565b93508360208202850161256d85612880565b8060005b858110156125a7578484038952815161258a8582612522565b945061259583612880565b60209a909a0199925050600101612571565b5091979650505050505050565b6125378161289e565b61253781611fdf565b612537816128a3565b60006125db838561288a565b93506125e88385846128f9565b6125f183612935565b9093019392505050565b60006126078385610419565b93506126148385846128f9565b50500190565b600061262582612886565b61262f818561288a565b935061263f818560208601612905565b6125f181612935565b600061265382612886565b61265d8185610419565b935061266d818560208601612905565b9290920192915050565b6000612684602483610419565b7f696e74657266616365496d706c656d656e74657228627974657333322c62797481527f6573342900000000000000000000000000000000000000000000000000000000602082015260240192915050565b612537816128c8565b600061211a8284866125fb565b6000610c238284612648565b60006109f182612677565b602081016109f1828461253d565b602081016109f1828461252e565b60208082528101610c238184612546565b602081016109f182846125b4565b602081016109f182846125bd565b6040810161275a82856125bd565b610c2360208301846125bd565b602081016109f182846125c6565b6020808252810161211a8184866125cf565b60208082528101610c23818461261a565b604080825281016127a9818561261a565b9050610c2360208301846126d6565b606080825281016127c9818661261a565b90506127d860208301856126d6565b81810360408301526127ea818461261a565b95945050505050565b6040810161280182856125bd565b818103602083015261211a818461261a565b60405181810167ffffffffffffffff8111828210171561283257600080fd5b604052919050565b600067ffffffffffffffff82111561285157600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b90815260200190565b6000610416826128cf565b151590565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b61ffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b600061041682600061041682612893565b82818337506000910152565b60005b83811015612920578181015183820152602001612908565b8381111561292f576000848401525b50505050565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b61296681612893565b811461199757600080fd5b6129668161289e565b61296681611fdf565b612966816128a3565b612966816128c856fea365627a7a7231582082927c55ed80cd2c2b4af3ecca0340c755f0257fadbdd76a4c4b6458f1c8eefc6c6578706572696d656e74616cf564736f6c63430005110040" +} diff --git a/deploy/.contracts/CustomNameWrapperAwareResolver.json b/deploy/.contracts/CustomNameWrapperAwareResolver.json new file mode 100644 index 000000000..6a07ef30b --- /dev/null +++ b/deploy/.contracts/CustomNameWrapperAwareResolver.json @@ -0,0 +1,1662 @@ +{ + "address": "0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63", + "abi": [ + { + "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": false, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "indexed": true, + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "Approved", + "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" + }, + { + "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" + }, + { + "indexed": false, + "internalType": "string", + "name": "value", + "type": "string" + } + ], + "name": "TextChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "newVersion", + "type": "uint64" + } + ], + "name": "VersionChanged", + "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" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + }, + { + "internalType": "bool", + "name": "approved", + "type": "bool" + } + ], + "name": "approve", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + } + ], + "name": "clearRecords", + "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": "owner", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "node", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "delegate", + "type": "address" + } + ], + "name": "isApprovedFor", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "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": "nodehash", + "type": "bytes32" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicallWithNodeCheck", + "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": "", + "type": "bytes32" + } + ], + "name": "recordVersions", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "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": "view", + "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" + } + ], + "transactionHash": "0x97409a208eb9cecb969cde484434dca6589a8e533c963d13a2dc3df2ff2ba811", + "receipt": { + "to": null, + "from": "0x0904Dac3347eA47d208F3Fd67402D039a3b99859", + "contractAddress": "0x231b0Ee14048e9dCcD1d247744d114a4EB5E8E63", + "transactionIndex": 95, + "gasUsed": "2768314", + "logsBloom": "0x00000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000010000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000008000040000000000000000000000000200000000005000000000000000000000000000000000000000000000000000000000000100000000000000001000000000000000000000", + "blockHash": "0x70ebaedbce1d0b82228f2268d415167f923f9474cd5dc1b1b59e718733ba953a", + "transactionHash": "0x97409a208eb9cecb969cde484434dca6589a8e533c963d13a2dc3df2ff2ba811", + "logs": [ + { + "transactionIndex": 95, + "blockNumber": 16925619, + "transactionHash": "0x97409a208eb9cecb969cde484434dca6589a8e533c963d13a2dc3df2ff2ba811", + "address": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + "topics": [ + "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2", + "0xb7e1ee41082754786e6040112f63ab27e9cda80736a3f80f3e0727fd6d19cfba" + ], + "data": "0x0000000000000000000000000904dac3347ea47d208f3fd67402d039a3b99859", + "logIndex": 153, + "blockHash": "0x70ebaedbce1d0b82228f2268d415167f923f9474cd5dc1b1b59e718733ba953a" + } + ], + "blockNumber": 16925619, + "cumulativeGasUsed": "9246445", + "status": 1, + "byzantium": true + }, + "args": [ + "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", + "0xD4416b13d2b3a9aBae7AcD5D6C2BbDBE25686401", + "0x253553366Da8546fC250F225fe3d25d0C782303b", + "0xa58E81fe9b61B5c3fE2AFD33CF304c454AbFc7Cb" + ], + "numDeployments": 1, + "solcInputHash": "3fa59c31b7672c86eff32031f5a10f8a", + "metadata": "{\"compiler\":{\"version\":\"0.8.17+commit.8df45f5f\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"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\":false,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"Approved\",\"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\"},{\"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\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"}],\"name\":\"TextChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"newVersion\",\"type\":\"uint64\"}],\"name\":\"VersionChanged\",\"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\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"}],\"name\":\"clearRecords\",\"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\":\"owner\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"node\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"delegate\",\"type\":\"address\"}],\"name\":\"isApprovedFor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"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\":\"nodehash\",\"type\":\"bytes32\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"multicallWithNodeCheck\",\"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\":\"\",\"type\":\"bytes32\"}],\"name\":\"recordVersions\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"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\":\"view\",\"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\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"ABI(bytes32,uint256)\":{\"params\":{\"contentTypes\":\"A bitwise OR of the ABI formats accepted by the caller.\",\"node\":\"The ENS node to query\"},\"returns\":{\"_0\":\"contentType The content type of the return value\",\"_1\":\"data The ABI data\"}},\"addr(bytes32)\":{\"params\":{\"node\":\"The ENS node to query.\"},\"returns\":{\"_0\":\"The associated address.\"}},\"approve(bytes32,address,bool)\":{\"details\":\"Approve a delegate to be able to updated records on a node.\"},\"clearRecords(bytes32)\":{\"params\":{\"node\":\"The node to update.\"}},\"contenthash(bytes32)\":{\"params\":{\"node\":\"The ENS node to query.\"},\"returns\":{\"_0\":\"The associated contenthash.\"}},\"dnsRecord(bytes32,bytes32,uint16)\":{\"params\":{\"name\":\"the keccak-256 hash of the fully-qualified name for which to fetch the record\",\"node\":\"the namehash of the node for which to fetch the record\",\"resource\":\"the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\"},\"returns\":{\"_0\":\"the DNS record in wire format if present, otherwise empty\"}},\"hasDNSRecords(bytes32,bytes32)\":{\"params\":{\"name\":\"the namehash of the node for which to check the records\",\"node\":\"the namehash of the node for which to check the records\"}},\"interfaceImplementer(bytes32,bytes4)\":{\"params\":{\"interfaceID\":\"The EIP 165 interface ID to check for.\",\"node\":\"The ENS node to query.\"},\"returns\":{\"_0\":\"The address that implements this interface, or 0 if the interface is unsupported.\"}},\"isApprovedFor(address,bytes32,address)\":{\"details\":\"Check to see if the delegate has been approved by the owner for the node.\"},\"isApprovedForAll(address,address)\":{\"details\":\"See {IERC1155-isApprovedForAll}.\"},\"name(bytes32)\":{\"params\":{\"node\":\"The ENS node to query.\"},\"returns\":{\"_0\":\"The associated name.\"}},\"pubkey(bytes32)\":{\"params\":{\"node\":\"The ENS node to query\"},\"returns\":{\"x\":\"The X coordinate of the curve point for the public key.\",\"y\":\"The Y coordinate of the curve point for the public key.\"}},\"setABI(bytes32,uint256,bytes)\":{\"params\":{\"contentType\":\"The content type of the ABI\",\"data\":\"The ABI data.\",\"node\":\"The node to update.\"}},\"setAddr(bytes32,address)\":{\"params\":{\"a\":\"The address to set.\",\"node\":\"The node to update.\"}},\"setApprovalForAll(address,bool)\":{\"details\":\"See {IERC1155-setApprovalForAll}.\"},\"setContenthash(bytes32,bytes)\":{\"params\":{\"hash\":\"The contenthash to set\",\"node\":\"The node to update.\"}},\"setDNSRecords(bytes32,bytes)\":{\"params\":{\"data\":\"the DNS wire format records to set\",\"node\":\"the namehash of the node for which to set the records\"}},\"setInterface(bytes32,bytes4,address)\":{\"params\":{\"implementer\":\"The address of a contract that implements this interface for this node.\",\"interfaceID\":\"The EIP 165 interface ID.\",\"node\":\"The node to update.\"}},\"setName(bytes32,string)\":{\"params\":{\"node\":\"The node to update.\"}},\"setPubkey(bytes32,bytes32,bytes32)\":{\"params\":{\"node\":\"The ENS node to query\",\"x\":\"the X coordinate of the curve point for the public key.\",\"y\":\"the Y coordinate of the curve point for the public key.\"}},\"setText(bytes32,string,string)\":{\"params\":{\"key\":\"The key to set.\",\"node\":\"The node to update.\",\"value\":\"The text data value to set.\"}},\"setZonehash(bytes32,bytes)\":{\"params\":{\"hash\":\"The zonehash to set\",\"node\":\"The node to update.\"}},\"text(bytes32,string)\":{\"params\":{\"key\":\"The text data key to query.\",\"node\":\"The ENS node to query.\"},\"returns\":{\"_0\":\"The associated text data.\"}},\"zonehash(bytes32)\":{\"params\":{\"node\":\"The ENS node to query.\"},\"returns\":{\"_0\":\"The associated contenthash.\"}}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"ABI(bytes32,uint256)\":{\"notice\":\"Returns the ABI associated with an ENS node. Defined in EIP205.\"},\"addr(bytes32)\":{\"notice\":\"Returns the address associated with an ENS node.\"},\"clearRecords(bytes32)\":{\"notice\":\"Increments the record version associated with an ENS node. May only be called by the owner of that node in the ENS registry.\"},\"contenthash(bytes32)\":{\"notice\":\"Returns the contenthash associated with an ENS node.\"},\"dnsRecord(bytes32,bytes32,uint16)\":{\"notice\":\"Obtain a DNS record.\"},\"hasDNSRecords(bytes32,bytes32)\":{\"notice\":\"Check if a given node has records.\"},\"interfaceImplementer(bytes32,bytes4)\":{\"notice\":\"Returns the address of a contract that implements the specified interface for this name. If an implementer has not been set for this interfaceID and name, the resolver will query the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that contract implements EIP165 and returns `true` for the specified interfaceID, its address will be returned.\"},\"name(bytes32)\":{\"notice\":\"Returns the name associated with an ENS node, for reverse records. Defined in EIP181.\"},\"pubkey(bytes32)\":{\"notice\":\"Returns the SECP256k1 public key associated with an ENS node. Defined in EIP 619.\"},\"setABI(bytes32,uint256,bytes)\":{\"notice\":\"Sets the ABI associated with an ENS node. Nodes may have one ABI of each content type. To remove an ABI, set it to the empty string.\"},\"setAddr(bytes32,address)\":{\"notice\":\"Sets the address associated with an ENS node. May only be called by the owner of that node in the ENS registry.\"},\"setContenthash(bytes32,bytes)\":{\"notice\":\"Sets the contenthash associated with an ENS node. May only be called by the owner of that node in the ENS registry.\"},\"setDNSRecords(bytes32,bytes)\":{\"notice\":\"Set one or more DNS records. Records are supplied in wire-format. Records with the same node/name/resource must be supplied one after the other to ensure the data is updated correctly. For example, if the data was supplied: a.example.com IN A 1.2.3.4 a.example.com IN A 5.6.7.8 www.example.com IN CNAME a.example.com. then this would store the two A records for a.example.com correctly as a single RRSET, however if the data was supplied: a.example.com IN A 1.2.3.4 www.example.com IN CNAME a.example.com. a.example.com IN A 5.6.7.8 then this would store the first A record, the CNAME, then the second A record which would overwrite the first.\"},\"setInterface(bytes32,bytes4,address)\":{\"notice\":\"Sets an interface associated with a name. Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support.\"},\"setName(bytes32,string)\":{\"notice\":\"Sets the name associated with an ENS node, for reverse records. May only be called by the owner of that node in the ENS registry.\"},\"setPubkey(bytes32,bytes32,bytes32)\":{\"notice\":\"Sets the SECP256k1 public key associated with an ENS node.\"},\"setText(bytes32,string,string)\":{\"notice\":\"Sets the text data associated with an ENS node and key. May only be called by the owner of that node in the ENS registry.\"},\"setZonehash(bytes32,bytes)\":{\"notice\":\"setZonehash sets the hash for the zone. May only be called by the owner of that node in the ENS registry.\"},\"text(bytes32,string)\":{\"notice\":\"Returns the text data associated with an ENS node and key.\"},\"zonehash(bytes32)\":{\"notice\":\"zonehash obtains the hash for the zone.\"}},\"notice\":\"A simple resolver anyone can use; only allows the owner of a node to set its address.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/resolvers/PublicResolver.sol\":\"PublicResolver\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1300},\"remappings\":[]},\"sources\":{\"@ensdomains/buffer/contracts/Buffer.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-2-Clause\\npragma solidity ^0.8.4;\\n\\n/**\\n* @dev A library for working with mutable byte buffers in Solidity.\\n*\\n* Byte buffers are mutable and expandable, and provide a variety of primitives\\n* for appending to them. At any time you can fetch a bytes object containing the\\n* current contents of the buffer. The bytes object should not be stored between\\n* operations, as it may change due to resizing of the buffer.\\n*/\\nlibrary Buffer {\\n /**\\n * @dev Represents a mutable buffer. Buffers have a current value (buf) and\\n * a capacity. The capacity may be longer than the current value, in\\n * which case it can be extended without the need to allocate more memory.\\n */\\n struct buffer {\\n bytes buf;\\n uint capacity;\\n }\\n\\n /**\\n * @dev Initializes a buffer with an initial capacity.\\n * @param buf The buffer to initialize.\\n * @param capacity The number of bytes of space to allocate the buffer.\\n * @return The buffer, for chaining.\\n */\\n function init(buffer memory buf, uint capacity) internal pure returns(buffer memory) {\\n if (capacity % 32 != 0) {\\n capacity += 32 - (capacity % 32);\\n }\\n // Allocate space for the buffer data\\n buf.capacity = capacity;\\n assembly {\\n let ptr := mload(0x40)\\n mstore(buf, ptr)\\n mstore(ptr, 0)\\n let fpm := add(32, add(ptr, capacity))\\n if lt(fpm, ptr) {\\n revert(0, 0)\\n }\\n mstore(0x40, fpm)\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Initializes a new buffer from an existing bytes object.\\n * Changes to the buffer may mutate the original value.\\n * @param b The bytes object to initialize the buffer with.\\n * @return A new buffer.\\n */\\n function fromBytes(bytes memory b) internal pure returns(buffer memory) {\\n buffer memory buf;\\n buf.buf = b;\\n buf.capacity = b.length;\\n return buf;\\n }\\n\\n function resize(buffer memory buf, uint capacity) private pure {\\n bytes memory oldbuf = buf.buf;\\n init(buf, capacity);\\n append(buf, oldbuf);\\n }\\n\\n /**\\n * @dev Sets buffer length to 0.\\n * @param buf The buffer to truncate.\\n * @return The original buffer, for chaining..\\n */\\n function truncate(buffer memory buf) internal pure returns (buffer memory) {\\n assembly {\\n let bufptr := mload(buf)\\n mstore(bufptr, 0)\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Appends len bytes of a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @param len The number of bytes to copy.\\n * @return The original buffer, for chaining.\\n */\\n function append(buffer memory buf, bytes memory data, uint len) internal pure returns(buffer memory) {\\n require(len <= data.length);\\n\\n uint off = buf.buf.length;\\n uint newCapacity = off + len;\\n if (newCapacity > buf.capacity) {\\n resize(buf, newCapacity * 2);\\n }\\n\\n uint dest;\\n uint src;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Length of existing buffer data\\n let buflen := mload(bufptr)\\n // Start address = buffer address + offset + sizeof(buffer length)\\n dest := add(add(bufptr, 32), off)\\n // Update buffer length if we're extending it\\n if gt(newCapacity, buflen) {\\n mstore(bufptr, newCapacity)\\n }\\n src := add(data, 32)\\n }\\n\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n unchecked {\\n uint mask = (256 ** (32 - len)) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n\\n return buf;\\n }\\n\\n /**\\n * @dev Appends a byte string to a buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chaining.\\n */\\n function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {\\n return append(buf, data, data.length);\\n }\\n\\n /**\\n * @dev Appends a byte to the buffer. Resizes if doing so would exceed the\\n * capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chaining.\\n */\\n function appendUint8(buffer memory buf, uint8 data) internal pure returns(buffer memory) {\\n uint off = buf.buf.length;\\n uint offPlusOne = off + 1;\\n if (off >= buf.capacity) {\\n resize(buf, offPlusOne * 2);\\n }\\n\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Address = buffer address + sizeof(buffer length) + off\\n let dest := add(add(bufptr, off), 32)\\n mstore8(dest, data)\\n // Update buffer length if we extended it\\n if gt(offPlusOne, mload(bufptr)) {\\n mstore(bufptr, offPlusOne)\\n }\\n }\\n\\n return buf;\\n }\\n\\n /**\\n * @dev Appends len bytes of bytes32 to a buffer. Resizes if doing so would\\n * exceed the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @param len The number of bytes to write (left-aligned).\\n * @return The original buffer, for chaining.\\n */\\n function append(buffer memory buf, bytes32 data, uint len) private pure returns(buffer memory) {\\n uint off = buf.buf.length;\\n uint newCapacity = len + off;\\n if (newCapacity > buf.capacity) {\\n resize(buf, newCapacity * 2);\\n }\\n\\n unchecked {\\n uint mask = (256 ** len) - 1;\\n // Right-align data\\n data = data >> (8 * (32 - len));\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Address = buffer address + sizeof(buffer length) + newCapacity\\n let dest := add(bufptr, newCapacity)\\n mstore(dest, or(and(mload(dest), not(mask)), data))\\n // Update buffer length if we extended it\\n if gt(newCapacity, mload(bufptr)) {\\n mstore(bufptr, newCapacity)\\n }\\n }\\n }\\n return buf;\\n }\\n\\n /**\\n * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chhaining.\\n */\\n function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {\\n return append(buf, bytes32(data), 20);\\n }\\n\\n /**\\n * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed\\n * the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @return The original buffer, for chaining.\\n */\\n function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {\\n return append(buf, data, 32);\\n }\\n\\n /**\\n * @dev Appends a byte to the end of the buffer. Resizes if doing so would\\n * exceed the capacity of the buffer.\\n * @param buf The buffer to append to.\\n * @param data The data to append.\\n * @param len The number of bytes to write (right-aligned).\\n * @return The original buffer.\\n */\\n function appendInt(buffer memory buf, uint data, uint len) internal pure returns(buffer memory) {\\n uint off = buf.buf.length;\\n uint newCapacity = len + off;\\n if (newCapacity > buf.capacity) {\\n resize(buf, newCapacity * 2);\\n }\\n\\n uint mask = (256 ** len) - 1;\\n assembly {\\n // Memory address of the buffer data\\n let bufptr := mload(buf)\\n // Address = buffer address + sizeof(buffer length) + newCapacity\\n let dest := add(bufptr, newCapacity)\\n mstore(dest, or(and(mload(dest), not(mask)), data))\\n // Update buffer length if we extended it\\n if gt(newCapacity, mload(bufptr)) {\\n mstore(bufptr, newCapacity)\\n }\\n }\\n return buf;\\n }\\n}\\n\",\"keccak256\":\"0xd6dd3b0b327288f8e1b711a609f4040fea602e2ad4bba9febdf2f33b4e56eb0c\",\"license\":\"BSD-2-Clause\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n /**\\n * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n */\\n event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n /**\\n * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n * transfers.\\n */\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] values\\n );\\n\\n /**\\n * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n * `approved`.\\n */\\n event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n /**\\n * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n *\\n * If an {URI} event was emitted for `id`, the standard\\n * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n * returned by {IERC1155MetadataURI-uri}.\\n */\\n event URI(string value, uint256 indexed id);\\n\\n /**\\n * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n *\\n * Requirements:\\n *\\n * - `accounts` and `ids` must have the same length.\\n */\\n function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)\\n external\\n view\\n returns (uint256[] memory);\\n\\n /**\\n * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n *\\n * Emits an {ApprovalForAll} event.\\n *\\n * Requirements:\\n *\\n * - `operator` cannot be the caller.\\n */\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n /**\\n * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n *\\n * See {setApprovalForAll}.\\n */\\n function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n /**\\n * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n *\\n * Emits a {TransferSingle} event.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n * acceptance magic value.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n *\\n * Emits a {TransferBatch} event.\\n *\\n * Requirements:\\n *\\n * - `ids` and `amounts` must have the same length.\\n * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n * acceptance magic value.\\n */\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) external;\\n}\\n\",\"keccak256\":\"0x6392f2cfe3a5ee802227fe7a2dfd47096d881aec89bddd214b35c5b46d3cd941\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721\\n * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must\\n * understand this adds an external call which potentially creates a reentrancy vulnerability.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0xab28a56179c1db258c9bf5235b382698cb650debecb51b23d12be9e241374b68\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n /**\\n * @dev See {IERC165-supportsInterface}.\\n */\\n function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n return interfaceId == type(IERC165).interfaceId;\\n }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/dnssec-oracle/BytesUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nlibrary BytesUtils {\\n error OffsetOutOfBoundsError(uint256 offset, uint256 length);\\n\\n /*\\n * @dev Returns the keccak-256 hash of a byte range.\\n * @param self The byte string to hash.\\n * @param offset The position to start hashing at.\\n * @param len The number of bytes to hash.\\n * @return The hash of the byte range.\\n */\\n function keccak(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(offset + len <= self.length);\\n assembly {\\n ret := keccak256(add(add(self, 32), offset), len)\\n }\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal.\\n * @param self The first bytes to compare.\\n * @param other The second bytes to compare.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (int256) {\\n return compare(self, 0, self.length, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns a positive number if `other` comes lexicographically after\\n * `self`, a negative number if it comes before, or zero if the\\n * contents of the two bytes are equal. Comparison is done per-rune,\\n * on unicode codepoints.\\n * @param self The first bytes to compare.\\n * @param offset The offset of self.\\n * @param len The length of self.\\n * @param other The second bytes to compare.\\n * @param otheroffset The offset of the other string.\\n * @param otherlen The length of the other string.\\n * @return The result of the comparison.\\n */\\n function compare(\\n bytes memory self,\\n uint256 offset,\\n uint256 len,\\n bytes memory other,\\n uint256 otheroffset,\\n uint256 otherlen\\n ) internal pure returns (int256) {\\n if (offset + len > self.length) {\\n revert OffsetOutOfBoundsError(offset + len, self.length);\\n }\\n if (otheroffset + otherlen > other.length) {\\n revert OffsetOutOfBoundsError(otheroffset + otherlen, other.length);\\n }\\n\\n uint256 shortest = len;\\n if (otherlen < len) shortest = otherlen;\\n\\n uint256 selfptr;\\n uint256 otherptr;\\n\\n assembly {\\n selfptr := add(self, add(offset, 32))\\n otherptr := add(other, add(otheroffset, 32))\\n }\\n for (uint256 idx = 0; idx < shortest; idx += 32) {\\n uint256 a;\\n uint256 b;\\n assembly {\\n a := mload(selfptr)\\n b := mload(otherptr)\\n }\\n if (a != b) {\\n // Mask out irrelevant bytes and check again\\n uint256 mask;\\n if (shortest - idx >= 32) {\\n mask = type(uint256).max;\\n } else {\\n mask = ~(2 ** (8 * (idx + 32 - shortest)) - 1);\\n }\\n int256 diff = int256(a & mask) - int256(b & mask);\\n if (diff != 0) return diff;\\n }\\n selfptr += 32;\\n otherptr += 32;\\n }\\n\\n return int256(len) - int256(otherlen);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @param len The number of bytes to compare\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset,\\n uint256 len\\n ) internal pure returns (bool) {\\n return keccak(self, offset, len) == keccak(other, otherOffset, len);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal with offsets.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @param otherOffset The offset into the second byte range.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other,\\n uint256 otherOffset\\n ) internal pure returns (bool) {\\n return\\n keccak(self, offset, self.length - offset) ==\\n keccak(other, otherOffset, other.length - otherOffset);\\n }\\n\\n /*\\n * @dev Compares a range of 'self' to all of 'other' and returns True iff\\n * they are equal.\\n * @param self The first byte range to compare.\\n * @param offset The offset into the first byte range.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n uint256 offset,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == offset + other.length &&\\n equals(self, offset, other, 0, other.length);\\n }\\n\\n /*\\n * @dev Returns true if the two byte ranges are equal.\\n * @param self The first byte range to compare.\\n * @param other The second byte range to compare.\\n * @return True if the byte ranges are equal, false otherwise.\\n */\\n function equals(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (bool) {\\n return\\n self.length == other.length &&\\n equals(self, 0, other, 0, self.length);\\n }\\n\\n /*\\n * @dev Returns the 8-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 8 bits of the string, interpreted as an integer.\\n */\\n function readUint8(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint8 ret) {\\n return uint8(self[idx]);\\n }\\n\\n /*\\n * @dev Returns the 16-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 16 bits of the string, interpreted as an integer.\\n */\\n function readUint16(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint16 ret) {\\n require(idx + 2 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 2), idx)), 0xFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32-bit number at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bits of the string, interpreted as an integer.\\n */\\n function readUint32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (uint32 ret) {\\n require(idx + 4 <= self.length);\\n assembly {\\n ret := and(mload(add(add(self, 4), idx)), 0xFFFFFFFF)\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes32(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes32 ret) {\\n require(idx + 32 <= self.length);\\n assembly {\\n ret := mload(add(add(self, 32), idx))\\n }\\n }\\n\\n /*\\n * @dev Returns the 32 byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytes20(\\n bytes memory self,\\n uint256 idx\\n ) internal pure returns (bytes20 ret) {\\n require(idx + 20 <= self.length);\\n assembly {\\n ret := and(\\n mload(add(add(self, 32), idx)),\\n 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000000\\n )\\n }\\n }\\n\\n /*\\n * @dev Returns the n byte value at the specified index of self.\\n * @param self The byte string.\\n * @param idx The index into the bytes.\\n * @param len The number of bytes.\\n * @return The specified 32 bytes of the string.\\n */\\n function readBytesN(\\n bytes memory self,\\n uint256 idx,\\n uint256 len\\n ) internal pure returns (bytes32 ret) {\\n require(len <= 32);\\n require(idx + len <= self.length);\\n assembly {\\n let mask := not(sub(exp(256, sub(32, len)), 1))\\n ret := and(mload(add(add(self, 32), idx)), mask)\\n }\\n }\\n\\n function memcpy(uint256 dest, uint256 src, uint256 len) private pure {\\n // Copy word-length chunks while possible\\n for (; len >= 32; len -= 32) {\\n assembly {\\n mstore(dest, mload(src))\\n }\\n dest += 32;\\n src += 32;\\n }\\n\\n // Copy remaining bytes\\n unchecked {\\n uint256 mask = (256 ** (32 - len)) - 1;\\n assembly {\\n let srcpart := and(mload(src), not(mask))\\n let destpart := and(mload(dest), mask)\\n mstore(dest, or(destpart, srcpart))\\n }\\n }\\n }\\n\\n /*\\n * @dev Copies a substring into a new byte string.\\n * @param self The byte string to copy from.\\n * @param offset The offset to start copying at.\\n * @param len The number of bytes to copy.\\n */\\n function substring(\\n bytes memory self,\\n uint256 offset,\\n uint256 len\\n ) internal pure returns (bytes memory) {\\n require(offset + len <= self.length);\\n\\n bytes memory ret = new bytes(len);\\n uint256 dest;\\n uint256 src;\\n\\n assembly {\\n dest := add(ret, 32)\\n src := add(add(self, 32), offset)\\n }\\n memcpy(dest, src, len);\\n\\n return ret;\\n }\\n\\n // Maps characters from 0x30 to 0x7A to their base32 values.\\n // 0xFF represents invalid characters in that range.\\n bytes constant base32HexTable =\\n hex\\\"00010203040506070809FFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1FFFFFFFFFFFFFFFFFFFFF0A0B0C0D0E0F101112131415161718191A1B1C1D1E1F\\\";\\n\\n /**\\n * @dev Decodes unpadded base32 data of up to one word in length.\\n * @param self The data to decode.\\n * @param off Offset into the string to start at.\\n * @param len Number of characters to decode.\\n * @return The decoded data, left aligned.\\n */\\n function base32HexDecodeWord(\\n bytes memory self,\\n uint256 off,\\n uint256 len\\n ) internal pure returns (bytes32) {\\n require(len <= 52);\\n\\n uint256 ret = 0;\\n uint8 decoded;\\n for (uint256 i = 0; i < len; i++) {\\n bytes1 char = self[off + i];\\n require(char >= 0x30 && char <= 0x7A);\\n decoded = uint8(base32HexTable[uint256(uint8(char)) - 0x30]);\\n require(decoded <= 0x20);\\n if (i == len - 1) {\\n break;\\n }\\n ret = (ret << 5) | decoded;\\n }\\n\\n uint256 bitlen = len * 5;\\n if (len % 8 == 0) {\\n // Multiple of 8 characters, no padding\\n ret = (ret << 5) | decoded;\\n } else if (len % 8 == 2) {\\n // Two extra characters - 1 byte\\n ret = (ret << 3) | (decoded >> 2);\\n bitlen -= 2;\\n } else if (len % 8 == 4) {\\n // Four extra characters - 2 bytes\\n ret = (ret << 1) | (decoded >> 4);\\n bitlen -= 4;\\n } else if (len % 8 == 5) {\\n // Five extra characters - 3 bytes\\n ret = (ret << 4) | (decoded >> 1);\\n bitlen -= 1;\\n } else if (len % 8 == 7) {\\n // Seven extra characters - 4 bytes\\n ret = (ret << 2) | (decoded >> 3);\\n bitlen -= 3;\\n } else {\\n revert();\\n }\\n\\n return bytes32(ret << (256 - bitlen));\\n }\\n\\n /**\\n * @dev Finds the first occurrence of the byte `needle` in `self`.\\n * @param self The string to search\\n * @param off The offset to start searching at\\n * @param len The number of bytes to search\\n * @param needle The byte to search for\\n * @return The offset of `needle` in `self`, or 2**256-1 if it was not found.\\n */\\n function find(\\n bytes memory self,\\n uint256 off,\\n uint256 len,\\n bytes1 needle\\n ) internal pure returns (uint256) {\\n for (uint256 idx = off; idx < off + len; idx++) {\\n if (self[idx] == needle) {\\n return idx;\\n }\\n }\\n return type(uint256).max;\\n }\\n}\\n\",\"keccak256\":\"0x4f10902639b85a17ae10745264feff322e793bfb1bc130a9a90efa7dda47c6cc\"},\"contracts/dnssec-oracle/RRUtils.sol\":{\"content\":\"pragma solidity ^0.8.4;\\n\\nimport \\\"./BytesUtils.sol\\\";\\nimport \\\"@ensdomains/buffer/contracts/Buffer.sol\\\";\\n\\n/**\\n * @dev RRUtils is a library that provides utilities for parsing DNS resource records.\\n */\\nlibrary RRUtils {\\n using BytesUtils for *;\\n using Buffer for *;\\n\\n /**\\n * @dev Returns the number of bytes in the DNS name at 'offset' in 'self'.\\n * @param self The byte array to read a name from.\\n * @param offset The offset to start reading at.\\n * @return The length of the DNS name at 'offset', in bytes.\\n */\\n function nameLength(\\n bytes memory self,\\n uint256 offset\\n ) internal pure returns (uint256) {\\n uint256 idx = offset;\\n while (true) {\\n assert(idx < self.length);\\n uint256 labelLen = self.readUint8(idx);\\n idx += labelLen + 1;\\n if (labelLen == 0) {\\n break;\\n }\\n }\\n return idx - offset;\\n }\\n\\n /**\\n * @dev Returns a DNS format name at the specified offset of self.\\n * @param self The byte array to read a name from.\\n * @param offset The offset to start reading at.\\n * @return ret The name.\\n */\\n function readName(\\n bytes memory self,\\n uint256 offset\\n ) internal pure returns (bytes memory ret) {\\n uint256 len = nameLength(self, offset);\\n return self.substring(offset, len);\\n }\\n\\n /**\\n * @dev Returns the number of labels in the DNS name at 'offset' in 'self'.\\n * @param self The byte array to read a name from.\\n * @param offset The offset to start reading at.\\n * @return The number of labels in the DNS name at 'offset', in bytes.\\n */\\n function labelCount(\\n bytes memory self,\\n uint256 offset\\n ) internal pure returns (uint256) {\\n uint256 count = 0;\\n while (true) {\\n assert(offset < self.length);\\n uint256 labelLen = self.readUint8(offset);\\n offset += labelLen + 1;\\n if (labelLen == 0) {\\n break;\\n }\\n count += 1;\\n }\\n return count;\\n }\\n\\n uint256 constant RRSIG_TYPE = 0;\\n uint256 constant RRSIG_ALGORITHM = 2;\\n uint256 constant RRSIG_LABELS = 3;\\n uint256 constant RRSIG_TTL = 4;\\n uint256 constant RRSIG_EXPIRATION = 8;\\n uint256 constant RRSIG_INCEPTION = 12;\\n uint256 constant RRSIG_KEY_TAG = 16;\\n uint256 constant RRSIG_SIGNER_NAME = 18;\\n\\n struct SignedSet {\\n uint16 typeCovered;\\n uint8 algorithm;\\n uint8 labels;\\n uint32 ttl;\\n uint32 expiration;\\n uint32 inception;\\n uint16 keytag;\\n bytes signerName;\\n bytes data;\\n bytes name;\\n }\\n\\n function readSignedSet(\\n bytes memory data\\n ) internal pure returns (SignedSet memory self) {\\n self.typeCovered = data.readUint16(RRSIG_TYPE);\\n self.algorithm = data.readUint8(RRSIG_ALGORITHM);\\n self.labels = data.readUint8(RRSIG_LABELS);\\n self.ttl = data.readUint32(RRSIG_TTL);\\n self.expiration = data.readUint32(RRSIG_EXPIRATION);\\n self.inception = data.readUint32(RRSIG_INCEPTION);\\n self.keytag = data.readUint16(RRSIG_KEY_TAG);\\n self.signerName = readName(data, RRSIG_SIGNER_NAME);\\n self.data = data.substring(\\n RRSIG_SIGNER_NAME + self.signerName.length,\\n data.length - RRSIG_SIGNER_NAME - self.signerName.length\\n );\\n }\\n\\n function rrs(\\n SignedSet memory rrset\\n ) internal pure returns (RRIterator memory) {\\n return iterateRRs(rrset.data, 0);\\n }\\n\\n /**\\n * @dev An iterator over resource records.\\n */\\n struct RRIterator {\\n bytes data;\\n uint256 offset;\\n uint16 dnstype;\\n uint16 class;\\n uint32 ttl;\\n uint256 rdataOffset;\\n uint256 nextOffset;\\n }\\n\\n /**\\n * @dev Begins iterating over resource records.\\n * @param self The byte string to read from.\\n * @param offset The offset to start reading at.\\n * @return ret An iterator object.\\n */\\n function iterateRRs(\\n bytes memory self,\\n uint256 offset\\n ) internal pure returns (RRIterator memory ret) {\\n ret.data = self;\\n ret.nextOffset = offset;\\n next(ret);\\n }\\n\\n /**\\n * @dev Returns true iff there are more RRs to iterate.\\n * @param iter The iterator to check.\\n * @return True iff the iterator has finished.\\n */\\n function done(RRIterator memory iter) internal pure returns (bool) {\\n return iter.offset >= iter.data.length;\\n }\\n\\n /**\\n * @dev Moves the iterator to the next resource record.\\n * @param iter The iterator to advance.\\n */\\n function next(RRIterator memory iter) internal pure {\\n iter.offset = iter.nextOffset;\\n if (iter.offset >= iter.data.length) {\\n return;\\n }\\n\\n // Skip the name\\n uint256 off = iter.offset + nameLength(iter.data, iter.offset);\\n\\n // Read type, class, and ttl\\n iter.dnstype = iter.data.readUint16(off);\\n off += 2;\\n iter.class = iter.data.readUint16(off);\\n off += 2;\\n iter.ttl = iter.data.readUint32(off);\\n off += 4;\\n\\n // Read the rdata\\n uint256 rdataLength = iter.data.readUint16(off);\\n off += 2;\\n iter.rdataOffset = off;\\n iter.nextOffset = off + rdataLength;\\n }\\n\\n /**\\n * @dev Returns the name of the current record.\\n * @param iter The iterator.\\n * @return A new bytes object containing the owner name from the RR.\\n */\\n function name(RRIterator memory iter) internal pure returns (bytes memory) {\\n return\\n iter.data.substring(\\n iter.offset,\\n nameLength(iter.data, iter.offset)\\n );\\n }\\n\\n /**\\n * @dev Returns the rdata portion of the current record.\\n * @param iter The iterator.\\n * @return A new bytes object containing the RR's RDATA.\\n */\\n function rdata(\\n RRIterator memory iter\\n ) internal pure returns (bytes memory) {\\n return\\n iter.data.substring(\\n iter.rdataOffset,\\n iter.nextOffset - iter.rdataOffset\\n );\\n }\\n\\n uint256 constant DNSKEY_FLAGS = 0;\\n uint256 constant DNSKEY_PROTOCOL = 2;\\n uint256 constant DNSKEY_ALGORITHM = 3;\\n uint256 constant DNSKEY_PUBKEY = 4;\\n\\n struct DNSKEY {\\n uint16 flags;\\n uint8 protocol;\\n uint8 algorithm;\\n bytes publicKey;\\n }\\n\\n function readDNSKEY(\\n bytes memory data,\\n uint256 offset,\\n uint256 length\\n ) internal pure returns (DNSKEY memory self) {\\n self.flags = data.readUint16(offset + DNSKEY_FLAGS);\\n self.protocol = data.readUint8(offset + DNSKEY_PROTOCOL);\\n self.algorithm = data.readUint8(offset + DNSKEY_ALGORITHM);\\n self.publicKey = data.substring(\\n offset + DNSKEY_PUBKEY,\\n length - DNSKEY_PUBKEY\\n );\\n }\\n\\n uint256 constant DS_KEY_TAG = 0;\\n uint256 constant DS_ALGORITHM = 2;\\n uint256 constant DS_DIGEST_TYPE = 3;\\n uint256 constant DS_DIGEST = 4;\\n\\n struct DS {\\n uint16 keytag;\\n uint8 algorithm;\\n uint8 digestType;\\n bytes digest;\\n }\\n\\n function readDS(\\n bytes memory data,\\n uint256 offset,\\n uint256 length\\n ) internal pure returns (DS memory self) {\\n self.keytag = data.readUint16(offset + DS_KEY_TAG);\\n self.algorithm = data.readUint8(offset + DS_ALGORITHM);\\n self.digestType = data.readUint8(offset + DS_DIGEST_TYPE);\\n self.digest = data.substring(offset + DS_DIGEST, length - DS_DIGEST);\\n }\\n\\n function isSubdomainOf(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (bool) {\\n uint256 off = 0;\\n uint256 counts = labelCount(self, 0);\\n uint256 othercounts = labelCount(other, 0);\\n\\n while (counts > othercounts) {\\n off = progress(self, off);\\n counts--;\\n }\\n\\n return self.equals(off, other, 0);\\n }\\n\\n function compareNames(\\n bytes memory self,\\n bytes memory other\\n ) internal pure returns (int256) {\\n if (self.equals(other)) {\\n return 0;\\n }\\n\\n uint256 off;\\n uint256 otheroff;\\n uint256 prevoff;\\n uint256 otherprevoff;\\n uint256 counts = labelCount(self, 0);\\n uint256 othercounts = labelCount(other, 0);\\n\\n // Keep removing labels from the front of the name until both names are equal length\\n while (counts > othercounts) {\\n prevoff = off;\\n off = progress(self, off);\\n counts--;\\n }\\n\\n while (othercounts > counts) {\\n otherprevoff = otheroff;\\n otheroff = progress(other, otheroff);\\n othercounts--;\\n }\\n\\n // Compare the last nonequal labels to each other\\n while (counts > 0 && !self.equals(off, other, otheroff)) {\\n prevoff = off;\\n off = progress(self, off);\\n otherprevoff = otheroff;\\n otheroff = progress(other, otheroff);\\n counts -= 1;\\n }\\n\\n if (off == 0) {\\n return -1;\\n }\\n if (otheroff == 0) {\\n return 1;\\n }\\n\\n return\\n self.compare(\\n prevoff + 1,\\n self.readUint8(prevoff),\\n other,\\n otherprevoff + 1,\\n other.readUint8(otherprevoff)\\n );\\n }\\n\\n /**\\n * @dev Compares two serial numbers using RFC1982 serial number math.\\n */\\n function serialNumberGte(\\n uint32 i1,\\n uint32 i2\\n ) internal pure returns (bool) {\\n unchecked {\\n return int32(i1) - int32(i2) >= 0;\\n }\\n }\\n\\n function progress(\\n bytes memory body,\\n uint256 off\\n ) internal pure returns (uint256) {\\n return off + 1 + body.readUint8(off);\\n }\\n\\n /**\\n * @dev Computes the keytag for a chunk of data.\\n * @param data The data to compute a keytag for.\\n * @return The computed key tag.\\n */\\n function computeKeytag(bytes memory data) internal pure returns (uint16) {\\n /* This function probably deserves some explanation.\\n * The DNSSEC keytag function is a checksum that relies on summing up individual bytes\\n * from the input string, with some mild bitshifting. Here's a Naive solidity implementation:\\n *\\n * function computeKeytag(bytes memory data) internal pure returns (uint16) {\\n * uint ac;\\n * for (uint i = 0; i < data.length; i++) {\\n * ac += i & 1 == 0 ? uint16(data.readUint8(i)) << 8 : data.readUint8(i);\\n * }\\n * return uint16(ac + (ac >> 16));\\n * }\\n *\\n * The EVM, with its 256 bit words, is exceedingly inefficient at doing byte-by-byte operations;\\n * the code above, on reasonable length inputs, consumes over 100k gas. But we can make the EVM's\\n * large words work in our favour.\\n *\\n * The code below works by treating the input as a series of 256 bit words. It first masks out\\n * even and odd bytes from each input word, adding them to two separate accumulators `ac1` and `ac2`.\\n * The bytes are separated by empty bytes, so as long as no individual sum exceeds 2^16-1, we're\\n * effectively summing 16 different numbers with each EVM ADD opcode.\\n *\\n * Once it's added up all the inputs, it has to add all the 16 bit values in `ac1` and `ac2` together.\\n * It does this using the same trick - mask out every other value, shift to align them, add them together.\\n * After the first addition on both accumulators, there's enough room to add the two accumulators together,\\n * and the remaining sums can be done just on ac1.\\n */\\n unchecked {\\n require(data.length <= 8192, \\\"Long keys not permitted\\\");\\n uint256 ac1;\\n uint256 ac2;\\n for (uint256 i = 0; i < data.length + 31; i += 32) {\\n uint256 word;\\n assembly {\\n word := mload(add(add(data, 32), i))\\n }\\n if (i + 32 > data.length) {\\n uint256 unused = 256 - (data.length - i) * 8;\\n word = (word >> unused) << unused;\\n }\\n ac1 +=\\n (word &\\n 0xFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00) >>\\n 8;\\n ac2 += (word &\\n 0x00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF);\\n }\\n ac1 =\\n (ac1 &\\n 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) +\\n ((ac1 &\\n 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >>\\n 16);\\n ac2 =\\n (ac2 &\\n 0x0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF) +\\n ((ac2 &\\n 0xFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000) >>\\n 16);\\n ac1 = (ac1 << 8) + ac2;\\n ac1 =\\n (ac1 &\\n 0x00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF) +\\n ((ac1 &\\n 0xFFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000) >>\\n 32);\\n ac1 =\\n (ac1 &\\n 0x0000000000000000FFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF) +\\n ((ac1 &\\n 0xFFFFFFFFFFFFFFFF0000000000000000FFFFFFFFFFFFFFFF0000000000000000) >>\\n 64);\\n ac1 =\\n (ac1 &\\n 0x00000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) +\\n (ac1 >> 128);\\n ac1 += (ac1 >> 16) & 0xFFFF;\\n return uint16(ac1);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x4dd68a6efd7c38f6b0e95ca0c056ecb74f88583da650b1a8639e6e78be36fede\"},\"contracts/ethregistrar/IBaseRegistrar.sol\":{\"content\":\"import \\\"../registry/ENS.sol\\\";\\nimport \\\"./IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\n\\ninterface IBaseRegistrar is IERC721 {\\n event ControllerAdded(address indexed controller);\\n event ControllerRemoved(address indexed controller);\\n event NameMigrated(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRegistered(\\n uint256 indexed id,\\n address indexed owner,\\n uint256 expires\\n );\\n event NameRenewed(uint256 indexed id, uint256 expires);\\n\\n // Authorises a controller, who can register and renew domains.\\n function addController(address controller) external;\\n\\n // Revoke controller permission for an address.\\n function removeController(address controller) external;\\n\\n // Set the resolver for the TLD this registrar manages.\\n function setResolver(address resolver) external;\\n\\n // Returns the expiration timestamp of the specified label hash.\\n function nameExpires(uint256 id) external view returns (uint256);\\n\\n // Returns true iff the specified name is available for registration.\\n function available(uint256 id) external view returns (bool);\\n\\n /**\\n * @dev Register a name.\\n */\\n function register(\\n uint256 id,\\n address owner,\\n uint256 duration\\n ) external returns (uint256);\\n\\n function renew(uint256 id, uint256 duration) external returns (uint256);\\n\\n /**\\n * @dev Reclaim ownership of a name in ENS, if you own it in the registrar.\\n */\\n function reclaim(uint256 id, address owner) external;\\n}\\n\",\"keccak256\":\"0x9ac51351ff72d73083aed62b7cdad4c07e9d1eb68401d7fd8457bdd828f2c6fe\"},\"contracts/registry/ENS.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface ENS {\\n // Logged when the owner of a node assigns a new owner to a subnode.\\n event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);\\n\\n // Logged when the owner of a node transfers ownership to a new account.\\n event Transfer(bytes32 indexed node, address owner);\\n\\n // Logged when the resolver for a node changes.\\n event NewResolver(bytes32 indexed node, address resolver);\\n\\n // Logged when the TTL of a node changes\\n event NewTTL(bytes32 indexed node, uint64 ttl);\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n bytes32 label,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n bytes32 label,\\n address owner\\n ) external returns (bytes32);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setOwner(bytes32 node, address owner) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function setApprovalForAll(address operator, bool approved) external;\\n\\n function owner(bytes32 node) external view returns (address);\\n\\n function resolver(bytes32 node) external view returns (address);\\n\\n function ttl(bytes32 node) external view returns (uint64);\\n\\n function recordExists(bytes32 node) external view returns (bool);\\n\\n function isApprovedForAll(\\n address owner,\\n address operator\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x7cb1158c7d268b63de1468e28e2711b28d686e2628ddb22da2149cd93ddeafda\"},\"contracts/resolvers/IMulticallable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\ninterface IMulticallable {\\n function multicall(\\n bytes[] calldata data\\n ) external returns (bytes[] memory results);\\n\\n function multicallWithNodeCheck(\\n bytes32,\\n bytes[] calldata data\\n ) external returns (bytes[] memory results);\\n}\\n\",\"keccak256\":\"0x0334202e20bb11995997083d05963f5e8e7ed6194cba494e7f9371ab7bf4e2c3\",\"license\":\"MIT\"},\"contracts/resolvers/Multicallable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.4;\\n\\nimport \\\"./IMulticallable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\n\\nabstract contract Multicallable is IMulticallable, ERC165 {\\n function _multicall(\\n bytes32 nodehash,\\n bytes[] calldata data\\n ) internal returns (bytes[] memory results) {\\n results = new bytes[](data.length);\\n for (uint256 i = 0; i < data.length; i++) {\\n if (nodehash != bytes32(0)) {\\n bytes32 txNamehash = bytes32(data[i][4:36]);\\n require(\\n txNamehash == nodehash,\\n \\\"multicall: All records must have a matching namehash\\\"\\n );\\n }\\n (bool success, bytes memory result) = address(this).delegatecall(\\n data[i]\\n );\\n require(success);\\n results[i] = result;\\n }\\n return results;\\n }\\n\\n // This function provides an extra security check when called\\n // from priviledged contracts (such as EthRegistrarController)\\n // that can set records on behalf of the node owners\\n function multicallWithNodeCheck(\\n bytes32 nodehash,\\n bytes[] calldata data\\n ) external returns (bytes[] memory results) {\\n return _multicall(nodehash, data);\\n }\\n\\n function multicall(\\n bytes[] calldata data\\n ) public override returns (bytes[] memory results) {\\n return _multicall(bytes32(0), data);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IMulticallable).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x1063a9dd3b94ba304624d5ec6deb43c1916640758ae970eece4d4e3ef8b2fcb1\",\"license\":\"MIT\"},\"contracts/resolvers/PublicResolver.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.17 <0.9.0;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"./profiles/ABIResolver.sol\\\";\\nimport \\\"./profiles/AddrResolver.sol\\\";\\nimport \\\"./profiles/ContentHashResolver.sol\\\";\\nimport \\\"./profiles/DNSResolver.sol\\\";\\nimport \\\"./profiles/InterfaceResolver.sol\\\";\\nimport \\\"./profiles/NameResolver.sol\\\";\\nimport \\\"./profiles/PubkeyResolver.sol\\\";\\nimport \\\"./profiles/TextResolver.sol\\\";\\nimport \\\"./Multicallable.sol\\\";\\nimport {ReverseClaimer} from \\\"../reverseRegistrar/ReverseClaimer.sol\\\";\\nimport {INameWrapper} from \\\"../wrapper/INameWrapper.sol\\\";\\n\\n/**\\n * A simple resolver anyone can use; only allows the owner of a node to set its\\n * address.\\n */\\ncontract PublicResolver is\\n Multicallable,\\n ABIResolver,\\n AddrResolver,\\n ContentHashResolver,\\n DNSResolver,\\n InterfaceResolver,\\n NameResolver,\\n PubkeyResolver,\\n TextResolver,\\n ReverseClaimer\\n{\\n ENS immutable ens;\\n INameWrapper immutable nameWrapper;\\n address immutable trustedETHController;\\n address immutable trustedReverseRegistrar;\\n\\n /**\\n * A mapping of operators. An address that is authorised for an address\\n * may make any changes to the name that the owner could, but may not update\\n * the set of authorisations.\\n * (owner, operator) => approved\\n */\\n mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n /**\\n * A mapping of delegates. A delegate that is authorised by an owner\\n * for a name may make changes to the name's resolver, but may not update\\n * the set of token approvals.\\n * (owner, name, delegate) => approved\\n */\\n mapping(address => mapping(bytes32 => mapping(address => bool)))\\n private _tokenApprovals;\\n\\n // Logged when an operator is added or removed.\\n event ApprovalForAll(\\n address indexed owner,\\n address indexed operator,\\n bool approved\\n );\\n\\n // Logged when a delegate is approved or an approval is revoked.\\n event Approved(\\n address owner,\\n bytes32 indexed node,\\n address indexed delegate,\\n bool indexed approved\\n );\\n\\n constructor(\\n ENS _ens,\\n INameWrapper wrapperAddress,\\n address _trustedETHController,\\n address _trustedReverseRegistrar\\n ) ReverseClaimer(_ens, msg.sender) {\\n ens = _ens;\\n nameWrapper = wrapperAddress;\\n trustedETHController = _trustedETHController;\\n trustedReverseRegistrar = _trustedReverseRegistrar;\\n }\\n\\n /**\\n * @dev See {IERC1155-setApprovalForAll}.\\n */\\n function setApprovalForAll(address operator, bool approved) external {\\n require(\\n msg.sender != operator,\\n \\\"ERC1155: setting approval status for self\\\"\\n );\\n\\n _operatorApprovals[msg.sender][operator] = approved;\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n /**\\n * @dev See {IERC1155-isApprovedForAll}.\\n */\\n function isApprovedForAll(\\n address account,\\n address operator\\n ) public view returns (bool) {\\n return _operatorApprovals[account][operator];\\n }\\n\\n /**\\n * @dev Approve a delegate to be able to updated records on a node.\\n */\\n function approve(bytes32 node, address delegate, bool approved) external {\\n require(msg.sender != delegate, \\\"Setting delegate status for self\\\");\\n\\n _tokenApprovals[msg.sender][node][delegate] = approved;\\n emit Approved(msg.sender, node, delegate, approved);\\n }\\n\\n /**\\n * @dev Check to see if the delegate has been approved by the owner for the node.\\n */\\n function isApprovedFor(\\n address owner,\\n bytes32 node,\\n address delegate\\n ) public view returns (bool) {\\n return _tokenApprovals[owner][node][delegate];\\n }\\n\\n function isAuthorised(bytes32 node) internal view override returns (bool) {\\n if (\\n msg.sender == trustedETHController ||\\n msg.sender == trustedReverseRegistrar\\n ) {\\n return true;\\n }\\n address owner = ens.owner(node);\\n if (owner == address(nameWrapper)) {\\n owner = nameWrapper.ownerOf(uint256(node));\\n }\\n return\\n owner == msg.sender ||\\n isApprovedForAll(owner, msg.sender) ||\\n isApprovedFor(owner, node, msg.sender);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n )\\n public\\n view\\n override(\\n Multicallable,\\n ABIResolver,\\n AddrResolver,\\n ContentHashResolver,\\n DNSResolver,\\n InterfaceResolver,\\n NameResolver,\\n PubkeyResolver,\\n TextResolver\\n )\\n returns (bool)\\n {\\n return super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x24c839eb7118da8eea65d07401cc26bad0444a3e651b2cb19749c43065bd24de\",\"license\":\"MIT\"},\"contracts/resolvers/ResolverBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/ERC165.sol\\\";\\nimport \\\"./profiles/IVersionableResolver.sol\\\";\\n\\nabstract contract ResolverBase is ERC165, IVersionableResolver {\\n mapping(bytes32 => uint64) public recordVersions;\\n\\n function isAuthorised(bytes32 node) internal view virtual returns (bool);\\n\\n modifier authorised(bytes32 node) {\\n require(isAuthorised(node));\\n _;\\n }\\n\\n /**\\n * Increments the record version associated with an ENS node.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param node The node to update.\\n */\\n function clearRecords(bytes32 node) public virtual authorised(node) {\\n recordVersions[node]++;\\n emit VersionChanged(node, recordVersions[node]);\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IVersionableResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x893049fffd6feee06d7acef1680f6e26505bedff62a9f7a17e921c0ba2f66307\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/ABIResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"./IABIResolver.sol\\\";\\nimport \\\"../ResolverBase.sol\\\";\\n\\nabstract contract ABIResolver is IABIResolver, ResolverBase {\\n mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_abis;\\n\\n /**\\n * Sets the ABI associated with an ENS node.\\n * Nodes may have one ABI of each content type. To remove an ABI, set it to\\n * the empty string.\\n * @param node The node to update.\\n * @param contentType The content type of the ABI\\n * @param data The ABI data.\\n */\\n function setABI(\\n bytes32 node,\\n uint256 contentType,\\n bytes calldata data\\n ) external virtual authorised(node) {\\n // Content types must be powers of 2\\n require(((contentType - 1) & contentType) == 0);\\n\\n versionable_abis[recordVersions[node]][node][contentType] = data;\\n emit ABIChanged(node, contentType);\\n }\\n\\n /**\\n * Returns the ABI associated with an ENS node.\\n * Defined in EIP205.\\n * @param node The ENS node to query\\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\\n * @return contentType The content type of the return value\\n * @return data The ABI data\\n */\\n function ABI(\\n bytes32 node,\\n uint256 contentTypes\\n ) external view virtual override returns (uint256, bytes memory) {\\n mapping(uint256 => bytes) storage abiset = versionable_abis[\\n recordVersions[node]\\n ][node];\\n\\n for (\\n uint256 contentType = 1;\\n contentType <= contentTypes;\\n contentType <<= 1\\n ) {\\n if (\\n (contentType & contentTypes) != 0 &&\\n abiset[contentType].length > 0\\n ) {\\n return (contentType, abiset[contentType]);\\n }\\n }\\n\\n return (0, bytes(\\\"\\\"));\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IABIResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x2da96d7750786afe3be019fc6ff768e2d98a5e61d360bd92d8d7bc3c7c1dcc27\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/AddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"./IAddrResolver.sol\\\";\\nimport \\\"./IAddressResolver.sol\\\";\\n\\nabstract contract AddrResolver is\\n IAddrResolver,\\n IAddressResolver,\\n ResolverBase\\n{\\n uint256 private constant COIN_TYPE_ETH = 60;\\n\\n mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes))) versionable_addresses;\\n\\n /**\\n * Sets the address associated with an ENS node.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param node The node to update.\\n * @param a The address to set.\\n */\\n function setAddr(\\n bytes32 node,\\n address a\\n ) external virtual authorised(node) {\\n setAddr(node, COIN_TYPE_ETH, addressToBytes(a));\\n }\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(\\n bytes32 node\\n ) public view virtual override returns (address payable) {\\n bytes memory a = addr(node, COIN_TYPE_ETH);\\n if (a.length == 0) {\\n return payable(0);\\n }\\n return bytesToAddress(a);\\n }\\n\\n function setAddr(\\n bytes32 node,\\n uint256 coinType,\\n bytes memory a\\n ) public virtual authorised(node) {\\n emit AddressChanged(node, coinType, a);\\n if (coinType == COIN_TYPE_ETH) {\\n emit AddrChanged(node, bytesToAddress(a));\\n }\\n versionable_addresses[recordVersions[node]][node][coinType] = a;\\n }\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) public view virtual override returns (bytes memory) {\\n return versionable_addresses[recordVersions[node]][node][coinType];\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IAddrResolver).interfaceId ||\\n interfaceID == type(IAddressResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n\\n function bytesToAddress(\\n bytes memory b\\n ) internal pure returns (address payable a) {\\n require(b.length == 20);\\n assembly {\\n a := div(mload(add(b, 32)), exp(256, 12))\\n }\\n }\\n\\n function addressToBytes(address a) internal pure returns (bytes memory b) {\\n b = new bytes(20);\\n assembly {\\n mstore(add(b, 32), mul(a, exp(256, 12)))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7f6ebb3144530a02db03379f33ade869c8408eceed36dfbd751aaff198735b55\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/ContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"./IContentHashResolver.sol\\\";\\n\\nabstract contract ContentHashResolver is IContentHashResolver, ResolverBase {\\n mapping(uint64 => mapping(bytes32 => bytes)) versionable_hashes;\\n\\n /**\\n * Sets the contenthash associated with an ENS node.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param node The node to update.\\n * @param hash The contenthash to set\\n */\\n function setContenthash(\\n bytes32 node,\\n bytes calldata hash\\n ) external virtual authorised(node) {\\n versionable_hashes[recordVersions[node]][node] = hash;\\n emit ContenthashChanged(node, hash);\\n }\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(\\n bytes32 node\\n ) external view virtual override returns (bytes memory) {\\n return versionable_hashes[recordVersions[node]][node];\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IContentHashResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0xc9755bfb77985375ded880ecab5af41f2b9e8280f30d3e523fe5042ea59f93ea\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/DNSResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"../../dnssec-oracle/RRUtils.sol\\\";\\nimport \\\"./IDNSRecordResolver.sol\\\";\\nimport \\\"./IDNSZoneResolver.sol\\\";\\n\\nabstract contract DNSResolver is\\n IDNSRecordResolver,\\n IDNSZoneResolver,\\n ResolverBase\\n{\\n using RRUtils for *;\\n using BytesUtils for bytes;\\n\\n // Zone hashes for the domains.\\n // A zone hash is an EIP-1577 content hash in binary format that should point to a\\n // resource containing a single zonefile.\\n // node => contenthash\\n mapping(uint64 => mapping(bytes32 => bytes)) private versionable_zonehashes;\\n\\n // The records themselves. Stored as binary RRSETs\\n // node => version => name => resource => data\\n mapping(uint64 => mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes))))\\n private versionable_records;\\n\\n // Count of number of entries for a given name. Required for DNS resolvers\\n // when resolving wildcards.\\n // node => version => name => number of records\\n mapping(uint64 => mapping(bytes32 => mapping(bytes32 => uint16)))\\n private versionable_nameEntriesCount;\\n\\n /**\\n * Set one or more DNS records. Records are supplied in wire-format.\\n * Records with the same node/name/resource must be supplied one after the\\n * other to ensure the data is updated correctly. For example, if the data\\n * was supplied:\\n * a.example.com IN A 1.2.3.4\\n * a.example.com IN A 5.6.7.8\\n * www.example.com IN CNAME a.example.com.\\n * then this would store the two A records for a.example.com correctly as a\\n * single RRSET, however if the data was supplied:\\n * a.example.com IN A 1.2.3.4\\n * www.example.com IN CNAME a.example.com.\\n * a.example.com IN A 5.6.7.8\\n * then this would store the first A record, the CNAME, then the second A\\n * record which would overwrite the first.\\n *\\n * @param node the namehash of the node for which to set the records\\n * @param data the DNS wire format records to set\\n */\\n function setDNSRecords(\\n bytes32 node,\\n bytes calldata data\\n ) external virtual authorised(node) {\\n uint16 resource = 0;\\n uint256 offset = 0;\\n bytes memory name;\\n bytes memory value;\\n bytes32 nameHash;\\n uint64 version = recordVersions[node];\\n // Iterate over the data to add the resource records\\n for (\\n RRUtils.RRIterator memory iter = data.iterateRRs(0);\\n !iter.done();\\n iter.next()\\n ) {\\n if (resource == 0) {\\n resource = iter.dnstype;\\n name = iter.name();\\n nameHash = keccak256(abi.encodePacked(name));\\n value = bytes(iter.rdata());\\n } else {\\n bytes memory newName = iter.name();\\n if (resource != iter.dnstype || !name.equals(newName)) {\\n setDNSRRSet(\\n node,\\n name,\\n resource,\\n data,\\n offset,\\n iter.offset - offset,\\n value.length == 0,\\n version\\n );\\n resource = iter.dnstype;\\n offset = iter.offset;\\n name = newName;\\n nameHash = keccak256(name);\\n value = bytes(iter.rdata());\\n }\\n }\\n }\\n if (name.length > 0) {\\n setDNSRRSet(\\n node,\\n name,\\n resource,\\n data,\\n offset,\\n data.length - offset,\\n value.length == 0,\\n version\\n );\\n }\\n }\\n\\n /**\\n * Obtain a DNS record.\\n * @param node the namehash of the node for which to fetch the record\\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\\n * @return the DNS record in wire format if present, otherwise empty\\n */\\n function dnsRecord(\\n bytes32 node,\\n bytes32 name,\\n uint16 resource\\n ) public view virtual override returns (bytes memory) {\\n return versionable_records[recordVersions[node]][node][name][resource];\\n }\\n\\n /**\\n * Check if a given node has records.\\n * @param node the namehash of the node for which to check the records\\n * @param name the namehash of the node for which to check the records\\n */\\n function hasDNSRecords(\\n bytes32 node,\\n bytes32 name\\n ) public view virtual returns (bool) {\\n return (versionable_nameEntriesCount[recordVersions[node]][node][\\n name\\n ] != 0);\\n }\\n\\n /**\\n * setZonehash sets the hash for the zone.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param node The node to update.\\n * @param hash The zonehash to set\\n */\\n function setZonehash(\\n bytes32 node,\\n bytes calldata hash\\n ) external virtual authorised(node) {\\n uint64 currentRecordVersion = recordVersions[node];\\n bytes memory oldhash = versionable_zonehashes[currentRecordVersion][\\n node\\n ];\\n versionable_zonehashes[currentRecordVersion][node] = hash;\\n emit DNSZonehashChanged(node, oldhash, hash);\\n }\\n\\n /**\\n * zonehash obtains the hash for the zone.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function zonehash(\\n bytes32 node\\n ) external view virtual override returns (bytes memory) {\\n return versionable_zonehashes[recordVersions[node]][node];\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IDNSRecordResolver).interfaceId ||\\n interfaceID == type(IDNSZoneResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n\\n function setDNSRRSet(\\n bytes32 node,\\n bytes memory name,\\n uint16 resource,\\n bytes memory data,\\n uint256 offset,\\n uint256 size,\\n bool deleteRecord,\\n uint64 version\\n ) private {\\n bytes32 nameHash = keccak256(name);\\n bytes memory rrData = data.substring(offset, size);\\n if (deleteRecord) {\\n if (\\n versionable_records[version][node][nameHash][resource].length !=\\n 0\\n ) {\\n versionable_nameEntriesCount[version][node][nameHash]--;\\n }\\n delete (versionable_records[version][node][nameHash][resource]);\\n emit DNSRecordDeleted(node, name, resource);\\n } else {\\n if (\\n versionable_records[version][node][nameHash][resource].length ==\\n 0\\n ) {\\n versionable_nameEntriesCount[version][node][nameHash]++;\\n }\\n versionable_records[version][node][nameHash][resource] = rrData;\\n emit DNSRecordChanged(node, name, resource, rrData);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x7233e4d2edca222ce6e1cdb07adf127ab52ecaea599fa5369971a7b28dbc59ac\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IABIResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IABIResolver {\\n event ABIChanged(bytes32 indexed node, uint256 indexed contentType);\\n\\n /**\\n * Returns the ABI associated with an ENS node.\\n * Defined in EIP205.\\n * @param node The ENS node to query\\n * @param contentTypes A bitwise OR of the ABI formats accepted by the caller.\\n * @return contentType The content type of the return value\\n * @return data The ABI data\\n */\\n function ABI(\\n bytes32 node,\\n uint256 contentTypes\\n ) external view returns (uint256, bytes memory);\\n}\\n\",\"keccak256\":\"0x85b373d02d19374fe570af407f459768285704bf7f30ab17c30eabfb5a10e4c3\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IAddrResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the legacy (ETH-only) addr function.\\n */\\ninterface IAddrResolver {\\n event AddrChanged(bytes32 indexed node, address a);\\n\\n /**\\n * Returns the address associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated address.\\n */\\n function addr(bytes32 node) external view returns (address payable);\\n}\\n\",\"keccak256\":\"0x2ad7f2fc60ebe0f93745fe70247f6a854f66af732483fda2a3c5e055614445e8\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IAddressResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\n/**\\n * Interface for the new (multicoin) addr function.\\n */\\ninterface IAddressResolver {\\n event AddressChanged(\\n bytes32 indexed node,\\n uint256 coinType,\\n bytes newAddress\\n );\\n\\n function addr(\\n bytes32 node,\\n uint256 coinType\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0x411447c1e90c51e09702815a85ec725ffbbe37cf96e8cc4d2a8bd4ad8a59d73e\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IContentHashResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IContentHashResolver {\\n event ContenthashChanged(bytes32 indexed node, bytes hash);\\n\\n /**\\n * Returns the contenthash associated with an ENS node.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function contenthash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xd95cd77684ba5752c428d7dceb4ecc6506ac94f4fbb910489637eb68dcd8e366\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IDNSRecordResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IDNSRecordResolver {\\n // DNSRecordChanged is emitted whenever a given node/name/resource's RRSET is updated.\\n event DNSRecordChanged(\\n bytes32 indexed node,\\n bytes name,\\n uint16 resource,\\n bytes record\\n );\\n // DNSRecordDeleted is emitted whenever a given node/name/resource's RRSET is deleted.\\n event DNSRecordDeleted(bytes32 indexed node, bytes name, uint16 resource);\\n\\n /**\\n * Obtain a DNS record.\\n * @param node the namehash of the node for which to fetch the record\\n * @param name the keccak-256 hash of the fully-qualified name for which to fetch the record\\n * @param resource the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types\\n * @return the DNS record in wire format if present, otherwise empty\\n */\\n function dnsRecord(\\n bytes32 node,\\n bytes32 name,\\n uint16 resource\\n ) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xcfa52200edd337f2c6c5bf402352600584da033b21323603e53de33051a3e25d\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IDNSZoneResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IDNSZoneResolver {\\n // DNSZonehashChanged is emitted whenever a given node's zone hash is updated.\\n event DNSZonehashChanged(\\n bytes32 indexed node,\\n bytes lastzonehash,\\n bytes zonehash\\n );\\n\\n /**\\n * zonehash obtains the hash for the zone.\\n * @param node The ENS node to query.\\n * @return The associated contenthash.\\n */\\n function zonehash(bytes32 node) external view returns (bytes memory);\\n}\\n\",\"keccak256\":\"0xca1b3a16e7005533f2800a3e66fcdccf7c574deac7913d8c810f40aec1d58dc0\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IInterfaceResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IInterfaceResolver {\\n event InterfaceChanged(\\n bytes32 indexed node,\\n bytes4 indexed interfaceID,\\n address implementer\\n );\\n\\n /**\\n * Returns the address of a contract that implements the specified interface for this name.\\n * If an implementer has not been set for this interfaceID and name, the resolver will query\\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\\n * will be returned.\\n * @param node The ENS node to query.\\n * @param interfaceID The EIP 165 interface ID to check for.\\n * @return The address that implements this interface, or 0 if the interface is unsupported.\\n */\\n function interfaceImplementer(\\n bytes32 node,\\n bytes4 interfaceID\\n ) external view returns (address);\\n}\\n\",\"keccak256\":\"0x390321fb58f7b927df9562450981e74b4be3907e7c09df321fd3b7409b63ae28\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/INameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface INameResolver {\\n event NameChanged(bytes32 indexed node, string name);\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(bytes32 node) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x9ec392b612447b1acbdc01114f2da2837a658d3f3157f60a99c5269f0b623346\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IPubkeyResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IPubkeyResolver {\\n event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);\\n\\n /**\\n * Returns the SECP256k1 public key associated with an ENS node.\\n * Defined in EIP 619.\\n * @param node The ENS node to query\\n * @return x The X coordinate of the curve point for the public key.\\n * @return y The Y coordinate of the curve point for the public key.\\n */\\n function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y);\\n}\\n\",\"keccak256\":\"0x69748947093dd2fda9ddcebd0adf19a6d1e7600df1d4b1462a0417156caddca7\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/ITextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface ITextResolver {\\n event TextChanged(\\n bytes32 indexed node,\\n string indexed indexedKey,\\n string key,\\n string value\\n );\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x7c5debb3c42cd9f5de2274ea7aa053f238608314b62db441c40e31cea2543fd5\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/IVersionableResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\ninterface IVersionableResolver {\\n event VersionChanged(bytes32 indexed node, uint64 newVersion);\\n\\n function recordVersions(bytes32 node) external view returns (uint64);\\n}\\n\",\"keccak256\":\"0xd0d09596f20c57bafb2ffa8521a8c57120e9af6c6b194f9c689d4da56f91a57c\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/InterfaceResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"./AddrResolver.sol\\\";\\nimport \\\"./IInterfaceResolver.sol\\\";\\n\\nabstract contract InterfaceResolver is IInterfaceResolver, AddrResolver {\\n mapping(uint64 => mapping(bytes32 => mapping(bytes4 => address))) versionable_interfaces;\\n\\n /**\\n * Sets an interface associated with a name.\\n * Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support.\\n * @param node The node to update.\\n * @param interfaceID The EIP 165 interface ID.\\n * @param implementer The address of a contract that implements this interface for this node.\\n */\\n function setInterface(\\n bytes32 node,\\n bytes4 interfaceID,\\n address implementer\\n ) external virtual authorised(node) {\\n versionable_interfaces[recordVersions[node]][node][\\n interfaceID\\n ] = implementer;\\n emit InterfaceChanged(node, interfaceID, implementer);\\n }\\n\\n /**\\n * Returns the address of a contract that implements the specified interface for this name.\\n * If an implementer has not been set for this interfaceID and name, the resolver will query\\n * the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that\\n * contract implements EIP165 and returns `true` for the specified interfaceID, its address\\n * will be returned.\\n * @param node The ENS node to query.\\n * @param interfaceID The EIP 165 interface ID to check for.\\n * @return The address that implements this interface, or 0 if the interface is unsupported.\\n */\\n function interfaceImplementer(\\n bytes32 node,\\n bytes4 interfaceID\\n ) external view virtual override returns (address) {\\n address implementer = versionable_interfaces[recordVersions[node]][\\n node\\n ][interfaceID];\\n if (implementer != address(0)) {\\n return implementer;\\n }\\n\\n address a = addr(node);\\n if (a == address(0)) {\\n return address(0);\\n }\\n\\n (bool success, bytes memory returnData) = a.staticcall(\\n abi.encodeWithSignature(\\n \\\"supportsInterface(bytes4)\\\",\\n type(IERC165).interfaceId\\n )\\n );\\n if (!success || returnData.length < 32 || returnData[31] == 0) {\\n // EIP 165 not supported by target\\n return address(0);\\n }\\n\\n (success, returnData) = a.staticcall(\\n abi.encodeWithSignature(\\\"supportsInterface(bytes4)\\\", interfaceID)\\n );\\n if (!success || returnData.length < 32 || returnData[31] == 0) {\\n // Specified interface not supported by target\\n return address(0);\\n }\\n\\n return a;\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IInterfaceResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x820ec60183e7a49a4ee399cf4708acb776725c8e4ad275d1f316c152eace0a59\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/NameResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"./INameResolver.sol\\\";\\n\\nabstract contract NameResolver is INameResolver, ResolverBase {\\n mapping(uint64 => mapping(bytes32 => string)) versionable_names;\\n\\n /**\\n * Sets the name associated with an ENS node, for reverse records.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param node The node to update.\\n */\\n function setName(\\n bytes32 node,\\n string calldata newName\\n ) external virtual authorised(node) {\\n versionable_names[recordVersions[node]][node] = newName;\\n emit NameChanged(node, newName);\\n }\\n\\n /**\\n * Returns the name associated with an ENS node, for reverse records.\\n * Defined in EIP181.\\n * @param node The ENS node to query.\\n * @return The associated name.\\n */\\n function name(\\n bytes32 node\\n ) external view virtual override returns (string memory) {\\n return versionable_names[recordVersions[node]][node];\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(INameResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x52d0bbb8f9dd33fae471ef2f5f6b3118b221954e5bb7ba724885d4562e75b8e2\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/PubkeyResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"./IPubkeyResolver.sol\\\";\\n\\nabstract contract PubkeyResolver is IPubkeyResolver, ResolverBase {\\n struct PublicKey {\\n bytes32 x;\\n bytes32 y;\\n }\\n\\n mapping(uint64 => mapping(bytes32 => PublicKey)) versionable_pubkeys;\\n\\n /**\\n * Sets the SECP256k1 public key associated with an ENS node.\\n * @param node The ENS node to query\\n * @param x the X coordinate of the curve point for the public key.\\n * @param y the Y coordinate of the curve point for the public key.\\n */\\n function setPubkey(\\n bytes32 node,\\n bytes32 x,\\n bytes32 y\\n ) external virtual authorised(node) {\\n versionable_pubkeys[recordVersions[node]][node] = PublicKey(x, y);\\n emit PubkeyChanged(node, x, y);\\n }\\n\\n /**\\n * Returns the SECP256k1 public key associated with an ENS node.\\n * Defined in EIP 619.\\n * @param node The ENS node to query\\n * @return x The X coordinate of the curve point for the public key.\\n * @return y The Y coordinate of the curve point for the public key.\\n */\\n function pubkey(\\n bytes32 node\\n ) external view virtual override returns (bytes32 x, bytes32 y) {\\n uint64 currentRecordVersion = recordVersions[node];\\n return (\\n versionable_pubkeys[currentRecordVersion][node].x,\\n versionable_pubkeys[currentRecordVersion][node].y\\n );\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(IPubkeyResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0x1a1f10a0e40520c998a9296fc81c092c81521e05a784e9bd9ee44cc4c62c8c78\",\"license\":\"MIT\"},\"contracts/resolvers/profiles/TextResolver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.4;\\n\\nimport \\\"../ResolverBase.sol\\\";\\nimport \\\"./ITextResolver.sol\\\";\\n\\nabstract contract TextResolver is ITextResolver, ResolverBase {\\n mapping(uint64 => mapping(bytes32 => mapping(string => string))) versionable_texts;\\n\\n /**\\n * Sets the text data associated with an ENS node and key.\\n * May only be called by the owner of that node in the ENS registry.\\n * @param node The node to update.\\n * @param key The key to set.\\n * @param value The text data value to set.\\n */\\n function setText(\\n bytes32 node,\\n string calldata key,\\n string calldata value\\n ) external virtual authorised(node) {\\n versionable_texts[recordVersions[node]][node][key] = value;\\n emit TextChanged(node, key, key, value);\\n }\\n\\n /**\\n * Returns the text data associated with an ENS node and key.\\n * @param node The ENS node to query.\\n * @param key The text data key to query.\\n * @return The associated text data.\\n */\\n function text(\\n bytes32 node,\\n string calldata key\\n ) external view virtual override returns (string memory) {\\n return versionable_texts[recordVersions[node]][node][key];\\n }\\n\\n function supportsInterface(\\n bytes4 interfaceID\\n ) public view virtual override returns (bool) {\\n return\\n interfaceID == type(ITextResolver).interfaceId ||\\n super.supportsInterface(interfaceID);\\n }\\n}\\n\",\"keccak256\":\"0xf9bedd807add38136779d84083ac2fa4f8c92d017c9e1a72fbc9003fa5074379\",\"license\":\"MIT\"},\"contracts/reverseRegistrar/IReverseRegistrar.sol\":{\"content\":\"pragma solidity >=0.8.4;\\n\\ninterface IReverseRegistrar {\\n function setDefaultResolver(address resolver) external;\\n\\n function claim(address owner) external returns (bytes32);\\n\\n function claimForAddr(\\n address addr,\\n address owner,\\n address resolver\\n ) external returns (bytes32);\\n\\n function claimWithResolver(\\n address owner,\\n address resolver\\n ) external returns (bytes32);\\n\\n function setName(string memory name) external returns (bytes32);\\n\\n function setNameForAddr(\\n address addr,\\n address owner,\\n address resolver,\\n string memory name\\n ) external returns (bytes32);\\n\\n function node(address addr) external pure returns (bytes32);\\n}\\n\",\"keccak256\":\"0x83adfcf6da72b1bcd1e3ac387afe5fc7fdf7f2ac28b7601544d2ca4b9d45d159\"},\"contracts/reverseRegistrar/ReverseClaimer.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity >=0.8.17 <0.9.0;\\n\\nimport {ENS} from \\\"../registry/ENS.sol\\\";\\nimport {IReverseRegistrar} from \\\"../reverseRegistrar/IReverseRegistrar.sol\\\";\\n\\ncontract ReverseClaimer {\\n bytes32 constant ADDR_REVERSE_NODE =\\n 0x91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e2;\\n\\n constructor(ENS ens, address claimant) {\\n IReverseRegistrar reverseRegistrar = IReverseRegistrar(\\n ens.owner(ADDR_REVERSE_NODE)\\n );\\n reverseRegistrar.claim(claimant);\\n }\\n}\\n\",\"keccak256\":\"0x78a28627241535b595f6fff476a1fa7acc90c80684fe7784734920fc8af6fc22\",\"license\":\"MIT\"},\"contracts/wrapper/IMetadataService.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface IMetadataService {\\n function uri(uint256) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xb3f1cf6df01ed7b15e5f2318f6823afbdb586ca38c2124c67955c645647ae9a2\",\"license\":\"MIT\"},\"contracts/wrapper/INameWrapper.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\nimport \\\"../registry/ENS.sol\\\";\\nimport \\\"../ethregistrar/IBaseRegistrar.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\\\";\\nimport \\\"./IMetadataService.sol\\\";\\nimport \\\"./INameWrapperUpgrade.sol\\\";\\n\\nuint32 constant CANNOT_UNWRAP = 1;\\nuint32 constant CANNOT_BURN_FUSES = 2;\\nuint32 constant CANNOT_TRANSFER = 4;\\nuint32 constant CANNOT_SET_RESOLVER = 8;\\nuint32 constant CANNOT_SET_TTL = 16;\\nuint32 constant CANNOT_CREATE_SUBDOMAIN = 32;\\nuint32 constant CANNOT_APPROVE = 64;\\n//uint16 reserved for parent controlled fuses from bit 17 to bit 32\\nuint32 constant PARENT_CANNOT_CONTROL = 1 << 16;\\nuint32 constant IS_DOT_ETH = 1 << 17;\\nuint32 constant CAN_EXTEND_EXPIRY = 1 << 18;\\nuint32 constant CAN_DO_EVERYTHING = 0;\\nuint32 constant PARENT_CONTROLLED_FUSES = 0xFFFF0000;\\n// all fuses apart from IS_DOT_ETH\\nuint32 constant USER_SETTABLE_FUSES = 0xFFFDFFFF;\\n\\ninterface INameWrapper is IERC1155 {\\n event NameWrapped(\\n bytes32 indexed node,\\n bytes name,\\n address owner,\\n uint32 fuses,\\n uint64 expiry\\n );\\n\\n event NameUnwrapped(bytes32 indexed node, address owner);\\n\\n event FusesSet(bytes32 indexed node, uint32 fuses);\\n event ExpiryExtended(bytes32 indexed node, uint64 expiry);\\n\\n function ens() external view returns (ENS);\\n\\n function registrar() external view returns (IBaseRegistrar);\\n\\n function metadataService() external view returns (IMetadataService);\\n\\n function names(bytes32) external view returns (bytes memory);\\n\\n function name() external view returns (string memory);\\n\\n function upgradeContract() external view returns (INameWrapperUpgrade);\\n\\n function supportsInterface(bytes4 interfaceID) external view returns (bool);\\n\\n function wrap(\\n bytes calldata name,\\n address wrappedOwner,\\n address resolver\\n ) external;\\n\\n function wrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint16 ownerControlledFuses,\\n address resolver\\n ) external returns (uint64 expires);\\n\\n function registerAndWrapETH2LD(\\n string calldata label,\\n address wrappedOwner,\\n uint256 duration,\\n address resolver,\\n uint16 ownerControlledFuses\\n ) external returns (uint256 registrarExpiry);\\n\\n function renew(\\n uint256 labelHash,\\n uint256 duration\\n ) external returns (uint256 expires);\\n\\n function unwrap(bytes32 node, bytes32 label, address owner) external;\\n\\n function unwrapETH2LD(\\n bytes32 label,\\n address newRegistrant,\\n address newController\\n ) external;\\n\\n function upgrade(bytes calldata name, bytes calldata extraData) external;\\n\\n function setFuses(\\n bytes32 node,\\n uint16 ownerControlledFuses\\n ) external returns (uint32 newFuses);\\n\\n function setChildFuses(\\n bytes32 parentNode,\\n bytes32 labelhash,\\n uint32 fuses,\\n uint64 expiry\\n ) external;\\n\\n function setSubnodeRecord(\\n bytes32 node,\\n string calldata label,\\n address owner,\\n address resolver,\\n uint64 ttl,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function setRecord(\\n bytes32 node,\\n address owner,\\n address resolver,\\n uint64 ttl\\n ) external;\\n\\n function setSubnodeOwner(\\n bytes32 node,\\n string calldata label,\\n address newOwner,\\n uint32 fuses,\\n uint64 expiry\\n ) external returns (bytes32);\\n\\n function extendExpiry(\\n bytes32 node,\\n bytes32 labelhash,\\n uint64 expiry\\n ) external returns (uint64);\\n\\n function canModifyName(\\n bytes32 node,\\n address addr\\n ) external view returns (bool);\\n\\n function setResolver(bytes32 node, address resolver) external;\\n\\n function setTTL(bytes32 node, uint64 ttl) external;\\n\\n function ownerOf(uint256 id) external view returns (address owner);\\n\\n function approve(address to, uint256 tokenId) external;\\n\\n function getApproved(uint256 tokenId) external view returns (address);\\n\\n function getData(\\n uint256 id\\n ) external view returns (address, uint32, uint64);\\n\\n function setMetadataService(IMetadataService _metadataService) external;\\n\\n function uri(uint256 tokenId) external view returns (string memory);\\n\\n function setUpgradeContract(INameWrapperUpgrade _upgradeAddress) external;\\n\\n function allFusesBurned(\\n bytes32 node,\\n uint32 fuseMask\\n ) external view returns (bool);\\n\\n function isWrapped(bytes32) external view returns (bool);\\n\\n function isWrapped(bytes32, bytes32) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x70310eb67146d7290731c31841399640ac3b6a949eadc6598bc150123d185c57\",\"license\":\"MIT\"},\"contracts/wrapper/INameWrapperUpgrade.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\npragma solidity ~0.8.17;\\n\\ninterface INameWrapperUpgrade {\\n function wrapFromUpgrade(\\n bytes calldata name,\\n address wrappedOwner,\\n uint32 fuses,\\n uint64 expiry,\\n address approved,\\n bytes calldata extraData\\n ) external;\\n}\\n\",\"keccak256\":\"0x42e0cec6cd9d1a62d51d45b678f69d3e4ad5555e659b197e41257b308346bb8a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x6101006040523480156200001257600080fd5b50604051620032943803806200329483398101604081905262000035916200017a565b6040516302571be360e01b81527f91d1777781884d03a6757a803996e38de2a42967fb37eeaca72729271025a9e26004820152849033906000906001600160a01b038416906302571be390602401602060405180830381865afa158015620000a1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000c79190620001e2565b604051630f41a04d60e11b81526001600160a01b03848116600483015291925090821690631e83409a906024016020604051808303816000875af115801562000114573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200013a919062000209565b5050506001600160a01b039485166080525091831660a052821660c0521660e05262000223565b6001600160a01b03811681146200017757600080fd5b50565b600080600080608085870312156200019157600080fd5b84516200019e8162000161565b6020860151909450620001b18162000161565b6040860151909350620001c48162000161565b6060860151909250620001d78162000161565b939692955090935050565b600060208284031215620001f557600080fd5b8151620002028162000161565b9392505050565b6000602082840312156200021c57600080fd5b5051919050565b60805160a05160c05160e0516130306200026460003960006117d7015260006117a50152600081816118af01526119150152600061183801526130306000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638b95dd7111610104578063c8690233116100a2578063e32954eb11610071578063e32954eb14610504578063e59d895d14610517578063e985e9c51461052a578063f1cb7e061461056657600080fd5b8063c869023314610442578063ce3decdc1461049b578063d5fa2b00146104ae578063d700ff33146104c157600080fd5b8063a8fa5682116100de578063a8fa5682146103b8578063a9784b3e146103cb578063ac9650d81461040f578063bc1c58d11461042f57600080fd5b80638b95dd711461037f578063a22cb46514610392578063a4b91a01146103a557600080fd5b80633603d7581161017c5780635c98042b1161014b5780635c98042b14610333578063623195b014610346578063691f343114610359578063773722131461036c57600080fd5b80633603d758146102a15780633b3b57de146102b45780634cbf6ba4146102c757806359d1d43c1461031357600080fd5b8063124a319c116101b8578063124a319c1461022f5780632203ab561461025a57806329cd62ea1461027b578063304e6ade1461028e57600080fd5b806301ffc9a7146101df5780630af179d71461020757806310f13a8c1461021c575b600080fd5b6101f26101ed366004612529565b610579565b60405190151581526020015b60405180910390f35b61021a610215366004612586565b61058a565b005b61021a61022a3660046125d2565b610794565b61024261023d36600461264c565b610861565b6040516001600160a01b0390911681526020016101fe565b61026d610268366004612678565b610b0d565b6040516101fe9291906126ea565b61021a610289366004612703565b610c44565b61021a61029c366004612586565b610cdf565b61021a6102af36600461272f565b610d5b565b6102426102c236600461272f565b610dfe565b6101f26102d5366004612678565b6000828152602081815260408083205467ffffffffffffffff1683526006825280832094835293815283822092825291909152205461ffff16151590565b610326610321366004612586565b610e30565b6040516101fe9190612748565b61032661034136600461272f565b610f10565b61021a61035436600461275b565b610fcf565b61032661036736600461272f565b61106c565b61021a61037a366004612586565b6110a6565b61021a61038d3660046127c4565b611122565b61021a6103a03660046128ad565b611202565b61021a6103b33660046128d9565b6112f1565b6103266103c6366004612917565b6113be565b6101f26103d9366004612957565b6001600160a01b039283166000908152600c60209081526040808320948352938152838220929094168152925290205460ff1690565b61042261041d3660046129d3565b61140c565b6040516101fe9190612a15565b61032661043d36600461272f565b61141a565b61048661045036600461272f565b6000818152602081815260408083205467ffffffffffffffff168352600982528083209383529290522080546001909101549091565b604080519283526020830191909152016101fe565b61021a6104a9366004612586565b611454565b61021a6104bc366004612a77565b611597565b6104eb6104cf36600461272f565b60006020819052908152604090205467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101fe565b610422610512366004612aa7565b6115be565b61021a610525366004612ae6565b6115d3565b6101f2610538366004612b1b565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b610326610574366004612678565b611692565b60006105848261175a565b92915050565b8261059481611798565b61059d57600080fd5b600084815260208181526040808320548151601f870184900484028101840190925285825283926060928392859267ffffffffffffffff9091169183916106039183918d908d908190840183828082843760009201919091525092939250506119ff9050565b90505b8051516020820151101561072d578661ffff1660000361066b578060400151965061063081611a60565b9450846040516020016106439190612b49565b60405160208183030381529060405280519060200120925061066481611a81565b935061071f565b600061067682611a60565b9050816040015161ffff168861ffff1614158061069a57506106988682611a9d565b155b1561071d576106f68c878a8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505060208801518d91506106ed908290612b7b565b8b51158a611abb565b81604001519750816020015196508095508580519060200120935061071a82611a81565b94505b505b61072881611d28565b610606565b50835115610788576107888a85888c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061077f91508290508f612b7b565b89511588611abb565b50505050505050505050565b8461079e81611798565b6107a757600080fd5b6000868152602081815260408083205467ffffffffffffffff168352600a8252808320898452909152908190209051849184916107e79089908990612b8e565b90815260200160405180910390209182610802929190612c26565b508484604051610813929190612b8e565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a1878787876040516108519493929190612d0f565b60405180910390a3505050505050565b6000828152602081815260408083205467ffffffffffffffff1683526007825280832085845282528083206001600160e01b0319851684529091528120546001600160a01b031680156108b5579050610584565b60006108c085610dfe565b90506001600160a01b0381166108db57600092505050610584565b6040516301ffc9a760e01b602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b179052516109489190612b49565b600060405180830381855afa9150503d8060008114610983576040519150601f19603f3d011682016040523d82523d6000602084013e610988565b606091505b509150915081158061099b575060208151105b806109dd575080601f815181106109b4576109b4612d41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b156109ef576000945050505050610584565b6040516001600160e01b0319871660248201526001600160a01b0384169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b17905251610a5a9190612b49565b600060405180830381855afa9150503d8060008114610a95576040519150601f19603f3d011682016040523d82523d6000602084013e610a9a565b606091505b509092509050811580610aae575060208151105b80610af0575080601f81518110610ac757610ac7612d41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b15610b02576000945050505050610584565b509095945050505050565b6000828152602081815260408083205467ffffffffffffffff168352600180835281842086855290925282206060915b848111610c245780851615801590610b6d575060008181526020839052604081208054610b6990612b9e565b9050115b15610c1c5780826000838152602001908152602001600020808054610b9190612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612b9e565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b50505050509050935093505050610c3d565b60011b610b3d565b5060006040518060200160405280600081525092509250505b9250929050565b82610c4e81611798565b610c5757600080fd5b604080518082018252848152602080820185815260008881528083528481205467ffffffffffffffff1681526009835284812089825283528490209251835551600190920191909155815185815290810184905285917f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e4691015b60405180910390a250505050565b82610ce981611798565b610cf257600080fd5b6000848152602081815260408083205467ffffffffffffffff168352600382528083208784529091529020610d28838583612c26565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d75788484604051610cd1929190612d57565b80610d6581611798565b610d6e57600080fd5b6000828152602081905260408120805467ffffffffffffffff1691610d9283612d6b565b82546101009290920a67ffffffffffffffff818102199093169183160217909155600084815260208181526040918290205491519190921681528492507fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db444910160405180910390a25050565b600080610e0c83603c611692565b90508051600003610e205750600092915050565b610e2981611e10565b9392505050565b6000838152602081815260408083205467ffffffffffffffff168352600a825280832086845290915290819020905160609190610e709085908590612b8e565b90815260200160405180910390208054610e8990612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb590612b9e565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b505050505090509392505050565b6000818152602081815260408083205467ffffffffffffffff168352600482528083208484529091529020805460609190610f4a90612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7690612b9e565b8015610fc35780601f10610f9857610100808354040283529160200191610fc3565b820191906000526020600020905b815481529060010190602001808311610fa657829003601f168201915b50505050509050919050565b83610fd981611798565b610fe257600080fd5b83610fee600182612b7b565b1615610ff957600080fd5b6000858152602081815260408083205467ffffffffffffffff1683526001825280832088845282528083208784529091529020611037838583612c26565b50604051849086907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35050505050565b6000818152602081815260408083205467ffffffffffffffff168352600882528083208484529091529020805460609190610f4a90612b9e565b826110b081611798565b6110b957600080fd5b6000848152602081815260408083205467ffffffffffffffff1683526008825280832087845290915290206110ef838583612c26565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051610cd1929190612d57565b8261112c81611798565b61113557600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040516111679291906126ea565b60405180910390a2603c83036111be57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd26111a284611e10565b6040516001600160a01b03909116815260200160405180910390a25b6000848152602081815260408083205467ffffffffffffffff16835260028252808320878452825280832086845290915290206111fb8382612d92565b5050505050565b6001600160a01b03821633036112855760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03821633036113495760405162461bcd60e51b815260206004820181905260248201527f53657474696e672064656c65676174652073746174757320666f722073656c66604482015260640161127c565b336000818152600c6020908152604080832087845282528083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519384529286917ff0ddb3b04746704017f9aa8bd728fcc2c1d11675041205350018915f5e4750a0910160405180910390a4505050565b6000838152602081815260408083205467ffffffffffffffff168352600582528083208684528252808320858452825280832061ffff851684529091529020805460609190610e8990612b9e565b6060610e2960008484611e38565b6000818152602081815260408083205467ffffffffffffffff168352600382528083208484529091529020805460609190610f4a90612b9e565b8261145e81611798565b61146757600080fd5b6000848152602081815260408083205467ffffffffffffffff1680845260048352818420888552909252822080549192916114a190612b9e565b80601f01602080910402602001604051908101604052809291908181526020018280546114cd90612b9e565b801561151a5780601f106114ef5761010080835404028352916020019161151a565b820191906000526020600020905b8154815290600101906020018083116114fd57829003601f168201915b5050505067ffffffffffffffff841660009081526004602090815260408083208b845290915290209192506115529050858783612c26565b50857f8f15ed4b723ef428f250961da8315675b507046737e19319fc1a4d81bfe87f8582878760405161158793929190612e52565b60405180910390a2505050505050565b816115a181611798565b6115aa57600080fd5b6115b983603c61038d85612011565b505050565b60606115cb848484611e38565b949350505050565b826115dd81611798565b6115e657600080fd5b6000848152602081815260408083205467ffffffffffffffff1683526007825280832087845282528083206001600160e01b031987168085529083529281902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038716908117909155905190815286917f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa910160405180910390a350505050565b6000828152602081815260408083205467ffffffffffffffff16835260028252808320858452825280832084845290915290208054606091906116d490612b9e565b80601f016020809104026020016040519081016040528092919081815260200182805461170090612b9e565b801561174d5780601f106117225761010080835404028352916020019161174d565b820191906000526020600020905b81548152906001019060200180831161173057829003601f168201915b5050505050905092915050565b60006001600160e01b031982167f59d1d43c00000000000000000000000000000000000000000000000000000000148061058457506105848261204a565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117f95750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561180657506001919050565b6040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906302571be390602401602060405180830381865afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab9190612e82565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03160361198b576040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015611964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119889190612e82565b90505b6001600160a01b0381163314806119c557506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff165b80610e2957506001600160a01b0381166000908152600c60209081526040808320868452825280832033845290915290205460ff16610e29565b611a4d6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b82815260c0810182905261058481611d28565b6020810151815160609161058491611a789082612088565b845191906120e2565b60a081015160c082015160609161058491611a78908290612b7b565b600081518351148015610e295750610e298360008460008751612159565b865160208801206000611acf8787876120e2565b90508315611bf95767ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c16845290915290208054611b1a90612b9e565b159050611b795767ffffffffffffffff831660009081526006602090815260408083208d845282528083208584529091528120805461ffff1691611b5d83612e9f565b91906101000a81548161ffff021916908361ffff160217905550505b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c1684529091528120611bba916124b6565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a604051611bec929190612ebd565b60405180910390a2610788565b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c16845290915290208054611c3c90612b9e565b9050600003611c9d5767ffffffffffffffff831660009081526006602090815260408083208d845282528083208584529091528120805461ffff1691611c8183612ee3565b91906101000a81548161ffff021916908361ffff160217905550505b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c1684529091529020611cdf8282612d92565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a84604051611d1493929190612efa565b60405180910390a250505050505050505050565b60c08101516020820181905281515111611d3f5750565b6000611d5382600001518360200151612088565b8260200151611d629190612f29565b8251909150611d71908261217c565b61ffff166040830152611d85600282612f29565b8251909150611d94908261217c565b61ffff166060830152611da8600282612f29565b8251909150611db790826121a4565b63ffffffff166080830152611dcd600482612f29565b8251909150600090611ddf908361217c565b61ffff169050611df0600283612f29565b60a084018190529150611e038183612f29565b60c0909301929092525050565b60008151601414611e2057600080fd5b50602001516c01000000000000000000000000900490565b60608167ffffffffffffffff811115611e5357611e536127ae565b604051908082528060200260200182016040528015611e8657816020015b6060815260200190600190039081611e715790505b50905060005b82811015612009578415611f51576000848483818110611eae57611eae612d41565b9050602002810190611ec09190612f3c565b611ecf91602491600491612f83565b611ed891612fad565b9050858114611f4f5760405162461bcd60e51b815260206004820152603460248201527f6d756c746963616c6c3a20416c6c207265636f726473206d757374206861766560448201527f2061206d61746368696e67206e616d6568617368000000000000000000000000606482015260840161127c565b505b60008030868685818110611f6757611f67612d41565b9050602002810190611f799190612f3c565b604051611f87929190612b8e565b600060405180830381855af49150503d8060008114611fc2576040519150601f19603f3d011682016040523d82523d6000602084013e611fc7565b606091505b509150915081611fd657600080fd5b80848481518110611fe957611fe9612d41565b60200260200101819052505050808061200190612fcb565b915050611e8c565b509392505050565b6040805160148082528183019092526060916020820181803683375050506c010000000000000000000000009290920260208301525090565b60006001600160e01b031982167fc86902330000000000000000000000000000000000000000000000000000000014806105845750610584826121ce565b6000815b8351811061209c5761209c612fe4565b60006120a8858361220c565b60ff1690506120b8816001612f29565b6120c29083612f29565b9150806000036120d257506120d8565b5061208c565b6115cb8382612b7b565b82516060906120f18385612f29565b11156120fc57600080fd5b60008267ffffffffffffffff811115612117576121176127ae565b6040519080825280601f01601f191660200182016040528015612141576020820181803683370190505b50905060208082019086860101610b02828287612230565b6000612166848484612286565b612171878785612286565b149695505050505050565b815160009061218c836002612f29565b111561219757600080fd5b50016002015161ffff1690565b81516000906121b4836004612f29565b11156121bf57600080fd5b50016004015163ffffffff1690565b60006001600160e01b031982167f691f34310000000000000000000000000000000000000000000000000000000014806105845750610584826122aa565b600082828151811061222057612220612d41565b016020015160f81c905092915050565b602081106122685781518352612247602084612f29565b9250612254602083612f29565b9150612261602082612b7b565b9050612230565b905182516020929092036101000a6000190180199091169116179052565b82516000906122958385612f29565b11156122a057600080fd5b5091016020012090565b60006001600160e01b031982167f124a319c00000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167fa8fa568200000000000000000000000000000000000000000000000000000000148061234657506001600160e01b031982167f5c98042b00000000000000000000000000000000000000000000000000000000145b8061058457506105848260006001600160e01b031982167fbc1c58d100000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806123ec57506001600160e01b031982167ff1cb7e0600000000000000000000000000000000000000000000000000000000145b8061058457506105848260006001600160e01b031982167f2203ab5600000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167fd700ff3300000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167f4fbf043300000000000000000000000000000000000000000000000000000000148061058457506301ffc9a760e01b6001600160e01b0319831614610584565b5080546124c290612b9e565b6000825580601f106124d2575050565b601f0160209004906000526020600020908101906124f091906124f3565b50565b5b8082111561250857600081556001016124f4565b5090565b80356001600160e01b03198116811461252457600080fd5b919050565b60006020828403121561253b57600080fd5b610e298261250c565b60008083601f84011261255657600080fd5b50813567ffffffffffffffff81111561256e57600080fd5b602083019150836020828501011115610c3d57600080fd5b60008060006040848603121561259b57600080fd5b83359250602084013567ffffffffffffffff8111156125b957600080fd5b6125c586828701612544565b9497909650939450505050565b6000806000806000606086880312156125ea57600080fd5b85359450602086013567ffffffffffffffff8082111561260957600080fd5b61261589838a01612544565b9096509450604088013591508082111561262e57600080fd5b5061263b88828901612544565b969995985093965092949392505050565b6000806040838503121561265f57600080fd5b8235915061266f6020840161250c565b90509250929050565b6000806040838503121561268b57600080fd5b50508035926020909101359150565b60005b838110156126b557818101518382015260200161269d565b50506000910152565b600081518084526126d681602086016020860161269a565b601f01601f19169290920160200192915050565b8281526040602082015260006115cb60408301846126be565b60008060006060848603121561271857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561274157600080fd5b5035919050565b602081526000610e2960208301846126be565b6000806000806060858703121561277157600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561279657600080fd5b6127a287828801612544565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156127d957600080fd5b8335925060208401359150604084013567ffffffffffffffff808211156127ff57600080fd5b818601915086601f83011261281357600080fd5b813581811115612825576128256127ae565b604051601f8201601f19908116603f0116810190838211818310171561284d5761284d6127ae565b8160405282815289602084870101111561286657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6001600160a01b03811681146124f057600080fd5b8035801515811461252457600080fd5b600080604083850312156128c057600080fd5b82356128cb81612888565b915061266f6020840161289d565b6000806000606084860312156128ee57600080fd5b83359250602084013561290081612888565b915061290e6040850161289d565b90509250925092565b60008060006060848603121561292c57600080fd5b8335925060208401359150604084013561ffff8116811461294c57600080fd5b809150509250925092565b60008060006060848603121561296c57600080fd5b833561297781612888565b925060208401359150604084013561294c81612888565b60008083601f8401126129a057600080fd5b50813567ffffffffffffffff8111156129b857600080fd5b6020830191508360208260051b8501011115610c3d57600080fd5b600080602083850312156129e657600080fd5b823567ffffffffffffffff8111156129fd57600080fd5b612a098582860161298e565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612a6a57603f19888603018452612a588583516126be565b94509285019290850190600101612a3c565b5092979650505050505050565b60008060408385031215612a8a57600080fd5b823591506020830135612a9c81612888565b809150509250929050565b600080600060408486031215612abc57600080fd5b83359250602084013567ffffffffffffffff811115612ada57600080fd5b6125c58682870161298e565b600080600060608486031215612afb57600080fd5b83359250612b0b6020850161250c565b9150604084013561294c81612888565b60008060408385031215612b2e57600080fd5b8235612b3981612888565b91506020830135612a9c81612888565b60008251612b5b81846020870161269a565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058457610584612b65565b8183823760009101908152919050565b600181811c90821680612bb257607f821691505b602082108103612bd257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156115b957600081815260208120601f850160051c81016020861015612bff5750805b601f850160051c820191505b81811015612c1e57828155600101612c0b565b505050505050565b67ffffffffffffffff831115612c3e57612c3e6127ae565b612c5283612c4c8354612b9e565b83612bd8565b6000601f841160018114612c865760008515612c6e5750838201355b600019600387901b1c1916600186901b1783556111fb565b600083815260209020601f19861690835b82811015612cb75786850135825560209485019460019092019101612c97565b5086821015612cd45760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612d23604083018688612ce6565b8281036020840152612d36818587612ce6565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b6020815260006115cb602083018486612ce6565b600067ffffffffffffffff808316818103612d8857612d88612b65565b6001019392505050565b815167ffffffffffffffff811115612dac57612dac6127ae565b612dc081612dba8454612b9e565b84612bd8565b602080601f831160018114612df55760008415612ddd5750858301515b600019600386901b1c1916600185901b178555612c1e565b600085815260208120601f198616915b82811015612e2457888601518255948401946001909101908401612e05565b5085821015612e425787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000612e6560408301866126be565b8281036020840152612e78818587612ce6565b9695505050505050565b600060208284031215612e9457600080fd5b8151610e2981612888565b600061ffff821680612eb357612eb3612b65565b6000190192915050565b604081526000612ed060408301856126be565b905061ffff831660208301529392505050565b600061ffff808316818103612d8857612d88612b65565b606081526000612f0d60608301866126be565b61ffff851660208401528281036040840152612e7881856126be565b8082018082111561058457610584612b65565b6000808335601e19843603018112612f5357600080fd5b83018035915067ffffffffffffffff821115612f6e57600080fd5b602001915036819003821315610c3d57600080fd5b60008085851115612f9357600080fd5b83861115612fa057600080fd5b5050820193919092039150565b8035602083101561058457600019602084900360031b1b1692915050565b600060018201612fdd57612fdd612b65565b5060010190565b634e487b7160e01b600052600160045260246000fdfea26469706673582212200cadfbfa7a3500543d3cccaa88637fe3e6de9643115ee2aba8968d512f3c914864736f6c63430008110033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80638b95dd7111610104578063c8690233116100a2578063e32954eb11610071578063e32954eb14610504578063e59d895d14610517578063e985e9c51461052a578063f1cb7e061461056657600080fd5b8063c869023314610442578063ce3decdc1461049b578063d5fa2b00146104ae578063d700ff33146104c157600080fd5b8063a8fa5682116100de578063a8fa5682146103b8578063a9784b3e146103cb578063ac9650d81461040f578063bc1c58d11461042f57600080fd5b80638b95dd711461037f578063a22cb46514610392578063a4b91a01146103a557600080fd5b80633603d7581161017c5780635c98042b1161014b5780635c98042b14610333578063623195b014610346578063691f343114610359578063773722131461036c57600080fd5b80633603d758146102a15780633b3b57de146102b45780634cbf6ba4146102c757806359d1d43c1461031357600080fd5b8063124a319c116101b8578063124a319c1461022f5780632203ab561461025a57806329cd62ea1461027b578063304e6ade1461028e57600080fd5b806301ffc9a7146101df5780630af179d71461020757806310f13a8c1461021c575b600080fd5b6101f26101ed366004612529565b610579565b60405190151581526020015b60405180910390f35b61021a610215366004612586565b61058a565b005b61021a61022a3660046125d2565b610794565b61024261023d36600461264c565b610861565b6040516001600160a01b0390911681526020016101fe565b61026d610268366004612678565b610b0d565b6040516101fe9291906126ea565b61021a610289366004612703565b610c44565b61021a61029c366004612586565b610cdf565b61021a6102af36600461272f565b610d5b565b6102426102c236600461272f565b610dfe565b6101f26102d5366004612678565b6000828152602081815260408083205467ffffffffffffffff1683526006825280832094835293815283822092825291909152205461ffff16151590565b610326610321366004612586565b610e30565b6040516101fe9190612748565b61032661034136600461272f565b610f10565b61021a61035436600461275b565b610fcf565b61032661036736600461272f565b61106c565b61021a61037a366004612586565b6110a6565b61021a61038d3660046127c4565b611122565b61021a6103a03660046128ad565b611202565b61021a6103b33660046128d9565b6112f1565b6103266103c6366004612917565b6113be565b6101f26103d9366004612957565b6001600160a01b039283166000908152600c60209081526040808320948352938152838220929094168152925290205460ff1690565b61042261041d3660046129d3565b61140c565b6040516101fe9190612a15565b61032661043d36600461272f565b61141a565b61048661045036600461272f565b6000818152602081815260408083205467ffffffffffffffff168352600982528083209383529290522080546001909101549091565b604080519283526020830191909152016101fe565b61021a6104a9366004612586565b611454565b61021a6104bc366004612a77565b611597565b6104eb6104cf36600461272f565b60006020819052908152604090205467ffffffffffffffff1681565b60405167ffffffffffffffff90911681526020016101fe565b610422610512366004612aa7565b6115be565b61021a610525366004612ae6565b6115d3565b6101f2610538366004612b1b565b6001600160a01b039182166000908152600b6020908152604080832093909416825291909152205460ff1690565b610326610574366004612678565b611692565b60006105848261175a565b92915050565b8261059481611798565b61059d57600080fd5b600084815260208181526040808320548151601f870184900484028101840190925285825283926060928392859267ffffffffffffffff9091169183916106039183918d908d908190840183828082843760009201919091525092939250506119ff9050565b90505b8051516020820151101561072d578661ffff1660000361066b578060400151965061063081611a60565b9450846040516020016106439190612b49565b60405160208183030381529060405280519060200120925061066481611a81565b935061071f565b600061067682611a60565b9050816040015161ffff168861ffff1614158061069a57506106988682611a9d565b155b1561071d576106f68c878a8e8e8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250505060208801518d91506106ed908290612b7b565b8b51158a611abb565b81604001519750816020015196508095508580519060200120935061071a82611a81565b94505b505b61072881611d28565b610606565b50835115610788576107888a85888c8c8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c925061077f91508290508f612b7b565b89511588611abb565b50505050505050505050565b8461079e81611798565b6107a757600080fd5b6000868152602081815260408083205467ffffffffffffffff168352600a8252808320898452909152908190209051849184916107e79089908990612b8e565b90815260200160405180910390209182610802929190612c26565b508484604051610813929190612b8e565b6040518091039020867f448bc014f1536726cf8d54ff3d6481ed3cbc683c2591ca204274009afa09b1a1878787876040516108519493929190612d0f565b60405180910390a3505050505050565b6000828152602081815260408083205467ffffffffffffffff1683526007825280832085845282528083206001600160e01b0319851684529091528120546001600160a01b031680156108b5579050610584565b60006108c085610dfe565b90506001600160a01b0381166108db57600092505050610584565b6040516301ffc9a760e01b602482015260009081906001600160a01b0384169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b179052516109489190612b49565b600060405180830381855afa9150503d8060008114610983576040519150601f19603f3d011682016040523d82523d6000602084013e610988565b606091505b509150915081158061099b575060208151105b806109dd575080601f815181106109b4576109b4612d41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b156109ef576000945050505050610584565b6040516001600160e01b0319871660248201526001600160a01b0384169060440160408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b17905251610a5a9190612b49565b600060405180830381855afa9150503d8060008114610a95576040519150601f19603f3d011682016040523d82523d6000602084013e610a9a565b606091505b509092509050811580610aae575060208151105b80610af0575080601f81518110610ac757610ac7612d41565b01602001517fff0000000000000000000000000000000000000000000000000000000000000016155b15610b02576000945050505050610584565b509095945050505050565b6000828152602081815260408083205467ffffffffffffffff168352600180835281842086855290925282206060915b848111610c245780851615801590610b6d575060008181526020839052604081208054610b6990612b9e565b9050115b15610c1c5780826000838152602001908152602001600020808054610b9190612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90612b9e565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b50505050509050935093505050610c3d565b60011b610b3d565b5060006040518060200160405280600081525092509250505b9250929050565b82610c4e81611798565b610c5757600080fd5b604080518082018252848152602080820185815260008881528083528481205467ffffffffffffffff1681526009835284812089825283528490209251835551600190920191909155815185815290810184905285917f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e4691015b60405180910390a250505050565b82610ce981611798565b610cf257600080fd5b6000848152602081815260408083205467ffffffffffffffff168352600382528083208784529091529020610d28838583612c26565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d75788484604051610cd1929190612d57565b80610d6581611798565b610d6e57600080fd5b6000828152602081905260408120805467ffffffffffffffff1691610d9283612d6b565b82546101009290920a67ffffffffffffffff818102199093169183160217909155600084815260208181526040918290205491519190921681528492507fc6621ccb8f3f5a04bb6502154b2caf6adf5983fe76dfef1cfc9c42e3579db444910160405180910390a25050565b600080610e0c83603c611692565b90508051600003610e205750600092915050565b610e2981611e10565b9392505050565b6000838152602081815260408083205467ffffffffffffffff168352600a825280832086845290915290819020905160609190610e709085908590612b8e565b90815260200160405180910390208054610e8990612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610eb590612b9e565b8015610f025780601f10610ed757610100808354040283529160200191610f02565b820191906000526020600020905b815481529060010190602001808311610ee557829003601f168201915b505050505090509392505050565b6000818152602081815260408083205467ffffffffffffffff168352600482528083208484529091529020805460609190610f4a90612b9e565b80601f0160208091040260200160405190810160405280929190818152602001828054610f7690612b9e565b8015610fc35780601f10610f9857610100808354040283529160200191610fc3565b820191906000526020600020905b815481529060010190602001808311610fa657829003601f168201915b50505050509050919050565b83610fd981611798565b610fe257600080fd5b83610fee600182612b7b565b1615610ff957600080fd5b6000858152602081815260408083205467ffffffffffffffff1683526001825280832088845282528083208784529091529020611037838583612c26565b50604051849086907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35050505050565b6000818152602081815260408083205467ffffffffffffffff168352600882528083208484529091529020805460609190610f4a90612b9e565b826110b081611798565b6110b957600080fd5b6000848152602081815260408083205467ffffffffffffffff1683526008825280832087845290915290206110ef838583612c26565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f78484604051610cd1929190612d57565b8261112c81611798565b61113557600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040516111679291906126ea565b60405180910390a2603c83036111be57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd26111a284611e10565b6040516001600160a01b03909116815260200160405180910390a25b6000848152602081815260408083205467ffffffffffffffff16835260028252808320878452825280832086845290915290206111fb8382612d92565b5050505050565b6001600160a01b03821633036112855760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c66000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b336000818152600b602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03821633036113495760405162461bcd60e51b815260206004820181905260248201527f53657474696e672064656c65676174652073746174757320666f722073656c66604482015260640161127c565b336000818152600c6020908152604080832087845282528083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519384529286917ff0ddb3b04746704017f9aa8bd728fcc2c1d11675041205350018915f5e4750a0910160405180910390a4505050565b6000838152602081815260408083205467ffffffffffffffff168352600582528083208684528252808320858452825280832061ffff851684529091529020805460609190610e8990612b9e565b6060610e2960008484611e38565b6000818152602081815260408083205467ffffffffffffffff168352600382528083208484529091529020805460609190610f4a90612b9e565b8261145e81611798565b61146757600080fd5b6000848152602081815260408083205467ffffffffffffffff1680845260048352818420888552909252822080549192916114a190612b9e565b80601f01602080910402602001604051908101604052809291908181526020018280546114cd90612b9e565b801561151a5780601f106114ef5761010080835404028352916020019161151a565b820191906000526020600020905b8154815290600101906020018083116114fd57829003601f168201915b5050505067ffffffffffffffff841660009081526004602090815260408083208b845290915290209192506115529050858783612c26565b50857f8f15ed4b723ef428f250961da8315675b507046737e19319fc1a4d81bfe87f8582878760405161158793929190612e52565b60405180910390a2505050505050565b816115a181611798565b6115aa57600080fd5b6115b983603c61038d85612011565b505050565b60606115cb848484611e38565b949350505050565b826115dd81611798565b6115e657600080fd5b6000848152602081815260408083205467ffffffffffffffff1683526007825280832087845282528083206001600160e01b031987168085529083529281902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038716908117909155905190815286917f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa910160405180910390a350505050565b6000828152602081815260408083205467ffffffffffffffff16835260028252808320858452825280832084845290915290208054606091906116d490612b9e565b80601f016020809104026020016040519081016040528092919081815260200182805461170090612b9e565b801561174d5780601f106117225761010080835404028352916020019161174d565b820191906000526020600020905b81548152906001019060200180831161173057829003601f168201915b5050505050905092915050565b60006001600160e01b031982167f59d1d43c00000000000000000000000000000000000000000000000000000000148061058457506105848261204a565b6000336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117f95750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b1561180657506001919050565b6040517f02571be3000000000000000000000000000000000000000000000000000000008152600481018390526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906302571be390602401602060405180830381865afa158015611887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ab9190612e82565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03160361198b576040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa158015611964573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119889190612e82565b90505b6001600160a01b0381163314806119c557506001600160a01b0381166000908152600b6020908152604080832033845290915290205460ff165b80610e2957506001600160a01b0381166000908152600c60209081526040808320868452825280832033845290915290205460ff16610e29565b611a4d6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b82815260c0810182905261058481611d28565b6020810151815160609161058491611a789082612088565b845191906120e2565b60a081015160c082015160609161058491611a78908290612b7b565b600081518351148015610e295750610e298360008460008751612159565b865160208801206000611acf8787876120e2565b90508315611bf95767ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c16845290915290208054611b1a90612b9e565b159050611b795767ffffffffffffffff831660009081526006602090815260408083208d845282528083208584529091528120805461ffff1691611b5d83612e9f565b91906101000a81548161ffff021916908361ffff160217905550505b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c1684529091528120611bba916124b6565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a604051611bec929190612ebd565b60405180910390a2610788565b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c16845290915290208054611c3c90612b9e565b9050600003611c9d5767ffffffffffffffff831660009081526006602090815260408083208d845282528083208584529091528120805461ffff1691611c8183612ee3565b91906101000a81548161ffff021916908361ffff160217905550505b67ffffffffffffffff831660009081526005602090815260408083208d84528252808320858452825280832061ffff8c1684529091529020611cdf8282612d92565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a84604051611d1493929190612efa565b60405180910390a250505050505050505050565b60c08101516020820181905281515111611d3f5750565b6000611d5382600001518360200151612088565b8260200151611d629190612f29565b8251909150611d71908261217c565b61ffff166040830152611d85600282612f29565b8251909150611d94908261217c565b61ffff166060830152611da8600282612f29565b8251909150611db790826121a4565b63ffffffff166080830152611dcd600482612f29565b8251909150600090611ddf908361217c565b61ffff169050611df0600283612f29565b60a084018190529150611e038183612f29565b60c0909301929092525050565b60008151601414611e2057600080fd5b50602001516c01000000000000000000000000900490565b60608167ffffffffffffffff811115611e5357611e536127ae565b604051908082528060200260200182016040528015611e8657816020015b6060815260200190600190039081611e715790505b50905060005b82811015612009578415611f51576000848483818110611eae57611eae612d41565b9050602002810190611ec09190612f3c565b611ecf91602491600491612f83565b611ed891612fad565b9050858114611f4f5760405162461bcd60e51b815260206004820152603460248201527f6d756c746963616c6c3a20416c6c207265636f726473206d757374206861766560448201527f2061206d61746368696e67206e616d6568617368000000000000000000000000606482015260840161127c565b505b60008030868685818110611f6757611f67612d41565b9050602002810190611f799190612f3c565b604051611f87929190612b8e565b600060405180830381855af49150503d8060008114611fc2576040519150601f19603f3d011682016040523d82523d6000602084013e611fc7565b606091505b509150915081611fd657600080fd5b80848481518110611fe957611fe9612d41565b60200260200101819052505050808061200190612fcb565b915050611e8c565b509392505050565b6040805160148082528183019092526060916020820181803683375050506c010000000000000000000000009290920260208301525090565b60006001600160e01b031982167fc86902330000000000000000000000000000000000000000000000000000000014806105845750610584826121ce565b6000815b8351811061209c5761209c612fe4565b60006120a8858361220c565b60ff1690506120b8816001612f29565b6120c29083612f29565b9150806000036120d257506120d8565b5061208c565b6115cb8382612b7b565b82516060906120f18385612f29565b11156120fc57600080fd5b60008267ffffffffffffffff811115612117576121176127ae565b6040519080825280601f01601f191660200182016040528015612141576020820181803683370190505b50905060208082019086860101610b02828287612230565b6000612166848484612286565b612171878785612286565b149695505050505050565b815160009061218c836002612f29565b111561219757600080fd5b50016002015161ffff1690565b81516000906121b4836004612f29565b11156121bf57600080fd5b50016004015163ffffffff1690565b60006001600160e01b031982167f691f34310000000000000000000000000000000000000000000000000000000014806105845750610584826122aa565b600082828151811061222057612220612d41565b016020015160f81c905092915050565b602081106122685781518352612247602084612f29565b9250612254602083612f29565b9150612261602082612b7b565b9050612230565b905182516020929092036101000a6000190180199091169116179052565b82516000906122958385612f29565b11156122a057600080fd5b5091016020012090565b60006001600160e01b031982167f124a319c00000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167fa8fa568200000000000000000000000000000000000000000000000000000000148061234657506001600160e01b031982167f5c98042b00000000000000000000000000000000000000000000000000000000145b8061058457506105848260006001600160e01b031982167fbc1c58d100000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806123ec57506001600160e01b031982167ff1cb7e0600000000000000000000000000000000000000000000000000000000145b8061058457506105848260006001600160e01b031982167f2203ab5600000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167fd700ff3300000000000000000000000000000000000000000000000000000000148061058457506105848260006001600160e01b031982167f4fbf043300000000000000000000000000000000000000000000000000000000148061058457506301ffc9a760e01b6001600160e01b0319831614610584565b5080546124c290612b9e565b6000825580601f106124d2575050565b601f0160209004906000526020600020908101906124f091906124f3565b50565b5b8082111561250857600081556001016124f4565b5090565b80356001600160e01b03198116811461252457600080fd5b919050565b60006020828403121561253b57600080fd5b610e298261250c565b60008083601f84011261255657600080fd5b50813567ffffffffffffffff81111561256e57600080fd5b602083019150836020828501011115610c3d57600080fd5b60008060006040848603121561259b57600080fd5b83359250602084013567ffffffffffffffff8111156125b957600080fd5b6125c586828701612544565b9497909650939450505050565b6000806000806000606086880312156125ea57600080fd5b85359450602086013567ffffffffffffffff8082111561260957600080fd5b61261589838a01612544565b9096509450604088013591508082111561262e57600080fd5b5061263b88828901612544565b969995985093965092949392505050565b6000806040838503121561265f57600080fd5b8235915061266f6020840161250c565b90509250929050565b6000806040838503121561268b57600080fd5b50508035926020909101359150565b60005b838110156126b557818101518382015260200161269d565b50506000910152565b600081518084526126d681602086016020860161269a565b601f01601f19169290920160200192915050565b8281526040602082015260006115cb60408301846126be565b60008060006060848603121561271857600080fd5b505081359360208301359350604090920135919050565b60006020828403121561274157600080fd5b5035919050565b602081526000610e2960208301846126be565b6000806000806060858703121561277157600080fd5b8435935060208501359250604085013567ffffffffffffffff81111561279657600080fd5b6127a287828801612544565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b6000806000606084860312156127d957600080fd5b8335925060208401359150604084013567ffffffffffffffff808211156127ff57600080fd5b818601915086601f83011261281357600080fd5b813581811115612825576128256127ae565b604051601f8201601f19908116603f0116810190838211818310171561284d5761284d6127ae565b8160405282815289602084870101111561286657600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6001600160a01b03811681146124f057600080fd5b8035801515811461252457600080fd5b600080604083850312156128c057600080fd5b82356128cb81612888565b915061266f6020840161289d565b6000806000606084860312156128ee57600080fd5b83359250602084013561290081612888565b915061290e6040850161289d565b90509250925092565b60008060006060848603121561292c57600080fd5b8335925060208401359150604084013561ffff8116811461294c57600080fd5b809150509250925092565b60008060006060848603121561296c57600080fd5b833561297781612888565b925060208401359150604084013561294c81612888565b60008083601f8401126129a057600080fd5b50813567ffffffffffffffff8111156129b857600080fd5b6020830191508360208260051b8501011115610c3d57600080fd5b600080602083850312156129e657600080fd5b823567ffffffffffffffff8111156129fd57600080fd5b612a098582860161298e565b90969095509350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015612a6a57603f19888603018452612a588583516126be565b94509285019290850190600101612a3c565b5092979650505050505050565b60008060408385031215612a8a57600080fd5b823591506020830135612a9c81612888565b809150509250929050565b600080600060408486031215612abc57600080fd5b83359250602084013567ffffffffffffffff811115612ada57600080fd5b6125c58682870161298e565b600080600060608486031215612afb57600080fd5b83359250612b0b6020850161250c565b9150604084013561294c81612888565b60008060408385031215612b2e57600080fd5b8235612b3981612888565b91506020830135612a9c81612888565b60008251612b5b81846020870161269a565b9190910192915050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561058457610584612b65565b8183823760009101908152919050565b600181811c90821680612bb257607f821691505b602082108103612bd257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156115b957600081815260208120601f850160051c81016020861015612bff5750805b601f850160051c820191505b81811015612c1e57828155600101612c0b565b505050505050565b67ffffffffffffffff831115612c3e57612c3e6127ae565b612c5283612c4c8354612b9e565b83612bd8565b6000601f841160018114612c865760008515612c6e5750838201355b600019600387901b1c1916600186901b1783556111fb565b600083815260209020601f19861690835b82811015612cb75786850135825560209485019460019092019101612c97565b5086821015612cd45760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b604081526000612d23604083018688612ce6565b8281036020840152612d36818587612ce6565b979650505050505050565b634e487b7160e01b600052603260045260246000fd5b6020815260006115cb602083018486612ce6565b600067ffffffffffffffff808316818103612d8857612d88612b65565b6001019392505050565b815167ffffffffffffffff811115612dac57612dac6127ae565b612dc081612dba8454612b9e565b84612bd8565b602080601f831160018114612df55760008415612ddd5750858301515b600019600386901b1c1916600185901b178555612c1e565b600085815260208120601f198616915b82811015612e2457888601518255948401946001909101908401612e05565b5085821015612e425787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b604081526000612e6560408301866126be565b8281036020840152612e78818587612ce6565b9695505050505050565b600060208284031215612e9457600080fd5b8151610e2981612888565b600061ffff821680612eb357612eb3612b65565b6000190192915050565b604081526000612ed060408301856126be565b905061ffff831660208301529392505050565b600061ffff808316818103612d8857612d88612b65565b606081526000612f0d60608301866126be565b61ffff851660208401528281036040840152612e7881856126be565b8082018082111561058457610584612b65565b6000808335601e19843603018112612f5357600080fd5b83018035915067ffffffffffffffff821115612f6e57600080fd5b602001915036819003821315610c3d57600080fd5b60008085851115612f9357600080fd5b83861115612fa057600080fd5b5050820193919092039150565b8035602083101561058457600019602084900360031b1b1692915050565b600060018201612fdd57612fdd612b65565b5060010190565b634e487b7160e01b600052600160045260246000fdfea26469706673582212200cadfbfa7a3500543d3cccaa88637fe3e6de9643115ee2aba8968d512f3c914864736f6c63430008110033", + "devdoc": { + "kind": "dev", + "methods": { + "ABI(bytes32,uint256)": { + "params": { + "contentTypes": "A bitwise OR of the ABI formats accepted by the caller.", + "node": "The ENS node to query" + }, + "returns": { + "_0": "contentType The content type of the return value", + "_1": "data The ABI data" + } + }, + "addr(bytes32)": { + "params": { + "node": "The ENS node to query." + }, + "returns": { + "_0": "The associated address." + } + }, + "approve(bytes32,address,bool)": { + "details": "Approve a delegate to be able to updated records on a node." + }, + "clearRecords(bytes32)": { + "params": { + "node": "The node to update." + } + }, + "contenthash(bytes32)": { + "params": { + "node": "The ENS node to query." + }, + "returns": { + "_0": "The associated contenthash." + } + }, + "dnsRecord(bytes32,bytes32,uint16)": { + "params": { + "name": "the keccak-256 hash of the fully-qualified name for which to fetch the record", + "node": "the namehash of the node for which to fetch the record", + "resource": "the ID of the resource as per https://en.wikipedia.org/wiki/List_of_DNS_record_types" + }, + "returns": { + "_0": "the DNS record in wire format if present, otherwise empty" + } + }, + "hasDNSRecords(bytes32,bytes32)": { + "params": { + "name": "the namehash of the node for which to check the records", + "node": "the namehash of the node for which to check the records" + } + }, + "interfaceImplementer(bytes32,bytes4)": { + "params": { + "interfaceID": "The EIP 165 interface ID to check for.", + "node": "The ENS node to query." + }, + "returns": { + "_0": "The address that implements this interface, or 0 if the interface is unsupported." + } + }, + "isApprovedFor(address,bytes32,address)": { + "details": "Check to see if the delegate has been approved by the owner for the node." + }, + "isApprovedForAll(address,address)": { + "details": "See {IERC1155-isApprovedForAll}." + }, + "name(bytes32)": { + "params": { + "node": "The ENS node to query." + }, + "returns": { + "_0": "The associated name." + } + }, + "pubkey(bytes32)": { + "params": { + "node": "The ENS node to query" + }, + "returns": { + "x": "The X coordinate of the curve point for the public key.", + "y": "The Y coordinate of the curve point for the public key." + } + }, + "setABI(bytes32,uint256,bytes)": { + "params": { + "contentType": "The content type of the ABI", + "data": "The ABI data.", + "node": "The node to update." + } + }, + "setAddr(bytes32,address)": { + "params": { + "a": "The address to set.", + "node": "The node to update." + } + }, + "setApprovalForAll(address,bool)": { + "details": "See {IERC1155-setApprovalForAll}." + }, + "setContenthash(bytes32,bytes)": { + "params": { + "hash": "The contenthash to set", + "node": "The node to update." + } + }, + "setDNSRecords(bytes32,bytes)": { + "params": { + "data": "the DNS wire format records to set", + "node": "the namehash of the node for which to set the records" + } + }, + "setInterface(bytes32,bytes4,address)": { + "params": { + "implementer": "The address of a contract that implements this interface for this node.", + "interfaceID": "The EIP 165 interface ID.", + "node": "The node to update." + } + }, + "setName(bytes32,string)": { + "params": { + "node": "The node to update." + } + }, + "setPubkey(bytes32,bytes32,bytes32)": { + "params": { + "node": "The ENS node to query", + "x": "the X coordinate of the curve point for the public key.", + "y": "the Y coordinate of the curve point for the public key." + } + }, + "setText(bytes32,string,string)": { + "params": { + "key": "The key to set.", + "node": "The node to update.", + "value": "The text data value to set." + } + }, + "setZonehash(bytes32,bytes)": { + "params": { + "hash": "The zonehash to set", + "node": "The node to update." + } + }, + "text(bytes32,string)": { + "params": { + "key": "The text data key to query.", + "node": "The ENS node to query." + }, + "returns": { + "_0": "The associated text data." + } + }, + "zonehash(bytes32)": { + "params": { + "node": "The ENS node to query." + }, + "returns": { + "_0": "The associated contenthash." + } + } + }, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "ABI(bytes32,uint256)": { + "notice": "Returns the ABI associated with an ENS node. Defined in EIP205." + }, + "addr(bytes32)": { + "notice": "Returns the address associated with an ENS node." + }, + "clearRecords(bytes32)": { + "notice": "Increments the record version associated with an ENS node. May only be called by the owner of that node in the ENS registry." + }, + "contenthash(bytes32)": { + "notice": "Returns the contenthash associated with an ENS node." + }, + "dnsRecord(bytes32,bytes32,uint16)": { + "notice": "Obtain a DNS record." + }, + "hasDNSRecords(bytes32,bytes32)": { + "notice": "Check if a given node has records." + }, + "interfaceImplementer(bytes32,bytes4)": { + "notice": "Returns the address of a contract that implements the specified interface for this name. If an implementer has not been set for this interfaceID and name, the resolver will query the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that contract implements EIP165 and returns `true` for the specified interfaceID, its address will be returned." + }, + "name(bytes32)": { + "notice": "Returns the name associated with an ENS node, for reverse records. Defined in EIP181." + }, + "pubkey(bytes32)": { + "notice": "Returns the SECP256k1 public key associated with an ENS node. Defined in EIP 619." + }, + "setABI(bytes32,uint256,bytes)": { + "notice": "Sets the ABI associated with an ENS node. Nodes may have one ABI of each content type. To remove an ABI, set it to the empty string." + }, + "setAddr(bytes32,address)": { + "notice": "Sets the address associated with an ENS node. May only be called by the owner of that node in the ENS registry." + }, + "setContenthash(bytes32,bytes)": { + "notice": "Sets the contenthash associated with an ENS node. May only be called by the owner of that node in the ENS registry." + }, + "setDNSRecords(bytes32,bytes)": { + "notice": "Set one or more DNS records. Records are supplied in wire-format. Records with the same node/name/resource must be supplied one after the other to ensure the data is updated correctly. For example, if the data was supplied: a.example.com IN A 1.2.3.4 a.example.com IN A 5.6.7.8 www.example.com IN CNAME a.example.com. then this would store the two A records for a.example.com correctly as a single RRSET, however if the data was supplied: a.example.com IN A 1.2.3.4 www.example.com IN CNAME a.example.com. a.example.com IN A 5.6.7.8 then this would store the first A record, the CNAME, then the second A record which would overwrite the first." + }, + "setInterface(bytes32,bytes4,address)": { + "notice": "Sets an interface associated with a name. Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support." + }, + "setName(bytes32,string)": { + "notice": "Sets the name associated with an ENS node, for reverse records. May only be called by the owner of that node in the ENS registry." + }, + "setPubkey(bytes32,bytes32,bytes32)": { + "notice": "Sets the SECP256k1 public key associated with an ENS node." + }, + "setText(bytes32,string,string)": { + "notice": "Sets the text data associated with an ENS node and key. May only be called by the owner of that node in the ENS registry." + }, + "setZonehash(bytes32,bytes)": { + "notice": "setZonehash sets the hash for the zone. May only be called by the owner of that node in the ENS registry." + }, + "text(bytes32,string)": { + "notice": "Returns the text data associated with an ENS node and key." + }, + "zonehash(bytes32)": { + "notice": "zonehash obtains the hash for the zone." + } + }, + "notice": "A simple resolver anyone can use; only allows the owner of a node to set its address.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 15383, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "recordVersions", + "offset": 0, + "slot": "0", + "type": "t_mapping(t_bytes32,t_uint64)" + }, + { + "astId": 15477, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_abis", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage)))" + }, + { + "astId": 15631, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_addresses", + "offset": 0, + "slot": "2", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage)))" + }, + { + "astId": 15822, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_hashes", + "offset": 0, + "slot": "3", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_bytes_storage))" + }, + { + "astId": 15912, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_zonehashes", + "offset": 0, + "slot": "4", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_bytes_storage))" + }, + { + "astId": 15922, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_records", + "offset": 0, + "slot": "5", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_bytes32,t_mapping(t_uint16,t_bytes_storage))))" + }, + { + "astId": 15930, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_nameEntriesCount", + "offset": 0, + "slot": "6", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_bytes32,t_uint16)))" + }, + { + "astId": 16668, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_interfaces", + "offset": 0, + "slot": "7", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_bytes4,t_address)))" + }, + { + "astId": 16860, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_names", + "offset": 0, + "slot": "8", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_string_storage))" + }, + { + "astId": 16947, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_pubkeys", + "offset": 0, + "slot": "9", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_struct(PublicKey)16940_storage))" + }, + { + "astId": 17050, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "versionable_texts", + "offset": 0, + "slot": "10", + "type": "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage)))" + }, + { + "astId": 14912, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "_operatorApprovals", + "offset": 0, + "slot": "11", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))" + }, + { + "astId": 14921, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "_tokenApprovals", + "offset": 0, + "slot": "12", + "type": "t_mapping(t_address,t_mapping(t_bytes32,t_mapping(t_address,t_bool)))" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_bool": { + "encoding": "inplace", + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes4": { + "encoding": "inplace", + "label": "bytes4", + "numberOfBytes": "4" + }, + "t_bytes_storage": { + "encoding": "bytes", + "label": "bytes", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => bool)", + "numberOfBytes": "32", + "value": "t_bool" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_address,t_mapping(t_bytes32,t_mapping(t_address,t_bool)))": { + "encoding": "mapping", + "key": "t_address", + "label": "mapping(address => mapping(bytes32 => mapping(address => bool)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_address,t_bool))" + }, + "t_mapping(t_bytes32,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_bytes32,t_mapping(t_address,t_bool))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(address => bool))", + "numberOfBytes": "32", + "value": "t_mapping(t_address,t_bool)" + }, + "t_mapping(t_bytes32,t_mapping(t_bytes32,t_mapping(t_uint16,t_bytes_storage)))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_uint16,t_bytes_storage))" + }, + "t_mapping(t_bytes32,t_mapping(t_bytes32,t_uint16))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(bytes32 => uint16))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_uint16)" + }, + "t_mapping(t_bytes32,t_mapping(t_bytes4,t_address))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(bytes4 => address))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes4,t_address)" + }, + "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(string => string))", + "numberOfBytes": "32", + "value": "t_mapping(t_string_memory_ptr,t_string_storage)" + }, + "t_mapping(t_bytes32,t_mapping(t_uint16,t_bytes_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(uint16 => bytes))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint16,t_bytes_storage)" + }, + "t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage))": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => mapping(uint256 => bytes))", + "numberOfBytes": "32", + "value": "t_mapping(t_uint256,t_bytes_storage)" + }, + "t_mapping(t_bytes32,t_string_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_bytes32,t_struct(PublicKey)16940_storage)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => struct PubkeyResolver.PublicKey)", + "numberOfBytes": "32", + "value": "t_struct(PublicKey)16940_storage" + }, + "t_mapping(t_bytes32,t_uint16)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint16)", + "numberOfBytes": "32", + "value": "t_uint16" + }, + "t_mapping(t_bytes32,t_uint64)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint64)", + "numberOfBytes": "32", + "value": "t_uint64" + }, + "t_mapping(t_bytes4,t_address)": { + "encoding": "mapping", + "key": "t_bytes4", + "label": "mapping(bytes4 => address)", + "numberOfBytes": "32", + "value": "t_address" + }, + "t_mapping(t_string_memory_ptr,t_string_storage)": { + "encoding": "mapping", + "key": "t_string_memory_ptr", + "label": "mapping(string => string)", + "numberOfBytes": "32", + "value": "t_string_storage" + }, + "t_mapping(t_uint16,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint16", + "label": "mapping(uint16 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint256,t_bytes_storage)": { + "encoding": "mapping", + "key": "t_uint256", + "label": "mapping(uint256 => bytes)", + "numberOfBytes": "32", + "value": "t_bytes_storage" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_bytes_storage))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => bytes))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_bytes_storage)" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_bytes32,t_mapping(t_uint16,t_bytes_storage))))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => mapping(bytes32 => mapping(uint16 => bytes))))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_bytes32,t_mapping(t_uint16,t_bytes_storage)))" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_bytes32,t_uint16)))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => mapping(bytes32 => uint16)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_bytes32,t_uint16))" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_bytes4,t_address)))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => mapping(bytes4 => address)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_bytes4,t_address))" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage)))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => mapping(string => string)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_string_memory_ptr,t_string_storage))" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage)))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => mapping(uint256 => bytes)))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_mapping(t_uint256,t_bytes_storage))" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_string_storage))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => string))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_string_storage)" + }, + "t_mapping(t_uint64,t_mapping(t_bytes32,t_struct(PublicKey)16940_storage))": { + "encoding": "mapping", + "key": "t_uint64", + "label": "mapping(uint64 => mapping(bytes32 => struct PubkeyResolver.PublicKey))", + "numberOfBytes": "32", + "value": "t_mapping(t_bytes32,t_struct(PublicKey)16940_storage)" + }, + "t_string_memory_ptr": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_string_storage": { + "encoding": "bytes", + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(PublicKey)16940_storage": { + "encoding": "inplace", + "label": "struct PubkeyResolver.PublicKey", + "members": [ + { + "astId": 16937, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "x", + "offset": 0, + "slot": "0", + "type": "t_bytes32" + }, + { + "astId": 16939, + "contract": "contracts/resolvers/PublicResolver.sol:PublicResolver", + "label": "y", + "offset": 0, + "slot": "1", + "type": "t_bytes32" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "encoding": "inplace", + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + } + } + } +} \ No newline at end of file diff --git a/deploy/.contracts/LegacyResolverV1.json b/deploy/.contracts/LegacyResolverV1.json index a70b5c960..7f76234b9 100644 --- a/deploy/.contracts/LegacyResolverV1.json +++ b/deploy/.contracts/LegacyResolverV1.json @@ -1,170 +1,397 @@ { "abi": [ { - "constant": true, - "inputs": [{ "name": "interfaceID", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "name": "", "type": "bool" }], + "inputs": [{ "internalType": "contract ENS", "name": "_ens", "type": "address" }], "payable": false, - "type": "function" + "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": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, + { "indexed": false, "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "AuthorisationChanged", + "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": 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" }, { "constant": true, "inputs": [ - { "name": "node", "type": "bytes32" }, - { "name": "contentTypes", "type": "uint256" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "contentTypes", "type": "uint256" } ], "name": "ABI", "outputs": [ - { "name": "contentType", "type": "uint256" }, - { "name": "data", "type": "bytes" } + { "internalType": "uint256", "name": "", "type": "uint256" }, + { "internalType": "bytes", "name": "", "type": "bytes" } ], "payable": false, + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "internalType": "address payable", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, "inputs": [ - { "name": "node", "type": "bytes32" }, - { "name": "x", "type": "bytes32" }, - { "name": "y", "type": "bytes32" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" } ], - "name": "setPubkey", + "name": "addr", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "authorisations", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "clearDNSZone", "outputs": [], "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { "constant": true, - "inputs": [{ "name": "node", "type": "bytes32" }], - "name": "content", - "outputs": [{ "name": "ret", "type": "bytes32" }], + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "contenthash", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "payable": false, + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [{ "name": "node", "type": "bytes32" }], - "name": "addr", - "outputs": [{ "name": "ret", "type": "address" }], + "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" }], "payable": false, + "stateMutability": "view", "type": "function" }, { - "constant": false, + "constant": true, "inputs": [ - { "name": "node", "type": "bytes32" }, - { "name": "contentType", "type": "uint256" }, - { "name": "data", "type": "bytes" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "name", "type": "bytes32" } ], - "name": "setABI", - "outputs": [], + "name": "hasDNSRecords", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } + ], + "name": "interfaceImplementer", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "payable": false, + "stateMutability": "view", "type": "function" }, { "constant": true, - "inputs": [{ "name": "node", "type": "bytes32" }], + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], "name": "name", - "outputs": [{ "name": "ret", "type": "string" }], + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "payable": false, + "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [ - { "name": "node", "type": "bytes32" }, - { "name": "name", "type": "string" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "contentType", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } ], - "name": "setName", + "name": "setABI", "outputs": [], "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ - { "name": "node", "type": "bytes32" }, - { "name": "hash", "type": "bytes32" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" }, + { "internalType": "bytes", "name": "a", "type": "bytes" } ], - "name": "setContent", + "name": "setAddr", "outputs": [], "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "constant": true, - "inputs": [{ "name": "node", "type": "bytes32" }], - "name": "pubkey", - "outputs": [ - { "name": "x", "type": "bytes32" }, - { "name": "y", "type": "bytes32" } + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "a", "type": "address" } ], + "name": "setAddr", + "outputs": [], "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { "constant": false, "inputs": [ - { "name": "node", "type": "bytes32" }, - { "name": "addr", "type": "address" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bool", "name": "isAuthorised", "type": "bool" } ], - "name": "setAddr", + "name": "setAuthorisation", "outputs": [], "payable": false, + "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [{ "name": "ensAddr", "type": "address" }], + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "setContenthash", + "outputs": [], "payable": false, - "type": "constructor" + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ - { "indexed": true, "name": "node", "type": "bytes32" }, - { "indexed": false, "name": "a", "type": "address" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } ], - "name": "AddrChanged", - "type": "event" + "name": "setDNSRecords", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ - { "indexed": true, "name": "node", "type": "bytes32" }, - { "indexed": false, "name": "hash", "type": "bytes32" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }, + { "internalType": "address", "name": "implementer", "type": "address" } ], - "name": "ContentChanged", - "type": "event" + "name": "setInterface", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ - { "indexed": true, "name": "node", "type": "bytes32" }, - { "indexed": false, "name": "name", "type": "string" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "name", "type": "string" } ], - "name": "NameChanged", - "type": "event" + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ - { "indexed": true, "name": "node", "type": "bytes32" }, - { "indexed": true, "name": "contentType", "type": "uint256" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } ], - "name": "ABIChanged", - "type": "event" + "name": "setPubkey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" }, { - "anonymous": false, + "constant": false, "inputs": [ - { "indexed": true, "name": "node", "type": "bytes32" }, - { "indexed": false, "name": "x", "type": "bytes32" }, - { "indexed": false, "name": "y", "type": "bytes32" } + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" }, + { "internalType": "string", "name": "value", "type": "string" } ], - "name": "PubkeyChanged", - "type": "event" + "name": "setText", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "text", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" } ], - "bytecode": "0x6060604052341561000c57fe5b604051602080610dc583398101604052515b60008054600160a060020a031916600160a060020a0383161790555b505b610d7a8061004b6000396000f300606060405236156100ac5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100ae5780632203ab56146100df57806329cd62ea146101815780632dff69411461019c5780633b3b57de146101c1578063623195b0146101f0578063691f34311461024c57806377372213146102df578063c3d014d614610338578063c869023314610350578063d5fa2b001461037c575bfe5b34156100b657fe5b6100cb600160e060020a03196004351661039d565b604080519115158252519081900360200190f35b34156100e757fe5b6100f56004356024356104d8565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360008314610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561018957fe5b61019a6004356024356044356105ef565b005b34156101a457fe5b6101af6004356106e6565b60408051918252519081900360200190f35b34156101c957fe5b6101d46004356106ff565b60408051600160a060020a039092168252519081900360200190f35b34156101f857fe5b604080516020600460443581810135601f810184900484028501840190955284845261019a94823594602480359560649492939190920191819084018382808284375094965061071d95505050505050565b005b341561025457fe5b61025f600435610816565b6040805160208082528351818301528351919283929083019185019080838382156102a5575b8051825260208311156102a557601f199092019160209182019101610285565b505050905090810190601f1680156102d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102e757fe5b60408051602060046024803582810135601f810185900485028601850190965285855261019a95833595939460449493929092019181908401838280828437509496506108c195505050505050565b005b341561034057fe5b61019a600435602435610a19565b005b341561035857fe5b610363600435610af1565b6040805192835260208301919091528051918290030190f35b341561038457fe5b61019a600435600160a060020a0360243516610b10565b005b6000600160e060020a031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806104005750600160e060020a031982167fd8389dc500000000000000000000000000000000000000000000000000000000145b806104345750600160e060020a031982167f691f343100000000000000000000000000000000000000000000000000000000145b806104685750600160e060020a031982167f2203ab5600000000000000000000000000000000000000000000000000000000145b8061049c5750600160e060020a031982167fc869023300000000000000000000000000000000000000000000000000000000145b806104d05750600160e060020a031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b90505b919050565b60006104e2610c0b565b60008481526001602081905260409091209092505b8383116105e257828416158015906105305750600083815260058201602052604081205460026000196101006001841615020190911604115b156105d657600083815260058201602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b505050505091506105e7565b5b6002909202916104f7565b600092505b509250929050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561064957fe5b6102c65a03f1151561065757fe5b505060405151600160a060020a03169190911490506106765760006000fd5b604080518082018252848152602080820185815260008881526001835284902092516003840155516004909201919091558151858152908101849052815186927f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46928290030190a25b5b50505050565b600081815260016020819052604090912001545b919050565b600081815260016020526040902054600160a060020a03165b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561077757fe5b6102c65a03f1151561078557fe5b505060405151600160a060020a03169190911490506107a45760006000fd5b60001983018316156107b65760006000fd5b6000848152600160209081526040808320868452600501825290912083516107e092850190610c1d565b50604051839085907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35b5b50505050565b61081e610c0b565b6000828152600160208181526040928390206002908101805485516000199582161561010002959095011691909104601f81018390048302840183019094528383529192908301828280156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505090505b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561091b57fe5b6102c65a03f1151561092957fe5b505060405151600160a060020a03169190911490506109485760006000fd5b6000838152600160209081526040909120835161096d92600290920191850190610c1d565b50604080516020808252845181830152845186937fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f79387939092839283019185019080838382156109d9575b8051825260208311156109d957601f1990920191602091820191016109b9565b505050905090810190601f168015610a055780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b5b505050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610a7357fe5b6102c65a03f11515610a8157fe5b505060405151600160a060020a0316919091149050610aa05760006000fd5b6000838152600160208181526040928390209091018490558151848152915185927f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc92908290030190a25b5b505050565b600081815260016020526040902060038101546004909101545b915091565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610b6a57fe5b6102c65a03f11515610b7857fe5b505060405151600160a060020a0316919091149050610b975760006000fd5b600083815260016020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386169081179091558251908152915185927f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd292908290030190a25b5b505050565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b610d4b91905b80821115610c985760008155600101610d33565b5090565b905600a165627a7a72305820f05b42978350d3945a3fe885ef530e3f8ecbfcdb822550779dfcf0b06b00754f0029000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b" + "bytecode": "0x608060405234801561001057600080fd5b5060405161342e38038061342e8339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613399806100956000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063623195b0116100c3578063bc1c58d11161007c578063bc1c58d114610aad578063c869023314610b54578063d5fa2b0014610b9d578063e59d895d14610beb578063f1cb7e0614610c62578063f86bc87914610d135761014d565b8063623195b01461073a578063691f3431146107c7578063773722131461086e5780638b95dd71146108f1578063a8fa5682146109c0578063ad5780af14610a7f5761014d565b806329cd62ea1161011557806329cd62ea14610461578063304e6ade146104a35780633b3b57de146105265780633e9ce794146105945780634cbf6ba4146105ee57806359d1d43c1461063e5761014d565b806301ffc9a7146101525780630af179d7146101b757806310f13a8c1461023a578063124a319c146103125780632203ab56146103a9575b600080fd5b61019d6004803603602081101561016857600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d99565b604051808215151515815260200191505060405180910390f35b610238600480360360408110156101cd57600080fd5b8101908080359060200190929190803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b9091929391929390505050610dfa565b005b6103106004803603606081101561025057600080fd5b81019080803590602001909291908035906020019064010000000081111561027757600080fd5b82018360208201111561028957600080fd5b803590602001918460018302840111640100000000831117156102ab57600080fd5b9091929391929390803590602001906401000000008111156102cc57600080fd5b8201836020820111156102de57600080fd5b8035906020019184600183028401116401000000008311171561030057600080fd5b9091929391929390505050611073565b005b6103676004803603604081101561032857600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611159565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103df600480360360408110156103bf57600080fd5b810190808035906020019092919080359060200190929190505050611656565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6104a16004803603606081101561047757600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506117a5565b005b610524600480360360408110156104b957600080fd5b8101908080359060200190929190803590602001906401000000008111156104e057600080fd5b8201836020820111156104f257600080fd5b8035906020019184600183028401116401000000008311171561051457600080fd5b909192939192939050505061183d565b005b6105526004803603602081101561053c57600080fd5b81019080803590602001909291905050506118dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ec600480360360608110156105aa57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611914565b005b6106246004803603604081101561060457600080fd5b810190808035906020019092919080359060200190929190505050611a28565b604051808215151515815260200191505060405180910390f35b6106bf6004803603604081101561065457600080fd5b81019080803590602001909291908035906020019064010000000081111561067b57600080fd5b82018360208201111561068d57600080fd5b803590602001918460018302840111640100000000831117156106af57600080fd5b9091929391929390505050611a90565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106ff5780820151818401526020810190506106e4565b50505050905090810190601f16801561072c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107c56004803603606081101561075057600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561078157600080fd5b82018360208201111561079357600080fd5b803590602001918460018302840111640100000000831117156107b557600080fd5b9091929391929390505050611b6c565b005b6107f3600480360360208110156107dd57600080fd5b8101908080359060200190929190505050611bf9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610833578082015181840152602081019050610818565b50505050905090810190601f1680156108605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108ef6004803603604081101561088457600080fd5b8101908080359060200190929190803590602001906401000000008111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460018302840111640100000000831117156108df57600080fd5b9091929391929390505050611cae565b005b6109be6004803603606081101561090757600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561093857600080fd5b82018360208201111561094a57600080fd5b8035906020019184600183028401116401000000008311171561096c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611d4e565b005b610a04600480360360608110156109d657600080fd5b810190808035906020019092919080359060200190929190803561ffff169060200190929190505050611ebb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a44578082015181840152602081019050610a29565b50505050905090810190601f168015610a715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610aab60048036036020811015610a9557600080fd5b8101908080359060200190929190505050611fc0565b005b610ad960048036036020811015610ac357600080fd5b8101908080359060200190929190505050612027565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b19578082015181840152602081019050610afe565b50505050905090810190601f168015610b465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b8060048036036020811015610b6a57600080fd5b81019080803590602001909291905050506120dc565b604051808381526020018281526020019250505060405180910390f35b610be960048036036040811015610bb357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612116565b005b610c6060048036036060811015610c0157600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612142565b005b610c9860048036036040811015610c7857600080fd5b810190808035906020019092919080359060200190929190505050612280565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610cd8578082015181840152602081019050610cbd565b50505050905090810190601f168015610d055780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610d7f60048036036060811015610d2957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612347565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610df35750610df282612383565b5b9050919050565b82610e04816123e4565b610e0d57600080fd5b600080905060008090506060806000610e24613108565b610e7c60008a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061257090919063ffffffff16565b90505b610e888161259a565b6110005760008661ffff161415610f2f5780604001519550610ea9816125b0565b9350836040516020018082805190602001908083835b60208310610ee25780518252602082019150602081019050602083039250610ebf565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001209150610f28816125e7565b9250610ff2565b6060610f3a826125b0565b9050816040015161ffff168761ffff16141580610f675750610f65818661261790919063ffffffff16565b155b15610ff057610fc98b86898d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508a8b88602001510360008b511461263e565b816040015196508160200151955080945084805190602001209250610fed826125e7565b93505b505b610ffb81612abf565b610e7f565b50600083511115611068576110678984878b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505088898e8e905003600089511461263e565b5b505050505050505050565b8461107d816123e4565b61108657600080fd5b8282600960008981526020019081526020016000208787604051808383808284378083019250505092505050908152602001604051809103902091906110cd929190613153565b5084846040518083838082843780830192505050925050506040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a3505050505050565b600080600660008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461121e5780915050611650565b6000611229856118dd565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561126b57600092505050611650565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061138c5780518252602082019150602081019050602083039250611369565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b5091509150811580611404575060208151105b8061144b5750600060f81b81601f8151811061141c57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561145d576000945050505050611650565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106115735780518252602082019150602081019050602083039250611550565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146115d3576040519150601f19603f3d011682016040523d82523d6000602084013e6115d8565b606091505b5080925081935050508115806115ef575060208151105b806116365750600060f81b81601f8151811061160757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b15611648576000945050505050611650565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b848111611782576000858216141580156116b757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156117765780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117645780601f1061173957610100808354040283529160200191611764565b820191906000526020600020905b81548152906001019060200180831161174757829003601f168201915b5050505050905093509350505061179e565b600181901b9050611677565b5060006040518060200160405280600081525081915092509250505b9250929050565b826117af816123e4565b6117b857600080fd5b604051806040016040528084815260200183815250600860008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b82611847816123e4565b61185057600080fd5b82826002600087815260200190815260200160002091906118729291906131d3565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b600060606118ec83603c612280565b905060008151141561190257600091505061190f565b61190b81612bd3565b9150505b919050565b80600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b60008060056000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060009054906101000a900461ffff1661ffff161415905092915050565b606060096000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b5e5780601f10611b3357610100808354040283529160200191611b5e565b820191906000526020600020905b815481529060010190602001808311611b4157829003601f168201915b505050505090509392505050565b83611b76816123e4565b611b7f57600080fd5b600084600186031614611b9157600080fd5b828260008088815260200190815260200160002060008781526020019081526020016000209190611bc39291906131d3565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600760008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ca25780601f10611c7757610100808354040283529160200191611ca2565b820191906000526020600020905b815481529060010190602001808311611c8557829003601f168201915b50505050509050919050565b82611cb8816123e4565b611cc157600080fd5b8282600760008781526020019081526020016000209190611ce3929190613153565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b82611d58816123e4565b611d6157600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611dcb578082015181840152602081019050611db0565b50505050905090810190601f168015611df85780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c831415611e7c57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2611e3a84612bd3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b816001600086815260200190815260200160002060008581526020019081526020016000209080519060200190611eb4929190613253565b5050505050565b606060046000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060008361ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fb25780601f10611f8757610100808354040283529160200191611fb2565b820191906000526020600020905b815481529060010190602001808311611f9557829003601f168201915b505050505090509392505050565b80611fca816123e4565b611fd357600080fd5b6003600083815260200190815260200160002060008154809291906001019190505550817fb757169b8492ca2f1c6619d9d76ce22803035c3b1d5f6930dffe7b127c1a198360405160405180910390a25050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120d05780601f106120a5576101008083540402835291602001916120d0565b820191906000526020600020905b8154815290600101906020018083116120b357829003601f168201915b50505050509050919050565b6000806008600084815260200190815260200160002060000154600860008581526020019081526020016000206001015491509150915091565b81612120816123e4565b61212957600080fd5b61213d83603c61213885612bf6565b611d4e565b505050565b8261214c816123e4565b61215557600080fd5b81600660008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561233a5780601f1061230f5761010080835404028352916020019161233a565b820191906000526020600020905b81548152906001019060200180831161231d57829003601f168201915b5050505050905092915050565b600b602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123dd57506123dc82612c41565b5b9050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561245a57600080fd5b505afa15801561246e573d6000803e3d6000fd5b505050506040513d602081101561248457600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806125685750600b600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b612578613108565b828160000181905250818160c001818152505061259481612abf565b92915050565b6000816000015151826020015110159050919050565b60606125e082602001516125cc84600001518560200151612ca2565b8460000151612cfd9092919063ffffffff16565b9050919050565b60606126108260a001518360a001518460c00151038460000151612cfd9092919063ffffffff16565b9050919050565b60008151835114801561263657506126358360008460008751612d70565b5b905092915050565b6000600360008981526020019081526020016000205490506000878051906020012090506060612679868689612cfd9092919063ffffffff16565b90508315612861576000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900490501461275557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff16809291906001900391906101000a81548161ffff021916908361ffff160217905550505b600460008b81526020019081526020016000206000848152602001908152602001600020600083815260200190815260200160002060008961ffff1661ffff16815260200190815260200160002060006127af91906132d3565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a60405180806020018361ffff1661ffff168152602001828103825284818151815260200191508051906020019080838360005b83811015612821578082015181840152602081019050612806565b50505050905090810190601f16801561284e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2612ab3565b6000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff168152602001908152602001600020805460018160011615610100020316600290049050141561293557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff168092919060010191906101000a81548161ffff021916908361ffff160217905550505b80600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000209080519060200190612997929190613253565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a8460405180806020018461ffff1661ffff16815260200180602001838103835286818151815260200191508051906020019080838360005b83811015612a0f5780820151818401526020810190506129f4565b50505050905090810190601f168015612a3c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612a75578082015181840152602081019050612a5a565b50505050905090810190601f168015612aa25780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a25b50505050505050505050565b8060c00151816020018181525050806000015151816020015110612ae257612bd0565b6000612af682600001518360200151612ca2565b8260200151019050612b15818360000151612d9490919063ffffffff16565b826040019061ffff16908161ffff1681525050600281019050612b45818360000151612d9490919063ffffffff16565b826060019061ffff16908161ffff1681525050600281019050612b75818360000151612dba90919063ffffffff16565b826080019063ffffffff16908163ffffffff16815250506004810190506000612bab828460000151612d9490919063ffffffff16565b61ffff169050600282019150818360a00181815250508082018360c001818152505050505b50565b60006014825114612be357600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015612c2c5781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612c9b5750612c9a82612de2565b5b9050919050565b6000808290505b600115612cf15783518110612cba57fe5b6000612ccf8286612e5490919063ffffffff16565b60ff16905060018101820191506000811415612ceb5750612cf1565b50612ca9565b82810391505092915050565b606083518284011115612d0f57600080fd5b6060826040519080825280601f01601f191660200182016040528015612d445781602001600182028038833980820191505090505b5090506000806020830191508560208801019050612d63828287612e78565b8293505050509392505050565b6000612d7d848484612ec1565b612d88878785612ec1565b14905095945050505050565b60008251600283011115612da757600080fd5b61ffff8260028501015116905092915050565b60008251600483011115612dcd57600080fd5b63ffffffff8260048501015116905092915050565b6000604051808061334160249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612e4d5750612e4c82612ee4565b5b9050919050565b6000828281518110612e6257fe5b602001015160f81c60f81b60f81c905092915050565b5b60208110612e9c5781518352602083019250602082019150602081039050612e79565b60006001826020036101000a0390508019835116818551168181178652505050505050565b600083518284011115612ed357600080fd5b818360208601012090509392505050565b600063a8fa568260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f3e5750612f3d82612f45565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f9f5750612f9e82612fa6565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061303f575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061304f575061304e82613056565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806130b057506130af826130b7565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061319457803560ff19168380011785556131c2565b828001600101855582156131c2579182015b828111156131c15782358255916020019190600101906131a6565b5b5090506131cf919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061321457803560ff1916838001178555613242565b82800160010185558215613242579182015b82811115613241578235825591602001919060010190613226565b5b50905061324f919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061329457805160ff19168380011785556132c2565b828001600101855582156132c2579182015b828111156132c15782518255916020019190600101906132a6565b5b5090506132cf919061331b565b5090565b50805460018160011615610100020316600290046000825580601f106132f95750613318565b601f016020900490600052602060002090810190613317919061331b565b5b50565b61333d91905b80821115613339576000816000905550600101613321565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820e37e49339c407f277a18b1276335d80f06f86465250ddd0bb061d5fb5f0892b264736f6c6343000510003200000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e" } diff --git a/deploy/.contracts/LegacyResolverV4.json b/deploy/.contracts/LegacyResolverV4.json deleted file mode 100644 index 97e4cb904..000000000 --- a/deploy/.contracts/LegacyResolverV4.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "abi": [{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"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":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"AuthorisationChanged","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":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"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"clearDNSZone","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"hasDNSRecords","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"setAuthorisation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setDNSRecords","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"}], - "bytecode": "0x608060405234801561001057600080fd5b5060405161342e38038061342e8339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050613399806100956000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063623195b0116100c3578063bc1c58d11161007c578063bc1c58d114610aad578063c869023314610b54578063d5fa2b0014610b9d578063e59d895d14610beb578063f1cb7e0614610c62578063f86bc87914610d135761014d565b8063623195b01461073a578063691f3431146107c7578063773722131461086e5780638b95dd71146108f1578063a8fa5682146109c0578063ad5780af14610a7f5761014d565b806329cd62ea1161011557806329cd62ea14610461578063304e6ade146104a35780633b3b57de146105265780633e9ce794146105945780634cbf6ba4146105ee57806359d1d43c1461063e5761014d565b806301ffc9a7146101525780630af179d7146101b757806310f13a8c1461023a578063124a319c146103125780632203ab56146103a9575b600080fd5b61019d6004803603602081101561016857600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d99565b604051808215151515815260200191505060405180910390f35b610238600480360360408110156101cd57600080fd5b8101908080359060200190929190803590602001906401000000008111156101f457600080fd5b82018360208201111561020657600080fd5b8035906020019184600183028401116401000000008311171561022857600080fd5b9091929391929390505050610dfa565b005b6103106004803603606081101561025057600080fd5b81019080803590602001909291908035906020019064010000000081111561027757600080fd5b82018360208201111561028957600080fd5b803590602001918460018302840111640100000000831117156102ab57600080fd5b9091929391929390803590602001906401000000008111156102cc57600080fd5b8201836020820111156102de57600080fd5b8035906020019184600183028401116401000000008311171561030057600080fd5b9091929391929390505050611073565b005b6103676004803603604081101561032857600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050611159565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103df600480360360408110156103bf57600080fd5b810190808035906020019092919080359060200190929190505050611656565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6104a16004803603606081101561047757600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506117a5565b005b610524600480360360408110156104b957600080fd5b8101908080359060200190929190803590602001906401000000008111156104e057600080fd5b8201836020820111156104f257600080fd5b8035906020019184600183028401116401000000008311171561051457600080fd5b909192939192939050505061183d565b005b6105526004803603602081101561053c57600080fd5b81019080803590602001909291905050506118dd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ec600480360360608110156105aa57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611914565b005b6106246004803603604081101561060457600080fd5b810190808035906020019092919080359060200190929190505050611a28565b604051808215151515815260200191505060405180910390f35b6106bf6004803603604081101561065457600080fd5b81019080803590602001909291908035906020019064010000000081111561067b57600080fd5b82018360208201111561068d57600080fd5b803590602001918460018302840111640100000000831117156106af57600080fd5b9091929391929390505050611a90565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106ff5780820151818401526020810190506106e4565b50505050905090810190601f16801561072c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107c56004803603606081101561075057600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561078157600080fd5b82018360208201111561079357600080fd5b803590602001918460018302840111640100000000831117156107b557600080fd5b9091929391929390505050611b6c565b005b6107f3600480360360208110156107dd57600080fd5b8101908080359060200190929190505050611bf9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610833578082015181840152602081019050610818565b50505050905090810190601f1680156108605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108ef6004803603604081101561088457600080fd5b8101908080359060200190929190803590602001906401000000008111156108ab57600080fd5b8201836020820111156108bd57600080fd5b803590602001918460018302840111640100000000831117156108df57600080fd5b9091929391929390505050611cae565b005b6109be6004803603606081101561090757600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561093857600080fd5b82018360208201111561094a57600080fd5b8035906020019184600183028401116401000000008311171561096c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611d4e565b005b610a04600480360360608110156109d657600080fd5b810190808035906020019092919080359060200190929190803561ffff169060200190929190505050611ebb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610a44578082015181840152602081019050610a29565b50505050905090810190601f168015610a715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610aab60048036036020811015610a9557600080fd5b8101908080359060200190929190505050611fc0565b005b610ad960048036036020811015610ac357600080fd5b8101908080359060200190929190505050612027565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610b19578082015181840152602081019050610afe565b50505050905090810190601f168015610b465780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b8060048036036020811015610b6a57600080fd5b81019080803590602001909291905050506120dc565b604051808381526020018281526020019250505060405180910390f35b610be960048036036040811015610bb357600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612116565b005b610c6060048036036060811015610c0157600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612142565b005b610c9860048036036040811015610c7857600080fd5b810190808035906020019092919080359060200190929190505050612280565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610cd8578082015181840152602081019050610cbd565b50505050905090810190601f168015610d055780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610d7f60048036036060811015610d2957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612347565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610df35750610df282612383565b5b9050919050565b82610e04816123e4565b610e0d57600080fd5b600080905060008090506060806000610e24613108565b610e7c60008a8a8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505061257090919063ffffffff16565b90505b610e888161259a565b6110005760008661ffff161415610f2f5780604001519550610ea9816125b0565b9350836040516020018082805190602001908083835b60208310610ee25780518252602082019150602081019050602083039250610ebf565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052805190602001209150610f28816125e7565b9250610ff2565b6060610f3a826125b0565b9050816040015161ffff168761ffff16141580610f675750610f65818661261790919063ffffffff16565b155b15610ff057610fc98b86898d8d8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050508a8b88602001510360008b511461263e565b816040015196508160200151955080945084805190602001209250610fed826125e7565b93505b505b610ffb81612abf565b610e7f565b50600083511115611068576110678984878b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505088898e8e905003600089511461263e565b5b505050505050505050565b8461107d816123e4565b61108657600080fd5b8282600960008981526020019081526020016000208787604051808383808284378083019250505092505050908152602001604051809103902091906110cd929190613153565b5084846040518083838082843780830192505050925050506040518091039020867fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550878760405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a3505050505050565b600080600660008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461121e5780915050611650565b6000611229856118dd565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561126b57600092505050611650565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b6020831061138c5780518252602082019150602081019050602083039250611369565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146113ec576040519150601f19603f3d011682016040523d82523d6000602084013e6113f1565b606091505b5091509150811580611404575060208151105b8061144b5750600060f81b81601f8151811061141c57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561145d576000945050505050611650565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106115735780518252602082019150602081019050602083039250611550565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d80600081146115d3576040519150601f19603f3d011682016040523d82523d6000602084013e6115d8565b606091505b5080925081935050508115806115ef575060208151105b806116365750600060f81b81601f8151811061160757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b15611648576000945050505050611650565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b848111611782576000858216141580156116b757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156117765780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117645780601f1061173957610100808354040283529160200191611764565b820191906000526020600020905b81548152906001019060200180831161174757829003601f168201915b5050505050905093509350505061179e565b600181901b9050611677565b5060006040518060200160405280600081525081915092509250505b9250929050565b826117af816123e4565b6117b857600080fd5b604051806040016040528084815260200183815250600860008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b82611847816123e4565b61185057600080fd5b82826002600087815260200190815260200160002091906118729291906131d3565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b600060606118ec83603c612280565b905060008151141561190257600091505061190f565b61190b81612bd3565b9150505b919050565b80600b600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b60008060056000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060009054906101000a900461ffff1661ffff161415905092915050565b606060096000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b5e5780601f10611b3357610100808354040283529160200191611b5e565b820191906000526020600020905b815481529060010190602001808311611b4157829003601f168201915b505050505090509392505050565b83611b76816123e4565b611b7f57600080fd5b600084600186031614611b9157600080fd5b828260008088815260200190815260200160002060008781526020019081526020016000209190611bc39291906131d3565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600760008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611ca25780601f10611c7757610100808354040283529160200191611ca2565b820191906000526020600020905b815481529060010190602001808311611c8557829003601f168201915b50505050509050919050565b82611cb8816123e4565b611cc157600080fd5b8282600760008781526020019081526020016000209190611ce3929190613153565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b82611d58816123e4565b611d6157600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611dcb578082015181840152602081019050611db0565b50505050905090810190601f168015611df85780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c831415611e7c57837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2611e3a84612bd3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b816001600086815260200190815260200160002060008581526020019081526020016000209080519060200190611eb4929190613253565b5050505050565b606060046000858152602001908152602001600020600060036000878152602001908152602001600020548152602001908152602001600020600084815260200190815260200160002060008361ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611fb25780601f10611f8757610100808354040283529160200191611fb2565b820191906000526020600020905b815481529060010190602001808311611f9557829003601f168201915b505050505090509392505050565b80611fca816123e4565b611fd357600080fd5b6003600083815260200190815260200160002060008154809291906001019190505550817fb757169b8492ca2f1c6619d9d76ce22803035c3b1d5f6930dffe7b127c1a198360405160405180910390a25050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120d05780601f106120a5576101008083540402835291602001916120d0565b820191906000526020600020905b8154815290600101906020018083116120b357829003601f168201915b50505050509050919050565b6000806008600084815260200190815260200160002060000154600860008581526020019081526020016000206001015491509150915091565b81612120816123e4565b61212957600080fd5b61213d83603c61213885612bf6565b611d4e565b505050565b8261214c816123e4565b61215557600080fd5b81600660008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561233a5780601f1061230f5761010080835404028352916020019161233a565b820191906000526020600020905b81548152906001019060200180831161231d57829003601f168201915b5050505050905092915050565b600b602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806123dd57506123dc82612c41565b5b9050919050565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561245a57600080fd5b505afa15801561246e573d6000803e3d6000fd5b505050506040513d602081101561248457600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614806125685750600b600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b612578613108565b828160000181905250818160c001818152505061259481612abf565b92915050565b6000816000015151826020015110159050919050565b60606125e082602001516125cc84600001518560200151612ca2565b8460000151612cfd9092919063ffffffff16565b9050919050565b60606126108260a001518360a001518460c00151038460000151612cfd9092919063ffffffff16565b9050919050565b60008151835114801561263657506126358360008460008751612d70565b5b905092915050565b6000600360008981526020019081526020016000205490506000878051906020012090506060612679868689612cfd9092919063ffffffff16565b90508315612861576000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000208054600181600116156101000203166002900490501461275557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff16809291906001900391906101000a81548161ffff021916908361ffff160217905550505b600460008b81526020019081526020016000206000848152602001908152602001600020600083815260200190815260200160002060008961ffff1661ffff16815260200190815260200160002060006127af91906132d3565b897f03528ed0c2a3ebc993b12ce3c16bb382f9c7d88ef7d8a1bf290eaf35955a12078a8a60405180806020018361ffff1661ffff168152602001828103825284818151815260200191508051906020019080838360005b83811015612821578082015181840152602081019050612806565b50505050905090810190601f16801561284e5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2612ab3565b6000600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff168152602001908152602001600020805460018160011615610100020316600290049050141561293557600560008b815260200190815260200160002060008481526020019081526020016000206000838152602001908152602001600020600081819054906101000a900461ffff168092919060010191906101000a81548161ffff021916908361ffff160217905550505b80600460008c81526020019081526020016000206000858152602001908152602001600020600084815260200190815260200160002060008a61ffff1661ffff1681526020019081526020016000209080519060200190612997929190613253565b50897f52a608b3303a48862d07a73d82fa221318c0027fbbcfb1b2329bface3f19ff2b8a8a8460405180806020018461ffff1661ffff16815260200180602001838103835286818151815260200191508051906020019080838360005b83811015612a0f5780820151818401526020810190506129f4565b50505050905090810190601f168015612a3c5780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b83811015612a75578082015181840152602081019050612a5a565b50505050905090810190601f168015612aa25780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a25b50505050505050505050565b8060c00151816020018181525050806000015151816020015110612ae257612bd0565b6000612af682600001518360200151612ca2565b8260200151019050612b15818360000151612d9490919063ffffffff16565b826040019061ffff16908161ffff1681525050600281019050612b45818360000151612d9490919063ffffffff16565b826060019061ffff16908161ffff1681525050600281019050612b75818360000151612dba90919063ffffffff16565b826080019063ffffffff16908163ffffffff16815250506004810190506000612bab828460000151612d9490919063ffffffff16565b61ffff169050600282019150818360a00181815250508082018360c001818152505050505b50565b60006014825114612be357600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015612c2c5781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612c9b5750612c9a82612de2565b5b9050919050565b6000808290505b600115612cf15783518110612cba57fe5b6000612ccf8286612e5490919063ffffffff16565b60ff16905060018101820191506000811415612ceb5750612cf1565b50612ca9565b82810391505092915050565b606083518284011115612d0f57600080fd5b6060826040519080825280601f01601f191660200182016040528015612d445781602001600182028038833980820191505090505b5090506000806020830191508560208801019050612d63828287612e78565b8293505050509392505050565b6000612d7d848484612ec1565b612d88878785612ec1565b14905095945050505050565b60008251600283011115612da757600080fd5b61ffff8260028501015116905092915050565b60008251600483011115612dcd57600080fd5b63ffffffff8260048501015116905092915050565b6000604051808061334160249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612e4d5750612e4c82612ee4565b5b9050919050565b6000828281518110612e6257fe5b602001015160f81c60f81b60f81c905092915050565b5b60208110612e9c5781518352602083019250602082019150602081039050612e79565b60006001826020036101000a0390508019835116818551168181178652505050505050565b600083518284011115612ed357600080fd5b818360208601012090509392505050565b600063a8fa568260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f3e5750612f3d82612f45565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612f9f5750612f9e82612fa6565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061303f575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061304f575061304e82613056565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806130b057506130af826130b7565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6040518060e001604052806060815260200160008152602001600061ffff168152602001600061ffff168152602001600063ffffffff16815260200160008152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061319457803560ff19168380011785556131c2565b828001600101855582156131c2579182015b828111156131c15782358255916020019190600101906131a6565b5b5090506131cf919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061321457803560ff1916838001178555613242565b82800160010185558215613242579182015b82811115613241578235825591602001919060010190613226565b5b50905061324f919061331b565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061329457805160ff19168380011785556132c2565b828001600101855582156132c2579182015b828111156132c15782518255916020019190600101906132a6565b5b5090506132cf919061331b565b5090565b50805460018160011615610100020316600290046000825580601f106132f95750613318565b601f016020900490600052602060002090810190613317919061331b565b5b50565b61333d91905b80821115613339576000816000905550600101613321565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820e37e49339c407f277a18b1276335d80f06f86465250ddd0bb061d5fb5f0892b264736f6c6343000510003200000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1e" -} diff --git a/deploy/.contracts/LegacyResolverV2.json b/deploy/.contracts/OutdatedResolverV1.json similarity index 100% rename from deploy/.contracts/LegacyResolverV2.json rename to deploy/.contracts/OutdatedResolverV1.json diff --git a/deploy/.contracts/OutdatedResolverV2.json b/deploy/.contracts/OutdatedResolverV2.json new file mode 100644 index 000000000..a70b5c960 --- /dev/null +++ b/deploy/.contracts/OutdatedResolverV2.json @@ -0,0 +1,170 @@ +{ + "abi": [ + { + "constant": true, + "inputs": [{ "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "name": "", "type": "bool" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentTypes", "type": "uint256" } + ], + "name": "ABI", + "outputs": [ + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "content", + "outputs": [{ "name": "ret", "type": "bytes32" }], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "name": "ret", "type": "address" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "contentType", "type": "uint256" }, + { "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "name": "ret", "type": "string" }], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "hash", "type": "bytes32" } + ], + "name": "setContent", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "constant": true, + "inputs": [{ "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "name": "x", "type": "bytes32" }, + { "name": "y", "type": "bytes32" } + ], + "payable": false, + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "name": "node", "type": "bytes32" }, + { "name": "addr", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "type": "function" + }, + { + "inputs": [{ "name": "ensAddr", "type": "address" }], + "payable": false, + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "a", "type": "address" } + ], + "name": "AddrChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "hash", "type": "bytes32" } + ], + "name": "ContentChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "name", "type": "string" } + ], + "name": "NameChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": true, "name": "contentType", "type": "uint256" } + ], + "name": "ABIChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "name": "node", "type": "bytes32" }, + { "indexed": false, "name": "x", "type": "bytes32" }, + { "indexed": false, "name": "y", "type": "bytes32" } + ], + "name": "PubkeyChanged", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000c57fe5b604051602080610dc583398101604052515b60008054600160a060020a031916600160a060020a0383161790555b505b610d7a8061004b6000396000f300606060405236156100ac5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301ffc9a781146100ae5780632203ab56146100df57806329cd62ea146101815780632dff69411461019c5780633b3b57de146101c1578063623195b0146101f0578063691f34311461024c57806377372213146102df578063c3d014d614610338578063c869023314610350578063d5fa2b001461037c575bfe5b34156100b657fe5b6100cb600160e060020a03196004351661039d565b604080519115158252519081900360200190f35b34156100e757fe5b6100f56004356024356104d8565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360008314610146575b80518252602083111561014657601f199092019160209182019101610126565b505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561018957fe5b61019a6004356024356044356105ef565b005b34156101a457fe5b6101af6004356106e6565b60408051918252519081900360200190f35b34156101c957fe5b6101d46004356106ff565b60408051600160a060020a039092168252519081900360200190f35b34156101f857fe5b604080516020600460443581810135601f810184900484028501840190955284845261019a94823594602480359560649492939190920191819084018382808284375094965061071d95505050505050565b005b341561025457fe5b61025f600435610816565b6040805160208082528351818301528351919283929083019185019080838382156102a5575b8051825260208311156102a557601f199092019160209182019101610285565b505050905090810190601f1680156102d15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102e757fe5b60408051602060046024803582810135601f810185900485028601850190965285855261019a95833595939460449493929092019181908401838280828437509496506108c195505050505050565b005b341561034057fe5b61019a600435602435610a19565b005b341561035857fe5b610363600435610af1565b6040805192835260208301919091528051918290030190f35b341561038457fe5b61019a600435600160a060020a0360243516610b10565b005b6000600160e060020a031982167f3b3b57de0000000000000000000000000000000000000000000000000000000014806104005750600160e060020a031982167fd8389dc500000000000000000000000000000000000000000000000000000000145b806104345750600160e060020a031982167f691f343100000000000000000000000000000000000000000000000000000000145b806104685750600160e060020a031982167f2203ab5600000000000000000000000000000000000000000000000000000000145b8061049c5750600160e060020a031982167fc869023300000000000000000000000000000000000000000000000000000000145b806104d05750600160e060020a031982167f01ffc9a700000000000000000000000000000000000000000000000000000000145b90505b919050565b60006104e2610c0b565b60008481526001602081905260409091209092505b8383116105e257828416158015906105305750600083815260058201602052604081205460026000196101006001841615020190911604115b156105d657600083815260058201602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845290918301828280156105ca5780601f1061059f576101008083540402835291602001916105ca565b820191906000526020600020905b8154815290600101906020018083116105ad57829003601f168201915b505050505091506105e7565b5b6002909202916104f7565b600092505b509250929050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561064957fe5b6102c65a03f1151561065757fe5b505060405151600160a060020a03169190911490506106765760006000fd5b604080518082018252848152602080820185815260008881526001835284902092516003840155516004909201919091558151858152908101849052815186927f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e46928290030190a25b5b50505050565b600081815260016020819052604090912001545b919050565b600081815260016020526040902054600160a060020a03165b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810188905291518794600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561077757fe5b6102c65a03f1151561078557fe5b505060405151600160a060020a03169190911490506107a45760006000fd5b60001983018316156107b65760006000fd5b6000848152600160209081526040808320868452600501825290912083516107e092850190610c1d565b50604051839085907faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe390600090a35b5b50505050565b61081e610c0b565b6000828152600160208181526040928390206002908101805485516000199582161561010002959095011691909104601f81018390048302840183019094528383529192908301828280156108b45780601f10610889576101008083540402835291602001916108b4565b820191906000526020600020905b81548152906001019060200180831161089757829003601f168201915b505050505090505b919050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b151561091b57fe5b6102c65a03f1151561092957fe5b505060405151600160a060020a03169190911490506109485760006000fd5b6000838152600160209081526040909120835161096d92600290920191850190610c1d565b50604080516020808252845181830152845186937fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f79387939092839283019185019080838382156109d9575b8051825260208311156109d957601f1990920191602091820191016109b9565b505050905090810190601f168015610a055780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b5b505050565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610a7357fe5b6102c65a03f11515610a8157fe5b505060405151600160a060020a0316919091149050610aa05760006000fd5b6000838152600160208181526040928390209091018490558151848152915185927f0424b6fe0d9c3bdbece0e7879dc241bb0c22e900be8b6c168b4ee08bd9bf83bc92908290030190a25b5b505050565b600081815260016020526040902060038101546004909101545b915091565b60008054604080516020908101849052815160e060020a6302571be30281526004810187905291518694600160a060020a033381169516936302571be393602480830194919391928390030190829087803b1515610b6a57fe5b6102c65a03f11515610b7857fe5b505060405151600160a060020a0316919091149050610b975760006000fd5b600083815260016020908152604091829020805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0386169081179091558251908152915185927f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd292908290030190a25b5b505050565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b60408051602081019091526000815290565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610c5e57805160ff1916838001178555610c8b565b82800160010185558215610c8b579182015b82811115610c8b578251825591602001919060010190610c70565b5b50610c98929150610d2d565b5090565b610d4b91905b80821115610c985760008155600101610d33565b5090565b905600a165627a7a72305820f05b42978350d3945a3fe885ef530e3f8ecbfcdb822550779dfcf0b06b00754f0029000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b" +} diff --git a/deploy/.contracts/LegacyResolverV3.json b/deploy/.contracts/OutdatedResolverV3.json similarity index 63% rename from deploy/.contracts/LegacyResolverV3.json rename to deploy/.contracts/OutdatedResolverV3.json index aae2dfb3d..ad4c155c9 100644 --- a/deploy/.contracts/LegacyResolverV3.json +++ b/deploy/.contracts/OutdatedResolverV3.json @@ -1,4 +1,324 @@ { - "abi": [{"constant":true,"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"name":"setText","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"interfaceImplementer","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"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"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"name":"setPubkey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes","name":"hash","type":"bytes"}],"name":"setContenthash","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"addr","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"setAuthorisation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"key","type":"string"}],"name":"text","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"contentType","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"setABI","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"string","name":"name","type":"string"}],"name":"setName","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"},{"internalType":"bytes","name":"a","type":"bytes"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"contenthash","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"}],"name":"pubkey","outputs":[{"internalType":"bytes32","name":"x","type":"bytes32"},{"internalType":"bytes32","name":"y","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"address","name":"a","type":"address"}],"name":"setAddr","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"bytes4","name":"interfaceID","type":"bytes4"},{"internalType":"address","name":"implementer","type":"address"}],"name":"setInterface","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"node","type":"bytes32"},{"internalType":"uint256","name":"coinType","type":"uint256"}],"name":"addr","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"authorisations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ENS","name":"_ens","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"bool","name":"isAuthorised","type":"bool"}],"name":"AuthorisationChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"node","type":"bytes32"},{"indexed":false,"internalType":"string","name":"indexedKey","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"}],"name":"TextChanged","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":false,"internalType":"string","name":"name","type":"string"}],"name":"NameChanged","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":"bytes","name":"hash","type":"bytes"}],"name":"ContenthashChanged","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":"bytes32","name":"node","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"contentType","type":"uint256"}],"name":"ABIChanged","type":"event"}], + "abi": [ + { + "constant": true, + "inputs": [{ "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }], + "name": "supportsInterface", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "pure", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" }, + { "internalType": "string", "name": "value", "type": "string" } + ], + "name": "setText", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" } + ], + "name": "interfaceImplementer", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "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" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "name": "setPubkey", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "setContenthash", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "addr", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "target", "type": "address" }, + { "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "setAuthorisation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "key", "type": "string" } + ], + "name": "text", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "contentType", "type": "uint256" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "setABI", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "string", "name": "name", "type": "string" } + ], + "name": "setName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" }, + { "internalType": "bytes", "name": "a", "type": "bytes" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "contenthash", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [{ "internalType": "bytes32", "name": "node", "type": "bytes32" }], + "name": "pubkey", + "outputs": [ + { "internalType": "bytes32", "name": "x", "type": "bytes32" }, + { "internalType": "bytes32", "name": "y", "type": "bytes32" } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "address", "name": "a", "type": "address" } + ], + "name": "setAddr", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "bytes4", "name": "interfaceID", "type": "bytes4" }, + { "internalType": "address", "name": "implementer", "type": "address" } + ], + "name": "setInterface", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "internalType": "uint256", "name": "coinType", "type": "uint256" } + ], + "name": "addr", + "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "authorisations", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "contract ENS", "name": "_ens", "type": "address" }], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, + { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, + { "indexed": false, "internalType": "bool", "name": "isAuthorised", "type": "bool" } + ], + "name": "AuthorisationChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { "indexed": true, "internalType": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": false, "internalType": "string", "name": "indexedKey", "type": "string" }, + { "indexed": false, "internalType": "string", "name": "key", "type": "string" } + ], + "name": "TextChanged", + "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": false, "internalType": "string", "name": "name", "type": "string" } + ], + "name": "NameChanged", + "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": "bytes", "name": "hash", "type": "bytes" } + ], + "name": "ContenthashChanged", + "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": "bytes32", "name": "node", "type": "bytes32" }, + { "indexed": true, "internalType": "uint256", "name": "contentType", "type": "uint256" } + ], + "name": "ABIChanged", + "type": "event" + } + ], "bytecode": "0x608060405234801561001057600080fd5b506040516124e33803806124e38339818101604052602081101561003357600080fd5b810190808051906020019092919050505080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505061244e806100956000396000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063623195b0116100ad578063c869023311610071578063c869023314610968578063d5fa2b00146109b1578063e59d895d146109ff578063f1cb7e0614610a76578063f86bc87914610b2757610121565b8063623195b01461063b578063691f3431146106c8578063773722131461076f5780638b95dd71146107f2578063bc1c58d1146108c157610121565b806329cd62ea116100f457806329cd62ea146103b2578063304e6ade146103f45780633b3b57de146104775780633e9ce794146104e557806359d1d43c1461053f57610121565b806301ffc9a71461012657806310f13a8c1461018b578063124a319c146102635780632203ab56146102fa575b600080fd5b6101716004803603602081101561013c57600080fd5b8101908080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610bad565b604051808215151515815260200191505060405180910390f35b610261600480360360608110156101a157600080fd5b8101908080359060200190929190803590602001906401000000008111156101c857600080fd5b8201836020820111156101da57600080fd5b803590602001918460018302840111640100000000831117156101fc57600080fd5b90919293919293908035906020019064010000000081111561021d57600080fd5b82018360208201111561022f57600080fd5b8035906020019184600183028401116401000000008311171561025157600080fd5b9091929391929390505050610c0e565b005b6102b86004803603604081101561027957600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190505050610d09565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103306004803603604081101561031057600080fd5b810190808035906020019092919080359060200190929190505050611206565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561037657808201518184015260208101905061035b565b50505050905090810190601f1680156103a35780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b6103f2600480360360608110156103c857600080fd5b81019080803590602001909291908035906020019092919080359060200190929190505050611355565b005b6104756004803603604081101561040a57600080fd5b81019080803590602001909291908035906020019064010000000081111561043157600080fd5b82018360208201111561044357600080fd5b8035906020019184600183028401116401000000008311171561046557600080fd5b90919293919293905050506113ed565b005b6104a36004803603602081101561048d57600080fd5b810190808035906020019092919050505061148d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053d600480360360608110156104fb57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035151590602001909291905050506114c4565b005b6105c06004803603604081101561055557600080fd5b81019080803590602001909291908035906020019064010000000081111561057c57600080fd5b82018360208201111561058e57600080fd5b803590602001918460018302840111640100000000831117156105b057600080fd5b90919293919293905050506115d8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106005780820151818401526020810190506105e5565b50505050905090810190601f16801561062d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106c66004803603606081101561065157600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561068257600080fd5b82018360208201111561069457600080fd5b803590602001918460018302840111640100000000831117156106b657600080fd5b90919293919293905050506116b4565b005b6106f4600480360360208110156106de57600080fd5b8101908080359060200190929190505050611741565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610734578082015181840152602081019050610719565b50505050905090810190601f1680156107615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107f06004803603604081101561078557600080fd5b8101908080359060200190929190803590602001906401000000008111156107ac57600080fd5b8201836020820111156107be57600080fd5b803590602001918460018302840111640100000000831117156107e057600080fd5b90919293919293905050506117f6565b005b6108bf6004803603606081101561080857600080fd5b8101908080359060200190929190803590602001909291908035906020019064010000000081111561083957600080fd5b82018360208201111561084b57600080fd5b8035906020019184600183028401116401000000008311171561086d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290505050611896565b005b6108ed600480360360208110156108d757600080fd5b8101908080359060200190929190505050611a03565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561092d578082015181840152602081019050610912565b50505050905090810190601f16801561095a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6109946004803603602081101561097e57600080fd5b8101908080359060200190929190505050611ab8565b604051808381526020018281526020019250505060405180910390f35b6109fd600480360360408110156109c757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611af2565b005b610a7460048036036060811015610a1557600080fd5b810190808035906020019092919080357bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b1e565b005b610aac60048036036040811015610a8c57600080fd5b810190808035906020019092919080359060200190929190505050611c5c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610aec578082015181840152602081019050610ad1565b50505050905090810190601f168015610b195780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610b9360048036036060811015610b3d57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d23565b604051808215151515815260200191505060405180910390f35b60006359d1d43c60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480610c075750610c0682611d5f565b5b9050919050565b84610c1881611dc0565b610c2157600080fd5b828260066000898152602001908152602001600020878760405180838380828437808301925050509250505090815260200160405180910390209190610c68929190612250565b50857fd8c9334b1a9c2f9da342a0a2b32629c1a229b6445dad78947f674b44444a7550868688886040518080602001806020018381038352878782818152602001925080828437600081840152601f19601f8201169050808301925050508381038252858582818152602001925080828437600081840152601f19601f820116905080830192505050965050505050505060405180910390a2505050505050565b600080600360008581526020019081526020016000206000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610dce5780915050611200565b6000610dd98561148d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610e1b57600092505050611200565b600060608273ffffffffffffffffffffffffffffffffffffffff166301ffc9a760e01b60405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b60208310610f3c5780518252602082019150602081019050602083039250610f19565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610f9c576040519150601f19603f3d011682016040523d82523d6000602084013e610fa1565b606091505b5091509150811580610fb4575060208151105b80610ffb5750600060f81b81601f81518110610fcc57fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b1561100d576000945050505050611200565b8273ffffffffffffffffffffffffffffffffffffffff168660405160240180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191681526020019150506040516020818303038152906040527f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040518082805190602001908083835b602083106111235780518252602082019150602081019050602083039250611100565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114611183576040519150601f19603f3d011682016040523d82523d6000602084013e611188565b606091505b50809250819350505081158061119f575060208151105b806111e65750600060f81b81601f815181106111b757fe5b602001015160f81c60f81b7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b156111f8576000945050505050611200565b829450505050505b92915050565b60006060600080600086815260200190815260200160002090506000600190505b8481116113325760008582161415801561126757506000826000838152602001908152602001600020805460018160011615610100020316600290049050115b156113265780826000838152602001908152602001600020808054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113145780601f106112e957610100808354040283529160200191611314565b820191906000526020600020905b8154815290600101906020018083116112f757829003601f168201915b5050505050905093509350505061134e565b600181901b9050611227565b5060006040518060200160405280600081525081915092509250505b9250929050565b8261135f81611dc0565b61136857600080fd5b604051806040016040528084815260200183815250600560008681526020019081526020016000206000820151816000015560208201518160010155905050837f1d6f5e03d3f63eb58751986629a5439baee5079ff04f345becb66e23eb154e468484604051808381526020018281526020019250505060405180910390a250505050565b826113f781611dc0565b61140057600080fd5b82826002600087815260200190815260200160002091906114229291906122d0565b50837fe379c1624ed7e714cc0937528a32359d69d5281337765313dba4e081b72d7578848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b6000606061149c83603c611c5c565b90506000815114156114b25760009150506114bf565b6114bb81611f4c565b9150505b919050565b806008600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16847fe1c5610a6e0cbe10764ecd182adcef1ec338dc4e199c99c32ce98f38e12791df84604051808215151515815260200191505060405180910390a4505050565b606060066000858152602001908152602001600020838360405180838380828437808301925050509250505090815260200160405180910390208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156116a65780601f1061167b576101008083540402835291602001916116a6565b820191906000526020600020905b81548152906001019060200180831161168957829003601f168201915b505050505090509392505050565b836116be81611dc0565b6116c757600080fd5b6000846001860316146116d957600080fd5b82826000808881526020019081526020016000206000878152602001908152602001600020919061170b9291906122d0565b5083857faa121bbeef5f32f5961a2a28966e769023910fc9479059ee3495d4c1a696efe360405160405180910390a35050505050565b6060600460008381526020019081526020016000208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117ea5780601f106117bf576101008083540402835291602001916117ea565b820191906000526020600020905b8154815290600101906020018083116117cd57829003601f168201915b50505050509050919050565b8261180081611dc0565b61180957600080fd5b828260046000878152602001908152602001600020919061182b929190612250565b50837fb7d29e911041e8d9b843369e890bcb72c9388692ba48b65ac54e7214c4c348f7848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a250505050565b826118a081611dc0565b6118a957600080fd5b837f65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af75284846040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156119135780820151818401526020810190506118f8565b50505050905090810190601f1680156119405780820380516001836020036101000a031916815260200191505b50935050505060405180910390a2603c8314156119c457837f52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd261198284611f4c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a25b8160016000868152602001908152602001600020600085815260200190815260200160002090805190602001906119fc929190612350565b5050505050565b6060600260008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611aac5780601f10611a8157610100808354040283529160200191611aac565b820191906000526020600020905b815481529060010190602001808311611a8f57829003601f168201915b50505050509050919050565b6000806005600084815260200190815260200160002060000154600560008581526020019081526020016000206001015491509150915091565b81611afc81611dc0565b611b0557600080fd5b611b1983603c611b1485611f6f565b611896565b505050565b82611b2881611dc0565b611b3157600080fd5b81600360008681526020019081526020016000206000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916847f7c69f06bea0bdef565b709e93a147836b0063ba2dd89f02d0b7e8d931e6a6daa84604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b60606001600084815260200190815260200160002060008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d165780601f10611ceb57610100808354040283529160200191611d16565b820191906000526020600020905b815481529060010190602001808311611cf957829003601f168201915b5050505050905092915050565b6008602052826000526040600020602052816000526040600020602052806000526040600020600092509250509054906101000a900460ff1681565b600063c869023360e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480611db95750611db882611fba565b5b9050919050565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302571be3846040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611e3657600080fd5b505afa158015611e4a573d6000803e3d6000fd5b505050506040513d6020811015611e6057600080fd5b810190808051906020019092919050505090503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480611f4457506008600084815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b915050919050565b60006014825114611f5c57600080fd5b600c6101000a6020830151049050919050565b606060146040519080825280601f01601f191660200182016040528015611fa55781602001600182028038833980820191505090505b509050600c6101000a82026020820152919050565b600063691f343160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061201457506120138261201b565b5b9050919050565b600060405180806123f660249139602401905060405180910390207bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061208657506120858261208d565b5b9050919050565b600063bc1c58d160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806120e757506120e6826120ee565b5b9050919050565b6000633b3b57de60e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161480612187575063f1cb7e0660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061219757506121968261219e565b5b9050919050565b6000632203ab5660e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806121f857506121f7826121ff565b5b9050919050565b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061229157803560ff19168380011785556122bf565b828001600101855582156122bf579182015b828111156122be5782358255916020019190600101906122a3565b5b5090506122cc91906123d0565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061231157803560ff191683800117855561233f565b8280016001018555821561233f579182015b8281111561233e578235825591602001919060010190612323565b5b50905061234c91906123d0565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061239157805160ff19168380011785556123bf565b828001600101855582156123bf579182015b828111156123be5782518255916020019190600101906123a3565b5b5090506123cc91906123d0565b5090565b6123f291905b808211156123ee5760008160009055506001016123d6565b5090565b9056fe696e74657266616365496d706c656d656e74657228627974657333322c62797465733429a265627a7a72315820ad8f8a41d6a908b475138c4e12dbb403d590d1a66cd707d281b6f5adf64a8b9b64736f6c634300050b0032000000000000000000000000314159265dd8dbb310642f98f50c066173c1259b" } diff --git a/deploy/00_deploy_legacy_resolvers.ts b/deploy/00_deploy_legacy_resolvers.ts index 190cd3eda..2f646dee3 100644 --- a/deploy/00_deploy_legacy_resolvers.ts +++ b/deploy/00_deploy_legacy_resolvers.ts @@ -15,44 +15,44 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const ethController = await ethers.getContract('ETHRegistrarController', owner) const reverseRegistrar = await ethers.getContract('ReverseRegistrar', owner) - await deployments.deploy('LegacyResolverV1', { + await deployments.deploy('OutdatedResolver', { from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV1.json'), { + await fs.readFile(resolve(__dirname, './.contracts/OutdatedResolverV1.json'), { encoding: 'utf8', }), ), args: [registry.address], }) - await deployments.deploy('LegacyResolverV2', { + await deployments.deploy('CustomOutdatedResolver', { from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV2.json'), { + await fs.readFile(resolve(__dirname, './.contracts/OutdatedResolverV3.json'), { encoding: 'utf8', }), ), args: [registry.address], }) - await deployments.deploy('LegacyResolverV3', { + await deployments.deploy('CustomLegacyResolver', { from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV3.json'), { + await fs.readFile(resolve(__dirname, './.contracts/CustomLegacyResolver.json'), { encoding: 'utf8', }), ), args: [registry.address], }) - await deployments.deploy('LegacyResolverV4', { + await deployments.deploy('CustomNameWrapperAwareResolver', { from: deployer, contract: JSON.parse( - await fs.readFile(resolve(__dirname, './.contracts/LegacyResolverV4.json'), { + await fs.readFile(resolve(__dirname, './.contracts/CustomNameWrapperAwareResolver.json'), { encoding: 'utf8', }), ), - args: [registry.address], + args: [registry.address, nameWrapper.address, ethController.address, reverseRegistrar.address], }) // console.log('Deploying CustomResolver...') diff --git a/e2e/specs/stateless/profileEditor.spec.ts b/e2e/specs/stateless/profileEditor.spec.ts index 93f16f68f..b3549aaee 100644 --- a/e2e/specs/stateless/profileEditor.spec.ts +++ b/e2e/specs/stateless/profileEditor.spec.ts @@ -14,24 +14,16 @@ import { emptyAddress } from '../../../src/utils/constants' dotenv.config({ path: '.env.local' }) -const oldResolver = testClient.chain.contracts.legacyPublicResolver.address -const newResolver = testClient.chain.contracts.publicResolver.address +const legacyResolver = testClient.chain.contracts.legacyPublicResolver.address +const latestResolver = testClient.chain.contracts.publicResolver.address const contractAddresses = JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}') -const ownedResolverAddress = - JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.OwnedResolver || '' -const invalidResolverAddress = - JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NameWrapper || '' -const noMulticallResolverAddress = - JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.NoMulticallResolverAddress || '' -const oldestResolverAddress = - JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.OldesResolver || '' -const customResolver = - JSON.parse(process.env.NEXT_PUBLIC_DEPLOYMENT_ADDRESSES || '{}')?.CustomResolver || '' - -const resolverV4Address = contractAddresses.LegacyResolverV4 || '' -const resolverV5Address = contractAddresses.LegacyResolverV5 || '' -const outdatedResolverAddress = contractAddresses.LegacyResolverV4 || '' +const ownedResolverAddress = contractAddresses.OwnedResolver || '' +const invalidResolverAddress = contractAddresses.NameWrapper || '' +const outdatedResolver = contractAddresses.OutdatedResolver || '' +const customLegacyResolver = contractAddresses.CustomLegacyResolver || '' +const customOutdatedResolver = contractAddresses.CustomOutdatedResolver || '' +const customNameWrapperAwareResolver = contractAddresses.CustomNameWrapperAwareResolver || '' const dummyABI = { test: 'test', @@ -146,42 +138,8 @@ test.describe('profile', () => { }) }) -test.describe('legacy resolvers', () => { - test('should force a name with an outdated resolver to upgrade', async ({ - page, - login, - makeName, - makePageObject, - }) => { - const name = await makeName({ - label: 'outdated-resolver', - type: 'legacy', - owner: 'user', - resolver: outdatedResolverAddress, - }) - - const profilePage = makePageObject('ProfilePage') - const transactionModal = makePageObject('TransactionModal') - const morePage = makePageObject('MorePage') - - await profilePage.goto(name) - await login.connect() - - await profilePage.editProfileButton.click() - await page.pause() - await expect(profilePage.profileEditor.locator('text=No resolver set')).toBeVisible() - - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await transactionModal.autoComplete() - - await morePage.goto(name) - - await morePage.resolver.click() - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() - }) - - test('should be able to update records with resolver v4', async ({ - page, +test.describe('legacy resolver', () => { + test('should be able to add/update profile records without migration', async ({ login, makeName, makePageObject, @@ -190,7 +148,7 @@ test.describe('legacy resolvers', () => { const name = await makeName({ label: 'unwrapped', type: 'legacy', - resolver: resolverV4Address, + resolver: legacyResolver, records: await makeRecords(), }) @@ -202,8 +160,7 @@ test.describe('legacy resolvers', () => { await morePage.goto(name) await login.connect() - await page.pause() - await expect(morePage.resolver.getByText(resolverV4Address)).toBeVisible() + await expect(morePage.resolver.getByText(legacyResolver)).toBeVisible() await profilePage.goto(name) await expect(profilePage.record('text', 'description')).toHaveText('Hello2') @@ -215,7 +172,7 @@ test.describe('legacy resolvers', () => { await profilePage.editProfileButton.click() - await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() + // await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() // Update records await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) @@ -231,7 +188,7 @@ test.describe('legacy resolvers', () => { await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver).toHaveText(oldResolver) + await expect(morePage.resolver).toHaveText(legacyResolver) await recordsPage.goto(name) await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') @@ -245,649 +202,872 @@ test.describe('legacy resolvers', () => { ) await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') }) -}) - -test.describe('migrations', () => { - test('should force a name on the old registry to go to update registry', async ({ - page, - login, - makePageObject, - }) => { - await page.goto('/legacy.test') - - await login.connect('user2') - - const profilePage = makePageObject('ProfilePage') - await profilePage.editProfileButton.click() - - await page.pause() - await expect(page.getByText('Registry out of date')).toBeVisible() - await expect(page.getByTestId('warning-overlay-next-button')).toHaveAttribute( - 'href', - `https://legacy.ens.domains/name/legacy.test`, - ) - }) - test('should force a name without a resolver to update their resolver', async ({ + test('should be able to delete profile records without migration', async ({ page, login, makeName, makePageObject, }) => { + test.slow() const name = await makeName({ label: 'unwrapped', type: 'legacy', - owner: 'user', - // resolver: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', - subnames: [ - { - label: 'test', - owner: 'user', - resolver: emptyAddress, - }, - ], + resolver: legacyResolver, + records: await makeRecords(), }) - const subname = `test.${name}` + const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') - const morePage = makePageObject('MorePage') - await profilePage.goto(subname) + await morePage.goto(name) await login.connect() - await profilePage.editProfileButton.click() + await expect(morePage.resolver.getByText(legacyResolver)).toBeVisible() + + await profilePage.goto(name) + await page.pause() - await expect(profilePage.profileEditor.locator('text=No resolver set')).toBeVisible() + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + + await profilePage.editProfileButton.click() + + // await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() + + // Delete records + await profilePage.profileEditorClearButton('description').click() + await profilePage.profileEditorClearButton('url').click() + await profilePage.profileEditorClearButton('email').click() + await profilePage.profileEditorInput('eth').fill('') + await expect(await profilePage.profileEditorInput('eth')).toHaveAttribute( + 'placeholder', + '0xb8c2C2...', + ) + await profilePage.profileEditorClearButton('eth').click() + await profilePage.profileEditorInput('btc').fill('') + await expect(await profilePage.profileEditorInput('btc')).toHaveAttribute( + 'placeholder', + '3FZbgi29...', + ) + await profilePage.profileEditorClearButton('btc').click() + await profilePage.profileEditorInput('etcLegacy').fill('') + await expect(await profilePage.profileEditorInput('etcLegacy')).toHaveAttribute( + 'placeholder', + 'Add address here', + ) + await profilePage.profileEditorClearButton('etcLegacy').click() + await profilePage.profileEditorClearButton('ipfs').click() + await profilePage.profileEditorClearButton('abi').click() + + await profilePage.profileEditor.getByTestId('profile-submit-button').click() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await transactionModal.autoComplete() - await morePage.goto(subname) + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(legacyResolver) - await morePage.resolver.click() - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + await recordsPage.goto(name) + await expect(page.getByTestId('text-amount')).toHaveText('0 Records') + await expect(page.getByTestId('address-amount')).toHaveText('0 Records') + await expect(page.getByText('No Content Hash')).toBeVisible() + await expect(page.getByText('No ABI')).toBeVisible() }) +}) - test('should force a name with an unauthorised resolver to update their resolver', async ({ +test.describe('custom legacy resolver', () => { + test('should be able to add/update profile records without migration', async ({ login, - page, makeName, makePageObject, }) => { + test.slow() const name = await makeName({ - label: 'unwrapped', + label: 'custom-legacy-resolver', type: 'legacy', - owner: 'user2', - resolver: ownedResolverAddress as Address, + resolver: customLegacyResolver, records: await makeRecords(), }) const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') await morePage.goto(name) - await login.connect('user2') + await login.connect() - await expect(morePage.resolver.getByText(ownedResolverAddress)).toBeVisible() + await expect(morePage.resolver.getByText(customLegacyResolver)).toBeVisible() await profilePage.goto(name) + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + await profilePage.editProfileButton.click() - await page.pause() - await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + // await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() + + // Update records + await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) + await profilePage.profileEditorInput('description').fill('new name') + + // Add records + await profilePage.profileEditorAddInputs(['location', 'bnb']) + await profilePage.profileEditorInput('location').fill('L1 chain') + await profilePage.profileEditorInput('bnb').fill('bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl') + + await profilePage.profileEditor.getByTestId('profile-submit-button').click() await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + await expect(morePage.resolver).toHaveText(customLegacyResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('new name') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user2'), + ) + await expect(recordsPage.getRecordValue('address', 'bnb')).toHaveText( + 'bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl', + ) + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') }) - test('should force a name with an invalid resolver to update their resolver', async ({ - login, + test('should be able to delete profile records without migration', async ({ page, + login, makeName, makePageObject, }) => { + test.slow() const name = await makeName({ - label: 'unwrapped', + label: 'custom-legacy-resolver', type: 'legacy', - owner: 'user', - resolver: invalidResolverAddress as Address, + resolver: customLegacyResolver, records: await makeRecords(), }) const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') await morePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(invalidResolverAddress)).toBeVisible() + await expect(morePage.resolver.getByText(customLegacyResolver)).toBeVisible() await profilePage.goto(name) - await profilePage.editProfileButton.click() + await page.pause() - await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + + await profilePage.editProfileButton.click() + + // await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() + + // Delete records + await profilePage.profileEditorClearButton('description').click() + await profilePage.profileEditorClearButton('url').click() + await profilePage.profileEditorClearButton('email').click() + await profilePage.profileEditorInput('eth').fill('') + await expect(await profilePage.profileEditorInput('eth')).toHaveAttribute( + 'placeholder', + '0xb8c2C2...', + ) + await profilePage.profileEditorClearButton('eth').click() + await profilePage.profileEditorInput('btc').fill('') + await expect(await profilePage.profileEditorInput('btc')).toHaveAttribute( + 'placeholder', + '3FZbgi29...', + ) + await profilePage.profileEditorClearButton('btc').click() + await profilePage.profileEditorInput('etcLegacy').fill('') + await expect(await profilePage.profileEditorInput('etcLegacy')).toHaveAttribute( + 'placeholder', + 'Add address here', + ) + await profilePage.profileEditorClearButton('etcLegacy').click() + await profilePage.profileEditorClearButton('ipfs').click() + await profilePage.profileEditorClearButton('abi').click() + + await profilePage.profileEditor.getByTestId('profile-submit-button').click() await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + await expect(morePage.resolver).toHaveText(customLegacyResolver) + + await recordsPage.goto(name) + await expect(page.getByTestId('text-amount')).toHaveText('0 Records') + await expect(page.getByTestId('address-amount')).toHaveText('0 Records') + await expect(page.getByText('No Content Hash')).toBeVisible() + await expect(page.getByText('No ABI')).toBeVisible() }) +}) - test('should force a wrapped name with a resolver that is not name wrapper aware to migrate update their resolver', async ({ +test.describe('namewrapper aware resolver', () => { + test('should be able to add/update profile records without migration', async ({ login, - page, makeName, makePageObject, }) => { + test.slow() const name = await makeName({ - label: 'wrapped', + label: 'namewrapper-aware-resolver', type: 'wrapped', - resolver: oldResolver, + records: await makeRecords(), }) - const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') - await morePage.goto(name) + await profilePage.goto(name) await login.connect() - await expect(morePage.resolver).toHaveText(oldResolver) + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') - await profilePage.goto(name) await profilePage.editProfileButton.click() - await page.pause() - await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + // Update records + await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) + await profilePage.profileEditorInput('description').fill('new name') + + // Add records + await profilePage.profileEditorAddInputs(['location', 'bnb']) + await profilePage.profileEditorInput('location').fill('L1 chain') + await profilePage.profileEditorInput('bnb').fill('bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl') + + await profilePage.profileEditor.getByTestId('profile-submit-button').click() await transactionModal.autoComplete() - await morePage.goto(name) - await expect(morePage.resolver).toHaveText(newResolver) + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('new name') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user2'), + ) + await expect(recordsPage.getRecordValue('address', 'bnb')).toHaveText( + 'bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl', + ) + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') }) - test('should be able to update to latest resolver when profile has been migrated on current and latest resolver', async ({ + test('should be able to delete profile records without migration', async ({ page, login, - accounts, makeName, makePageObject, }) => { + test.slow() const name = await makeName({ - label: 'unwrapped', - type: 'legacy', - owner: 'user', - resolver: oldResolver, + label: 'namewrapper-aware-resolver', + type: 'wrapped', records: await makeRecords(), }) - // Add records to latest resolver - await generateRecords({ accounts })({ - name, - owner: 'user', - resolver: newResolver, + const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') + const transactionModal = makePageObject('TransactionModal') + + await profilePage.goto(name) + await login.connect() + + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + + await profilePage.editProfileButton.click() + + // Delete records + await profilePage.profileEditorClearButton('description').click() + await profilePage.profileEditorClearButton('url').click() + await profilePage.profileEditorClearButton('email').click() + await profilePage.profileEditorInput('eth').fill('') + await expect(await profilePage.profileEditorInput('eth')).toHaveAttribute( + 'placeholder', + '0xb8c2C2...', + ) + await profilePage.profileEditorClearButton('eth').click() + await profilePage.profileEditorInput('btc').fill('') + await expect(await profilePage.profileEditorInput('btc')).toHaveAttribute( + 'placeholder', + '3FZbgi29...', + ) + await profilePage.profileEditorClearButton('btc').click() + await profilePage.profileEditorInput('etcLegacy').fill('') + await expect(await profilePage.profileEditorInput('etcLegacy')).toHaveAttribute( + 'placeholder', + 'Add address here', + ) + await profilePage.profileEditorClearButton('etcLegacy').click() + await profilePage.profileEditorClearButton('ipfs').click() + await profilePage.profileEditorClearButton('abi').click() + + await profilePage.profileEditor.getByTestId('profile-submit-button').click() + + await transactionModal.autoComplete() + + await recordsPage.goto(name) + await expect(page.getByTestId('text-amount')).toHaveText('0 Records') + await expect(page.getByTestId('address-amount')).toHaveText('0 Records') + await expect(page.getByText('No Content Hash')).toBeVisible() + await expect(page.getByText('No ABI')).toBeVisible() + }) +}) + +test.describe('custom namewrapper aware resolver', () => { + test('should be able to add/update profile records without migration', async ({ + login, + makeName, + makePageObject, + }) => { + test.slow() + const name = await makeName({ + label: 'custom-namewrapper-aware-resolver', + type: 'wrapped', records: await makeRecords(), + resolver: customNameWrapperAwareResolver, }) - const morePage = makePageObject('MorePage') - const recordsPage = makePageObject('RecordsPage') const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') await morePage.goto(name) + await expect(morePage.resolver.getByText(customNameWrapperAwareResolver)).toBeVisible() + + await profilePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') - await profilePage.goto(name) await profilePage.editProfileButton.click() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await expect( - profilePage.profileEditor.getByText( - 'You can keep your current profile on the new resolver, or reset it and remove all profile records.', - ), - ).toBeVisible() - await expect(page.getByTestId('detailed-switch').getByRole('checkbox')).toBeChecked() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await transactionModal.autoComplete() + // Update records + await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) + await profilePage.profileEditorInput('description').fill('new name') - await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + // Add records + await profilePage.profileEditorAddInputs(['location', 'bnb']) + await profilePage.profileEditorInput('location').fill('L1 chain') + await profilePage.profileEditorInput('bnb').fill('bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl') - await recordsPage.goto(name) + await profilePage.profileEditor.getByTestId('profile-submit-button').click() - await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') - await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') + await transactionModal.autoComplete() + + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('new name') await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( - '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', - ) - await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( - 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', - ) - await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( - '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', + createAccounts().getAddress('user2'), ) - await expect(recordsPage.getRecordValue('contentHash')).toHaveText( - 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + await expect(recordsPage.getRecordValue('address', 'bnb')).toHaveText( + 'bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl', ) - await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') }) - test('should be able to reset the latest resolver when profile has been migrated on current and latest resolver', async ({ + test('should be able to delete profile records without migration', async ({ page, login, - accounts, makeName, makePageObject, }) => { + test.slow() const name = await makeName({ - label: 'unwrapped', - type: 'legacy', - owner: 'user', - resolver: oldResolver, - records: await makeRecords(), - }) - - // Add records to latest resolver - await generateRecords({ accounts })({ - name, - owner: 'user', - resolver: newResolver, + label: 'custom-namewrapper-aware-resolver', + type: 'wrapped', records: await makeRecords(), + resolver: customNameWrapperAwareResolver, }) - const morePage = makePageObject('MorePage') - const recordsPage = makePageObject('RecordsPage') const profilePage = makePageObject('ProfilePage') + const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') await morePage.goto(name) + await expect(morePage.resolver.getByText(customNameWrapperAwareResolver)).toBeVisible() + + await profilePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + await expect(profilePage.record('text', 'description')).toHaveText('Hello2') + await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') + await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') + await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') + await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') + await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') - await profilePage.goto(name) await profilePage.editProfileButton.click() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await expect( - profilePage.profileEditor.getByText( - 'You can keep your current profile on the new resolver, or reset it and remove all profile records.', - ), - ).toBeVisible() - await page.getByTestId('detailed-switch').getByRole('checkbox').uncheck() - await expect(page.getByTestId('detailed-switch').getByRole('checkbox')).not.toBeChecked() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await expect(profilePage.profileEditor.getByText('Reset profile')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + // Delete records + await profilePage.profileEditorClearButton('description').click() + await profilePage.profileEditorClearButton('url').click() + await profilePage.profileEditorClearButton('email').click() + await profilePage.profileEditorInput('eth').fill('') + await expect(await profilePage.profileEditorInput('eth')).toHaveAttribute( + 'placeholder', + '0xb8c2C2...', + ) + await profilePage.profileEditorClearButton('eth').click() + await profilePage.profileEditorInput('btc').fill('') + await expect(await profilePage.profileEditorInput('btc')).toHaveAttribute( + 'placeholder', + '3FZbgi29...', + ) + await profilePage.profileEditorClearButton('btc').click() + await profilePage.profileEditorInput('etcLegacy').fill('') + await expect(await profilePage.profileEditorInput('etcLegacy')).toHaveAttribute( + 'placeholder', + 'Add address here', + ) + await profilePage.profileEditorClearButton('etcLegacy').click() + await profilePage.profileEditorClearButton('ipfs').click() + await profilePage.profileEditorClearButton('abi').click() - await transactionModal.autoComplete() + await profilePage.profileEditor.getByTestId('profile-submit-button').click() - await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() + await transactionModal.autoComplete() await recordsPage.goto(name) - await expect(page.getByTestId('text-amount')).toHaveText('0 Records') await expect(page.getByTestId('address-amount')).toHaveText('0 Records') await expect(page.getByText('No Content Hash')).toBeVisible() await expect(page.getByText('No ABI')).toBeVisible() }) +}) - test('should be able to choose to migrate to the latest profile when the current and latest resolver are not in sync', async ({ +test.describe('outdated resolver', () => { + test('should force a name with an outdated resolver to upgrade', async ({ page, login, - accounts, makeName, makePageObject, }) => { const name = await makeName({ - label: 'unwrapped', + label: 'outdated-resolver', type: 'legacy', owner: 'user', - resolver: oldResolver, - records: await makeRecords(), - }) - - // Add records to latest resolver - await generateRecords({ accounts })({ - name, - owner: 'user', - resolver: newResolver, - records: await makeRecords({ - texts: [{ key: 'description', value: 'New profile' }], - coins: [{ coin: 'eth', value: createAccounts().getAddress('user2') }], - contentHash: 'bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162', - abi: await encodeAbi({ encodeAs: 'cbor', data: { test2: 'test2' } }), - }), + resolver: outdatedResolver, }) - const morePage = makePageObject('MorePage') - const recordsPage = makePageObject('RecordsPage') const profilePage = makePageObject('ProfilePage') const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') - await morePage.goto(name) + await profilePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() - - await profilePage.goto(name) await profilePage.editProfileButton.click() - await expect(page.getByText('Resolver out of sync')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await page.pause() + await expect(profilePage.profileEditor.locator('text=Resolver out of date')).toBeVisible() - await expect(page.getByTestId('migrate-profile-selector-latest')).toBeChecked() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() - - await recordsPage.goto(name) - await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') - await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('New profile') - await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') - await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( - createAccounts().getAddress('user2'), - ) - await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( - 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', - ) - await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( - '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', - ) - await expect(recordsPage.getRecordValue('contentHash')).toHaveText( - 'bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162', - ) - await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test2":"test2"}') + await morePage.resolver.click() + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() }) - test('should be able migrate the current profile when the current and latest resolver are not in sync', async ({ + test('should be able to choose latest resolver if there is a profile on the latest resolver', async ({ page, login, - accounts, makeName, + accounts, makePageObject, }) => { const name = await makeName({ - label: 'unwrapped', + label: 'outdated-resolver', type: 'legacy', owner: 'user', - resolver: oldResolver, + resolver: outdatedResolver, records: await makeRecords(), }) - // Add records to latest resolver await generateRecords({ accounts })({ name, owner: 'user', - resolver: newResolver, - records: await makeRecords({ - texts: [{ key: 'description', value: 'New profile' }], - coins: [{ coin: 'eth', value: createAccounts().getAddress('user2') }], - contentHash: 'bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162', - abi: await encodeAbi({ encodeAs: 'cbor', data: { test2: 'test2' } }), - }), + resolver: latestResolver, + records: await makeRecords(), }) - const morePage = makePageObject('MorePage') - const recordsPage = makePageObject('RecordsPage') const profilePage = makePageObject('ProfilePage') const transactionModal = makePageObject('TransactionModal') - - await morePage.goto(name) + const morePage = makePageObject('MorePage') + const recordsPage = makePageObject('RecordsPage') + await profilePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() - - await profilePage.goto(name) await profilePage.editProfileButton.click() - await expect(page.getByText('Resolver out of sync')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - - await page.getByTestId('migrate-profile-selector-current').check() - await expect(page.getByTestId('migrate-profile-selector-current')).toBeChecked() + await page.pause() + await expect(profilePage.profileEditor.locator('text=Resolver out of date')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await expect(page.getByText('Migrate profile')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await test.step('Switch to latest resolver', async () => { + await expect(page.getByTestId('migrate-profile-selector-latest')).toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).toBeVisible() + await expect(page.getByTestId('migrate-profile-selector-current')).not.toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() - await recordsPage.goto(name) + await morePage.resolver.click() + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() - await expect(page.getByTestId('text-amount')).toHaveText('3 Records') + await recordsPage.goto(name) await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') - await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') - await expect(page.getByTestId('address-amount')).toHaveText('3 Records') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( createAccounts().getAddress('user'), ) + await page.pause() await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', ) await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', ) - await expect(recordsPage.getRecordValue('contentHash')).toHaveText(DEFAULT_RECORDS.contentHash!) + await expect(recordsPage.getRecordValue('contentHash')).toHaveText( + 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + ) await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') }) - test('should be able to reset the profile when the current and latest resolver are not in sync', async ({ + test('should be able to reset latest resolver on migration', async ({ page, login, - accounts, makeName, + accounts, makePageObject, }) => { const name = await makeName({ - label: 'unwrapped', + label: 'outdated-resolver', type: 'legacy', owner: 'user', - resolver: oldResolver, + resolver: outdatedResolver, records: await makeRecords(), }) - // Add records to latest resolver await generateRecords({ accounts })({ name, owner: 'user', - resolver: newResolver, - records: await makeRecords({ - texts: [{ key: 'description', value: 'New profile' }], - coins: [{ coin: 'eth', value: createAccounts().getAddress('user2') }], - contentHash: 'bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162', - abi: await encodeAbi({ encodeAs: 'cbor', data: { test2: 'test2' } }), - }), + resolver: latestResolver, + records: await makeRecords(), }) - const morePage = makePageObject('MorePage') - const recordsPage = makePageObject('RecordsPage') const profilePage = makePageObject('ProfilePage') const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') + const recordsPage = makePageObject('RecordsPage') + await profilePage.goto(name) + await login.connect() + + await profilePage.editProfileButton.click() + await page.pause() + await expect(profilePage.profileEditor.locator('text=Resolver out of date')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('Switch to latest resolver', async () => { + await page.getByTestId('migrate-profile-selector-reset').click() + await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-current')).not.toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await expect(page.getByText('Reset profile')).toBeVisible() + await page.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() await morePage.goto(name) - await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + await morePage.resolver.click() + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() + + await recordsPage.goto(name) + await expect(recordsPage.getRecordButton('text', 'email')).not.toBeVisible() + await expect(recordsPage.getRecordButton('text', 'url')).not.toBeVisible() + await expect(recordsPage.getRecordButton('text', 'description')).not.toBeVisible() + await expect(recordsPage.getRecordButton('address', 'eth')).not.toBeVisible() + await expect(recordsPage.getRecordButton('address', 'btc')).not.toBeVisible() + await expect(recordsPage.getRecordButton('address', 'etcLegacy')).not.toBeVisible() + await expect(recordsPage.getRecordButton('contentHash')).not.toBeVisible() + await expect(recordsPage.getRecordButton('abi')).not.toBeVisible() + }) +}) + +test.describe('custom outdated resolver', () => { + // Manager app will mark this as an authorised resolver because it will fail the isAuthorised check. Technically a bug since it not accurately descriptive, + // but low priority since it is a very niche case. + test('should force a name with an outdated resolver to upgrade', async ({ + login, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'custom-outdated-resolver', + type: 'legacy', + owner: 'user', + resolver: customOutdatedResolver, + }) + + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') await profilePage.goto(name) - await profilePage.editProfileButton.click() - await expect(page.getByText('Resolver out of sync')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await login.connect() - await page.getByTestId('migrate-profile-selector-reset').check() - await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await profilePage.editProfileButton.click() + await expect(profilePage.profileEditor.locator('text=Unauthorised resolver')).toBeVisible() - await expect(page.getByText('Reset profile')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() - await recordsPage.goto(name) + await morePage.resolver.click() + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() + }) +}) - await expect(page.getByTestId('text-amount')).toHaveText('0 Records') - await expect(page.getByTestId('address-amount')).toHaveText('0 Records') - await expect(page.getByText('No Content Hash')).toBeVisible() - await expect(page.getByText('No ABI')).toBeVisible() +test.describe('legacy registryy', () => { + test('should force a name on the old registry to go to update registry', async ({ + page, + login, + makePageObject, + }) => { + await page.goto('/legacy.test') + + await login.connect('user2') + + const profilePage = makePageObject('ProfilePage') + await profilePage.editProfileButton.click() + + await page.pause() + await expect(page.getByText('Registry out of date')).toBeVisible() + await expect(page.getByTestId('warning-overlay-next-button')).toHaveAttribute( + 'href', + `https://legacy.ens.domains/name/legacy.test`, + ) }) +}) - test('old resolver', async ({ page, login, accounts, makeName, makePageObject }) => { +test.describe('no resolver', () => { + test('should force a name without a resolver to update their resolver', async ({ + page, + login, + makeName, + makePageObject, + }) => { const name = await makeName({ label: 'unwrapped', type: 'legacy', owner: 'user', - resolver: customResolver, - records: await makeRecords(), + // resolver: '0x70997970C51812dc3A010C7d01b50e0d17dc79C8', + subnames: [ + { + label: 'test', + owner: 'user', + resolver: emptyAddress, + }, + ], }) + const subname = `test.${name}` - // Add records to latest resolver - await generateRecords({ accounts })({ - name, - owner: 'user', - resolver: newResolver, - records: await makeRecords({ - texts: [{ key: 'description', value: 'New profile' }], - coins: [{ coin: 'eth', value: createAccounts().getAddress('user2') }], - contentHash: 'bzz://d1de9994b4d039f6548d191eb26786769f580809256b4685ef316805265ea162', - abi: await encodeAbi({ encodeAs: 'cbor', data: { test2: 'test2' } }), - }), + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const morePage = makePageObject('MorePage') + + await profilePage.goto(subname) + await login.connect() + + await profilePage.editProfileButton.click() + await page.pause() + await expect(profilePage.profileEditor.locator('text=No resolver set')).toBeVisible() + + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await transactionModal.autoComplete() + + await morePage.goto(subname) + + await morePage.resolver.click() + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() + }) +}) + +test.describe('unauthorised resolver', () => { + test('should force a name with an unauthorised resolver to update their resolver', async ({ + login, + page, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'unwrapped', + type: 'legacy', + owner: 'user2', + resolver: ownedResolverAddress as Address, + records: await makeRecords(), }) const morePage = makePageObject('MorePage') - const recordsPage = makePageObject('RecordsPage') const profilePage = makePageObject('ProfilePage') const transactionModal = makePageObject('TransactionModal') await morePage.goto(name) - await login.connect() + await login.connect('user2') - // await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + await expect(morePage.resolver.getByText(ownedResolverAddress)).toBeVisible() await profilePage.goto(name) await profilePage.editProfileButton.click() await page.pause() - - await expect(page.getByText('Resolver out of sync')).toBeVisible() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - - await page.getByTestId('migrate-profile-selector-reset').check() - await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() - await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - - await expect(page.getByText('Reset profile')).toBeVisible() + await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver.getByText(newResolver)).toBeVisible() - - await recordsPage.goto(name) - - await expect(page.getByTestId('text-amount')).toHaveText('0 Records') - await expect(page.getByTestId('address-amount')).toHaveText('0 Records') - await expect(page.getByText('No Content Hash')).toBeVisible() - await expect(page.getByText('No ABI')).toBeVisible() + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() }) }) -test.describe('unwrapped', () => { - test('should be able to add/update profile records without migration', async ({ +test.describe('invalid resolver', () => { + test('should force a name with an invalid resolver to update their resolver', async ({ login, + page, makeName, makePageObject, }) => { - test.slow() const name = await makeName({ label: 'unwrapped', type: 'legacy', - resolver: oldResolver, + owner: 'user', + resolver: invalidResolverAddress as Address, records: await makeRecords(), }) const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') - const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') await morePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + await expect(morePage.resolver.getByText(invalidResolverAddress)).toBeVisible() await profilePage.goto(name) - await expect(profilePage.record('text', 'description')).toHaveText('Hello2') - await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') - await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') - await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') - await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') - await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') - await profilePage.editProfileButton.click() + await page.pause() + await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() + await transactionModal.autoComplete() - // Update records - await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) - await profilePage.profileEditorInput('description').fill('new name') + await morePage.goto(name) + await expect(morePage.resolver.getByText(latestResolver)).toBeVisible() + }) +}) - // Add records - await profilePage.profileEditorAddInputs(['location', 'bnb']) - await profilePage.profileEditorInput('location').fill('L1 chain') - await profilePage.profileEditorInput('bnb').fill('bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl') +test.describe('wrapped name with legacy resolver', () => { + test('should force a wrapped name (with no profile) with a resolver that is not name wrapper aware to migrate update their resolver', async ({ + login, + page, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'wrapped', + resolver: legacyResolver, + }) - await profilePage.profileEditor.getByTestId('profile-submit-button').click() + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + + await morePage.goto(name) + await login.connect() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + await page.pause() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver).toHaveText(oldResolver) - - await recordsPage.goto(name) - await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') - await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('new name') - await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') - await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( - createAccounts().getAddress('user2'), - ) - await expect(recordsPage.getRecordValue('address', 'bnb')).toHaveText( - 'bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl', - ) - await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(morePage.resolver).toHaveText(latestResolver) }) - test('should be able to delete profile records without migration', async ({ - page, + test('should force a wrapped name (with a profile on latest resolver) with a resolver that is not name wrapper aware to migrate update their resolver', async ({ login, + page, makeName, makePageObject, + accounts, }) => { - test.slow() const name = await makeName({ - label: 'unwrapped', - type: 'legacy', - resolver: oldResolver, + label: 'wrapped', + type: 'wrapped', + resolver: legacyResolver, + }) + + // Add records to latest resolver + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, records: await makeRecords(), }) @@ -899,178 +1079,181 @@ test.describe('unwrapped', () => { await morePage.goto(name) await login.connect() - await expect(morePage.resolver.getByText(oldResolver)).toBeVisible() + await expect(morePage.resolver).toHaveText(legacyResolver) await profilePage.goto(name) - await expect(profilePage.record('text', 'description')).toHaveText('Hello2') - await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') - await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') - await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') - await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') - await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') - await profilePage.editProfileButton.click() + await page.pause() - await profilePage.profileEditor.getByTestId('warning-overlay-skip-button').click() - - // Delete records - await profilePage.profileEditorClearButton('description').click() - await profilePage.profileEditorClearButton('url').click() - await profilePage.profileEditorClearButton('email').click() - await profilePage.profileEditorInput('eth').fill('') - await expect(await profilePage.profileEditorInput('eth')).toHaveAttribute( - 'placeholder', - '0xb8c2C2...', - ) - await profilePage.profileEditorClearButton('eth').click() - await profilePage.profileEditorInput('btc').fill('') - await expect(await profilePage.profileEditorInput('btc')).toHaveAttribute( - 'placeholder', - '3FZbgi29...', - ) - await profilePage.profileEditorClearButton('btc').click() - await profilePage.profileEditorInput('etcLegacy').fill('') - await expect(await profilePage.profileEditorInput('etcLegacy')).toHaveAttribute( - 'placeholder', - 'Add address here', - ) - await profilePage.profileEditorClearButton('etcLegacy').click() - await profilePage.profileEditorClearButton('ipfs').click() - await profilePage.profileEditorClearButton('abi').click() + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await profilePage.profileEditor.getByTestId('profile-submit-button').click() + await test.step('Migrate profile', async () => { + await expect(page.getByTestId('migrate-profile-selector-latest')).toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).toBeVisible() + await expect(page.getByTestId('migrate-profile-selector-current')).not.toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) await transactionModal.autoComplete() await morePage.goto(name) - await expect(morePage.resolver).toHaveText(oldResolver) + await expect(morePage.resolver).toHaveText(latestResolver) await recordsPage.goto(name) - await expect(page.getByTestId('text-amount')).toHaveText('0 Records') - await expect(page.getByTestId('address-amount')).toHaveText('0 Records') - await expect(page.getByText('No Content Hash')).toBeVisible() - await expect(page.getByText('No ABI')).toBeVisible() + await page.pause() + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user'), + ) + await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( + 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', + ) + await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( + '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', + ) + await expect(recordsPage.getRecordValue('contentHash')).toHaveText( + 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + ) + await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') }) -}) -test.describe('wrapped', () => { - test('should be able to add/update profile records without migration', async ({ + test('should be able to reset their profile during migration for a wrapped name with a profile on latest resolver', async ({ login, + page, makeName, makePageObject, + accounts, }) => { - test.slow() const name = await makeName({ label: 'wrapped', type: 'wrapped', + resolver: legacyResolver, + }) + + // Add records to latest resolver + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, records: await makeRecords(), }) + const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') - await profilePage.goto(name) + await morePage.goto(name) await login.connect() - await expect(profilePage.record('text', 'description')).toHaveText('Hello2') - await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') - await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') - await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') - await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') - await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(morePage.resolver).toHaveText(legacyResolver) + await profilePage.goto(name) await profilePage.editProfileButton.click() + await page.pause() - // Update records - await profilePage.profileEditorInput('eth').fill(createAccounts().getAddress('user2')) - await profilePage.profileEditorInput('description').fill('new name') - - // Add records - await profilePage.profileEditorAddInputs(['location', 'bnb']) - await profilePage.profileEditorInput('location').fill('L1 chain') - await profilePage.profileEditorInput('bnb').fill('bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl') + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await profilePage.profileEditor.getByTestId('profile-submit-button').click() + await test.step('Migrate profile', async () => { + await page.getByTestId('migrate-profile-selector-reset').check() + await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-current')).not.toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await expect(page.getByText('Reset profile')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) await transactionModal.autoComplete() + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + await recordsPage.goto(name) - await expect(recordsPage.getRecordValue('text', 'location')).toHaveText('L1 chain') - await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('new name') - await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') - await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( - createAccounts().getAddress('user2'), - ) - await expect(recordsPage.getRecordValue('address', 'bnb')).toHaveText( - 'bnb1g5p04snezgpky203fq6da9qyjsy2k9kzr5yuhl', - ) - await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await page.pause() + await expect(recordsPage.getRecordButton('text', 'email')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'url')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'description')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'eth')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'btc')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'etcLegacy')).toHaveCount(0) + await expect(recordsPage.getRecordButton('contentHash')).toHaveCount(0) + await expect(recordsPage.getRecordButton('abi')).toHaveCount(0) }) - test('should be able to delete profile records without migration', async ({ - page, + test('should force a wrapped name (with a profile on currenct resolver) with a resolver that is not name wrapper aware to migrate update their resolver', async ({ login, + page, makeName, makePageObject, }) => { - test.slow() const name = await makeName({ label: 'wrapped', - type: 'wrapped', + type: 'legacy', records: await makeRecords(), }) + const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') - const recordsPage = makePageObject('RecordsPage') const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') - await profilePage.goto(name) + await morePage.goto(name) await login.connect() - await expect(profilePage.record('text', 'description')).toHaveText('Hello2') - await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') - await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') - await expect(profilePage.record('address', 'btc')).toHaveText('bc1qj...pwa6n') - await expect(profilePage.record('address', 'etcLegacy')).toHaveText('etcLegacy0x3C4...293BC') - await expect(profilePage.record('text', 'email')).toHaveText('fakeemail@fake.com') + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) await profilePage.editProfileButton.click() - // Delete records - await profilePage.profileEditorClearButton('description').click() - await profilePage.profileEditorClearButton('url').click() - await profilePage.profileEditorClearButton('email').click() - await profilePage.profileEditorInput('eth').fill('') - await expect(await profilePage.profileEditorInput('eth')).toHaveAttribute( - 'placeholder', - '0xb8c2C2...', - ) - await profilePage.profileEditorClearButton('eth').click() - await profilePage.profileEditorInput('btc').fill('') - await expect(await profilePage.profileEditorInput('btc')).toHaveAttribute( - 'placeholder', - '3FZbgi29...', - ) - await profilePage.profileEditorClearButton('btc').click() - await profilePage.profileEditorInput('etcLegacy').fill('') - await expect(await profilePage.profileEditorInput('etcLegacy')).toHaveAttribute( - 'placeholder', - 'Add address here', - ) - await profilePage.profileEditorClearButton('etcLegacy').click() - await profilePage.profileEditorClearButton('ipfs').click() - await profilePage.profileEditorClearButton('abi').click() + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() - await profilePage.profileEditor.getByTestId('profile-submit-button').click() + await test.step('Migrate profile', async () => { + await page.getByTestId('migrate-profile-selector-current').check() + await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).not.toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-current')).toBeChecked() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await expect(page.getByText('Migrate profile')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) await transactionModal.autoComplete() + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + await recordsPage.goto(name) - await expect(page.getByTestId('text-amount')).toHaveText('0 Records') - await expect(page.getByTestId('address-amount')).toHaveText('0 Records') - await expect(page.getByText('No Content Hash')).toBeVisible() - await expect(page.getByText('No ABI')).toBeVisible() + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user'), + ) + await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( + 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', + ) + await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( + '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', + ) + await expect(recordsPage.getRecordValue('contentHash')).toHaveText( + 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + ) + await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') }) }) @@ -1104,83 +1287,85 @@ test.describe('subgraph errors', () => { }) }) -test('Should show edit profile button if user is manager', async ({ - login, - makeName, - makePageObject, -}) => { - const name = await makeName({ - label: 'unwrapped', - type: 'legacy', - owner: 'user2', - manager: 'user', - }) - - const profilePage = makePageObject('ProfilePage') +test.describe('edit profile button states', () => { + test('Should show edit profile button if user is manager', async ({ + login, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'unwrapped', + type: 'legacy', + owner: 'user2', + manager: 'user', + }) - await profilePage.goto(name) - await login.connect() + const profilePage = makePageObject('ProfilePage') - await expect(profilePage.editProfileButton).toBeVisible() -}) + await profilePage.goto(name) + await login.connect() -test('Should show disabled edit profile button if user is owner but not manager', async ({ - page, - login, - makeName, - makePageObject, -}) => { - const name = await makeName({ - label: 'unwrapped', - type: 'legacy', - owner: 'user', - manager: 'user2', + await expect(profilePage.editProfileButton).toBeVisible() }) - const profilePage = makePageObject('ProfilePage') + test('Should show disabled edit profile button if user is owner but not manager', async ({ + page, + login, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'unwrapped', + type: 'legacy', + owner: 'user', + manager: 'user2', + }) - await profilePage.goto(name) - await login.connect() + const profilePage = makePageObject('ProfilePage') - await expect(page.getByTestId('disabled-profile-action-Edit profile')).toBeVisible() -}) + await profilePage.goto(name) + await login.connect() -test('Should show disabled edit profile button if name is wrapped but use for edit resolver is burned and resolver is unauthorised', async ({ - page, - login, - makeName, - makePageObject, -}) => { - const name = await makeName({ - label: 'wrapped', - type: 'wrapped', - owner: 'user', + await expect(page.getByTestId('disabled-profile-action-Edit profile')).toBeVisible() }) - const UNAUTHORISED_RESOLVER = '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750' - const profilePage = makePageObject('ProfilePage') - const morePage = makePageObject('MorePage') - const permissionsPage = makePageObject('PermissionsPage') - const transactionModal = makePageObject('TransactionModal') + test('Should show disabled edit profile button if name is wrapped but use for edit resolver is burned and resolver is unauthorised', async ({ + page, + login, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'wrapped', + owner: 'user', + }) + + const UNAUTHORISED_RESOLVER = '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750' + const profilePage = makePageObject('ProfilePage') + const morePage = makePageObject('MorePage') + const permissionsPage = makePageObject('PermissionsPage') + const transactionModal = makePageObject('TransactionModal') - await profilePage.goto(name) - await login.connect() + await profilePage.goto(name) + await login.connect() - // Set resolver to unauthorized resolver - await morePage.goto(name) - await morePage.editResolverButton.click() - await page.getByTestId('custom-resolver-radio').check() - await page.getByTestId('dogfood').fill(UNAUTHORISED_RESOLVER) - await page.getByTestId('update-button').click() - await transactionModal.autoComplete() + // Set resolver to unauthorized resolver + await morePage.goto(name) + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(UNAUTHORISED_RESOLVER) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() - // Burn CSR fuse - await permissionsPage.goto(name) - await permissionsPage.burnChildPermissions(['CANNOT_UNWRAP', 'CANNOT_SET_RESOLVER'], name) - await transactionModal.autoComplete() + // Burn CSR fuse + await permissionsPage.goto(name) + await permissionsPage.burnChildPermissions(['CANNOT_UNWRAP', 'CANNOT_SET_RESOLVER'], name) + await transactionModal.autoComplete() - // Validate that the edit profile button is disabled - await profilePage.goto(name) + // Validate that the edit profile button is disabled + await profilePage.goto(name) - await expect(page.getByTestId('disabled-profile-action-Edit profile')).toBeVisible() + await expect(page.getByTestId('disabled-profile-action-Edit profile')).toBeVisible() + }) }) diff --git a/playwright/fixtures/makeName/generators/wrappedNameGenerator.ts b/playwright/fixtures/makeName/generators/wrappedNameGenerator.ts index 0d9ff76ab..3a1bd7b78 100644 --- a/playwright/fixtures/makeName/generators/wrappedNameGenerator.ts +++ b/playwright/fixtures/makeName/generators/wrappedNameGenerator.ts @@ -177,6 +177,13 @@ export const makeWrappedNameGenerator = ({ accounts }: Dependencies) => ({ account: ownerAddress as `0x${string}`, }) await waitForTransaction(resolverTx) + + if (records) await generateRecords({ accounts })({ + name, + owner, + resolver: resolver as `0x${string}`, + records, + }) } if (childFuses) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 51859ab5b..a09756da6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -430,84 +430,6 @@ importers: specifier: ^1.0.0-pre.53 version: 1.0.0-pre.53 - .yalc/@ensdomains/ens-test-env: - dependencies: - '@ethersproject/wallet': - specifier: ^5.6.0 - version: 5.7.0 - ansi-colors: - specifier: ^4.1.1 - version: 4.1.3 - cli-progress: - specifier: ^3.10.0 - version: 3.12.0 - commander: - specifier: ^9.3.0 - version: 9.5.0 - concurrently: - specifier: ^7.1.0 - version: 7.6.0 - docker-compose: - specifier: ^0.24.7 - version: 0.24.8 - dotenv: - specifier: ^16.0.1 - version: 16.4.5 - js-yaml: - specifier: ^4.1.0 - version: 4.1.0 - lz4: - specifier: ^0.6.5 - version: 0.6.5 - progress-stream: - specifier: ^2.0.0 - version: 2.0.0 - tar-fs: - specifier: ^2.1.1 - version: 2.1.1 - viem: - specifier: ^2.21.37 - version: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - wait-on: - specifier: ^6.0.1 - version: 6.0.1 - - .yalc/@ensdomains/ensjs: - dependencies: - '@adraffy/ens-normalize': - specifier: 1.10.1 - version: 1.10.1 - '@ensdomains/address-encoder': - specifier: 1.1.1 - version: 1.1.1 - '@ensdomains/content-hash': - specifier: 3.1.0-rc.1 - version: 3.1.0-rc.1 - '@ensdomains/dnsprovejs': - specifier: ^0.5.1 - version: 0.5.1 - abitype: - specifier: ^1.0.0 - version: 1.0.6(typescript@5.4.5)(zod@3.23.8) - dns-packet: - specifier: ^5.3.1 - version: 5.6.1 - graphql: - specifier: ^16.3.0 - version: 16.8.1 - graphql-request: - specifier: 6.1.0 - version: 6.1.0(encoding@0.1.13)(graphql@16.8.1) - pako: - specifier: ^2.1.0 - version: 2.1.0 - ts-pattern: - specifier: ^5.4.0 - version: 5.5.0 - viem: - specifier: ^2.9.2 - version: 2.21.40(bufferutil@4.0.8)(typescript@5.4.5)(utf-8-validate@5.0.10)(zod@3.23.8) - packages: '@adobe/css-tools@4.3.3': @@ -9226,6 +9148,7 @@ packages: sudo-prompt@9.2.1: resolution: {integrity: sha512-Mu7R0g4ig9TUuGSxJavny5Rv0egCEtpZRNMrZaYS1vxkiIxGiGUwoezU3LazIQ+KE04hTrTfNPgxU5gzi7F5Pw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. summary@2.1.0: resolution: {integrity: sha512-nMIjMrd5Z2nuB2RZCKJfFMjgS3fygbeyGk9PxPPaJR1RIcyN9yn4A63Isovzm3ZtQuEkLBVgMdPup8UeLH7aQw==} diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx index feff39d41..f7e317589 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx @@ -179,6 +179,9 @@ export const AddProfileRecordView = ({ hasAbiInterface, ]) + const showProfileWarning = + !hasTextInterface || !hasAddressInterface || !hasContenthashInterface || !hasAbiInterface + // Tracks when to skip updating the sidebar while options grid is scrolling const shouldSkipObserverUpdateRef = useRef() const debouncedSetShouldSkipObserverUpdateRef = useDebouncedCallback( @@ -334,9 +337,15 @@ export const AddProfileRecordView = ({
- - Your custom resolver doesn't support all records - + {showProfileWarning && ( + + Your custom resolver doesn't support all records + + )} {filteredOptions.map((option) => { const showLabel = !['address', 'website'].includes(option.group) if (option.items.length === 0 && option.group !== 'other') return null diff --git a/src/components/pages/profile/[name]/tabs/ProfileTab.tsx b/src/components/pages/profile/[name]/tabs/ProfileTab.tsx index 67e98b23f..415c75bbe 100644 --- a/src/components/pages/profile/[name]/tabs/ProfileTab.tsx +++ b/src/components/pages/profile/[name]/tabs/ProfileTab.tsx @@ -60,6 +60,8 @@ const ProfileTab = ({ nameDetails, name }: Props) => { gracePeriodEndDate, } = nameDetails + console.log('profile', profile) + const abilities = useAbilities({ name }) const { data: primaryData } = usePrimaryName({ address }) diff --git a/src/constants/resolverAddressData.ts b/src/constants/resolverAddressData.ts index 151f36e6b..1a7c10f33 100644 --- a/src/constants/resolverAddressData.ts +++ b/src/constants/resolverAddressData.ts @@ -230,13 +230,6 @@ export const KNOWN_RESOLVER_DATA: KnownResolverData = { RESOLVER_INTERFACE_IDS.VersionableResolver, ], }, - { - address: '0xd7a4F6473f32aC2Af804B3686AE8F1932bC35750', - deployer: 'Custom ', - tag: null, - isNameWrapperAware: false, - supportedInterfaces: [], - }, { address: deploymentAddresses.LegacyPublicResolver, deployer: 'ENS Labs', @@ -254,7 +247,7 @@ export const KNOWN_RESOLVER_DATA: KnownResolverData = { ], }, { - address: deploymentAddresses.LegacyResolverV1, + address: deploymentAddresses.OutdatedResolver, deployer: 'ENS Labs', tag: 'outdated', isNameWrapperAware: false, @@ -277,7 +270,7 @@ export const getKnownResolverData = ({ chainId: number resolverAddress: string }): KnownResolverItem | undefined => { - console.log(KNOWN_RESOLVER_DATA[chainId]) + console.log('getKnownResolverData', KNOWN_RESOLVER_DATA[chainId], resolverAddress, chainId) return KNOWN_RESOLVER_DATA[chainId]?.find( (data) => data.address?.toLowerCase() === resolverAddress?.toLowerCase(), ) diff --git a/src/hooks/resolver/useResolverIsAuthorised.ts b/src/hooks/resolver/useResolverIsAuthorised.ts index 8747d2749..57344973b 100644 --- a/src/hooks/resolver/useResolverIsAuthorised.ts +++ b/src/hooks/resolver/useResolverIsAuthorised.ts @@ -70,6 +70,8 @@ export const useResolverIsAuthorised = ({ }, }) + console.log('estimateGasQuery', estimateGasQuery, name, resolverAddress, connector.data?.account) + const { data: estimateGasData, isLoading: isEstimateGasLoading, diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 0fcc1e9e1..006af41e4 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -34,7 +34,6 @@ import TransactionLoader from '@app/transaction-flow/TransactionLoader' import type { TransactionDialogPassthrough } from '@app/transaction-flow/types' import { useProfileEditorReducer } from './hooks/useProfileEditorReducer' -import type { View } from './hooks/useProfileEditorReducer' // import { getResolverWrapperAwareness } from '@app/utils/utils' import ResolverWarningOverlay from './ResolverWarningOverlay' @@ -75,6 +74,18 @@ const ButtonWrapper = styled.div(({ theme }) => [ `), ]) +const CloseButtonBlocker = styled.div( + ({ theme }) => css` + position: absolute; + top: 0; + right: 0; + background: ${theme.colors.backgroundPrimary}; + width: ${theme.space['12']}; + height: ${theme.space['12']}; + z-index: 1000; + `, +) + type Data = { name?: string resumable?: boolean @@ -210,7 +221,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr }) const [hasTextInterface, hasAddressInterface, hasAbiInterface, hasContenthashInterface] = interfacesData || [] - console.log(interfacesData) + console.log('interfacesData', interfacesData) // const chainId = useChainId() @@ -252,15 +263,31 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr } }, [shouldShowResolverWarning]) + const isLoading_ = isLoading || resolverStatus.isLoading + const [editorState, editorDispatch] = useProfileEditorReducer( + { + profile, + resolverStatus: resolverStatus.data, + isWrapped, + isLoading: isLoading_, + }, + { + onDismiss, + }, + ) + const view_ = editorState.stack[editorState.stack.length - 1] + const handleDeleteRecord = (record: ProfileRecord, index: number) => { removeRecordAtIndex(index) process.nextTick(() => trigger()) } const handleShowAddRecordModal = () => { - setView('addRecord') + editorDispatch({ type: 'pushView', payload: 'addRecord' }) } + console.log('view', view) + const handleUpdateResolver = () => { dispatch({ name: 'setTransactions', @@ -364,19 +391,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr console.log('canEditRecordsWhenWrapped', canEditRecordsWhenWrapped) console.log('resolverStatus', resolverStatus.isLoading) - const isLoading_ = isLoading || resolverStatus.isLoading - const [editorState, editorDispatch] = useProfileEditorReducer( - { - profile, - resolverStatus: resolverStatus.data, - isWrapped, - isLoading: isLoading_, - }, - { - onDismiss, - }, - ) - const view_ = editorState.stack[editorState.stack.length - 1] + console.log('editorState', view_) const shouldInitializeEditorState = !isLoading_ && view_ === 'loading' @@ -398,6 +413,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr return ( <> + {match(view_) .with('loading', () => ) .with('editor', () => ( @@ -412,12 +428,15 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr })} alwaysShowDividers={{ bottom: true }} > + {view_} setView(option)} + onSelectOption={(option) => { + editorDispatch({ type: 'pushView', payload: option }) + }} onAvatarChange={(avatar) => setAvatar(avatar)} onAvatarFileChange={(file) => setAvatarFile(file)} onAvatarSrcChange={(src) => setAvatarSrc(src)} @@ -529,9 +548,9 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr hasContenthashInterface={hasContenthashInterface} onAdd={(newRecords) => { addRecords(newRecords) - setView('editor') + editorDispatch({ type: 'popView' }) }} - onClose={() => setView('editor')} + onClose={() => editorDispatch({ type: 'popView' })} /> )) .with('warning', () => ( @@ -554,19 +573,19 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr setView('editor')} + handleCancel={() => editorDispatch({ type: 'popView' })} type={type} handleSubmit={(_, uri, display) => { setAvatar(uri) setAvatarSrc(display) - setView('editor') + editorDispatch({ type: 'popView' }) trigger() }} /> )) .with('migrateRegistry', () => ) .with('invalidResolver', () => ( - {}} onCancel={onDismiss} /> + handleUpdateResolver()} onCancel={onDismiss} /> )) .with('migrateProfileSelector', () => ( {}} - onBack={() => {}} - onNext={() => {}} + onBack={() => { + editorDispatch({ type: 'popView' }) + }} + onNext={(selectedProfile) => { + if (selectedProfile === 'latest') handleUpdateResolver() + else if (selectedProfile === 'current') + editorDispatch({ type: 'pushView', payload: 'migrateProfileWarningView' }) + else editorDispatch({ type: 'pushView', payload: 'resetProfile' }) + }} /> )) .with('migrateProfileWarningView', () => ( @@ -585,7 +609,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr onBack={() => { editorDispatch({ type: 'popView' }) }} - onNext={() => {}} + onNext={() => handleMigrateCurrentProfileToLatest()} /> )) .with('noResolver', () => ( @@ -593,7 +617,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr onCancel={() => { editorDispatch({ type: 'popView' }) }} - onConfirm={() => {}} + onConfirm={() => handleUpdateResolver()} /> )) .with('resetProfile', () => ( @@ -601,7 +625,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr onBack={() => { editorDispatch({ type: 'popView' }) }} - onNext={() => {}} + onNext={() => handleResetProfile()} /> )) .with('resolverNotNameWrapperAware', () => ( @@ -610,7 +634,11 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr hasProfile={resolverStatus.data?.hasProfile!} onChangeSelected={() => {}} onCancel={onDismiss} - onNext={() => {}} + onNext={() => { + if (resolverStatus.data?.hasProfile || resolverStatus.data?.hasMigratedProfile) + editorDispatch({ type: 'pushView', payload: 'migrateProfileSelector' }) + else handleUpdateResolver() + }} /> )) .with('resolverOutOfDate', () => ( @@ -619,7 +647,13 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr editorDispatch({ type: 'popView' }) }} onConfirm={() => { - if (resolverStatus.data?.hasProfile) + console.log( + 'resolverStatus.data?.hasMigratedProfile', + resolverStatus.data?.hasMigratedProfile, + ) + if (resolverStatus.data?.hasMigratedProfile) + editorDispatch({ type: 'pushView', payload: 'migrateProfileSelector' }) + else if (resolverStatus.data?.hasProfile) editorDispatch({ type: 'pushView', payload: 'transferOrResetProfile' }) else handleUpdateResolver() }} diff --git a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts index 577ba3ca4..b8e1b0247 100644 --- a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts +++ b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts @@ -16,6 +16,9 @@ export type View = | 'resolverOutOfDate' | 'transferOrResetProfile' | 'invalidResolver' + | 'migrateProfileSelector' + | 'migrateProfileWarning' + | 'resetProfile' type State = { stack: View[] @@ -54,10 +57,6 @@ const initializer = }, () => ({ ...defaultState, stack: ['migrateRegistry'] as View[] }), ) - .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ - ...defaultState, - stack: ['resolverOutOfDate'] as View[], - })) .with({ resolverStatus: { hasResolver: false } }, () => ({ ...defaultState, stack: ['noResolver'] as View[], @@ -66,6 +65,10 @@ const initializer = ...defaultState, stack: ['resolverNotNameWrapperAware'] as View[], })) + .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ + ...defaultState, + stack: ['resolverOutOfDate'] as View[], + })) .with( { resolverStatus: { hasValidResolver: false } }, { diff --git a/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx b/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx index 1d34500a3..9d13e97de 100644 --- a/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx @@ -1,3 +1,4 @@ +import { useState } from 'react' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { Address } from 'viem' @@ -38,9 +39,7 @@ type Props = { currentResolverAddress: Address latestResolverAddress: Address hasCurrentProfile: boolean - selected: SelectedProfile - onChangeSelected: (selected: SelectedProfile) => void - onNext: () => void + onNext: (selectedProfile: SelectedProfile) => void onBack: () => void } export const MigrateProfileSelectorView = ({ @@ -48,12 +47,11 @@ export const MigrateProfileSelectorView = ({ currentResolverAddress, latestResolverAddress, hasCurrentProfile, - selected, - onChangeSelected, onNext, onBack, }: Props) => { const { t } = useTranslation('transactionFlow') + const [selectedProfile, setSelectedProfile] = useState('latest') return ( <> onChangeSelected('latest')} + checked={selectedProfile === 'latest'} + onChange={() => setSelectedProfile('latest')} /> {hasCurrentProfile && ( onChangeSelected('current')} + checked={selectedProfile === 'current'} + onChange={() => setSelectedProfile('current')} /> )} onChangeSelected('reset')} + checked={selectedProfile === 'reset'} + onChange={() => setSelectedProfile('reset')} /> @@ -134,7 +132,7 @@ export const MigrateProfileSelectorView = ({ } trailing={ - } diff --git a/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx b/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx index 0b2c6fdbf..ccfe3aec9 100644 --- a/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx @@ -40,16 +40,19 @@ export const ResolverNotNameWrapperAwareView = ({ {t('input.profileEditor.warningOverlay.action.learnMoreResolvers')} - {hasProfile && ( - onChangeSelected(e.target.checked ? 'latest' : 'reset')} - /> - )} + {/* {hasProfile || + (true && ( + onChangeSelected(e.target.checked ? 'latest' : 'reset')} + /> + ))} */} void From 55829107b8bb4d4ef7850cf8c615248fc92c7430 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 02:21:12 +0800 Subject: [PATCH 09/22] finish linking up profile editor migration hooks and add tests --- e2e/specs/stateless/profileEditor.spec.ts | 470 +++++++++++++++++- .../steps/Profile/AddProfileRecordView.tsx | 2 +- src/constants/profileRecordOptions.ts | 5 +- src/hooks/resolver/useResolver.ts | 18 +- .../ProfileEditor/ProfileEditor-flow.tsx | 109 ++-- .../ProfileEditor/ResolverWarningOverlay.tsx | 275 ---------- .../hooks/useProfileEditorReducer.ts | 125 +++-- .../input/ProfileEditor/types.ts | 1 + .../views/MigrateProfileSelectorView.tsx.tsx | 2 +- .../views/ResolverNotNameWrapperAwareView.tsx | 26 +- .../views/ResolverOutOfDateView.tsx | 4 +- .../views/TransferOrResetProfileView.tsx | 2 +- .../UpdateResolverOrResetProfileView.tsx | 24 +- 13 files changed, 589 insertions(+), 474 deletions(-) delete mode 100644 src/transaction-flow/input/ProfileEditor/ResolverWarningOverlay.tsx create mode 100644 src/transaction-flow/input/ProfileEditor/types.ts diff --git a/e2e/specs/stateless/profileEditor.spec.ts b/e2e/specs/stateless/profileEditor.spec.ts index b3549aaee..c7319bf55 100644 --- a/e2e/specs/stateless/profileEditor.spec.ts +++ b/e2e/specs/stateless/profileEditor.spec.ts @@ -1185,7 +1185,7 @@ test.describe('wrapped name with legacy resolver', () => { await expect(recordsPage.getRecordButton('abi')).toHaveCount(0) }) - test('should force a wrapped name (with a profile on currenct resolver) with a resolver that is not name wrapper aware to migrate update their resolver', async ({ + test('should be able to transfer profile when only current resolver has a profile', async ({ login, page, makeName, @@ -1223,6 +1223,310 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { + await page.pause() + await expect( + page.getByText( + 'You can transfer your current profile to the new resolver before updating your resolver.', + ), + ).toBeVisible() + await page.getByTestId('detailed-switch').getByRole('checkbox').check() + await page.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user'), + ) + await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( + 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', + ) + await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( + '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', + ) + await expect(recordsPage.getRecordValue('contentHash')).toHaveText( + 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + ) + await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') + }) + + test('should be able to update resolver when only current resolver has a profile', async ({ + login, + page, + makeName, + makePageObject, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'legacy', + records: await makeRecords(), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') + + await morePage.goto(name) + await login.connect() + + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('update resolver', async () => { + await page.pause() + await expect( + page.getByText( + 'You can transfer your current profile to the new resolver before updating your resolver.', + ), + ).toBeVisible() + await page.getByTestId('detailed-switch').getByRole('checkbox').uncheck() + await page.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordButton('text', 'email')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'url')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'description')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'eth')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'btc')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'etcLegacy')).toHaveCount(0) + await expect(recordsPage.getRecordButton('contentHash')).toHaveCount(0) + await expect(recordsPage.getRecordButton('abi')).toHaveCount(0) + }) + + test('should be able to only update resolver if records on current and latest resolver are equal', async ({ + login, + page, + makeName, + makePageObject, + accounts, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'legacy', + records: await makeRecords(), + }) + + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, + records: await makeRecords(), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') + + await morePage.goto(name) + await login.connect() + + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('Migrate profile', async () => { + await page.pause() + await expect( + page.getByText( + 'You can keep your current profile on the new resolver, or reset it and remove all profile records.', + ), + ).toBeVisible() + await page.getByTestId('detailed-switch').getByRole('checkbox').check() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user'), + ) + await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( + 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', + ) + await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( + '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', + ) + await expect(recordsPage.getRecordValue('contentHash')).toHaveText( + 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + ) + await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') + }) + + test('should be able to reset resolver if records on current and latest resolver are equal', async ({ + login, + page, + makeName, + makePageObject, + accounts, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'legacy', + records: await makeRecords(), + }) + + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, + records: await makeRecords(), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') + + await morePage.goto(name) + await login.connect() + + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('Migrate profile', async () => { + await page.pause() + await expect( + page.getByText( + 'You can keep your current profile on the new resolver, or reset it and remove all profile records.', + ), + ).toBeVisible() + await page.getByTestId('detailed-switch').getByRole('checkbox').uncheck() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordButton('text', 'email')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'url')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'description')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'eth')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'btc')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'etcLegacy')).toHaveCount(0) + await expect(recordsPage.getRecordButton('contentHash')).toHaveCount(0) + await expect(recordsPage.getRecordButton('abi')).toHaveCount(0) + }) + + test('should be able to migrate current profile if records on current and latest resolver are NOT equal', async ({ + login, + page, + makeName, + makePageObject, + accounts, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'legacy', + records: await makeRecords(), + }) + + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, + records: await makeRecords({ + texts: [ + { + key: 'description', + value: 'Do not set me as resolver', + }, + ], + }), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') + + await morePage.goto(name) + await login.connect() + + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('Migrate profile', async () => { + await page.pause() await page.getByTestId('migrate-profile-selector-current').check() await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() await expect(page.getByTestId('migrate-profile-selector-reset')).not.toBeChecked() @@ -1255,6 +1559,170 @@ test.describe('wrapped name with legacy resolver', () => { ) await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') }) + + test('should be able to update resolver if records on current and latest resolver are NOT equal', async ({ + login, + page, + makeName, + makePageObject, + accounts, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'legacy', + records: await makeRecords({ + texts: [ + { + key: 'description', + value: 'Do not set me as resolver', + }, + ], + }), + }) + + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, + records: await makeRecords(), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') + + await morePage.goto(name) + await login.connect() + + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('Migrate profile', async () => { + await page.pause() + await page.getByTestId('migrate-profile-selector-latest').check() + await expect(page.getByTestId('migrate-profile-selector-latest')).toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).not.toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-current')).not.toBeChecked() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') + await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') + await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') + await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( + createAccounts().getAddress('user'), + ) + await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( + 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', + ) + await expect(recordsPage.getRecordValue('address', 'etcLegacy')).toHaveText( + '0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC', + ) + await expect(recordsPage.getRecordValue('contentHash')).toHaveText( + 'ipfs://bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y', + ) + await expect(recordsPage.getRecordValue('abi')).toHaveText('{"test":"test"}') + }) + + test('should be able to reset profile if records on current and latest resolver are NOT equal', async ({ + login, + page, + makeName, + makePageObject, + accounts, + }) => { + const name = await makeName({ + label: 'wrapped', + type: 'legacy', + records: await makeRecords({ + texts: [ + { + key: 'description', + value: 'Do not set me as resolver', + }, + ], + }), + }) + + await generateRecords({ accounts })({ + name, + owner: 'user', + resolver: latestResolver, + records: await makeRecords(), + }) + + const morePage = makePageObject('MorePage') + const profilePage = makePageObject('ProfilePage') + const transactionModal = makePageObject('TransactionModal') + const recordsPage = makePageObject('RecordsPage') + + await morePage.goto(name) + await login.connect() + + await morePage.wrapButton.click() + await transactionModal.autoComplete() + + await morePage.editResolverButton.click() + await page.getByTestId('custom-resolver-radio').check() + await page.getByTestId('dogfood').fill(legacyResolver) + await page.getByTestId('update-button').click() + await transactionModal.autoComplete() + + await expect(morePage.resolver).toHaveText(legacyResolver) + + await profilePage.goto(name) + await profilePage.editProfileButton.click() + + await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + + await test.step('Migrate profile', async () => { + await page.pause() + await page.getByTestId('migrate-profile-selector-reset').check() + await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() + await expect(page.getByTestId('migrate-profile-selector-current')).not.toBeChecked() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + await expect(page.getByText('Reset profile')).toBeVisible() + await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() + }) + + await transactionModal.autoComplete() + + await morePage.goto(name) + await expect(morePage.resolver).toHaveText(latestResolver) + + await recordsPage.goto(name) + await expect(recordsPage.getRecordButton('text', 'email')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'url')).toHaveCount(0) + await expect(recordsPage.getRecordButton('text', 'description')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'eth')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'btc')).toHaveCount(0) + await expect(recordsPage.getRecordButton('address', 'etcLegacy')).toHaveCount(0) + await expect(recordsPage.getRecordButton('contentHash')).toHaveCount(0) + await expect(recordsPage.getRecordButton('abi')).toHaveCount(0) + }) }) test.describe('subgraph errors', () => { diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx index f7e317589..b2d5c3e95 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx @@ -343,7 +343,7 @@ export const AddProfileRecordView = ({ alignment="horizontal" data-testid="add-profile-record-resolver-warning" > - Your custom resolver doesn't support all records + Your custom resolver doesn't support all records )} {filteredOptions.map((option) => { diff --git a/src/constants/profileRecordOptions.ts b/src/constants/profileRecordOptions.ts index 06a73c9fc..54646f844 100644 --- a/src/constants/profileRecordOptions.ts +++ b/src/constants/profileRecordOptions.ts @@ -4,10 +4,7 @@ import coinsWithIcons from '@app/constants/coinsWithIcons.json' import coinsWithoutIcons from '@app/constants/coinsWithoutIcons.json' import { supportedContentHashKeys } from '@app/constants/supportedContentHashKeys' import { supportedGeneralRecordKeys } from '@app/constants/supportedGeneralRecordKeys' -import { - getSupportedOtherRecordKeysForInterfaces, - supportedOtherRecordKeys, -} from '@app/constants/supportedOtherRecordKeys' +import { supportedOtherRecordKeys } from '@app/constants/supportedOtherRecordKeys' import { supportedSocialRecordKeys } from '@app/constants/supportedSocialRecordKeys' export type ProfileRecordGroup = diff --git a/src/hooks/resolver/useResolver.ts b/src/hooks/resolver/useResolver.ts index a7c0e030a..7ce8c1588 100644 --- a/src/hooks/resolver/useResolver.ts +++ b/src/hooks/resolver/useResolver.ts @@ -1,28 +1,12 @@ import { Hash } from 'viem' import { useChainId } from 'wagmi' -import { KNOWN_RESOLVER_DATA, KnownResolverItem } from '@app/constants/resolverAddressData' - -import { useResolverHasInterfaces } from '../useResolverHasInterfaces' - -type Resolver = KnownResolverItem +import { KNOWN_RESOLVER_DATA } from '@app/constants/resolverAddressData' export const useResolver = ({ resolverAddress }: { resolverAddress?: Hash }) => { const chainId = useChainId() const knownResolver = KNOWN_RESOLVER_DATA[chainId]?.find((r) => r.address === resolverAddress) - const interfaces = useResolverHasInterfaces({ - resolverAddress: resolverAddress!, - interfaceNames: [ - 'AbiResolver', - 'AddressResolver', - 'MultiCoinAddressResolver', - 'ContentHashResolver', - 'TextResolver', - ], - enabled: !knownResolver && !!resolverAddress, - }) - if (knownResolver) return knownResolver return {} } diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 006af41e4..165fc5750 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -33,10 +33,9 @@ import { createTransactionItem, TransactionItem } from '@app/transaction-flow/tr import TransactionLoader from '@app/transaction-flow/TransactionLoader' import type { TransactionDialogPassthrough } from '@app/transaction-flow/types' -import { useProfileEditorReducer } from './hooks/useProfileEditorReducer' +import { useProfileEditorReducer, View } from './hooks/useProfileEditorReducer' // import { getResolverWrapperAwareness } from '@app/utils/utils' -import ResolverWarningOverlay from './ResolverWarningOverlay' import { InvalidResolverView } from './views/InvalidResolverView' import { MigrateProfileSelectorView } from './views/MigrateProfileSelectorView.tsx' import { MigrateProfileWarningView } from './views/MigrateProfileWarningView' @@ -45,7 +44,6 @@ import { NoResolverView } from './views/NoResolverView' import { ResetProfileView } from './views/ResetProfileView' import { ResolverNotNameWrapperAwareView } from './views/ResolverNotNameWrapperAwareView' import { ResolverOutOfDateView } from './views/ResolverOutOfDateView' -import { ResolverOutOfSyncView } from './views/ResolverOutOfSyncView' import { TransferOrResetProfileView } from './views/TransferOrResetProfileView' import { UpdateResolverOrResetProfileView } from './views/UpdateResolverOrResetProfileView' import { WrappedAvatarButton } from './WrappedAvatarButton' @@ -139,13 +137,21 @@ const SubmitButton = ({ ) } +export const getPayloadForResolverStatus = ( + resolverStatus: ReturnType['data'], +): View | undefined => { + if (resolverStatus?.hasMigratedProfile && !resolverStatus.isMigratedProfileEqual) + return 'updateResolverOrResetProfile' + if (resolverStatus?.hasMigratedProfile) return 'migrateProfileSelector' + if (resolverStatus?.hasProfile) return 'transferOrResetProfile' +} + const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Props) => { const { t } = useTranslation('register') const formRef = useRef(null) - const [view, setView] = useState<'editor' | 'upload' | 'nft' | 'addRecord' | 'warning'>('editor') - const { name = '', resumable = false } = data + const { name = '' } = data const { data: profile, isLoading: isProfileLoading } = useProfile({ name }) const { data: isWrapped = false, isLoading: isWrappedLoading } = useIsWrapped({ name }) @@ -173,7 +179,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr isDirtyForRecordAtIndex, hasErrors, } = useProfileEditorForm(existingRecords) - console.log('profileRecords', profileRecords, 'isLoading', isLoading) // Update profile records if transaction data exists const [isRecordsUpdated, setIsRecordsUpdated] = useState(false) @@ -212,7 +217,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr const resolverStatus = useResolverStatus({ name, }) - console.log('resolverStatus', resolverStatus) const { data: interfacesData } = useResolverHasInterfaces({ resolverAddress: profile?.resolverAddress!, @@ -221,7 +225,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr }) const [hasTextInterface, hasAddressInterface, hasAbiInterface, hasContenthashInterface] = interfacesData || [] - console.log('interfacesData', interfacesData) // const chainId = useChainId() @@ -249,20 +252,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr const [avatarSrc, setAvatarSrc] = useState() const [avatarFile, setAvatarFile] = useState() - const hasOutdatedKnownResolver = - !resolverStatus.isLoading && - !resolverStatus.data?.hasLatestResolver && - !!resolverStatus.data?.isKnownResolver && - transactions.length === 0 - console.log('hasOutdatedKnownResolver', hasOutdatedKnownResolver, resolverStatus) - const hasNotMigratedProfile = !isProfileLoading && profile?.isMigrated === false - const shouldShowResolverWarning = hasOutdatedKnownResolver || hasNotMigratedProfile - useEffect(() => { - if (shouldShowResolverWarning) { - setView('warning') - } - }, [shouldShowResolverWarning]) - const isLoading_ = isLoading || resolverStatus.isLoading const [editorState, editorDispatch] = useProfileEditorReducer( { @@ -286,8 +275,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr editorDispatch({ type: 'pushView', payload: 'addRecord' }) } - console.log('view', view) - const handleUpdateResolver = () => { dispatch({ name: 'setTransactions', @@ -340,7 +327,9 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr intro: { title: ['input.profileEditor.intro.resetProfile.title', { ns: 'transactionFlow' }], content: makeIntroItem('GenericWithDescription', { - description: t('input.profileEditor.intro.resetProfile.description'), + description: t('input.profileEditor.intro.resetProfile.description', { + ns: 'transactionFlow', + }), }), }, transactions: [ @@ -369,7 +358,9 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr { ns: 'transactionFlow' }, ], content: makeIntroItem('GenericWithDescription', { - description: t('input.profileEditor.intro.migrateCurrentProfile.description'), + description: t('input.profileEditor.intro.migrateCurrentProfile.description', { + ns: 'transactionFlow', + }), }), }, transactions: [ @@ -387,12 +378,17 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr }) } - const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized - console.log('canEditRecordsWhenWrapped', canEditRecordsWhenWrapped) - - console.log('resolverStatus', resolverStatus.isLoading) + const handleMigrate = () => { + if (resolverStatus.data?.hasMigratedProfile && resolverStatus.data?.isMigratedProfileEqual) + editorDispatch({ type: 'pushView', payload: 'updateResolverOrResetProfile' }) + else if (resolverStatus.data?.hasMigratedProfile) + editorDispatch({ type: 'pushView', payload: 'migrateProfileSelector' }) + else if (resolverStatus.data?.hasProfile) + editorDispatch({ type: 'pushView', payload: 'transferOrResetProfile' }) + else handleUpdateResolver() + } - console.log('editorState', view_) + const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized const shouldInitializeEditorState = !isLoading_ && view_ === 'loading' useEffect(() => { @@ -553,22 +549,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr onClose={() => editorDispatch({ type: 'popView' })} /> )) - .with('warning', () => ( - dispatch({ name: 'stopFlow' })} - onDismissOverlay={() => setView('editor')} - /> - )) .with('upload', 'nft', (type) => ( { if (selectedProfile === 'latest') handleUpdateResolver() else if (selectedProfile === 'current') - editorDispatch({ type: 'pushView', payload: 'migrateProfileWarningView' }) + editorDispatch({ type: 'pushView', payload: 'migrateProfileWarning' }) else editorDispatch({ type: 'pushView', payload: 'resetProfile' }) }} /> )) - .with('migrateProfileWarningView', () => ( + .with('migrateProfileWarning', () => ( { editorDispatch({ type: 'popView' }) @@ -617,7 +597,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr onCancel={() => { editorDispatch({ type: 'popView' }) }} - onConfirm={() => handleUpdateResolver()} + onConfirm={() => handleMigrate()} /> )) .with('resetProfile', () => ( @@ -630,14 +610,9 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr )) .with('resolverNotNameWrapperAware', () => ( {}} onCancel={onDismiss} onNext={() => { - if (resolverStatus.data?.hasProfile || resolverStatus.data?.hasMigratedProfile) - editorDispatch({ type: 'pushView', payload: 'migrateProfileSelector' }) - else handleUpdateResolver() + handleMigrate() }} /> )) @@ -647,21 +622,10 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr editorDispatch({ type: 'popView' }) }} onConfirm={() => { - console.log( - 'resolverStatus.data?.hasMigratedProfile', - resolverStatus.data?.hasMigratedProfile, - ) - if (resolverStatus.data?.hasMigratedProfile) - editorDispatch({ type: 'pushView', payload: 'migrateProfileSelector' }) - else if (resolverStatus.data?.hasProfile) - editorDispatch({ type: 'pushView', payload: 'transferOrResetProfile' }) - else handleUpdateResolver() + handleMigrate() }} /> )) - .with('resolverOutOfSync', () => ( - {}} onCancel={onDismiss} onNext={() => {}} /> - )) .with('transferOrResetProfile', () => ( { @@ -675,10 +639,11 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr )) .with('updateResolverOrResetProfile', () => ( {}} - onBack={() => {}} - onNext={() => {}} + onBack={() => editorDispatch({ type: 'popView' })} + onNext={(selected) => { + if (selected === 'reset') handleResetProfile() + else handleUpdateResolver() + }} /> )) .exhaustive()} diff --git a/src/transaction-flow/input/ProfileEditor/ResolverWarningOverlay.tsx b/src/transaction-flow/input/ProfileEditor/ResolverWarningOverlay.tsx deleted file mode 100644 index 1684bbf29..000000000 --- a/src/transaction-flow/input/ProfileEditor/ResolverWarningOverlay.tsx +++ /dev/null @@ -1,275 +0,0 @@ -import { useMemo, useState } from 'react' -import { useTranslation } from 'react-i18next' -import { Address } from 'viem' - -import { useResolverStatus } from '@app/hooks/resolver/useResolverStatus' -import { makeIntroItem } from '@app/transaction-flow/intro' -import { createTransactionItem } from '@app/transaction-flow/transaction' -import { TransactionDialogPassthrough } from '@app/transaction-flow/types' - -import { InvalidResolverView } from './views/InvalidResolverView' -import { MigrateProfileSelectorView } from './views/MigrateProfileSelectorView.tsx' -import { MigrateProfileWarningView } from './views/MigrateProfileWarningView' -import { MigrateRegistryView } from './views/MigrateRegistryView' -import { NoResolverView } from './views/NoResolverView' -import { ResetProfileView } from './views/ResetProfileView' -import { ResolverNotNameWrapperAwareView } from './views/ResolverNotNameWrapperAwareView' -import { ResolverOutOfDateView } from './views/ResolverOutOfDateView' -import { ResolverOutOfSyncView } from './views/ResolverOutOfSyncView' -import { TransferOrResetProfileView } from './views/TransferOrResetProfileView' -import { UpdateResolverOrResetProfileView } from './views/UpdateResolverOrResetProfileView' - -export type SelectedProfile = 'latest' | 'current' | 'reset' - -type Props = { - name: string - isWrapped: boolean - resumable?: boolean - hasOldRegistry?: boolean - hasMigratedProfile?: boolean - hasNoResolver?: boolean - latestResolverAddress: Address - oldResolverAddress: Address - status: ReturnType['data'] - onDismissOverlay: () => void -} & TransactionDialogPassthrough - -type View = - | 'invalidResolver' - | 'migrateProfileSelector' - | 'migrateProfileWarning' - | 'migrateRegistry' - | 'noResolver' - | 'resetProfile' - | 'resolverNotNameWrapperAware' - | 'resolverOutOfDate' - | 'resolverOutOfSync' - | 'transferOrResetProfile' - | 'updateResolverOrResetProfile' - -const ResolverWarningOverlay = ({ - name, - status, - isWrapped, - hasOldRegistry = false, - latestResolverAddress, - oldResolverAddress, - dispatch, - onDismiss, - onDismissOverlay, -}: Props) => { - const { t } = useTranslation('transactionFlow') - const [selectedProfile, setSelectedProfile] = useState('latest') - - const flow: View[] = useMemo(() => { - if (hasOldRegistry) return ['migrateRegistry'] - if (!status?.hasResolver) return ['noResolver'] - if (!status?.hasValidResolver) return ['invalidResolver'] - if (!status?.isNameWrapperAware && isWrapped) return ['resolverNotNameWrapperAware'] - if (!status?.isAuthorized) return ['invalidResolver'] - if (status?.hasMigratedProfile && status.isMigratedProfileEqual) - return ['resolverOutOfSync', 'updateResolverOrResetProfile', 'resetProfile'] - if (status?.hasMigratedProfile) - return [ - 'resolverOutOfSync', - 'migrateProfileSelector', - ...(selectedProfile === 'current' - ? (['migrateProfileWarning'] as View[]) - : (['resetProfile'] as View[])), - ] - return ['resolverOutOfDate', 'transferOrResetProfile'] - }, [ - hasOldRegistry, - isWrapped, - status?.hasResolver, - status?.isNameWrapperAware, - status?.hasValidResolver, - status?.isAuthorized, - status?.hasMigratedProfile, - status?.isMigratedProfileEqual, - selectedProfile, - ]) - const [index, setIndex] = useState(0) - const view = flow[index] - - const onIncrement = () => { - if (flow[index + 1]) setIndex(index + 1) - } - - const onDecrement = () => { - if (flow[index - 1]) setIndex(index - 1) - } - - const handleUpdateResolver = () => { - dispatch({ - name: 'setTransactions', - payload: [ - createTransactionItem('updateResolver', { - name, - contract: isWrapped ? 'nameWrapper' : 'registry', - resolverAddress: latestResolverAddress, - }), - ], - }) - dispatch({ - name: 'setFlowStage', - payload: 'transaction', - }) - } - - const handleMigrateProfile = () => { - dispatch({ - name: 'startFlow', - key: `migrate-profile-${name}`, - payload: { - intro: { - title: ['input.profileEditor.intro.migrateProfile.title', { ns: 'transactionFlow' }], - content: makeIntroItem('GenericWithDescription', { - description: t('input.profileEditor.intro.migrateProfile.description'), - }), - }, - transactions: [ - createTransactionItem('migrateProfile', { - name, - }), - createTransactionItem('updateResolver', { - name, - contract: isWrapped ? 'nameWrapper' : 'registry', - resolverAddress: latestResolverAddress, - }), - ], - }, - }) - } - - const handleResetProfile = () => { - dispatch({ - name: 'startFlow', - key: `reset-profile-${name}`, - payload: { - intro: { - title: ['input.profileEditor.intro.resetProfile.title', { ns: 'transactionFlow' }], - content: makeIntroItem('GenericWithDescription', { - description: t('input.profileEditor.intro.resetProfile.description'), - }), - }, - transactions: [ - createTransactionItem('resetProfile', { - name, - resolverAddress: latestResolverAddress, - }), - createTransactionItem('updateResolver', { - name, - contract: isWrapped ? 'nameWrapper' : 'registry', - resolverAddress: latestResolverAddress, - }), - ], - }, - }) - } - - const handleMigrateCurrentProfileToLatest = async () => { - dispatch({ - name: 'startFlow', - key: `migrate-profile-with-reset-${name}`, - payload: { - intro: { - title: [ - 'input.profileEditor.intro.migrateCurrentProfile.title', - { ns: 'transactionFlow' }, - ], - content: makeIntroItem('GenericWithDescription', { - description: t('input.profileEditor.intro.migrateCurrentProfile.description'), - }), - }, - transactions: [ - createTransactionItem('migrateProfileWithReset', { - name, - resolverAddress: oldResolverAddress, - }), - createTransactionItem('updateResolver', { - name, - contract: isWrapped ? 'nameWrapper' : 'registry', - resolverAddress: latestResolverAddress, - }), - ], - }, - }) - } - - const viewsMap: { [key in View]: any } = { - migrateRegistry: , - invalidResolver: , - migrateProfileSelector: ( - { - if (selectedProfile === 'latest') handleUpdateResolver() - else onIncrement() - }} - /> - ), - migrateProfileWarning: ( - - ), - noResolver: , - resetProfile: , - resolverNotNameWrapperAware: ( - { - if (selectedProfile === 'reset' || !status?.hasProfile) handleUpdateResolver() - else handleMigrateProfile() - }} - /> - ), - resolverOutOfDate: ( - - ), - resolverOutOfSync: ( - - ), - transferOrResetProfile: ( - { - if (selectedProfile === 'reset') handleUpdateResolver() - else handleMigrateProfile() - }} - /> - ), - updateResolverOrResetProfile: ( - { - if (selectedProfile === 'reset') onIncrement() - else handleUpdateResolver() - }} - /> - ), - } - - return viewsMap[view] -} - -export default ResolverWarningOverlay diff --git a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts index b8e1b0247..afed2303f 100644 --- a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts +++ b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts @@ -19,6 +19,7 @@ export type View = | 'migrateProfileSelector' | 'migrateProfileWarning' | 'resetProfile' + | 'updateResolverOrResetProfile' type State = { stack: View[] @@ -35,55 +36,51 @@ type InitialData = { isLoading: boolean } -const initializer = - (deps: any) => - ({ profile, resolverStatus, isWrapped, isLoading }: InitialData): State => { - const defaultState: State = { - stack: ['loading'] as const, - } - - console.log('initializer', profile, resolverStatus, isLoading) +const initializer = ({ profile, resolverStatus, isWrapped, isLoading }: InitialData): State => { + const defaultState: State = { + stack: ['loading'] as const, + } - if (isLoading || !profile || !resolverStatus) return defaultState - return match({ - profile, - resolverStatus, - isWrapped, - isLoading, - }) - .with( - { - profile: { isMigrated: false }, - }, - () => ({ ...defaultState, stack: ['migrateRegistry'] as View[] }), - ) - .with({ resolverStatus: { hasResolver: false } }, () => ({ - ...defaultState, - stack: ['noResolver'] as View[], - })) - .with({ resolverStatus: { isNameWrapperAware: false }, isWrapped: true }, () => ({ - ...defaultState, - stack: ['resolverNotNameWrapperAware'] as View[], - })) - .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ + if (isLoading || !profile || !resolverStatus) return defaultState + return match({ + profile, + resolverStatus, + isWrapped, + isLoading, + }) + .with( + { + profile: { isMigrated: false }, + }, + () => ({ ...defaultState, stack: ['migrateRegistry'] as View[] }), + ) + .with({ resolverStatus: { hasResolver: false } }, () => ({ + ...defaultState, + stack: ['noResolver'] as View[], + })) + .with({ resolverStatus: { isNameWrapperAware: false }, isWrapped: true }, () => ({ + ...defaultState, + stack: ['resolverNotNameWrapperAware'] as View[], + })) + .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ + ...defaultState, + stack: ['resolverOutOfDate'] as View[], + })) + .with( + { resolverStatus: { hasValidResolver: false } }, + { + resolverStatus: { isAuthorized: false }, + }, + () => ({ ...defaultState, - stack: ['resolverOutOfDate'] as View[], - })) - .with( - { resolverStatus: { hasValidResolver: false } }, - { - resolverStatus: { isAuthorized: false }, - }, - () => ({ - ...defaultState, - stack: ['invalidResolver'] as View[], - }), - ) - .otherwise(() => ({ - ...defaultState, - stack: ['editor'] as View[], - })) - } + stack: ['invalidResolver'] as View[], + }), + ) + .otherwise(() => ({ + ...defaultState, + stack: ['editor'] as View[], + })) +} type BaseAction = { type: 'init' | 'increment' | 'decrement' | 'pushView' | 'popView' @@ -96,24 +93,26 @@ type DecrementAction = BaseAction & { type: 'popView'; payload?: never } type Action = InitAction | IncrementAction | DecrementAction -const reducer = (deps: Dependencies) => (state: any, action: Action) => { - const { type, payload } = action - switch (type) { - case 'init': - return initializer(deps)(payload) - case 'pushView': - return { ...state, stack: [...state.stack, payload] } - case 'popView': { - const poopedStack = state.stack.slice(0, -1) - if (poopedStack.length > 0) return { ...state, stack: poopedStack } - deps.onDismiss?.() - return state +const reducer = + ({ onDismiss }: Dependencies) => + (state: State, action: Action) => { + const { type, payload } = action + switch (type) { + case 'init': + return initializer(payload) + case 'pushView': + return { ...state, stack: [...state.stack, payload] } + case 'popView': { + const poopedStack = state.stack.slice(0, -1) + if (poopedStack.length > 0) return { ...state, stack: poopedStack } + onDismiss?.() + return state + } + default: + return state } - default: - return state } -} export const useProfileEditorReducer = (initialState: InitialData, deps: Dependencies) => { - return useReducer(reducer(deps), initialState, initializer(deps)) + return useReducer(reducer(deps), initialState, initializer) } diff --git a/src/transaction-flow/input/ProfileEditor/types.ts b/src/transaction-flow/input/ProfileEditor/types.ts new file mode 100644 index 000000000..998b1a9a4 --- /dev/null +++ b/src/transaction-flow/input/ProfileEditor/types.ts @@ -0,0 +1 @@ +export type SelectedProfile = 'latest' | 'reset' | 'current' diff --git a/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx b/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx index 9d13e97de..96d53acf9 100644 --- a/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx @@ -7,7 +7,7 @@ import { Button, Dialog, RadioButton, Typography } from '@ensdomains/thorin' import { CenteredTypography } from '../components/CenteredTypography' import { ProfileBlurb } from '../components/ProfileBlurb' -import type { SelectedProfile } from '../ResolverWarningOverlay' +import type { SelectedProfile } from '../types' const RadioGroupContainer = styled.div( ({ theme }) => css` diff --git a/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx b/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx index ccfe3aec9..c067b605a 100644 --- a/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/ResolverNotNameWrapperAwareView.tsx @@ -7,23 +7,12 @@ import { getSupportLink } from '@app/utils/supportLinks' import { CenteredTypography } from '../components/CenteredTypography' import { ContentContainer } from '../components/ContentContainer' -import { DetailedSwitch } from '../components/DetailedSwitch' -import type { SelectedProfile } from '../ResolverWarningOverlay' type Props = { - selected: SelectedProfile - hasProfile: boolean - onChangeSelected: (selected: SelectedProfile) => void onCancel: () => void onNext: () => void } -export const ResolverNotNameWrapperAwareView = ({ - selected, - hasProfile, - onChangeSelected, - onNext, - onCancel, -}: Props) => { +export const ResolverNotNameWrapperAwareView = ({ onNext, onCancel }: Props) => { const { t } = useTranslation('transactionFlow') return ( <> @@ -40,19 +29,6 @@ export const ResolverNotNameWrapperAwareView = ({ {t('input.profileEditor.warningOverlay.action.learnMoreResolvers')} - {/* {hasProfile || - (true && ( - onChangeSelected(e.target.checked ? 'latest' : 'reset')} - /> - ))} */} void onCancel?: () => void - onSkip?: () => void } -export const ResolverOutOfDateView = ({ onConfirm, onCancel, onSkip }: Props) => { + +export const ResolverOutOfDateView = ({ onConfirm, onCancel }: Props) => { const { t } = useTranslation('transactionFlow') return ( <> diff --git a/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx b/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx index b3658ce8b..ab1696b31 100644 --- a/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx @@ -5,7 +5,7 @@ import { Button, Dialog } from '@ensdomains/thorin' import { CenteredTypography } from '../components/CenteredTypography' import { DetailedSwitch } from '../components/DetailedSwitch' -import type { SelectedProfile } from '../ResolverWarningOverlay' +import type { SelectedProfile } from '../types' type Props = { onNext: (profile: SelectedProfile) => void diff --git a/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx b/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx index 66f924252..99043fe20 100644 --- a/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx @@ -1,26 +1,21 @@ /** This is when the current resolver and latest resolver have matching records */ +import { useState } from 'react' import { useTranslation } from 'react-i18next' import { Button, Dialog } from '@ensdomains/thorin' import { CenteredTypography } from '../components/CenteredTypography' import { DetailedSwitch } from '../components/DetailedSwitch' -import type { SelectedProfile } from '../ResolverWarningOverlay' +import type { SelectedProfile } from '../types' type Props = { - selected: SelectedProfile - onChangeSelected: (selected: SelectedProfile) => void - onNext: () => void + onNext: (selected: SelectedProfile) => void onBack: () => void } -export const UpdateResolverOrResetProfileView = ({ - selected, - onChangeSelected, - onNext, - onBack, -}: Props) => { +export const UpdateResolverOrResetProfileView = ({ onNext, onBack }: Props) => { const { t } = useTranslation('transactionFlow') + const [selected, setSelected] = useState('latest') return ( <> onChangeSelected(e.currentTarget.checked ? 'latest' : 'reset')} + onChange={(e) => setSelected(e.currentTarget.checked ? 'latest' : 'reset')} title={t('input.profileEditor.warningOverlay.updateResolverOrResetProfile.toggle.title')} description={t( 'input.profileEditor.warningOverlay.updateResolverOrResetProfile.toggle.subtitle', @@ -50,7 +45,12 @@ export const UpdateResolverOrResetProfileView = ({ } trailing={ - } From 263bb8f2d765422571ab906c9d69db4eb8dd6fe5 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 02:37:12 +0800 Subject: [PATCH 10/22] add step for updating corpack in test ci --- .github/workflows/test.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d4e7211eb..3bda73655 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,6 +11,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Use Latest Corepack + run: | + echo "Before: corepack version => $(corepack --version || echo 'not installed')" + npm install -g corepack@latest + echo "After : corepack version => $(corepack --version)" + corepack enable + pnpm --version + - name: Install pnpm run: corepack enable pnpm From e495615fcc49a15752a9893ddf5ac94478c6e93c Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 02:39:30 +0800 Subject: [PATCH 11/22] Update test.yaml --- .github/workflows/test.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3bda73655..7864f87f8 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,6 +42,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Use Latest Corepack + run: | + echo "Before: corepack version => $(corepack --version || echo 'not installed')" + npm install -g corepack@latest + echo "After : corepack version => $(corepack --version)" + corepack enable + pnpm --version + - name: Install pnpm run: corepack enable pnpm @@ -75,6 +83,14 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Use Latest Corepack + run: | + echo "Before: corepack version => $(corepack --version || echo 'not installed')" + npm install -g corepack@latest + echo "After : corepack version => $(corepack --version)" + corepack enable + pnpm --version + - name: Install pnpm run: corepack enable pnpm From 5b5f82c0f887ae5caed23c3fd27509d098876b80 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 02:41:54 +0800 Subject: [PATCH 12/22] Update pages-deployment.yaml --- .github/workflows/pages-deployment.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/pages-deployment.yaml b/.github/workflows/pages-deployment.yaml index df5cb6318..dfc20820c 100644 --- a/.github/workflows/pages-deployment.yaml +++ b/.github/workflows/pages-deployment.yaml @@ -21,6 +21,14 @@ jobs: - name: Install Misc. Deps run: sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ + - name: Use Latest Corepack + run: | + echo "Before: corepack version => $(corepack --version || echo 'not installed')" + npm install -g corepack@latest + echo "After : corepack version => $(corepack --version)" + corepack enable + pnpm --version + - name: Install pnpm run: corepack enable pnpm From 098fae305ffafb0ae541cbd0e4fe4090345e1f07 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 22:27:39 +0800 Subject: [PATCH 13/22] revert profile editor updates and clean up code --- .github/workflows/knip.yaml | 2 +- .github/workflows/pages-deployment.yaml | 10 +--- .github/workflows/test.yaml | 34 ++------------ .../steps/Profile/AddProfileRecordView.tsx | 47 ++----------------- .../pages/profile/[name]/tabs/ProfileTab.tsx | 2 - src/constants/profileRecordOptions.test.ts | 8 ---- src/constants/profileRecordOptions.ts | 46 ------------------ src/constants/resolverAddressData.ts | 6 +-- src/constants/supportedOtherRecordKeys.ts | 5 -- src/hooks/resolver/useResolver.ts | 12 ----- src/hooks/resolver/useResolverIsAuthorised.ts | 2 - src/hooks/resolver/useResolverStatus.ts | 4 -- src/hooks/resolver/useResolverType.ts | 1 - .../ProfileEditor/ProfileEditor-flow.tsx | 40 +++------------- .../input/ProfileEditor/types.ts | 1 - .../views/MigrateProfileSelectorView.tsx.tsx | 2 +- .../views/TransferOrResetProfileView.tsx | 2 +- .../UpdateResolverOrResetProfileView.tsx | 2 +- 18 files changed, 22 insertions(+), 204 deletions(-) delete mode 100644 src/constants/profileRecordOptions.test.ts delete mode 100644 src/hooks/resolver/useResolver.ts delete mode 100644 src/transaction-flow/input/ProfileEditor/types.ts diff --git a/.github/workflows/knip.yaml b/.github/workflows/knip.yaml index 77e388cec..b0195e1b5 100644 --- a/.github/workflows/knip.yaml +++ b/.github/workflows/knip.yaml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v3 - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/pages-deployment.yaml b/.github/workflows/pages-deployment.yaml index dfc20820c..4f23b6d3d 100644 --- a/.github/workflows/pages-deployment.yaml +++ b/.github/workflows/pages-deployment.yaml @@ -21,16 +21,8 @@ jobs: - name: Install Misc. Deps run: sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ - - name: Use Latest Corepack - run: | - echo "Before: corepack version => $(corepack --version || echo 'not installed')" - npm install -g corepack@latest - echo "After : corepack version => $(corepack --version)" - corepack enable - pnpm --version - - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7864f87f8..661d9bc74 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,16 +11,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Latest Corepack - run: | - echo "Before: corepack version => $(corepack --version || echo 'not installed')" - npm install -g corepack@latest - echo "After : corepack version => $(corepack --version)" - corepack enable - pnpm --version - - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 @@ -42,16 +34,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Latest Corepack - run: | - echo "Before: corepack version => $(corepack --version || echo 'not installed')" - npm install -g corepack@latest - echo "After : corepack version => $(corepack --version)" - corepack enable - pnpm --version - - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 @@ -83,16 +67,8 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Use Latest Corepack - run: | - echo "Before: corepack version => $(corepack --version || echo 'not installed')" - npm install -g corepack@latest - echo "After : corepack version => $(corepack --version)" - corepack enable - pnpm --version - - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 @@ -126,7 +102,7 @@ jobs: - uses: actions/checkout@v3 - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 @@ -177,7 +153,7 @@ jobs: - run: ./scripts/check-chrome.sh - name: Install pnpm - run: corepack enable pnpm + run: npm i -g --force corepack && corepack enable pnpm - name: Install Node.js uses: actions/setup-node@v3 diff --git a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx index b2d5c3e95..08b89c3fe 100644 --- a/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx +++ b/src/components/pages/profile/[name]/registration/steps/Profile/AddProfileRecordView.tsx @@ -3,14 +3,14 @@ import { Control, useWatch } from 'react-hook-form' import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' -import { Button, Dialog, Helper, MagnifyingGlassSimpleSVG, mq, ScrollBox } from '@ensdomains/thorin' +import { Button, Dialog, MagnifyingGlassSimpleSVG, mq, ScrollBox } from '@ensdomains/thorin' import DismissDialogButton from '@app/components/@atoms/DismissDialogButton/DismissDialogButton' import { Spacer } from '@app/components/@atoms/Spacer' import { DialogFooterWithBorder } from '@app/components/@molecules/DialogComponentVariants/DialogFooterWithBorder' import { DialogInput } from '@app/components/@molecules/DialogComponentVariants/DialogInput' import { - getGroupedProfileRecordsForInterfaces, + grouped as options, ProfileRecord, ProfileRecordGroup, } from '@app/constants/profileRecordOptions' @@ -111,25 +111,12 @@ const DismissButtonWrapper = styled.div( type Props = { control: Control - hasTextInterface?: boolean - hasAddressInterface?: boolean - hasContenthashInterface?: boolean - hasAbiInterface?: boolean onAdd?: (records: ProfileRecord[]) => void onClose?: () => void showDismiss?: boolean } -export const AddProfileRecordView = ({ - control, - hasTextInterface = true, - hasAddressInterface = true, - hasContenthashInterface = true, - hasAbiInterface = true, - onAdd, - onClose, - showDismiss, -}: Props) => { +export const AddProfileRecordView = ({ control, onAdd, onClose, showDismiss }: Props) => { const { t, i18n } = useTranslation('register') const currentRecords = useWatch({ control, name: 'records' }) @@ -138,12 +125,6 @@ export const AddProfileRecordView = ({ const [search, setSearch] = useState('') const filteredOptions = useMemo(() => { - const options = getGroupedProfileRecordsForInterfaces({ - textResolver: hasTextInterface, - addressResolver: hasAddressInterface, - contentHashResolver: hasContenthashInterface, - abiResolver: hasAbiInterface, - }) if (!i18n.isInitialized || !search) return options const matchSearch = (s: string) => s.toLowerCase().indexOf(search.toLocaleLowerCase()) !== -1 return options.map((option) => { @@ -169,18 +150,7 @@ export const AddProfileRecordView = ({ items, } }) - }, [ - search, - t, - i18n, - hasTextInterface, - hasAddressInterface, - hasContenthashInterface, - hasAbiInterface, - ]) - - const showProfileWarning = - !hasTextInterface || !hasAddressInterface || !hasContenthashInterface || !hasAbiInterface + }, [search, t, i18n]) // Tracks when to skip updating the sidebar while options grid is scrolling const shouldSkipObserverUpdateRef = useRef() @@ -337,15 +307,6 @@ export const AddProfileRecordView = ({
- {showProfileWarning && ( - - Your custom resolver doesn't support all records - - )} {filteredOptions.map((option) => { const showLabel = !['address', 'website'].includes(option.group) if (option.items.length === 0 && option.group !== 'other') return null diff --git a/src/components/pages/profile/[name]/tabs/ProfileTab.tsx b/src/components/pages/profile/[name]/tabs/ProfileTab.tsx index 415c75bbe..67e98b23f 100644 --- a/src/components/pages/profile/[name]/tabs/ProfileTab.tsx +++ b/src/components/pages/profile/[name]/tabs/ProfileTab.tsx @@ -60,8 +60,6 @@ const ProfileTab = ({ nameDetails, name }: Props) => { gracePeriodEndDate, } = nameDetails - console.log('profile', profile) - const abilities = useAbilities({ name }) const { data: primaryData } = usePrimaryName({ address }) diff --git a/src/constants/profileRecordOptions.test.ts b/src/constants/profileRecordOptions.test.ts deleted file mode 100644 index acc042fd9..000000000 --- a/src/constants/profileRecordOptions.test.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { describe, it, expect } from "vitest"; -import { getGroupedProfileRecordsForInterfaces } from "./profileRecordOptions"; - -describe('getGroupedProfileRecordsForInterfaces', () => { - it('', () => { - - }) -}) \ No newline at end of file diff --git a/src/constants/profileRecordOptions.ts b/src/constants/profileRecordOptions.ts index 54646f844..532a53265 100644 --- a/src/constants/profileRecordOptions.ts +++ b/src/constants/profileRecordOptions.ts @@ -118,49 +118,3 @@ export const sortValues: { [key: string]: { [key: string]: number } } = { return acc }, {}), } - -export const getGroupedProfileRecordsForInterfaces = ( - interfaces: - | { - textResolver: boolean - addressResolver: boolean - abiResolver: boolean - contentHashResolver: boolean - } - | undefined, -) => { - const { - textResolver = true, - addressResolver = true, - abiResolver = true, - contentHashResolver = true, - } = interfaces || {} - if (textResolver && addressResolver && abiResolver && contentHashResolver) return grouped - return [ - { - group: 'general', - items: textResolver ? general : [], - }, - { - group: 'social', - items: textResolver ? social : [], - }, - { - group: 'address', - items: addressResolver ? address : [], - }, - { - group: 'website', - items: contentHashResolver ? website : [], - }, - { - group: 'other', - items: other.filter( - ({ type }) => - (type === 'abi' && abiResolver) || - (type === 'contenthash' && contentHashResolver) || - (type === 'text' && textResolver), - ), - }, - ] as const -} diff --git a/src/constants/resolverAddressData.ts b/src/constants/resolverAddressData.ts index 1a7c10f33..cb751604a 100644 --- a/src/constants/resolverAddressData.ts +++ b/src/constants/resolverAddressData.ts @@ -269,9 +269,7 @@ export const getKnownResolverData = ({ }: { chainId: number resolverAddress: string -}): KnownResolverItem | undefined => { - console.log('getKnownResolverData', KNOWN_RESOLVER_DATA[chainId], resolverAddress, chainId) - return KNOWN_RESOLVER_DATA[chainId]?.find( +}): KnownResolverItem | undefined => + KNOWN_RESOLVER_DATA[chainId]?.find( (data) => data.address?.toLowerCase() === resolverAddress?.toLowerCase(), ) -} diff --git a/src/constants/supportedOtherRecordKeys.ts b/src/constants/supportedOtherRecordKeys.ts index 89bad73dd..4e8730a6c 100644 --- a/src/constants/supportedOtherRecordKeys.ts +++ b/src/constants/supportedOtherRecordKeys.ts @@ -1,6 +1 @@ export const supportedOtherRecordKeys = ['abi'] as const - -export const getSupportedOtherRecordKeysForInterfaces = (interfaces?: { abiResolver: boolean }) => { - const { abiResolver = true } = interfaces || {} - return abiResolver ? supportedOtherRecordKeys : [] -} diff --git a/src/hooks/resolver/useResolver.ts b/src/hooks/resolver/useResolver.ts deleted file mode 100644 index 7ce8c1588..000000000 --- a/src/hooks/resolver/useResolver.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Hash } from 'viem' -import { useChainId } from 'wagmi' - -import { KNOWN_RESOLVER_DATA } from '@app/constants/resolverAddressData' - -export const useResolver = ({ resolverAddress }: { resolverAddress?: Hash }) => { - const chainId = useChainId() - const knownResolver = KNOWN_RESOLVER_DATA[chainId]?.find((r) => r.address === resolverAddress) - - if (knownResolver) return knownResolver - return {} -} diff --git a/src/hooks/resolver/useResolverIsAuthorised.ts b/src/hooks/resolver/useResolverIsAuthorised.ts index 57344973b..8747d2749 100644 --- a/src/hooks/resolver/useResolverIsAuthorised.ts +++ b/src/hooks/resolver/useResolverIsAuthorised.ts @@ -70,8 +70,6 @@ export const useResolverIsAuthorised = ({ }, }) - console.log('estimateGasQuery', estimateGasQuery, name, resolverAddress, connector.data?.account) - const { data: estimateGasData, isLoading: isEstimateGasLoading, diff --git a/src/hooks/resolver/useResolverStatus.ts b/src/hooks/resolver/useResolverStatus.ts index 2942fc1d0..970ca790e 100644 --- a/src/hooks/resolver/useResolverStatus.ts +++ b/src/hooks/resolver/useResolverStatus.ts @@ -45,8 +45,6 @@ export const useResolverStatus = ({ enabled: enabled && !internalProfile.isLoading, }) - console.log('resolverType', resolverType) - const resolverIsAuthorised = useResolverIsAuthorised({ name, enabled: enabled && !resolverType.isLoading && resolverType.data?.type !== 'latest', @@ -83,7 +81,6 @@ export const useResolverStatus = ({ hasResolver: false, hasLatestResolver: false, hasValidResolver: false, - isKnownResolver: false, isOutdatedResolver: false, isAuthorized: false, isNameWrapperAware: false, @@ -97,7 +94,6 @@ export const useResolverStatus = ({ ...defaultResults, hasResolver: !!profileResolverAddress && profileResolverAddress !== emptyAddress, hasLatestResolver: resolverType.data?.type === 'latest', - isKnownResolver: resolverType.data?.type !== 'custom', isOutdatedResolver: resolverType.data?.type === 'outdated', isNameWrapperAware: profileResolverAddress ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) || diff --git a/src/hooks/resolver/useResolverType.ts b/src/hooks/resolver/useResolverType.ts index 6ded3ccd3..65e2e112a 100644 --- a/src/hooks/resolver/useResolverType.ts +++ b/src/hooks/resolver/useResolverType.ts @@ -58,7 +58,6 @@ export const useResolverType = ({ name, enabled: enabled_ = true }: UseResolverT const data = useMemo(() => { if (!enabled || isLoading) return - console.log('>>>>>', chainId, resolverAddress) const knownResolverData = getKnownResolverData({ chainId, resolverAddress }) if (!knownResolverData) { return { type: 'custom', isWildcard, tone: 'greySecondary' } as const diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 165fc5750..2aa3c87a3 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -5,8 +5,6 @@ import { useTranslation } from 'react-i18next' import styled, { css } from 'styled-components' import { match } from 'ts-pattern' -// import { useChainId } from 'wagmi' - import { Button, Dialog, mq, PlusSVG } from '@ensdomains/thorin' import { DisabledButtonWithTooltip } from '@app/components/@molecules/DisabledButtonWithTooltip' @@ -27,15 +25,12 @@ import { useResolverStatus } from '@app/hooks/resolver/useResolverStatus' import { useIsWrapped } from '@app/hooks/useIsWrapped' import { useProfile } from '@app/hooks/useProfile' import { ProfileEditorForm, useProfileEditorForm } from '@app/hooks/useProfileEditorForm' -import { useResolverHasInterfaces } from '@app/hooks/useResolverHasInterfaces' import { makeIntroItem } from '@app/transaction-flow/intro' import { createTransactionItem, TransactionItem } from '@app/transaction-flow/transaction' import TransactionLoader from '@app/transaction-flow/TransactionLoader' import type { TransactionDialogPassthrough } from '@app/transaction-flow/types' -import { useProfileEditorReducer, View } from './hooks/useProfileEditorReducer' -// import { getResolverWrapperAwareness } from '@app/utils/utils' - +import { useProfileEditorReducer } from './hooks/useProfileEditorReducer' import { InvalidResolverView } from './views/InvalidResolverView' import { MigrateProfileSelectorView } from './views/MigrateProfileSelectorView.tsx' import { MigrateProfileWarningView } from './views/MigrateProfileWarningView' @@ -95,7 +90,7 @@ export type Props = { onDismiss?: () => void } & TransactionDialogPassthrough -type SelectedProfile = 'latest' | 'current' | 'reset' +export type SelectedProfile = 'latest' | 'current' | 'reset' const SubmitButton = ({ control, @@ -137,15 +132,6 @@ const SubmitButton = ({ ) } -export const getPayloadForResolverStatus = ( - resolverStatus: ReturnType['data'], -): View | undefined => { - if (resolverStatus?.hasMigratedProfile && !resolverStatus.isMigratedProfileEqual) - return 'updateResolverOrResetProfile' - if (resolverStatus?.hasMigratedProfile) return 'migrateProfileSelector' - if (resolverStatus?.hasProfile) return 'transferOrResetProfile' -} - const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Props) => { const { t } = useTranslation('register') @@ -218,16 +204,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr name, }) - const { data: interfacesData } = useResolverHasInterfaces({ - resolverAddress: profile?.resolverAddress!, - interfaceNames: ['TextResolver', 'AddressResolver', 'AbiResolver', 'ContentHashResolver'], - enabled: !!profile?.resolverAddress, - }) - const [hasTextInterface, hasAddressInterface, hasAbiInterface, hasContenthashInterface] = - interfacesData || [] - - // const chainId = useChainId() - const handleCreateTransaction = useCallback( async (form: ProfileEditorForm) => { const records = profileEditorFormToProfileRecords(form) @@ -264,7 +240,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr onDismiss, }, ) - const view_ = editorState.stack[editorState.stack.length - 1] + const view = editorState.stack[editorState.stack.length - 1] const handleDeleteRecord = (record: ProfileRecord, index: number) => { removeRecordAtIndex(index) @@ -390,7 +366,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr const canEditRecordsWhenWrapped = !!resolverStatus.data?.isAuthorized - const shouldInitializeEditorState = !isLoading_ && view_ === 'loading' + const shouldInitializeEditorState = !isLoading_ && view === 'loading' useEffect(() => { if (shouldInitializeEditorState) editorDispatch({ @@ -410,7 +386,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr return ( <> - {match(view_) + {match(view) .with('loading', () => ) .with('editor', () => ( <> @@ -424,7 +400,7 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr })} alwaysShowDividers={{ bottom: true }} > - {view_} + {view} ( { addRecords(newRecords) editorDispatch({ type: 'popView' }) diff --git a/src/transaction-flow/input/ProfileEditor/types.ts b/src/transaction-flow/input/ProfileEditor/types.ts deleted file mode 100644 index 998b1a9a4..000000000 --- a/src/transaction-flow/input/ProfileEditor/types.ts +++ /dev/null @@ -1 +0,0 @@ -export type SelectedProfile = 'latest' | 'reset' | 'current' diff --git a/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx b/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx index 96d53acf9..c5767ae7d 100644 --- a/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/MigrateProfileSelectorView.tsx.tsx @@ -7,7 +7,7 @@ import { Button, Dialog, RadioButton, Typography } from '@ensdomains/thorin' import { CenteredTypography } from '../components/CenteredTypography' import { ProfileBlurb } from '../components/ProfileBlurb' -import type { SelectedProfile } from '../types' +import type { SelectedProfile } from '../ProfileEditor-flow' const RadioGroupContainer = styled.div( ({ theme }) => css` diff --git a/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx b/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx index ab1696b31..eac757a5c 100644 --- a/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/TransferOrResetProfileView.tsx @@ -5,7 +5,7 @@ import { Button, Dialog } from '@ensdomains/thorin' import { CenteredTypography } from '../components/CenteredTypography' import { DetailedSwitch } from '../components/DetailedSwitch' -import type { SelectedProfile } from '../types' +import type { SelectedProfile } from '../ProfileEditor-flow' type Props = { onNext: (profile: SelectedProfile) => void diff --git a/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx b/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx index 99043fe20..19ee8ce98 100644 --- a/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx +++ b/src/transaction-flow/input/ProfileEditor/views/UpdateResolverOrResetProfileView.tsx @@ -6,7 +6,7 @@ import { Button, Dialog } from '@ensdomains/thorin' import { CenteredTypography } from '../components/CenteredTypography' import { DetailedSwitch } from '../components/DetailedSwitch' -import type { SelectedProfile } from '../types' +import type { SelectedProfile } from '../ProfileEditor-flow' type Props = { onNext: (selected: SelectedProfile) => void From 0a44304d1c6d88da20d400997837db9f2974cc21 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 22:58:51 +0800 Subject: [PATCH 14/22] clean up unit tests + knip --- src/hooks/resolver/useResolverStatus.test.ts | 3 +- .../ProfileEditor/ProfileEditor.test.tsx | 518 ------------------ .../ProfileEditor/components/SkipButton.tsx | 58 -- .../views/ResolverOutOfSyncView.tsx | 56 -- 4 files changed, 2 insertions(+), 633 deletions(-) delete mode 100644 src/transaction-flow/input/ProfileEditor/components/SkipButton.tsx delete mode 100644 src/transaction-flow/input/ProfileEditor/views/ResolverOutOfSyncView.tsx diff --git a/src/hooks/resolver/useResolverStatus.test.ts b/src/hooks/resolver/useResolverStatus.test.ts index 2a9473198..07b88d9bb 100644 --- a/src/hooks/resolver/useResolverStatus.test.ts +++ b/src/hooks/resolver/useResolverStatus.test.ts @@ -280,7 +280,7 @@ describe('useResolverStatus', () => { expectEnabledHook(mockUseLatestResolverProfile, false) }) - it('should call useProfile for latest resolver if current resolver address is empty address', () => { + it.only('should call useProfile for latest resolver if current resolver address is empty address', () => { mockUseResolverType.mockReturnValueOnce({ data: { type: 'outdated' } }) mockUseProfile.mockReturnValueOnce({ isLoading: false, @@ -294,6 +294,7 @@ describe('useResolverStatus', () => { 'isAuthorized', 'hasMigratedProfile', 'isMigratedProfileEqual', + 'isNameWrapperAware', ]), ) expectEnabledHook(mockUseProfile, true) diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor.test.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor.test.tsx index ed1a26542..74768849d 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor.test.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor.test.tsx @@ -213,522 +213,4 @@ describe('ProfileEditor', () => { ensjsPackage.dependencies['@ensdomains/address-encoder'], ) }) - - it('should render', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect(screen.getByTestId('profile-editor')).toBeVisible() - }) - }) -}) - -describe('ResolverWarningOverlay', () => { - const makeUpdateResolverDispatch = (contract = 'registry') => ({ - name: 'setTransactions', - payload: [ - { - data: { - contract, - name: 'test.eth', - resolverAddress: '0x123', - }, - name: 'updateResolver', - }, - ], - }) - - const makeMigrateProfileDispatch = (contract = 'registry') => ({ - key: 'migrate-profile-test.eth', - name: 'startFlow', - payload: { - intro: { - content: { - data: { - description: 'input.profileEditor.intro.migrateProfile.description', - }, - name: 'GenericWithDescription', - }, - title: [ - 'input.profileEditor.intro.migrateProfile.title', - { - ns: 'transactionFlow', - }, - ], - }, - transactions: [ - { - data: { - name: 'test.eth', - }, - name: 'migrateProfile', - }, - { - data: { - contract, - name: 'test.eth', - resolverAddress: '0x123', - }, - name: 'updateResolver', - }, - ], - }, - }) - - const RESET_RESOLVER_DISPATCH = { - key: 'reset-profile-test.eth', - name: 'startFlow', - payload: { - intro: { - content: { - data: { - description: 'input.profileEditor.intro.resetProfile.description', - }, - name: 'GenericWithDescription', - }, - title: [ - 'input.profileEditor.intro.resetProfile.title', - { - ns: 'transactionFlow', - }, - ], - }, - transactions: [ - { - data: { - name: 'test.eth', - resolverAddress: '0x123', - }, - name: 'resetProfile', - }, - { - data: { - contract: 'registry', - name: 'test.eth', - resolverAddress: '0x123', - }, - name: 'updateResolver', - }, - ], - }, - } - - const MIGRATE_CURRENT_PROFILE_DISPATCH = { - key: 'migrate-profile-with-reset-test.eth', - name: 'startFlow', - payload: { - intro: { - content: { - data: { - description: 'input.profileEditor.intro.migrateCurrentProfile.description', - }, - name: 'GenericWithDescription', - }, - title: [ - 'input.profileEditor.intro.migrateCurrentProfile.title', - { - ns: 'transactionFlow', - }, - ], - }, - transactions: [ - { - data: { - name: 'test.eth', - resolverAddress: '0x0', - }, - name: 'migrateProfileWithReset', - }, - { - data: { - contract: 'registry', - name: 'test.eth', - resolverAddress: '0x123', - }, - name: 'updateResolver', - }, - ], - }, - } - - beforeEach(() => { - mockUseProfile.mockReturnValue(mockProfileData) - // @ts-ignore - mockUseContractAddress.mockReturnValue('0x123') - mockUseIsWrapped.mockReturnValue({ data: false, isLoading: false }) - mockUseEnsAvatar.mockReturnValue({ - data: 'avatar', - isLoading: false, - }) - mockDispatch.mockClear() - }) - - describe('No Resolver', () => { - beforeEach(() => { - mockUseResolverStatus.mockReturnValue(makeResolverStatus([])) - }) - - it('should dispatch update resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.noResolver.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeUpdateResolverDispatch()) - }) - }) - }) - - describe('Resolver not name wrapper aware', () => { - beforeEach(() => { - mockUseIsWrapped.mockReturnValue({ data: true, isLoading: false }) - mockUseResolverStatus.mockReturnValue(makeResolverStatus(['hasResolver', 'hasValidResolver'])) - }) - - it('should be able to migrate profile', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverNotNameWrapperAware.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeMigrateProfileDispatch('nameWrapper')) - }) - }) - - it('should be able to update resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverNotNameWrapperAware.title'), - ).toBeVisible() - }) - - const switchEl = screen.getByTestId('detailed-switch') - const toggle = within(switchEl).getByRole('checkbox') - await userEvent.click(toggle) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeUpdateResolverDispatch('nameWrapper')) - }) - }) - }) - - describe('Invalid Resolver', () => { - beforeEach(() => { - mockUseResolverStatus.mockReturnValue(makeResolverStatus(['hasResolver'])) - }) - - it('should dispatch update resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.invalidResolver.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeUpdateResolverDispatch()) - }) - }) - }) - - describe('Resolver out of date', () => { - beforeEach(() => { - mockUseResolverStatus.mockReturnValue( - makeResolverStatus(['hasResolver', 'hasValidResolver', 'isAuthorized']), - ) - }) - - it('should be able to go to profile editor', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfDate.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-skip-button')) - - await waitFor(() => { - expect(screen.getByTestId('profile-editor')).toBeVisible() - }) - }) - - it('should be able to migrate profile and resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfDate.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.transferOrResetProfile.title'), - ).toBeVisible() - }) - - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeMigrateProfileDispatch()) - }) - }) - - it('should be able to update resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfDate.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.transferOrResetProfile.title'), - ).toBeVisible() - }) - - const switchEl = screen.getByTestId('detailed-switch') - const toggle = within(switchEl).getByRole('checkbox') - await userEvent.click(toggle) - - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeUpdateResolverDispatch()) - }) - }) - }) - - describe('Resolver out of sync ( profiles do not match )', () => { - beforeEach(() => { - mockUseResolverStatus.mockReturnValue( - makeResolverStatus([ - 'hasResolver', - 'hasValidResolver', - 'isAuthorized', - 'hasMigratedProfile', - ]), - ) - }) - - it('should be able to go to profile editor', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-skip-button')) - - await waitFor(() => { - expect(screen.getByTestId('profile-editor')).toBeVisible() - }) - }) - - it('should be able to update resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // Select latest profile - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.migrateProfileSelector.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('migrate-profile-selector-latest')) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeUpdateResolverDispatch()) - }) - }) - - it('should be able to migrate current profile', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // select migrate current profile - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.migrateProfileSelector.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('migrate-profile-selector-current')) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // migrate profile warning - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.migrateProfileWarning.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(MIGRATE_CURRENT_PROFILE_DISPATCH) - }) - }) - - it('should be able to reset profile', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // Select reset option - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.migrateProfileSelector.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('migrate-profile-selector-reset')) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // Reset profile view - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resetProfile.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(RESET_RESOLVER_DISPATCH) - }) - }) - }) - - describe('Resolver out of sync ( profiles match )', () => { - beforeEach(() => { - mockUseResolverStatus.mockReturnValue( - makeResolverStatus([ - 'hasResolver', - 'hasValidResolver', - 'isAuthorized', - 'hasMigratedProfile', - 'isMigratedProfileEqual', - ]), - ) - }) - - it('should be able to go to profile editor', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-skip-button')) - - await waitFor(() => { - expect(screen.getByTestId('profile-editor')).toBeVisible() - }) - }) - - it('should be able to update resolver', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // Select latest profile - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.updateResolverOrResetProfile.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(makeUpdateResolverDispatch()) - }) - }) - - it('should be able to reset profile', async () => { - render( - {}} />, - ) - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resolverOutOfSync.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // Select reset option - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.updateResolverOrResetProfile.title'), - ).toBeVisible() - }) - const switchEl = screen.getByTestId('detailed-switch') - const toggle = within(switchEl).getByRole('checkbox') - await userEvent.click(toggle) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - // Reset profile view - await waitFor(() => { - expect( - screen.getByText('input.profileEditor.warningOverlay.resetProfile.title'), - ).toBeVisible() - }) - await userEvent.click(screen.getByTestId('warning-overlay-next-button')) - - await waitFor(() => { - expect(mockDispatch).toHaveBeenCalledWith(RESET_RESOLVER_DISPATCH) - }) - }) - }) }) diff --git a/src/transaction-flow/input/ProfileEditor/components/SkipButton.tsx b/src/transaction-flow/input/ProfileEditor/components/SkipButton.tsx deleted file mode 100644 index 4961c5ee3..000000000 --- a/src/transaction-flow/input/ProfileEditor/components/SkipButton.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import styled, { css } from 'styled-components' - -import { RightArrowSVG, Typography } from '@ensdomains/thorin' - -const Container = styled.button( - ({ theme }) => css` - background-color: ${theme.colors.yellowSurface}; - display: flex; - padding: ${theme.space['4']}; - gap: ${theme.space['4']}; - width: 100%; - border-radius: ${theme.radii.large}; - cursor: pointer; - transition: all 0.2s ease-in-out; - - &:hover { - background-color: ${theme.colors.yellowLight}; - transform: translateY(-1px); - } - `, -) - -const StyledTypography = styled(Typography)( - () => css` - flex: 1; - text-align: left; - `, -) - -const SkipLabel = styled.div( - ({ theme }) => css` - color: ${theme.colors.yellowDim}; - display: flex; - align-items: center; - gap: ${theme.space['2']}; - padding: ${theme.space['2']}; - `, -) - -type Props = { - description: string - actionLabel?: string - onClick?: () => void -} - -export const SkipButton = ({ description, actionLabel = 'Skip', onClick, ...props }: Props) => { - return ( - - {description} - - - {actionLabel} - - - - - ) -} diff --git a/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfSyncView.tsx b/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfSyncView.tsx deleted file mode 100644 index 3361dedd4..000000000 --- a/src/transaction-flow/input/ProfileEditor/views/ResolverOutOfSyncView.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import { useTranslation } from 'react-i18next' - -import { Button, Dialog } from '@ensdomains/thorin' - -import { Outlink } from '@app/components/Outlink' -import { getSupportLink } from '@app/utils/supportLinks' - -import { CenteredTypography } from '../components/CenteredTypography' -import { SkipButton } from '../components/SkipButton' - -type Props = { - onNext: () => void - onCancel: () => void - onSkip: () => void -} -export const ResolverOutOfSyncView = ({ onNext, onCancel, onSkip }: Props) => { - const { t } = useTranslation('transactionFlow') - return ( - <> - - - - {t('input.profileEditor.warningOverlay.resolverOutOfSync.subtitle')} - - - {t('input.profileEditor.warningOverlay.action.learnMoreResolvers')} - - - - - {t('action.cancel', { ns: 'common' })} - - } - trailing={ - - } - /> - - ) -} From 20590acb7e7294aaabecd92d9f5944196dd8076e Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Thu, 6 Feb 2025 23:45:42 +0800 Subject: [PATCH 15/22] revert behavior of useResolverStatus --- e2e/specs/stateless/wrapName.spec.ts | 2 -- .../profile/[name]/tabs/MoreTab/Token/WrapButton.tsx | 3 +-- src/hooks/resolver/useResolverStatus.ts | 3 +-- .../ProfileEditor/hooks/useProfileEditorReducer.ts | 11 +++++++---- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/e2e/specs/stateless/wrapName.spec.ts b/e2e/specs/stateless/wrapName.spec.ts index 607839564..8ee5fd58b 100644 --- a/e2e/specs/stateless/wrapName.spec.ts +++ b/e2e/specs/stateless/wrapName.spec.ts @@ -254,8 +254,6 @@ test('should calculate needed steps without localstorage', async ({ await morePage.goto(subname) await login.connect() - await expect(page.getByTestId('namewrapper-status')).toContainText('Unwrapped') - await morePage.wrapButton.click() await expect(page.getByTestId('display-item-Step 1-normal')).toContainText('Approve NameWrapper') await expect(page.getByTestId('display-item-Step 2-normal')).toContainText('Migrate profile') diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx index f442f69b7..f759af7c3 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx @@ -33,8 +33,7 @@ const WrapButton = ({ name, ownerData, profile, canBeWrapped, isManager, isRegis const hasOwnerData = !!ownerData - const shouldMigrate = - !resolverStatus.data?.isMigratedProfileEqual && !resolverStatus.data?.isNameWrapperAware + const shouldMigrate = !resolverStatus.data?.isMigratedProfileEqual const resolverAddress = profile?.resolverAddress const isSubname = name.split('.').length > 2 diff --git a/src/hooks/resolver/useResolverStatus.ts b/src/hooks/resolver/useResolverStatus.ts index 970ca790e..d9ef70235 100644 --- a/src/hooks/resolver/useResolverStatus.ts +++ b/src/hooks/resolver/useResolverStatus.ts @@ -96,8 +96,7 @@ export const useResolverStatus = ({ hasLatestResolver: resolverType.data?.type === 'latest', isOutdatedResolver: resolverType.data?.type === 'outdated', isNameWrapperAware: profileResolverAddress - ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) || - resolverIsAuthorised.data?.isAuthorised + ? getResolverWrapperAwareness({ resolverAddress: profileResolverAddress, chainId }) : false, hasProfile: profileHasRecords(profile), } diff --git a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts index afed2303f..3d9a1a836 100644 --- a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts +++ b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts @@ -58,10 +58,13 @@ const initializer = ({ profile, resolverStatus, isWrapped, isLoading }: InitialD ...defaultState, stack: ['noResolver'] as View[], })) - .with({ resolverStatus: { isNameWrapperAware: false }, isWrapped: true }, () => ({ - ...defaultState, - stack: ['resolverNotNameWrapperAware'] as View[], - })) + .with( + { resolverStatus: { isNameWrapperAware: false, isAuthorized: false }, isWrapped: true }, + () => ({ + ...defaultState, + stack: ['resolverNotNameWrapperAware'] as View[], + }), + ) .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ ...defaultState, stack: ['resolverOutOfDate'] as View[], From 864caa8e8225c41b9e2adaeb520a1617f9024be0 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Fri, 7 Feb 2025 00:07:55 +0800 Subject: [PATCH 16/22] Update extendNames.spec.ts --- e2e/specs/stateless/extendNames.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/specs/stateless/extendNames.spec.ts b/e2e/specs/stateless/extendNames.spec.ts index a4f906b5b..66c89aef3 100644 --- a/e2e/specs/stateless/extendNames.spec.ts +++ b/e2e/specs/stateless/extendNames.spec.ts @@ -157,13 +157,13 @@ test('should be able to extend a single unwrapped name from profile', async ({ await test.step('should show correct fiat values', async () => { await extendNamesModal.getCurrencyToggle.click({ force: true }) - await expect(extendNamesModal.getInvoiceExtensionFee).toContainText('$10.00') + await expect(extendNamesModal.getInvoiceExtensionFee).toContainText('$10.0') await expect(extendNamesModal.getInvoiceTransactionFee).toContainText('$0.13') - await expect(extendNamesModal.getInvoiceTotal).toContainText('$10.13') + await expect(extendNamesModal.getInvoiceTotal).toContainText('$10.1') await extendNamesModal.getCounterMinusButton.click() - await expect(extendNamesModal.getInvoiceExtensionFee).toContainText('$5.00') + await expect(extendNamesModal.getInvoiceExtensionFee).toContainText('$5.0') await expect(extendNamesModal.getInvoiceTransactionFee).toContainText('$0.13') - await expect(extendNamesModal.getInvoiceTotal).toContainText('$5.13') + await expect(extendNamesModal.getInvoiceTotal).toContainText('$5.1') }) await test.step('should extend', async () => { From 572f5fd9ec596e6c8d06f6936b1d800d7d0b49e5 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Fri, 7 Feb 2025 11:46:47 +0800 Subject: [PATCH 17/22] fix errors --- e2e/specs/stateless/profileEditor.spec.ts | 81 +++++++++++++------ src/hooks/resolver/useResolverStatus.test.ts | 3 +- .../hooks/useProfileEditorReducer.ts | 81 ++++++++++--------- 3 files changed, 100 insertions(+), 65 deletions(-) diff --git a/e2e/specs/stateless/profileEditor.spec.ts b/e2e/specs/stateless/profileEditor.spec.ts index c7319bf55..858418613 100644 --- a/e2e/specs/stateless/profileEditor.spec.ts +++ b/e2e/specs/stateless/profileEditor.spec.ts @@ -5,10 +5,15 @@ import dotenv from 'dotenv' import { Address } from 'viem' import { encodeAbi, RecordOptions } from '@ensdomains/ensjs/utils' +import { wrapName } from '@ensdomains/ensjs/wallet' import { test } from '../../../playwright' import { createAccounts } from '../../../playwright/fixtures/accounts' -import { testClient } from '../../../playwright/fixtures/contracts/utils/addTestContracts' +import { + testClient, + waitForTransaction, + walletClient, +} from '../../../playwright/fixtures/contracts/utils/addTestContracts' import { generateRecords } from '../../../playwright/fixtures/makeName/generators/generateRecords' import { emptyAddress } from '../../../src/utils/constants' @@ -1018,7 +1023,6 @@ test.describe('invalid resolver', () => { test.describe('wrapped name with legacy resolver', () => { test('should force a wrapped name (with no profile) with a resolver that is not name wrapper aware to migrate update their resolver', async ({ login, - page, makeName, makePageObject, }) => { @@ -1039,7 +1043,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -1190,6 +1193,7 @@ test.describe('wrapped name with legacy resolver', () => { page, makeName, makePageObject, + accounts, }) => { const name = await makeName({ label: 'wrapped', @@ -1197,6 +1201,13 @@ test.describe('wrapped name with legacy resolver', () => { records: await makeRecords(), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') const transactionModal = makePageObject('TransactionModal') @@ -1205,9 +1216,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) @@ -1260,6 +1268,7 @@ test.describe('wrapped name with legacy resolver', () => { test('should be able to update resolver when only current resolver has a profile', async ({ login, page, + accounts, makeName, makePageObject, }) => { @@ -1269,6 +1278,13 @@ test.describe('wrapped name with legacy resolver', () => { records: await makeRecords(), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + const morePage = makePageObject('MorePage') const profilePage = makePageObject('ProfilePage') const transactionModal = makePageObject('TransactionModal') @@ -1277,9 +1293,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) @@ -1334,6 +1347,13 @@ test.describe('wrapped name with legacy resolver', () => { records: await makeRecords(), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + await generateRecords({ accounts })({ name, owner: 'user', @@ -1349,9 +1369,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) @@ -1414,6 +1431,13 @@ test.describe('wrapped name with legacy resolver', () => { records: await makeRecords(), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + await generateRecords({ accounts })({ name, owner: 'user', @@ -1429,9 +1453,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) @@ -1486,6 +1507,13 @@ test.describe('wrapped name with legacy resolver', () => { records: await makeRecords(), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + await generateRecords({ accounts })({ name, owner: 'user', @@ -1508,9 +1536,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) @@ -1580,6 +1605,13 @@ test.describe('wrapped name with legacy resolver', () => { }), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + await generateRecords({ accounts })({ name, owner: 'user', @@ -1595,9 +1627,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) @@ -1665,6 +1694,13 @@ test.describe('wrapped name with legacy resolver', () => { }), }) + const wrapTx = await wrapName(walletClient, { + name, + newOwnerAddress: accounts.getAddress('user') as `0x${string}`, + account: accounts.getAddress('user') as `0x${string}`, + }) + await waitForTransaction(wrapTx) + await generateRecords({ accounts })({ name, owner: 'user', @@ -1680,9 +1716,6 @@ test.describe('wrapped name with legacy resolver', () => { await morePage.goto(name) await login.connect() - await morePage.wrapButton.click() - await transactionModal.autoComplete() - await morePage.editResolverButton.click() await page.getByTestId('custom-resolver-radio').check() await page.getByTestId('dogfood').fill(legacyResolver) diff --git a/src/hooks/resolver/useResolverStatus.test.ts b/src/hooks/resolver/useResolverStatus.test.ts index 07b88d9bb..2a9473198 100644 --- a/src/hooks/resolver/useResolverStatus.test.ts +++ b/src/hooks/resolver/useResolverStatus.test.ts @@ -280,7 +280,7 @@ describe('useResolverStatus', () => { expectEnabledHook(mockUseLatestResolverProfile, false) }) - it.only('should call useProfile for latest resolver if current resolver address is empty address', () => { + it('should call useProfile for latest resolver if current resolver address is empty address', () => { mockUseResolverType.mockReturnValueOnce({ data: { type: 'outdated' } }) mockUseProfile.mockReturnValueOnce({ isLoading: false, @@ -294,7 +294,6 @@ describe('useResolverStatus', () => { 'isAuthorized', 'hasMigratedProfile', 'isMigratedProfileEqual', - 'isNameWrapperAware', ]), ) expectEnabledHook(mockUseProfile, true) diff --git a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts index 3d9a1a836..e866e2b96 100644 --- a/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts +++ b/src/transaction-flow/input/ProfileEditor/hooks/useProfileEditorReducer.ts @@ -42,47 +42,50 @@ const initializer = ({ profile, resolverStatus, isWrapped, isLoading }: InitialD } if (isLoading || !profile || !resolverStatus) return defaultState - return match({ - profile, - resolverStatus, - isWrapped, - isLoading, - }) - .with( - { - profile: { isMigrated: false }, - }, - () => ({ ...defaultState, stack: ['migrateRegistry'] as View[] }), - ) - .with({ resolverStatus: { hasResolver: false } }, () => ({ - ...defaultState, - stack: ['noResolver'] as View[], - })) - .with( - { resolverStatus: { isNameWrapperAware: false, isAuthorized: false }, isWrapped: true }, - () => ({ + return ( + match({ + profile, + resolverStatus, + isWrapped, + isLoading, + }) + .with( + { + profile: { isMigrated: false }, + }, + () => ({ ...defaultState, stack: ['migrateRegistry'] as View[] }), + ) + .with({ resolverStatus: { hasResolver: false } }, () => ({ ...defaultState, - stack: ['resolverNotNameWrapperAware'] as View[], - }), - ) - .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ - ...defaultState, - stack: ['resolverOutOfDate'] as View[], - })) - .with( - { resolverStatus: { hasValidResolver: false } }, - { - resolverStatus: { isAuthorized: false }, - }, - () => ({ + stack: ['noResolver'] as View[], + })) + // NOTE: isAuthorized is used as backup check in case the resolver is name wrapper aware but not a known resolver (custom resolver) + .with( + { resolverStatus: { isNameWrapperAware: false, isAuthorized: false }, isWrapped: true }, + () => ({ + ...defaultState, + stack: ['resolverNotNameWrapperAware'] as View[], + }), + ) + .with({ resolverStatus: { isOutdatedResolver: true } }, () => ({ ...defaultState, - stack: ['invalidResolver'] as View[], - }), - ) - .otherwise(() => ({ - ...defaultState, - stack: ['editor'] as View[], - })) + stack: ['resolverOutOfDate'] as View[], + })) + .with( + { resolverStatus: { hasValidResolver: false } }, + { + resolverStatus: { isAuthorized: false }, + }, + () => ({ + ...defaultState, + stack: ['invalidResolver'] as View[], + }), + ) + .otherwise(() => ({ + ...defaultState, + stack: ['editor'] as View[], + })) + ) } type BaseAction = { From a43300ee81afa13503c0d8b68c0556e4477132b3 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Fri, 7 Feb 2025 13:15:19 +0800 Subject: [PATCH 18/22] remove page pause in e2e --- e2e/specs/stateless/profileEditor.spec.ts | 25 ----------------------- e2e/specs/stateless/verifications.spec.ts | 2 -- 2 files changed, 27 deletions(-) diff --git a/e2e/specs/stateless/profileEditor.spec.ts b/e2e/specs/stateless/profileEditor.spec.ts index 858418613..80ac8fe34 100644 --- a/e2e/specs/stateless/profileEditor.spec.ts +++ b/e2e/specs/stateless/profileEditor.spec.ts @@ -234,7 +234,6 @@ test.describe('legacy resolver', () => { await profilePage.goto(name) - await page.pause() await expect(profilePage.record('text', 'description')).toHaveText('Hello2') await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') @@ -377,7 +376,6 @@ test.describe('custom legacy resolver', () => { await profilePage.goto(name) - await page.pause() await expect(profilePage.record('text', 'description')).toHaveText('Hello2') await expect(profilePage.record('text', 'url')).toHaveText('twitter.com') await expect(profilePage.record('address', 'eth')).toHaveText('0xf39...92266') @@ -683,7 +681,6 @@ test.describe('custom namewrapper aware resolver', () => { test.describe('outdated resolver', () => { test('should force a name with an outdated resolver to upgrade', async ({ - page, login, makeName, makePageObject, @@ -703,7 +700,6 @@ test.describe('outdated resolver', () => { await login.connect() await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.locator('text=Resolver out of date')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -745,7 +741,6 @@ test.describe('outdated resolver', () => { await login.connect() await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.locator('text=Resolver out of date')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -770,7 +765,6 @@ test.describe('outdated resolver', () => { await expect(recordsPage.getRecordValue('address', 'eth')).toHaveText( createAccounts().getAddress('user'), ) - await page.pause() await expect(recordsPage.getRecordValue('address', 'btc')).toHaveText( 'bc1qjqg9slurvjukfl92wp58y94480fvh4uc2pwa6n', ) @@ -813,7 +807,6 @@ test.describe('outdated resolver', () => { await login.connect() await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.locator('text=Resolver out of date')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -894,7 +887,6 @@ test.describe('legacy registryy', () => { const profilePage = makePageObject('ProfilePage') await profilePage.editProfileButton.click() - await page.pause() await expect(page.getByText('Registry out of date')).toBeVisible() await expect(page.getByTestId('warning-overlay-next-button')).toHaveAttribute( 'href', @@ -905,7 +897,6 @@ test.describe('legacy registryy', () => { test.describe('no resolver', () => { test('should force a name without a resolver to update their resolver', async ({ - page, login, makeName, makePageObject, @@ -933,7 +924,6 @@ test.describe('no resolver', () => { await login.connect() await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.locator('text=No resolver set')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -949,7 +939,6 @@ test.describe('no resolver', () => { test.describe('unauthorised resolver', () => { test('should force a name with an unauthorised resolver to update their resolver', async ({ login, - page, makeName, makePageObject, }) => { @@ -972,7 +961,6 @@ test.describe('unauthorised resolver', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -986,7 +974,6 @@ test.describe('unauthorised resolver', () => { test.describe('invalid resolver', () => { test('should force a name with an invalid resolver to update their resolver', async ({ login, - page, makeName, makePageObject, }) => { @@ -1009,7 +996,6 @@ test.describe('invalid resolver', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.getByText('Unauthorised resolver')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -1086,7 +1072,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -1104,7 +1089,6 @@ test.describe('wrapped name with legacy resolver', () => { await expect(morePage.resolver).toHaveText(latestResolver) await recordsPage.goto(name) - await page.pause() await expect(recordsPage.getRecordValue('text', 'email')).toHaveText('fakeemail@fake.com') await expect(recordsPage.getRecordValue('text', 'url')).toHaveText('https://twitter.com') await expect(recordsPage.getRecordValue('text', 'description')).toHaveText('Hello2') @@ -1156,7 +1140,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.goto(name) await profilePage.editProfileButton.click() - await page.pause() await expect(profilePage.profileEditor.getByText('Resolver incompatible')).toBeVisible() await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() @@ -1177,7 +1160,6 @@ test.describe('wrapped name with legacy resolver', () => { await expect(morePage.resolver).toHaveText(latestResolver) await recordsPage.goto(name) - await page.pause() await expect(recordsPage.getRecordButton('text', 'email')).toHaveCount(0) await expect(recordsPage.getRecordButton('text', 'url')).toHaveCount(0) await expect(recordsPage.getRecordButton('text', 'description')).toHaveCount(0) @@ -1231,7 +1213,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { - await page.pause() await expect( page.getByText( 'You can transfer your current profile to the new resolver before updating your resolver.', @@ -1308,7 +1289,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('update resolver', async () => { - await page.pause() await expect( page.getByText( 'You can transfer your current profile to the new resolver before updating your resolver.', @@ -1384,7 +1364,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { - await page.pause() await expect( page.getByText( 'You can keep your current profile on the new resolver, or reset it and remove all profile records.', @@ -1468,7 +1447,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { - await page.pause() await expect( page.getByText( 'You can keep your current profile on the new resolver, or reset it and remove all profile records.', @@ -1551,7 +1529,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { - await page.pause() await page.getByTestId('migrate-profile-selector-current').check() await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() await expect(page.getByTestId('migrate-profile-selector-reset')).not.toBeChecked() @@ -1642,7 +1619,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { - await page.pause() await page.getByTestId('migrate-profile-selector-latest').check() await expect(page.getByTestId('migrate-profile-selector-latest')).toBeChecked() await expect(page.getByTestId('migrate-profile-selector-reset')).not.toBeChecked() @@ -1731,7 +1707,6 @@ test.describe('wrapped name with legacy resolver', () => { await profilePage.profileEditor.getByTestId('warning-overlay-next-button').click() await test.step('Migrate profile', async () => { - await page.pause() await page.getByTestId('migrate-profile-selector-reset').check() await expect(page.getByTestId('migrate-profile-selector-latest')).not.toBeChecked() await expect(page.getByTestId('migrate-profile-selector-reset')).toBeChecked() diff --git a/e2e/specs/stateless/verifications.spec.ts b/e2e/specs/stateless/verifications.spec.ts index 77e75b660..9ecde2925 100644 --- a/e2e/specs/stateless/verifications.spec.ts +++ b/e2e/specs/stateless/verifications.spec.ts @@ -427,8 +427,6 @@ test.describe('Verified records', () => { await page.goto(`/${name}`) await login.connect() - await page.pause() - await expect(page.getByTestId('profile-section-verifications')).toBeVisible() await profilePage.isRecordVerified('text', 'com.twitter', false) From 1e22679c19bf511679dee19b16bc1f733137e0c5 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Fri, 7 Feb 2025 13:34:23 +0800 Subject: [PATCH 19/22] Update WrapButton.tsx --- .../pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx index f759af7c3..184529edc 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx @@ -33,7 +33,8 @@ const WrapButton = ({ name, ownerData, profile, canBeWrapped, isManager, isRegis const hasOwnerData = !!ownerData - const shouldMigrate = !resolverStatus.data?.isMigratedProfileEqual + const shouldMigrate = + !resolverStatus.data?.isMigratedProfileEqual && !resolverStatus.data?.isAuthorized const resolverAddress = profile?.resolverAddress const isSubname = name.split('.').length > 2 From 36a63ccc40e99da670ca1dd130769752bca20aca Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Fri, 7 Feb 2025 13:41:55 +0800 Subject: [PATCH 20/22] Update WrapButton.tsx --- .../pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx index 184529edc..f759af7c3 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx @@ -33,8 +33,7 @@ const WrapButton = ({ name, ownerData, profile, canBeWrapped, isManager, isRegis const hasOwnerData = !!ownerData - const shouldMigrate = - !resolverStatus.data?.isMigratedProfileEqual && !resolverStatus.data?.isAuthorized + const shouldMigrate = !resolverStatus.data?.isMigratedProfileEqual const resolverAddress = profile?.resolverAddress const isSubname = name.split('.').length > 2 From 316a04604145394917a4781eb4057aa280458083 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Fri, 7 Feb 2025 21:14:42 +0800 Subject: [PATCH 21/22] add note on WrapButton --- .../pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx index f759af7c3..40c3f865c 100644 --- a/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx +++ b/src/components/pages/profile/[name]/tabs/MoreTab/Token/WrapButton.tsx @@ -33,6 +33,8 @@ const WrapButton = ({ name, ownerData, profile, canBeWrapped, isManager, isRegis const hasOwnerData = !!ownerData + // BUG: We should also check if the current resolver is name wrapper aware, but this check creates a false negative for custom name wrapper aware resolvers. + // For safety, we will migrate if the profile on the current resolver does not match the profile on the latest name wrapper aware resolver. const shouldMigrate = !resolverStatus.data?.isMigratedProfileEqual const resolverAddress = profile?.resolverAddress From 737aa3af6f14ec522fa2e724686297d96b57b5b4 Mon Sep 17 00:00:00 2001 From: storywithoutend Date: Sun, 9 Feb 2025 13:38:16 +0800 Subject: [PATCH 22/22] Update ProfileEditor-flow.tsx --- src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx index 2aa3c87a3..a2f22947a 100644 --- a/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx +++ b/src/transaction-flow/input/ProfileEditor/ProfileEditor-flow.tsx @@ -400,7 +400,6 @@ const ProfileEditor = ({ data = {}, transactions = [], dispatch, onDismiss }: Pr })} alwaysShowDividers={{ bottom: true }} > - {view}