diff --git a/package-lock.json b/package-lock.json index 9edcd6b40..ee52395e0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -33,10 +33,10 @@ "dcl-scene-writer": "^1.1.2", "decentraland": "^3.3.0", "decentraland-builder-scripts": "^0.24.0", - "decentraland-dapps": "^13.48.0", + "decentraland-dapps": "^13.50.0", "decentraland-ecs": "^6.6.1-20201020183014.commit-bdc29ef-hotfix", "decentraland-experiments": "^1.0.2", - "decentraland-transactions": "^1.42.0", + "decentraland-transactions": "^1.45.0", "decentraland-ui": "^3.96.0", "ethers": "^5.6.8", "file-saver": "^2.0.1", @@ -10850,9 +10850,9 @@ } }, "node_modules/decentraland-dapps": { - "version": "13.48.0", - "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-13.48.0.tgz", - "integrity": "sha512-EL9pA+vEQ1zW7yICTx+7Wb9CztB6W1hqO5gx93bYiQIIYGh8bWa+mCCww/14iSZDBa+wLZwgWAsz9+G+WxcW/g==", + "version": "13.50.0", + "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-13.50.0.tgz", + "integrity": "sha512-vbpyszqfK7d0fFzT4hs8JmPDhFH1iMDAgbZAOIzSdCzsbK4lMEnwbjWlF7Jq1puC8SisSC8Ug/rSyG9OGPGcsQ==", "dependencies": { "@0xsequence/multicall": "^0.25.1", "@0xsequence/relayer": "^0.25.1", @@ -10866,7 +10866,7 @@ "dcl-catalyst-client": "^14.0.9", "decentraland-connect": "^3.5.0", "decentraland-crypto-fetch": "^1.0.3", - "decentraland-transactions": "^1.43.1", + "decentraland-transactions": "^1.44.0", "decentraland-ui": "^3.96.0", "ethers": "^5.6.8", "events": "^3.3.0", @@ -11116,9 +11116,9 @@ } }, "node_modules/decentraland-transactions": { - "version": "1.43.1", - "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-1.43.1.tgz", - "integrity": "sha512-JJf6xrQJIFoS5DGzL6ZgSuRd5PtO5HOqK1pxLkxtShGmUFnVAV+gIqBA8o2oTzUzGc6uPXdR0zBar7/eyY6f8w==" + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-1.45.0.tgz", + "integrity": "sha512-NH0aPORvNwdvMT70I0cwL+srbM/Nh90Qwnnz33hEJOeD4kPMWo/VrjlyZEDh41iBp30vwSxHhjriNEqIXwR4LQ==" }, "node_modules/decentraland-ui": { "version": "3.96.0", @@ -41132,9 +41132,9 @@ } }, "decentraland-dapps": { - "version": "13.48.0", - "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-13.48.0.tgz", - "integrity": "sha512-EL9pA+vEQ1zW7yICTx+7Wb9CztB6W1hqO5gx93bYiQIIYGh8bWa+mCCww/14iSZDBa+wLZwgWAsz9+G+WxcW/g==", + "version": "13.50.0", + "resolved": "https://registry.npmjs.org/decentraland-dapps/-/decentraland-dapps-13.50.0.tgz", + "integrity": "sha512-vbpyszqfK7d0fFzT4hs8JmPDhFH1iMDAgbZAOIzSdCzsbK4lMEnwbjWlF7Jq1puC8SisSC8Ug/rSyG9OGPGcsQ==", "requires": { "@0xsequence/multicall": "^0.25.1", "@0xsequence/relayer": "^0.25.1", @@ -41148,7 +41148,7 @@ "dcl-catalyst-client": "^14.0.9", "decentraland-connect": "^3.5.0", "decentraland-crypto-fetch": "^1.0.3", - "decentraland-transactions": "^1.43.1", + "decentraland-transactions": "^1.44.0", "decentraland-ui": "^3.96.0", "ethers": "^5.6.8", "events": "^3.3.0", @@ -41334,9 +41334,9 @@ } }, "decentraland-transactions": { - "version": "1.43.1", - "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-1.43.1.tgz", - "integrity": "sha512-JJf6xrQJIFoS5DGzL6ZgSuRd5PtO5HOqK1pxLkxtShGmUFnVAV+gIqBA8o2oTzUzGc6uPXdR0zBar7/eyY6f8w==" + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/decentraland-transactions/-/decentraland-transactions-1.45.0.tgz", + "integrity": "sha512-NH0aPORvNwdvMT70I0cwL+srbM/Nh90Qwnnz33hEJOeD4kPMWo/VrjlyZEDh41iBp30vwSxHhjriNEqIXwR4LQ==" }, "decentraland-ui": { "version": "3.96.0", diff --git a/package.json b/package.json index 200e3e8bc..52f43e26c 100644 --- a/package.json +++ b/package.json @@ -27,10 +27,10 @@ "dcl-scene-writer": "^1.1.2", "decentraland": "^3.3.0", "decentraland-builder-scripts": "^0.24.0", - "decentraland-dapps": "^13.48.0", + "decentraland-dapps": "^13.50.0", "decentraland-ecs": "^6.6.1-20201020183014.commit-bdc29ef-hotfix", "decentraland-experiments": "^1.0.2", - "decentraland-transactions": "^1.42.0", + "decentraland-transactions": "^1.45.0", "decentraland-ui": "^3.96.0", "ethers": "^5.6.8", "file-saver": "^2.0.1", diff --git a/src/components/ClaimENSPage/ClaimENSPage.tsx b/src/components/ClaimENSPage/ClaimENSPage.tsx index 069503148..3bfb29a6a 100644 --- a/src/components/ClaimENSPage/ClaimENSPage.tsx +++ b/src/components/ClaimENSPage/ClaimENSPage.tsx @@ -4,11 +4,12 @@ import { Network } from '@dcl/schemas' import { T, t } from 'decentraland-dapps/dist/modules/translation/utils' import { getTokenAmountToApprove } from 'decentraland-dapps/dist/modules/authorization/utils' import { NetworkButton, NetworkCheck, TransactionLink } from 'decentraland-dapps/dist/containers' +import { ContractName } from 'decentraland-transactions' +import { getContractAddressForAppChainId } from 'modules/contract/utils' import Back from 'components/Back' import LoggedInDetailPage from 'components/LoggedInDetailPage' import { locations } from 'routing/locations' import { MAX_NAME_SIZE, PRICE, isNameValid, isNameAvailable, hasNameMinLength, isEnoughClaimMana } from 'modules/ens/utils' -import { CONTROLLER_V2_ADDRESS } from 'modules/common/contracts' import { Props, State } from './ClaimENSPage.types' import './ClaimENSPage.css' @@ -153,7 +154,7 @@ export default class ClaimENSPage extends React.PureComponent { id="claim_ens_page.need_mana_message" values={{ contract_link: ( - + DCLControllerV2 ) diff --git a/src/config/env/dev.json b/src/config/env/dev.json index 1f59b78a3..e2deb702e 100644 --- a/src/config/env/dev.json +++ b/src/config/env/dev.json @@ -21,8 +21,6 @@ "ENS_CONTRACT_ADDRESS": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", "ENS_GATEWAY": "limo", "RESOLVER_CONTRACT_ADDRESS": "0x4B1488B7a6B320d2D721406204aBc3eeAa9AD329", - "CONTROLLER_V2_CONTRACT_ADDRESS": "0xe23b047c8ee33d0c423676544bca6d2c9d3faa49", - "REGISTRAR_CONTRACT_ADDRESS": "0x6b8da2752827cf926215b43bb8e46fd7b9ddac35", "RENTALS_CONTRACT_ADDRESS": "0x92159c78f0f4523b9c60382bb888f30f10a46b3b", "IPFS_URL": "https://ipfs.infura.io:5001/api/v0/add?pin=false", "EXPLORER_URL": "https://play.decentraland.zone", diff --git a/src/config/env/prod.json b/src/config/env/prod.json index 0af19d059..1747031e4 100644 --- a/src/config/env/prod.json +++ b/src/config/env/prod.json @@ -21,8 +21,6 @@ "ENS_CONTRACT_ADDRESS": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", "ENS_GATEWAY": "limo", "RESOLVER_CONTRACT_ADDRESS": "0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41", - "CONTROLLER_V2_CONTRACT_ADDRESS": "0xbe92b49aee993adea3a002adcda189a2b7dec56c", - "REGISTRAR_CONTRACT_ADDRESS": "0x2a187453064356c898cae034eaed119e1663acb8", "RENTALS_CONTRACT_ADDRESS": "0x3a1469499d0be105d4f77045ca403a5f6dc2f3f5", "IPFS_URL": "https://ipfs.infura.io:5001/api/v0/add?pin=false", "EXPLORER_URL": "https://play.decentraland.org", diff --git a/src/config/env/stg.json b/src/config/env/stg.json index a563ce663..8ef189811 100644 --- a/src/config/env/stg.json +++ b/src/config/env/stg.json @@ -21,8 +21,6 @@ "ENS_CONTRACT_ADDRESS": "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e", "ENS_GATEWAY": "limo", "RESOLVER_CONTRACT_ADDRESS": "0x4976fb03c32e5b8cfe2b6ccb31c09ba78ebaba41", - "CONTROLLER_V2_CONTRACT_ADDRESS": "0xbe92b49aee993adea3a002adcda189a2b7dec56c", - "REGISTRAR_CONTRACT_ADDRESS": "0x2a187453064356c898cae034eaed119e1663acb8", "RENTALS_CONTRACT_ADDRESS": "0x3a1469499d0be105d4f77045ca403a5f6dc2f3f5", "IPFS_URL": "https://ipfs.infura.io:5001/api/v0/add?pin=false", "EXPLORER_URL": "https://play.decentraland.org", diff --git a/src/contracts/DCLController.json b/src/contracts/DCLController.json deleted file mode 100644 index 939bfacd7..000000000 --- a/src/contracts/DCLController.json +++ /dev/null @@ -1,133 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "contract IERC20Token", "name": "_acceptedToken", "type": "address" }, - { "internalType": "contract IDCLRegistrar", "name": "_registrar", "type": "address" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "uint256", "name": "_oldMaxGasPrice", "type": "uint256" }, - { "indexed": true, "internalType": "uint256", "name": "_newMaxGasPrice", "type": "uint256" } - ], - "name": "MaxGasPriceChanged", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_beneficiary", "type": "address" }, - { "indexed": false, "internalType": "uint256", "name": "_price", "type": "uint256" }, - { "indexed": false, "internalType": "string", "name": "_name", "type": "string" } - ], - "name": "NameBought", - "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" - }, - { - "constant": true, - "inputs": [], - "name": "PRICE", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "acceptedToken", - "outputs": [{ "internalType": "contract IERC20Token", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "maxGasPrice", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "string", "name": "_name", "type": "string" }, - { "internalType": "address", "name": "_beneficiary", "type": "address" } - ], - "name": "register", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "registrar", - "outputs": [{ "internalType": "contract IDCLRegistrar", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_maxGasPrice", "type": "uint256" }], - "name": "updateMaxGasPrice", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/contracts/DCLController.ts b/src/contracts/DCLController.ts deleted file mode 100644 index 05f1a787b..000000000 --- a/src/contracts/DCLController.ts +++ /dev/null @@ -1,385 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface DCLControllerInterface extends utils.Interface { - functions: { - "PRICE()": FunctionFragment; - "acceptedToken()": FunctionFragment; - "isOwner()": FunctionFragment; - "maxGasPrice()": FunctionFragment; - "owner()": FunctionFragment; - "register(string,address)": FunctionFragment; - "registrar()": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "updateMaxGasPrice(uint256)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "PRICE" - | "acceptedToken" - | "isOwner" - | "maxGasPrice" - | "owner" - | "register" - | "registrar" - | "renounceOwnership" - | "transferOwnership" - | "updateMaxGasPrice" - ): FunctionFragment; - - encodeFunctionData(functionFragment: "PRICE", values?: undefined): string; - encodeFunctionData( - functionFragment: "acceptedToken", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "isOwner", values?: undefined): string; - encodeFunctionData( - functionFragment: "maxGasPrice", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "register", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "registrar", values?: undefined): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "updateMaxGasPrice", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult(functionFragment: "PRICE", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "acceptedToken", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "maxGasPrice", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "register", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "registrar", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateMaxGasPrice", - data: BytesLike - ): Result; - - events: { - "MaxGasPriceChanged(uint256,uint256)": EventFragment; - "NameBought(address,address,uint256,string)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "MaxGasPriceChanged"): EventFragment; - getEvent(nameOrSignatureOrTopic: "NameBought"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; -} - -export interface MaxGasPriceChangedEventObject { - _oldMaxGasPrice: BigNumber; - _newMaxGasPrice: BigNumber; -} -export type MaxGasPriceChangedEvent = TypedEvent< - [BigNumber, BigNumber], - MaxGasPriceChangedEventObject ->; - -export type MaxGasPriceChangedEventFilter = - TypedEventFilter; - -export interface NameBoughtEventObject { - _caller: string; - _beneficiary: string; - _price: BigNumber; - _name: string; -} -export type NameBoughtEvent = TypedEvent< - [string, string, BigNumber, string], - NameBoughtEventObject ->; - -export type NameBoughtEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface DCLController extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: DCLControllerInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - PRICE(overrides?: CallOverrides): Promise<[BigNumber]>; - - acceptedToken(overrides?: CallOverrides): Promise<[string]>; - - isOwner(overrides?: CallOverrides): Promise<[boolean]>; - - maxGasPrice(overrides?: CallOverrides): Promise<[BigNumber]>; - - owner(overrides?: CallOverrides): Promise<[string]>; - - register( - _name: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registrar(overrides?: CallOverrides): Promise<[string]>; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateMaxGasPrice( - _maxGasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - PRICE(overrides?: CallOverrides): Promise; - - acceptedToken(overrides?: CallOverrides): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - maxGasPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - register( - _name: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registrar(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateMaxGasPrice( - _maxGasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - PRICE(overrides?: CallOverrides): Promise; - - acceptedToken(overrides?: CallOverrides): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - maxGasPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - register( - _name: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - registrar(overrides?: CallOverrides): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - updateMaxGasPrice( - _maxGasPrice: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "MaxGasPriceChanged(uint256,uint256)"( - _oldMaxGasPrice?: PromiseOrValue | null, - _newMaxGasPrice?: PromiseOrValue | null - ): MaxGasPriceChangedEventFilter; - MaxGasPriceChanged( - _oldMaxGasPrice?: PromiseOrValue | null, - _newMaxGasPrice?: PromiseOrValue | null - ): MaxGasPriceChangedEventFilter; - - "NameBought(address,address,uint256,string)"( - _caller?: PromiseOrValue | null, - _beneficiary?: PromiseOrValue | null, - _price?: null, - _name?: null - ): NameBoughtEventFilter; - NameBought( - _caller?: PromiseOrValue | null, - _beneficiary?: PromiseOrValue | null, - _price?: null, - _name?: null - ): NameBoughtEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - }; - - estimateGas: { - PRICE(overrides?: CallOverrides): Promise; - - acceptedToken(overrides?: CallOverrides): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - maxGasPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - register( - _name: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registrar(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateMaxGasPrice( - _maxGasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - PRICE(overrides?: CallOverrides): Promise; - - acceptedToken(overrides?: CallOverrides): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - maxGasPrice(overrides?: CallOverrides): Promise; - - owner(overrides?: CallOverrides): Promise; - - register( - _name: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registrar(overrides?: CallOverrides): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateMaxGasPrice( - _maxGasPrice: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/DCLRegistrar.json b/src/contracts/DCLRegistrar.json deleted file mode 100644 index b7ffa37f3..000000000 --- a/src/contracts/DCLRegistrar.json +++ /dev/null @@ -1,587 +0,0 @@ -[ - { - "inputs": [ - { "internalType": "contract IENSRegistry", "name": "_registry", "type": "address" }, - { "internalType": "contract IBaseRegistrar", "name": "_base", "type": "address" }, - { "internalType": "string", "name": "_topdomain", "type": "string" }, - { "internalType": "string", "name": "_domain", "type": "string" }, - { "internalType": "string", "name": "_baseURI", "type": "string" } - ], - "payable": false, - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "owner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "approved", "type": "address" }, - { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } - ], - "name": "Approval", - "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": "string", "name": "_oldBaseURI", "type": "string" }, - { "indexed": false, "internalType": "string", "name": "_newBaseURI", "type": "string" } - ], - "name": "BaseURI", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "contract IBaseRegistrar", "name": "_previousBase", "type": "address" }, - { "indexed": true, "internalType": "contract IBaseRegistrar", "name": "_newBase", "type": "address" } - ], - "name": "BaseUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "_controller", "type": "address" }], - "name": "ControllerAdded", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "address", "name": "_controller", "type": "address" }], - "name": "ControllerRemoved", - "type": "event" - }, - { - "anonymous": false, - "inputs": [{ "indexed": true, "internalType": "uint256", "name": "_tokenId", "type": "uint256" }], - "name": "DomainReclaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_newOwner", "type": "address" }, - { "indexed": true, "internalType": "uint256", "name": "_tokenId", "type": "uint256" } - ], - "name": "DomainTransferred", - "type": "event" - }, - { "anonymous": false, "inputs": [], "name": "MigrationFinished", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_beneficiary", "type": "address" }, - { "indexed": true, "internalType": "bytes32", "name": "_labelHash", "type": "bytes32" }, - { "indexed": false, "internalType": "string", "name": "_subdomain", "type": "string" }, - { "indexed": false, "internalType": "uint256", "name": "_createdDate", "type": "uint256" } - ], - "name": "NameRegistered", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } - ], - "name": "OwnershipTransferred", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "_caller", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "_owner", "type": "address" }, - { "indexed": true, "internalType": "uint256", "name": "_tokenId", "type": "uint256" } - ], - "name": "Reclaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "contract IENSRegistry", "name": "_previousRegistry", "type": "address" }, - { "indexed": true, "internalType": "contract IENSRegistry", "name": "_newRegistry", "type": "address" } - ], - "name": "RegistryUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, - { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, - { "indexed": true, "internalType": "uint256", "name": "tokenId", "type": "uint256" } - ], - "name": "Transfer", - "type": "event" - }, - { - "constant": true, - "inputs": [], - "name": "ERC721_RECEIVED", - "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "controller", "type": "address" }], - "name": "addController", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "tokenId", "type": "uint256" } - ], - "name": "approve", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "string", "name": "_subdomain", "type": "string" }], - "name": "available", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }], - "name": "balanceOf", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "base", - "outputs": [{ "internalType": "contract IBaseRegistrar", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "baseURI", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "address", "name": "", "type": "address" }], - "name": "controllers", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "domain", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "domainNameHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], - "name": "getApproved", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "string", "name": "_subdomain", "type": "string" }], - "name": "getOwnerOf", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "string", "name": "_subdomain", "type": "string" }], - "name": "getTokenId", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "address", "name": "operator", "type": "address" } - ], - "name": "isApprovedForAll", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "isOwner", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "bytes32[]", "name": "_names", "type": "bytes32[]" }, - { "internalType": "address[]", "name": "_beneficiaries", "type": "address[]" }, - { "internalType": "uint256[]", "name": "_createdDates", "type": "uint256[]" } - ], - "name": "migrateNames", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "migrated", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "migrationFinished", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "address", "name": "", "type": "address" }, - { "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, - { "internalType": "bytes", "name": "", "type": "bytes" } - ], - "name": "onERC721Received", - "outputs": [{ "internalType": "bytes4", "name": "", "type": "bytes4" }], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "owner", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "uint256", "name": "tokenId", "type": "uint256" }], - "name": "ownerOf", - "outputs": [{ "internalType": "address", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "uint256", "name": "_tokenId", "type": "uint256" }, - { "internalType": "address", "name": "_owner", "type": "address" } - ], - "name": "reclaim", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "uint256", "name": "_tokenId", "type": "uint256" }], - "name": "reclaimDomain", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "string", "name": "_subdomain", "type": "string" }, - { "internalType": "address", "name": "_beneficiary", "type": "address" } - ], - "name": "register", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "registry", - "outputs": [{ "internalType": "contract IENSRegistry", "name": "", "type": "address" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "controller", "type": "address" }], - "name": "removeController", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "tokenId", "type": "uint256" } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, - { "internalType": "bytes", "name": "_data", "type": "bytes" } - ], - "name": "safeTransferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "bool", "name": "approved", "type": "bool" } - ], - "name": "setApprovalForAll", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "name": "subdomains", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "bytes4", "name": "interfaceId", "type": "bytes4" }], - "name": "supportsInterface", - "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], - "name": "tokenByIndex", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [ - { "internalType": "address", "name": "owner", "type": "address" }, - { "internalType": "uint256", "name": "index", "type": "uint256" } - ], - "name": "tokenOfOwnerByIndex", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [{ "internalType": "uint256", "name": "_tokenId", "type": "uint256" }], - "name": "tokenURI", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "topdomain", - "outputs": [{ "internalType": "string", "name": "", "type": "string" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "topdomainNameHash", - "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], - "payable": false, - "stateMutability": "view", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "_owner", "type": "address" }, - { "internalType": "uint256", "name": "_tokenId", "type": "uint256" } - ], - "name": "transferDomainOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [ - { "internalType": "address", "name": "from", "type": "address" }, - { "internalType": "address", "name": "to", "type": "address" }, - { "internalType": "uint256", "name": "tokenId", "type": "uint256" } - ], - "name": "transferFrom", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], - "name": "transferOwnership", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "contract IBaseRegistrar", "name": "_base", "type": "address" }], - "name": "updateBase", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "string", "name": "_baseURI", "type": "string" }], - "name": "updateBaseURI", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - }, - { - "constant": false, - "inputs": [{ "internalType": "contract IENSRegistry", "name": "_registry", "type": "address" }], - "name": "updateRegistry", - "outputs": [], - "payable": false, - "stateMutability": "nonpayable", - "type": "function" - } -] diff --git a/src/contracts/DCLRegistrar.ts b/src/contracts/DCLRegistrar.ts deleted file mode 100644 index 1d9c1f971..000000000 --- a/src/contracts/DCLRegistrar.ts +++ /dev/null @@ -1,1799 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ -import type { - BaseContract, - BigNumber, - BigNumberish, - BytesLike, - CallOverrides, - ContractTransaction, - Overrides, - PopulatedTransaction, - Signer, - utils, -} from "ethers"; -import type { - FunctionFragment, - Result, - EventFragment, -} from "@ethersproject/abi"; -import type { Listener, Provider } from "@ethersproject/providers"; -import type { - TypedEventFilter, - TypedEvent, - TypedListener, - OnEvent, - PromiseOrValue, -} from "./common"; - -export interface DCLRegistrarInterface extends utils.Interface { - functions: { - "ERC721_RECEIVED()": FunctionFragment; - "addController(address)": FunctionFragment; - "approve(address,uint256)": FunctionFragment; - "available(string)": FunctionFragment; - "balanceOf(address)": FunctionFragment; - "base()": FunctionFragment; - "baseURI()": FunctionFragment; - "controllers(address)": FunctionFragment; - "domain()": FunctionFragment; - "domainNameHash()": FunctionFragment; - "getApproved(uint256)": FunctionFragment; - "getOwnerOf(string)": FunctionFragment; - "getTokenId(string)": FunctionFragment; - "isApprovedForAll(address,address)": FunctionFragment; - "isOwner()": FunctionFragment; - "migrateNames(bytes32[],address[],uint256[])": FunctionFragment; - "migrated()": FunctionFragment; - "migrationFinished()": FunctionFragment; - "name()": FunctionFragment; - "onERC721Received(address,address,uint256,bytes)": FunctionFragment; - "owner()": FunctionFragment; - "ownerOf(uint256)": FunctionFragment; - "reclaim(uint256,address)": FunctionFragment; - "reclaimDomain(uint256)": FunctionFragment; - "register(string,address)": FunctionFragment; - "registry()": FunctionFragment; - "removeController(address)": FunctionFragment; - "renounceOwnership()": FunctionFragment; - "safeTransferFrom(address,address,uint256)": FunctionFragment; - "safeTransferFrom(address,address,uint256,bytes)": FunctionFragment; - "setApprovalForAll(address,bool)": FunctionFragment; - "subdomains(bytes32)": FunctionFragment; - "supportsInterface(bytes4)": FunctionFragment; - "symbol()": FunctionFragment; - "tokenByIndex(uint256)": FunctionFragment; - "tokenOfOwnerByIndex(address,uint256)": FunctionFragment; - "tokenURI(uint256)": FunctionFragment; - "topdomain()": FunctionFragment; - "topdomainNameHash()": FunctionFragment; - "totalSupply()": FunctionFragment; - "transferDomainOwnership(address,uint256)": FunctionFragment; - "transferFrom(address,address,uint256)": FunctionFragment; - "transferOwnership(address)": FunctionFragment; - "updateBase(address)": FunctionFragment; - "updateBaseURI(string)": FunctionFragment; - "updateRegistry(address)": FunctionFragment; - }; - - getFunction( - nameOrSignatureOrTopic: - | "ERC721_RECEIVED" - | "addController" - | "approve" - | "available" - | "balanceOf" - | "base" - | "baseURI" - | "controllers" - | "domain" - | "domainNameHash" - | "getApproved" - | "getOwnerOf" - | "getTokenId" - | "isApprovedForAll" - | "isOwner" - | "migrateNames" - | "migrated" - | "migrationFinished" - | "name" - | "onERC721Received" - | "owner" - | "ownerOf" - | "reclaim" - | "reclaimDomain" - | "register" - | "registry" - | "removeController" - | "renounceOwnership" - | "safeTransferFrom(address,address,uint256)" - | "safeTransferFrom(address,address,uint256,bytes)" - | "setApprovalForAll" - | "subdomains" - | "supportsInterface" - | "symbol" - | "tokenByIndex" - | "tokenOfOwnerByIndex" - | "tokenURI" - | "topdomain" - | "topdomainNameHash" - | "totalSupply" - | "transferDomainOwnership" - | "transferFrom" - | "transferOwnership" - | "updateBase" - | "updateBaseURI" - | "updateRegistry" - ): FunctionFragment; - - encodeFunctionData( - functionFragment: "ERC721_RECEIVED", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "addController", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "approve", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "available", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "balanceOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "base", values?: undefined): string; - encodeFunctionData(functionFragment: "baseURI", values?: undefined): string; - encodeFunctionData( - functionFragment: "controllers", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "domain", values?: undefined): string; - encodeFunctionData( - functionFragment: "domainNameHash", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "getApproved", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getOwnerOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "getTokenId", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "isApprovedForAll", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "isOwner", values?: undefined): string; - encodeFunctionData( - functionFragment: "migrateNames", - values: [ - PromiseOrValue[], - PromiseOrValue[], - PromiseOrValue[] - ] - ): string; - encodeFunctionData(functionFragment: "migrated", values?: undefined): string; - encodeFunctionData( - functionFragment: "migrationFinished", - values?: undefined - ): string; - encodeFunctionData(functionFragment: "name", values?: undefined): string; - encodeFunctionData( - functionFragment: "onERC721Received", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData(functionFragment: "owner", values?: undefined): string; - encodeFunctionData( - functionFragment: "ownerOf", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "reclaim", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "reclaimDomain", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "register", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "registry", values?: undefined): string; - encodeFunctionData( - functionFragment: "removeController", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "renounceOwnership", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "safeTransferFrom(address,address,uint256)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "setApprovalForAll", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "subdomains", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "supportsInterface", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "symbol", values?: undefined): string; - encodeFunctionData( - functionFragment: "tokenByIndex", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "tokenOfOwnerByIndex", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "tokenURI", - values: [PromiseOrValue] - ): string; - encodeFunctionData(functionFragment: "topdomain", values?: undefined): string; - encodeFunctionData( - functionFragment: "topdomainNameHash", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "totalSupply", - values?: undefined - ): string; - encodeFunctionData( - functionFragment: "transferDomainOwnership", - values: [PromiseOrValue, PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "transferFrom", - values: [ - PromiseOrValue, - PromiseOrValue, - PromiseOrValue - ] - ): string; - encodeFunctionData( - functionFragment: "transferOwnership", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "updateBase", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "updateBaseURI", - values: [PromiseOrValue] - ): string; - encodeFunctionData( - functionFragment: "updateRegistry", - values: [PromiseOrValue] - ): string; - - decodeFunctionResult( - functionFragment: "ERC721_RECEIVED", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "addController", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "available", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "base", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "baseURI", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "controllers", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "domain", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "domainNameHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "getApproved", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "getOwnerOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "getTokenId", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "isApprovedForAll", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "migrateNames", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "migrated", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "migrationFinished", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "onERC721Received", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "ownerOf", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "reclaim", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "reclaimDomain", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "register", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "registry", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "removeController", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "renounceOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeTransferFrom(address,address,uint256)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "safeTransferFrom(address,address,uint256,bytes)", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "setApprovalForAll", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "subdomains", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "supportsInterface", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "tokenByIndex", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "tokenOfOwnerByIndex", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "tokenURI", data: BytesLike): Result; - decodeFunctionResult(functionFragment: "topdomain", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "topdomainNameHash", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "totalSupply", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferDomainOwnership", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferFrom", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "transferOwnership", - data: BytesLike - ): Result; - decodeFunctionResult(functionFragment: "updateBase", data: BytesLike): Result; - decodeFunctionResult( - functionFragment: "updateBaseURI", - data: BytesLike - ): Result; - decodeFunctionResult( - functionFragment: "updateRegistry", - data: BytesLike - ): Result; - - events: { - "Approval(address,address,uint256)": EventFragment; - "ApprovalForAll(address,address,bool)": EventFragment; - "BaseURI(string,string)": EventFragment; - "BaseUpdated(address,address)": EventFragment; - "ControllerAdded(address)": EventFragment; - "ControllerRemoved(address)": EventFragment; - "DomainReclaimed(uint256)": EventFragment; - "DomainTransferred(address,uint256)": EventFragment; - "MigrationFinished()": EventFragment; - "NameRegistered(address,address,bytes32,string,uint256)": EventFragment; - "OwnershipTransferred(address,address)": EventFragment; - "Reclaimed(address,address,uint256)": EventFragment; - "RegistryUpdated(address,address)": EventFragment; - "Transfer(address,address,uint256)": EventFragment; - }; - - getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BaseURI"): EventFragment; - getEvent(nameOrSignatureOrTopic: "BaseUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ControllerAdded"): EventFragment; - getEvent(nameOrSignatureOrTopic: "ControllerRemoved"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DomainReclaimed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "DomainTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "MigrationFinished"): EventFragment; - getEvent(nameOrSignatureOrTopic: "NameRegistered"): EventFragment; - getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Reclaimed"): EventFragment; - getEvent(nameOrSignatureOrTopic: "RegistryUpdated"): EventFragment; - getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; -} - -export interface ApprovalEventObject { - owner: string; - approved: string; - tokenId: BigNumber; -} -export type ApprovalEvent = TypedEvent< - [string, string, BigNumber], - ApprovalEventObject ->; - -export type ApprovalEventFilter = TypedEventFilter; - -export interface ApprovalForAllEventObject { - owner: string; - operator: string; - approved: boolean; -} -export type ApprovalForAllEvent = TypedEvent< - [string, string, boolean], - ApprovalForAllEventObject ->; - -export type ApprovalForAllEventFilter = TypedEventFilter; - -export interface BaseURIEventObject { - _oldBaseURI: string; - _newBaseURI: string; -} -export type BaseURIEvent = TypedEvent<[string, string], BaseURIEventObject>; - -export type BaseURIEventFilter = TypedEventFilter; - -export interface BaseUpdatedEventObject { - _previousBase: string; - _newBase: string; -} -export type BaseUpdatedEvent = TypedEvent< - [string, string], - BaseUpdatedEventObject ->; - -export type BaseUpdatedEventFilter = TypedEventFilter; - -export interface ControllerAddedEventObject { - _controller: string; -} -export type ControllerAddedEvent = TypedEvent< - [string], - ControllerAddedEventObject ->; - -export type ControllerAddedEventFilter = TypedEventFilter; - -export interface ControllerRemovedEventObject { - _controller: string; -} -export type ControllerRemovedEvent = TypedEvent< - [string], - ControllerRemovedEventObject ->; - -export type ControllerRemovedEventFilter = - TypedEventFilter; - -export interface DomainReclaimedEventObject { - _tokenId: BigNumber; -} -export type DomainReclaimedEvent = TypedEvent< - [BigNumber], - DomainReclaimedEventObject ->; - -export type DomainReclaimedEventFilter = TypedEventFilter; - -export interface DomainTransferredEventObject { - _newOwner: string; - _tokenId: BigNumber; -} -export type DomainTransferredEvent = TypedEvent< - [string, BigNumber], - DomainTransferredEventObject ->; - -export type DomainTransferredEventFilter = - TypedEventFilter; - -export interface MigrationFinishedEventObject {} -export type MigrationFinishedEvent = TypedEvent< - [], - MigrationFinishedEventObject ->; - -export type MigrationFinishedEventFilter = - TypedEventFilter; - -export interface NameRegisteredEventObject { - _caller: string; - _beneficiary: string; - _labelHash: string; - _subdomain: string; - _createdDate: BigNumber; -} -export type NameRegisteredEvent = TypedEvent< - [string, string, string, string, BigNumber], - NameRegisteredEventObject ->; - -export type NameRegisteredEventFilter = TypedEventFilter; - -export interface OwnershipTransferredEventObject { - previousOwner: string; - newOwner: string; -} -export type OwnershipTransferredEvent = TypedEvent< - [string, string], - OwnershipTransferredEventObject ->; - -export type OwnershipTransferredEventFilter = - TypedEventFilter; - -export interface ReclaimedEventObject { - _caller: string; - _owner: string; - _tokenId: BigNumber; -} -export type ReclaimedEvent = TypedEvent< - [string, string, BigNumber], - ReclaimedEventObject ->; - -export type ReclaimedEventFilter = TypedEventFilter; - -export interface RegistryUpdatedEventObject { - _previousRegistry: string; - _newRegistry: string; -} -export type RegistryUpdatedEvent = TypedEvent< - [string, string], - RegistryUpdatedEventObject ->; - -export type RegistryUpdatedEventFilter = TypedEventFilter; - -export interface TransferEventObject { - from: string; - to: string; - tokenId: BigNumber; -} -export type TransferEvent = TypedEvent< - [string, string, BigNumber], - TransferEventObject ->; - -export type TransferEventFilter = TypedEventFilter; - -export interface DCLRegistrar extends BaseContract { - connect(signerOrProvider: Signer | Provider | string): this; - attach(addressOrName: string): this; - deployed(): Promise; - - interface: DCLRegistrarInterface; - - queryFilter( - event: TypedEventFilter, - fromBlockOrBlockhash?: string | number | undefined, - toBlock?: string | number | undefined - ): Promise>; - - listeners( - eventFilter?: TypedEventFilter - ): Array>; - listeners(eventName?: string): Array; - removeAllListeners( - eventFilter: TypedEventFilter - ): this; - removeAllListeners(eventName?: string): this; - off: OnEvent; - on: OnEvent; - once: OnEvent; - removeListener: OnEvent; - - functions: { - ERC721_RECEIVED(overrides?: CallOverrides): Promise<[string]>; - - addController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - available( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - base(overrides?: CallOverrides): Promise<[string]>; - - baseURI(overrides?: CallOverrides): Promise<[string]>; - - controllers( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - domain(overrides?: CallOverrides): Promise<[string]>; - - domainNameHash(overrides?: CallOverrides): Promise<[string]>; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - getOwnerOf( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - getTokenId( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - isOwner(overrides?: CallOverrides): Promise<[boolean]>; - - migrateNames( - _names: PromiseOrValue[], - _beneficiaries: PromiseOrValue[], - _createdDates: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - migrated(overrides?: CallOverrides): Promise<[boolean]>; - - migrationFinished( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise<[string]>; - - onERC721Received( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - _tokenId: PromiseOrValue, - arg3: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise<[string]>; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - reclaim( - _tokenId: PromiseOrValue, - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - reclaimDomain( - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - register( - _subdomain: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registry(overrides?: CallOverrides): Promise<[string]>; - - removeController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - to: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - subdomains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[boolean]>; - - symbol(overrides?: CallOverrides): Promise<[string]>; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[BigNumber]>; - - tokenURI( - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise<[string]>; - - topdomain(overrides?: CallOverrides): Promise<[string]>; - - topdomainNameHash(overrides?: CallOverrides): Promise<[string]>; - - totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; - - transferDomainOwnership( - _owner: PromiseOrValue, - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBase( - _base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBaseURI( - _baseURI: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateRegistry( - _registry: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - ERC721_RECEIVED(overrides?: CallOverrides): Promise; - - addController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - available( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - controllers( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - domain(overrides?: CallOverrides): Promise; - - domainNameHash(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwnerOf( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getTokenId( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - migrateNames( - _names: PromiseOrValue[], - _beneficiaries: PromiseOrValue[], - _createdDates: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - migrated(overrides?: CallOverrides): Promise; - - migrationFinished( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - onERC721Received( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - _tokenId: PromiseOrValue, - arg3: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - reclaim( - _tokenId: PromiseOrValue, - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - reclaimDomain( - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - register( - _subdomain: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registry(overrides?: CallOverrides): Promise; - - removeController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - to: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - subdomains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - topdomain(overrides?: CallOverrides): Promise; - - topdomainNameHash(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferDomainOwnership( - _owner: PromiseOrValue, - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBase( - _base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBaseURI( - _baseURI: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateRegistry( - _registry: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - callStatic: { - ERC721_RECEIVED(overrides?: CallOverrides): Promise; - - addController( - controller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - available( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - controllers( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - domain(overrides?: CallOverrides): Promise; - - domainNameHash(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwnerOf( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getTokenId( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - migrateNames( - _names: PromiseOrValue[], - _beneficiaries: PromiseOrValue[], - _createdDates: PromiseOrValue[], - overrides?: CallOverrides - ): Promise; - - migrated(overrides?: CallOverrides): Promise; - - migrationFinished(overrides?: CallOverrides): Promise; - - name(overrides?: CallOverrides): Promise; - - onERC721Received( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - _tokenId: PromiseOrValue, - arg3: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - reclaim( - _tokenId: PromiseOrValue, - _owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - reclaimDomain( - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - register( - _subdomain: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - registry(overrides?: CallOverrides): Promise; - - removeController( - controller: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - renounceOwnership(overrides?: CallOverrides): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - setApprovalForAll( - to: PromiseOrValue, - approved: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - subdomains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - topdomain(overrides?: CallOverrides): Promise; - - topdomainNameHash(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferDomainOwnership( - _owner: PromiseOrValue, - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - updateBase( - _base: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - updateBaseURI( - _baseURI: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - updateRegistry( - _registry: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - }; - - filters: { - "Approval(address,address,uint256)"( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - Approval( - owner?: PromiseOrValue | null, - approved?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): ApprovalEventFilter; - - "ApprovalForAll(address,address,bool)"( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - ApprovalForAll( - owner?: PromiseOrValue | null, - operator?: PromiseOrValue | null, - approved?: null - ): ApprovalForAllEventFilter; - - "BaseURI(string,string)"( - _oldBaseURI?: null, - _newBaseURI?: null - ): BaseURIEventFilter; - BaseURI(_oldBaseURI?: null, _newBaseURI?: null): BaseURIEventFilter; - - "BaseUpdated(address,address)"( - _previousBase?: PromiseOrValue | null, - _newBase?: PromiseOrValue | null - ): BaseUpdatedEventFilter; - BaseUpdated( - _previousBase?: PromiseOrValue | null, - _newBase?: PromiseOrValue | null - ): BaseUpdatedEventFilter; - - "ControllerAdded(address)"( - _controller?: PromiseOrValue | null - ): ControllerAddedEventFilter; - ControllerAdded( - _controller?: PromiseOrValue | null - ): ControllerAddedEventFilter; - - "ControllerRemoved(address)"( - _controller?: PromiseOrValue | null - ): ControllerRemovedEventFilter; - ControllerRemoved( - _controller?: PromiseOrValue | null - ): ControllerRemovedEventFilter; - - "DomainReclaimed(uint256)"( - _tokenId?: PromiseOrValue | null - ): DomainReclaimedEventFilter; - DomainReclaimed( - _tokenId?: PromiseOrValue | null - ): DomainReclaimedEventFilter; - - "DomainTransferred(address,uint256)"( - _newOwner?: PromiseOrValue | null, - _tokenId?: PromiseOrValue | null - ): DomainTransferredEventFilter; - DomainTransferred( - _newOwner?: PromiseOrValue | null, - _tokenId?: PromiseOrValue | null - ): DomainTransferredEventFilter; - - "MigrationFinished()"(): MigrationFinishedEventFilter; - MigrationFinished(): MigrationFinishedEventFilter; - - "NameRegistered(address,address,bytes32,string,uint256)"( - _caller?: PromiseOrValue | null, - _beneficiary?: PromiseOrValue | null, - _labelHash?: PromiseOrValue | null, - _subdomain?: null, - _createdDate?: null - ): NameRegisteredEventFilter; - NameRegistered( - _caller?: PromiseOrValue | null, - _beneficiary?: PromiseOrValue | null, - _labelHash?: PromiseOrValue | null, - _subdomain?: null, - _createdDate?: null - ): NameRegisteredEventFilter; - - "OwnershipTransferred(address,address)"( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - OwnershipTransferred( - previousOwner?: PromiseOrValue | null, - newOwner?: PromiseOrValue | null - ): OwnershipTransferredEventFilter; - - "Reclaimed(address,address,uint256)"( - _caller?: PromiseOrValue | null, - _owner?: PromiseOrValue | null, - _tokenId?: PromiseOrValue | null - ): ReclaimedEventFilter; - Reclaimed( - _caller?: PromiseOrValue | null, - _owner?: PromiseOrValue | null, - _tokenId?: PromiseOrValue | null - ): ReclaimedEventFilter; - - "RegistryUpdated(address,address)"( - _previousRegistry?: PromiseOrValue | null, - _newRegistry?: PromiseOrValue | null - ): RegistryUpdatedEventFilter; - RegistryUpdated( - _previousRegistry?: PromiseOrValue | null, - _newRegistry?: PromiseOrValue | null - ): RegistryUpdatedEventFilter; - - "Transfer(address,address,uint256)"( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - Transfer( - from?: PromiseOrValue | null, - to?: PromiseOrValue | null, - tokenId?: PromiseOrValue | null - ): TransferEventFilter; - }; - - estimateGas: { - ERC721_RECEIVED(overrides?: CallOverrides): Promise; - - addController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - available( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - controllers( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - domain(overrides?: CallOverrides): Promise; - - domainNameHash(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwnerOf( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getTokenId( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - migrateNames( - _names: PromiseOrValue[], - _beneficiaries: PromiseOrValue[], - _createdDates: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - migrated(overrides?: CallOverrides): Promise; - - migrationFinished( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - onERC721Received( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - _tokenId: PromiseOrValue, - arg3: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - reclaim( - _tokenId: PromiseOrValue, - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - reclaimDomain( - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - register( - _subdomain: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registry(overrides?: CallOverrides): Promise; - - removeController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - to: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - subdomains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - topdomain(overrides?: CallOverrides): Promise; - - topdomainNameHash(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferDomainOwnership( - _owner: PromiseOrValue, - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBase( - _base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBaseURI( - _baseURI: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateRegistry( - _registry: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; - - populateTransaction: { - ERC721_RECEIVED(overrides?: CallOverrides): Promise; - - addController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - approve( - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - available( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - balanceOf( - owner: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - base(overrides?: CallOverrides): Promise; - - baseURI(overrides?: CallOverrides): Promise; - - controllers( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - domain(overrides?: CallOverrides): Promise; - - domainNameHash(overrides?: CallOverrides): Promise; - - getApproved( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getOwnerOf( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - getTokenId( - _subdomain: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isApprovedForAll( - owner: PromiseOrValue, - operator: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - isOwner(overrides?: CallOverrides): Promise; - - migrateNames( - _names: PromiseOrValue[], - _beneficiaries: PromiseOrValue[], - _createdDates: PromiseOrValue[], - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - migrated(overrides?: CallOverrides): Promise; - - migrationFinished( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - name(overrides?: CallOverrides): Promise; - - onERC721Received( - arg0: PromiseOrValue, - arg1: PromiseOrValue, - _tokenId: PromiseOrValue, - arg3: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - owner(overrides?: CallOverrides): Promise; - - ownerOf( - tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - reclaim( - _tokenId: PromiseOrValue, - _owner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - reclaimDomain( - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - register( - _subdomain: PromiseOrValue, - _beneficiary: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - registry(overrides?: CallOverrides): Promise; - - removeController( - controller: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - renounceOwnership( - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - "safeTransferFrom(address,address,uint256,bytes)"( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - _data: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - setApprovalForAll( - to: PromiseOrValue, - approved: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - subdomains( - arg0: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - supportsInterface( - interfaceId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - symbol(overrides?: CallOverrides): Promise; - - tokenByIndex( - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenOfOwnerByIndex( - owner: PromiseOrValue, - index: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - tokenURI( - _tokenId: PromiseOrValue, - overrides?: CallOverrides - ): Promise; - - topdomain(overrides?: CallOverrides): Promise; - - topdomainNameHash(overrides?: CallOverrides): Promise; - - totalSupply(overrides?: CallOverrides): Promise; - - transferDomainOwnership( - _owner: PromiseOrValue, - _tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferFrom( - from: PromiseOrValue, - to: PromiseOrValue, - tokenId: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - transferOwnership( - newOwner: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBase( - _base: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateBaseURI( - _baseURI: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - - updateRegistry( - _registry: PromiseOrValue, - overrides?: Overrides & { from?: PromiseOrValue } - ): Promise; - }; -} diff --git a/src/contracts/factories/DCLController__factory.ts b/src/contracts/factories/DCLController__factory.ts deleted file mode 100644 index 8837897e5..000000000 --- a/src/contracts/factories/DCLController__factory.ts +++ /dev/null @@ -1,258 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { DCLController, DCLControllerInterface } from "../DCLController"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract IERC20Token", - name: "_acceptedToken", - type: "address", - }, - { - internalType: "contract IDCLRegistrar", - name: "_registrar", - type: "address", - }, - ], - payable: false, - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_oldMaxGasPrice", - type: "uint256", - }, - { - indexed: true, - internalType: "uint256", - name: "_newMaxGasPrice", - type: "uint256", - }, - ], - name: "MaxGasPriceChanged", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_caller", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_beneficiary", - type: "address", - }, - { - indexed: false, - internalType: "uint256", - name: "_price", - type: "uint256", - }, - { - indexed: false, - internalType: "string", - name: "_name", - type: "string", - }, - ], - name: "NameBought", - 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", - }, - { - constant: true, - inputs: [], - name: "PRICE", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "acceptedToken", - outputs: [ - { - internalType: "contract IERC20Token", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "isOwner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "maxGasPrice", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "string", - name: "_name", - type: "string", - }, - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "register", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [], - name: "registrar", - outputs: [ - { - internalType: "contract IDCLRegistrar", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [], - name: "renounceOwnership", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "uint256", - name: "_maxGasPrice", - type: "uint256", - }, - ], - name: "updateMaxGasPrice", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class DCLController__factory { - static readonly abi = _abi; - static createInterface(): DCLControllerInterface { - return new utils.Interface(_abi) as DCLControllerInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): DCLController { - return new Contract(address, _abi, signerOrProvider) as DCLController; - } -} diff --git a/src/contracts/factories/DCLRegistrar__factory.ts b/src/contracts/factories/DCLRegistrar__factory.ts deleted file mode 100644 index e0e2c8ace..000000000 --- a/src/contracts/factories/DCLRegistrar__factory.ts +++ /dev/null @@ -1,1189 +0,0 @@ -/* Autogenerated file. Do not edit manually. */ -/* tslint:disable */ -/* eslint-disable */ - -import { Contract, Signer, utils } from "ethers"; -import type { Provider } from "@ethersproject/providers"; -import type { DCLRegistrar, DCLRegistrarInterface } from "../DCLRegistrar"; - -const _abi = [ - { - inputs: [ - { - internalType: "contract IENSRegistry", - name: "_registry", - type: "address", - }, - { - internalType: "contract IBaseRegistrar", - name: "_base", - type: "address", - }, - { - internalType: "string", - name: "_topdomain", - type: "string", - }, - { - internalType: "string", - name: "_domain", - type: "string", - }, - { - internalType: "string", - name: "_baseURI", - type: "string", - }, - ], - payable: false, - stateMutability: "nonpayable", - type: "constructor", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "owner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "approved", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Approval", - 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: "string", - name: "_oldBaseURI", - type: "string", - }, - { - indexed: false, - internalType: "string", - name: "_newBaseURI", - type: "string", - }, - ], - name: "BaseURI", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IBaseRegistrar", - name: "_previousBase", - type: "address", - }, - { - indexed: true, - internalType: "contract IBaseRegistrar", - name: "_newBase", - type: "address", - }, - ], - name: "BaseUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_controller", - type: "address", - }, - ], - name: "ControllerAdded", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_controller", - type: "address", - }, - ], - name: "ControllerRemoved", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - ], - name: "DomainReclaimed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_newOwner", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - ], - name: "DomainTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [], - name: "MigrationFinished", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_caller", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_beneficiary", - type: "address", - }, - { - indexed: true, - internalType: "bytes32", - name: "_labelHash", - type: "bytes32", - }, - { - indexed: false, - internalType: "string", - name: "_subdomain", - type: "string", - }, - { - indexed: false, - internalType: "uint256", - name: "_createdDate", - type: "uint256", - }, - ], - name: "NameRegistered", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "previousOwner", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "OwnershipTransferred", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_caller", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "_owner", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - ], - name: "Reclaimed", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "contract IENSRegistry", - name: "_previousRegistry", - type: "address", - }, - { - indexed: true, - internalType: "contract IENSRegistry", - name: "_newRegistry", - type: "address", - }, - ], - name: "RegistryUpdated", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "from", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "to", - type: "address", - }, - { - indexed: true, - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "Transfer", - type: "event", - }, - { - constant: true, - inputs: [], - name: "ERC721_RECEIVED", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "controller", - type: "address", - }, - ], - name: "addController", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "approve", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "string", - name: "_subdomain", - type: "string", - }, - ], - name: "available", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "balanceOf", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "base", - outputs: [ - { - internalType: "contract IBaseRegistrar", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "baseURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - name: "controllers", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "domain", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "domainNameHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "getApproved", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "string", - name: "_subdomain", - type: "string", - }, - ], - name: "getOwnerOf", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "string", - name: "_subdomain", - type: "string", - }, - ], - name: "getTokenId", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "address", - name: "operator", - type: "address", - }, - ], - name: "isApprovedForAll", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "isOwner", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "bytes32[]", - name: "_names", - type: "bytes32[]", - }, - { - internalType: "address[]", - name: "_beneficiaries", - type: "address[]", - }, - { - internalType: "uint256[]", - name: "_createdDates", - type: "uint256[]", - }, - ], - name: "migrateNames", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [], - name: "migrated", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [], - name: "migrationFinished", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [], - name: "name", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "address", - name: "", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - { - internalType: "bytes", - name: "", - type: "bytes", - }, - ], - name: "onERC721Received", - outputs: [ - { - internalType: "bytes4", - name: "", - type: "bytes4", - }, - ], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [], - name: "owner", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "ownerOf", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - { - internalType: "address", - name: "_owner", - type: "address", - }, - ], - name: "reclaim", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - ], - name: "reclaimDomain", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "string", - name: "_subdomain", - type: "string", - }, - { - internalType: "address", - name: "_beneficiary", - type: "address", - }, - ], - name: "register", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [], - name: "registry", - outputs: [ - { - internalType: "contract IENSRegistry", - name: "", - type: "address", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "controller", - type: "address", - }, - ], - name: "removeController", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [], - name: "renounceOwnership", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "safeTransferFrom", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - { - internalType: "bytes", - name: "_data", - type: "bytes", - }, - ], - name: "safeTransferFrom", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "bool", - name: "approved", - type: "bool", - }, - ], - name: "setApprovalForAll", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - name: "subdomains", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "bytes4", - name: "interfaceId", - type: "bytes4", - }, - ], - name: "supportsInterface", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "symbol", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - ], - name: "tokenByIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - { - internalType: "uint256", - name: "index", - type: "uint256", - }, - ], - name: "tokenOfOwnerByIndex", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [ - { - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - ], - name: "tokenURI", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "topdomain", - outputs: [ - { - internalType: "string", - name: "", - type: "string", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "topdomainNameHash", - outputs: [ - { - internalType: "bytes32", - name: "", - type: "bytes32", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: true, - inputs: [], - name: "totalSupply", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - payable: false, - stateMutability: "view", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "_owner", - type: "address", - }, - { - internalType: "uint256", - name: "_tokenId", - type: "uint256", - }, - ], - name: "transferDomainOwnership", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "from", - type: "address", - }, - { - internalType: "address", - name: "to", - type: "address", - }, - { - internalType: "uint256", - name: "tokenId", - type: "uint256", - }, - ], - name: "transferFrom", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "address", - name: "newOwner", - type: "address", - }, - ], - name: "transferOwnership", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "contract IBaseRegistrar", - name: "_base", - type: "address", - }, - ], - name: "updateBase", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "string", - name: "_baseURI", - type: "string", - }, - ], - name: "updateBaseURI", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, - { - constant: false, - inputs: [ - { - internalType: "contract IENSRegistry", - name: "_registry", - type: "address", - }, - ], - name: "updateRegistry", - outputs: [], - payable: false, - stateMutability: "nonpayable", - type: "function", - }, -]; - -export class DCLRegistrar__factory { - static readonly abi = _abi; - static createInterface(): DCLRegistrarInterface { - return new utils.Interface(_abi) as DCLRegistrarInterface; - } - static connect( - address: string, - signerOrProvider: Signer | Provider - ): DCLRegistrar { - return new Contract(address, _abi, signerOrProvider) as DCLRegistrar; - } -} diff --git a/src/contracts/factories/index.ts b/src/contracts/factories/index.ts index f0b0829c6..60882d01e 100644 --- a/src/contracts/factories/index.ts +++ b/src/contracts/factories/index.ts @@ -1,8 +1,6 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export { DCLController__factory } from "./DCLController__factory"; -export { DCLRegistrar__factory } from "./DCLRegistrar__factory"; export { ENS__factory } from "./ENS__factory"; export { ENSResolver__factory } from "./ENSResolver__factory"; export { ERC20__factory } from "./ERC20__factory"; diff --git a/src/contracts/index.ts b/src/contracts/index.ts index 50c072019..cd2072066 100644 --- a/src/contracts/index.ts +++ b/src/contracts/index.ts @@ -1,8 +1,6 @@ /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ -export type { DCLController } from "./DCLController"; -export type { DCLRegistrar } from "./DCLRegistrar"; export type { ENS } from "./ENS"; export type { ENSResolver } from "./ENSResolver"; export type { ERC20 } from "./ERC20"; @@ -11,8 +9,6 @@ export type { EstateRegistry } from "./EstateRegistry"; export type { LANDRegistry } from "./LANDRegistry"; export type { Rentals } from "./Rentals"; export * as factories from "./factories"; -export { DCLController__factory } from "./factories/DCLController__factory"; -export { DCLRegistrar__factory } from "./factories/DCLRegistrar__factory"; export { ENS__factory } from "./factories/ENS__factory"; export { ENSResolver__factory } from "./factories/ENSResolver__factory"; export { ERC20__factory } from "./factories/ERC20__factory"; diff --git a/src/modules/common/contracts.ts b/src/modules/common/contracts.ts index 334c47880..f833dc517 100644 --- a/src/modules/common/contracts.ts +++ b/src/modules/common/contracts.ts @@ -5,6 +5,4 @@ export const LAND_REGISTRY_ADDRESS = config.get('LAND_REGISTRY_CONTRACT_ADDRESS' export const ESTATE_REGISTRY_ADDRESS = config.get('ESTATE_REGISTRY_CONTRACT_ADDRESS', '') export const ENS_ADDRESS = config.get('ENS_CONTRACT_ADDRESS', '') export const ENS_RESOLVER_ADDRESS = config.get('RESOLVER_CONTRACT_ADDRESS', '') -export const CONTROLLER_V2_ADDRESS = config.get('CONTROLLER_V2_CONTRACT_ADDRESS', '') -export const REGISTRAR_ADDRESS = config.get('REGISTRAR_CONTRACT_ADDRESS', '') export const RENTALS_ADDRESS = config.get('RENTALS_CONTRACT_ADDRESS', '') diff --git a/src/modules/contract/utils.ts b/src/modules/contract/utils.ts index ffc0e4d92..7aefc7d99 100644 --- a/src/modules/contract/utils.ts +++ b/src/modules/contract/utils.ts @@ -1,4 +1,5 @@ -import { ContractName, getContractName } from 'decentraland-transactions' +import { ContractName, getContract, getContractName } from 'decentraland-transactions' +import { config } from 'config' export function getContractSymbol(address: string) { const contractName = getContractName(address) @@ -12,3 +13,7 @@ export function getContractSymbol(address: string) { } return symbol } + +export function getContractAddressForAppChainId(contractName: ContractName) { + return getContract(contractName, Number(config.get('CHAIN_ID'))).address +} diff --git a/src/modules/ens/sagas.spec.ts b/src/modules/ens/sagas.spec.ts index fdfd4974f..330844c4a 100644 --- a/src/modules/ens/sagas.spec.ts +++ b/src/modules/ens/sagas.spec.ts @@ -1,13 +1,15 @@ +import { expectSaga } from 'redux-saga-test-plan' +import { call, select } from 'redux-saga/effects' +import { ethers } from 'ethers' import { BuilderClient } from '@dcl/builder-client' import { ChainId, Network } from '@dcl/schemas' import { ERC20__factory, ERC20, DCLController__factory } from 'contracts' import { getChainIdByNetwork, getSigner } from 'decentraland-dapps/dist/lib/eth' import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors' -import { ethers } from 'ethers' -import { CONTROLLER_V2_ADDRESS, MANA_ADDRESS } from 'modules/common/contracts' +import { ContractName } from 'decentraland-transactions' +import { MANA_ADDRESS } from 'modules/common/contracts' +import { getContractAddressForAppChainId } from 'modules/contract/utils' import { getWallet } from 'modules/wallet/utils' -import { expectSaga } from 'redux-saga-test-plan' -import { call, select } from 'redux-saga/effects' import { allowClaimManaRequest, claimNameRequest, fetchENSAuthorizationRequest } from './actions' import { ensSaga } from './sagas' @@ -46,7 +48,7 @@ describe('when handling the approve claim mana request', () => { [call(getSigner), signer], [call([ERC20__factory, 'connect'], MANA_ADDRESS, signer), manaContract] ]) - .call([manaContract, 'approve'], CONTROLLER_V2_ADDRESS, allowance) + .call([manaContract, 'approve'], getContractAddressForAppChainId(ContractName.DCLControllerV2), allowance) .dispatch(allowClaimManaRequest(allowance)) .silentRun() }) @@ -67,7 +69,7 @@ describe('when handling the fetch of authorizations request', () => { [select(getAddress), from], [call(getChainIdByNetwork, Network.ETHEREUM), ChainId.ETHEREUM_GOERLI] ]) - .call(manaContract.allowance, from, CONTROLLER_V2_ADDRESS) + .call(manaContract.allowance, from, getContractAddressForAppChainId(ContractName.DCLControllerV2)) .dispatch(fetchENSAuthorizationRequest()) .silentRun() }) @@ -82,7 +84,7 @@ describe('when handling the claim name request', () => { [call(getWallet), { address: 'address' }], [call(getSigner), signer] ]) - .call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer) + .call([DCLController__factory, 'connect'], getContractAddressForAppChainId(ContractName.DCLControllerV2), signer) .dispatch(claimNameRequest('name')) .silentRun() }) diff --git a/src/modules/ens/sagas.ts b/src/modules/ens/sagas.ts index 2690a6375..35b6207fb 100644 --- a/src/modules/ens/sagas.ts +++ b/src/modules/ens/sagas.ts @@ -5,25 +5,24 @@ import { all, call, put, select, takeEvery, takeLatest } from 'redux-saga/effect import { ChainId, Network } from '@dcl/schemas' import { BuilderClient, LandCoords, LandHashes } from '@dcl/builder-client' import { ContractName, getContract } from 'decentraland-transactions' +import { DCLControllerV2, DCLControllerV2__factory, DCLRegistrar__factory } from 'decentraland-transactions/typechain' import { getChainIdByNetwork, getNetworkProvider, getSigner } from 'decentraland-dapps/dist/lib/eth' import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors' import { Wallet } from 'decentraland-dapps/dist/modules/wallet/types' import { getCurrentLocale } from 'decentraland-dapps/dist/modules/translation/utils' import { waitForTx } from 'decentraland-dapps/dist/modules/transaction/utils' -import { DCLController } from 'contracts' import { ENS__factory } from 'contracts/factories/ENS__factory' import { ENSResolver__factory } from 'contracts/factories/ENSResolver__factory' -import { DCLRegistrar__factory } from 'contracts/factories/DCLRegistrar__factory' -import { DCLController__factory } from 'contracts/factories/DCLController__factory' import { ERC20__factory } from 'contracts/factories/ERC20__factory' -import { ENS_ADDRESS, ENS_RESOLVER_ADDRESS, CONTROLLER_V2_ADDRESS, MANA_ADDRESS, REGISTRAR_ADDRESS } from 'modules/common/contracts' +import { ENS_ADDRESS, ENS_RESOLVER_ADDRESS, MANA_ADDRESS } from 'modules/common/contracts' import { getWallet } from 'modules/wallet/utils' import { getCenter, getSelection } from 'modules/land/utils' -import { marketplace } from 'lib/api/marketplace' +import { getContractAddressForAppChainId } from 'modules/contract/utils' import { getLands } from 'modules/land/selectors' import { FETCH_LANDS_SUCCESS } from 'modules/land/actions' import { Land, LandType } from 'modules/land/types' import { closeModal } from 'modules/modal/actions' +import { marketplace } from 'lib/api/marketplace' import { FETCH_ENS_REQUEST, FetchENSRequestAction, @@ -89,7 +88,7 @@ export function* ensSaga(builderClient: BuilderClient) { const address = wallet.address const nodehash = namehash(subdomain) const ensContract = ENS__factory.connect(ENS_ADDRESS, signer) - const dclRegistrarContract = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, signer) + const dclRegistrarContract = DCLRegistrar__factory.connect(getContractAddressForAppChainId(ContractName.DCLRegistrar), signer) const [resolverAddress, ownerAddress, nftTokenId]: [string, string, BigNumber] = yield all([ call([ensContract, 'resolver'], nodehash), call([ensContract, 'owner'], nodehash), @@ -242,7 +241,7 @@ export function* ensSaga(builderClient: BuilderClient) { const contract = getContract(ContractName.MANAToken, chainId) const provider: Awaited> = yield call(getNetworkProvider, chainId) const mana = new ethers.Contract(contract.address, contract.abi, new ethers.providers.Web3Provider(provider)) - const allowance: string = yield call(mana.allowance, from, CONTROLLER_V2_ADDRESS) + const allowance: string = yield call(mana.allowance, from, getContractAddressForAppChainId(ContractName.DCLControllerV2)) const authorization: Authorization = { allowance } yield put(fetchENSAuthorizationSuccess(authorization, from.toString())) @@ -262,21 +261,27 @@ export function* ensSaga(builderClient: BuilderClient) { const landHashes: { id: string; hash: string }[] = [] for (const { x, y, contentHash } of coordsWithHashesList) { - const landId = lands.find(land => { + const land = lands.find(land => { if (land.type === LandType.ESTATE) { return land.parcels!.some(parcel => parcel.x === x && parcel.y === y) } + return land.x === x && land.y === y - })!.id + }) - landHashes.push({ hash: `0x${contentHash}`, id: landId }) + // Sometimes this value was undefined, causing a crash with the previous implementation. + // This a temp fix to at least render the names that can be rendered. + // TODO: Find a real solution if needed. + if (land) { + landHashes.push({ hash: `0x${contentHash}`, id: land.id }) + } } const wallet: Wallet = yield getWallet() const signer: ethers.Signer = yield getSigner() const address = wallet.address const ensContract = ENS__factory.connect(ENS_ADDRESS, signer) - const dclRegistrarContract = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, signer) + const dclRegistrarContract = DCLRegistrar__factory.connect(getContractAddressForAppChainId(ContractName.DCLRegistrar), signer) const domains: string[] = yield call(() => marketplace.fetchENSList(address)) const REQUESTS_BATCH_SIZE = 25 @@ -341,8 +346,12 @@ export function* ensSaga(builderClient: BuilderClient) { const signer: ethers.Signer = yield call(getSigner) const from = wallet.address - const controllerContract: DCLController = yield call([DCLController__factory, 'connect'], CONTROLLER_V2_ADDRESS, signer) - const dclRegistrarContract = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, signer) + const controllerContract: DCLControllerV2 = yield call( + [DCLControllerV2__factory, 'connect'], + getContractAddressForAppChainId(ContractName.DCLControllerV2), + signer + ) + const dclRegistrarContract = DCLRegistrar__factory.connect(getContractAddressForAppChainId(ContractName.DCLRegistrar), signer) const transaction: ethers.ContractTransaction = yield call([controllerContract, 'register'], name, from) yield put(claimNameTransactionSubmitted(name, wallet.address, wallet.chainId, transaction.hash)) yield call(waitForTx, transaction.hash) @@ -369,8 +378,12 @@ export function* ensSaga(builderClient: BuilderClient) { try { const wallet: Wallet = yield getWallet() const signer: ethers.Signer = yield getSigner() - const dclRegistrarContract = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, signer) - const transaction: ethers.ContractTransaction = yield call([dclRegistrarContract, 'reclaim'], ens.tokenId, wallet.address) + const dclRegistrarContract = DCLRegistrar__factory.connect(getContractAddressForAppChainId(ContractName.DCLRegistrar), signer) + const transaction: ethers.ContractTransaction = yield call( + [dclRegistrarContract, 'reclaim(uint256,address)'], + ens.tokenId, + wallet.address + ) yield put(reclaimNameSuccess(transaction.hash, wallet.chainId, { ...ens, ensOwnerAddress: wallet.address })) } catch (error) { const ensError: ENSError = { message: error.message } @@ -385,7 +398,11 @@ export function* ensSaga(builderClient: BuilderClient) { const signer: ethers.Signer = yield call(getSigner) const from = wallet.address const manaContract: ReturnType = yield call([ERC20__factory, 'connect'], MANA_ADDRESS, signer) - const transaction: ethers.ContractTransaction = yield call([manaContract, 'approve'], CONTROLLER_V2_ADDRESS, allowance) + const transaction: ethers.ContractTransaction = yield call( + [manaContract, 'approve'], + getContractAddressForAppChainId(ContractName.DCLControllerV2), + allowance + ) yield put(allowClaimManaSuccess(allowance, from.toString(), wallet.chainId, transaction.hash)) } catch (error) { diff --git a/src/modules/ens/utils.ts b/src/modules/ens/utils.ts index 1c7cc0040..9b08c7a7f 100644 --- a/src/modules/ens/utils.ts +++ b/src/modules/ens/utils.ts @@ -1,11 +1,12 @@ import { ethers } from 'ethers' import { Entity } from 'dcl-catalyst-commons' import { getSigner } from 'decentraland-dapps/dist/lib/eth' +import { ContractName } from 'decentraland-transactions' import { PEER_URL, getCatalystContentUrl } from 'lib/api/peer' -import { DCLRegistrar__factory } from 'contracts/factories/DCLRegistrar__factory' import { Land } from 'modules/land/types' -import { REGISTRAR_ADDRESS } from 'modules/common/contracts' +import { getContractAddressForAppChainId } from 'modules/contract/utils' import { ENS } from './types' +import { DCLRegistrar__factory } from 'decentraland-transactions/typechain' export const PRICE_IN_WEI = '100000000000000000000' // 100 MANA export const PRICE = ethers.utils.formatEther(PRICE_IN_WEI) @@ -40,7 +41,7 @@ export async function isNameAvailable(name: string): Promise { return false } const signer: ethers.Signer = await getSigner() - const contractDCLRegistrar = DCLRegistrar__factory.connect(REGISTRAR_ADDRESS, signer) + const contractDCLRegistrar = DCLRegistrar__factory.connect(getContractAddressForAppChainId(ContractName.DCLRegistrar), signer) return contractDCLRegistrar.available(name) }