From d2f54fabaca05578f23937f9310e2e1535bc7be9 Mon Sep 17 00:00:00 2001 From: Jan-Felix Date: Tue, 29 Oct 2024 11:14:40 +0100 Subject: [PATCH] feat: typed `attach` return value --- package.json | 5 +++-- packages/hardhat-test/typechain-types/Counter.ts | 2 ++ packages/hardhat-test/typechain-types/Demo.ts | 2 ++ packages/hardhat-test/typechain-types/Directory/Hello.ts | 2 ++ .../hardhat-test/typechain-types/StructsInConstructor.ts | 2 ++ .../typechain-types/artifacts/contracts/EdgeCases.ts | 2 ++ .../typechain-types/artifacts/contracts/TestContract.ts | 2 ++ .../typechain-types/artifacts/contracts/TestContract1.ts | 2 ++ .../typechain-types/artifacts/contracts/lib/SafeMath.ts | 2 ++ .../typechain-types/externalArtifacts/ERC20.ts | 2 ++ .../target-ethers-v6-test/types/v0.6.4/DataTypesInput.ts | 2 ++ packages/target-ethers-v6-test/types/v0.6.4/DataTypesPure.ts | 2 ++ packages/target-ethers-v6-test/types/v0.6.4/DataTypesView.ts | 2 ++ packages/target-ethers-v6-test/types/v0.6.4/Events.ts | 2 ++ .../types/v0.6.4/Issue428_Reproduction/A.ts | 2 ++ .../types/v0.6.4/Issue428_Reproduction/B.ts | 2 ++ packages/target-ethers-v6-test/types/v0.6.4/Library/Lib.ts | 2 ++ .../target-ethers-v6-test/types/v0.6.4/LibraryConsumer.ts | 2 ++ .../types/v0.6.4/Name-Mangling/NAME12mangling.ts | 2 ++ packages/target-ethers-v6-test/types/v0.6.4/Overloads.ts | 2 ++ .../target-ethers-v6-test/types/v0.6.4/Payable/Payable.ts | 2 ++ .../types/v0.6.4/Payable/PayableFactory.ts | 2 ++ packages/target-ethers-v6-test/types/v0.8.9/ISimpleToken.ts | 2 ++ .../types/v0.8.9/Issue552_Reproduction.ts | 2 ++ .../types/v0.8.9/KingOfTheHill/KingOfTheHill.ts | 2 ++ .../types/v0.8.9/KingOfTheHill/Withdrawable.ts | 2 ++ packages/target-ethers-v6-test/types/v0.8.9/NameClashes.ts | 2 ++ packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721.ts | 2 ++ .../types/v0.8.9/Rarity/ERC721Enumerable.ts | 2 ++ .../target-ethers-v6-test/types/v0.8.9/Rarity/IERC721.ts | 2 ++ .../types/v0.8.9/Rarity/IERC721Enumerable.ts | 2 ++ .../types/v0.8.9/Rarity/IERC721Receiver.ts | 2 ++ packages/target-ethers-v6-test/types/v0.8.9/Rarity/Rarity.ts | 2 ++ packages/target-ethers-v6-test/types/v0.8.9/SimpleToken.ts | 2 ++ .../types/v0.8.9/nested/a/NestedLibrary.ts | 2 ++ .../types/v0.8.9/nested/b/NestedLibrary.ts | 2 ++ packages/target-ethers-v6/src/codegen/index.ts | 2 ++ 37 files changed, 75 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 029e2b74a..67bd611b9 100644 --- a/package.json +++ b/package.json @@ -51,5 +51,6 @@ "@types/node" ] } - } -} \ No newline at end of file + }, + "packageManager": "pnpm@8.14.0+sha512.5d4bf97b349faf1a51318aa1ba887e99d9c36e203dbcb55938a91fddd2454246cb00723d6642f54d463a0f52a2701dadf8de002a37fc613c9cdc94ed5675ddce" +} diff --git a/packages/hardhat-test/typechain-types/Counter.ts b/packages/hardhat-test/typechain-types/Counter.ts index 9d8ad3bab..291bd77d6 100644 --- a/packages/hardhat-test/typechain-types/Counter.ts +++ b/packages/hardhat-test/typechain-types/Counter.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -52,6 +53,7 @@ export namespace CountedToEvent { export interface Counter extends BaseContract { connect(runner?: ContractRunner | null): Counter; + attach(target: string | Addressable): Counter; waitForDeployment(): Promise; interface: CounterInterface; diff --git a/packages/hardhat-test/typechain-types/Demo.ts b/packages/hardhat-test/typechain-types/Demo.ts index dae9aab5a..15fdc7095 100644 --- a/packages/hardhat-test/typechain-types/Demo.ts +++ b/packages/hardhat-test/typechain-types/Demo.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, FunctionFragment, @@ -37,6 +38,7 @@ export interface DemoInterface extends Interface {} export interface Demo extends BaseContract { connect(runner?: ContractRunner | null): Demo; + attach(target: string | Addressable): Demo; waitForDeployment(): Promise; interface: DemoInterface; diff --git a/packages/hardhat-test/typechain-types/Directory/Hello.ts b/packages/hardhat-test/typechain-types/Directory/Hello.ts index a68059bfb..1e4b84778 100644 --- a/packages/hardhat-test/typechain-types/Directory/Hello.ts +++ b/packages/hardhat-test/typechain-types/Directory/Hello.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, FunctionFragment, Interface, @@ -20,6 +21,7 @@ export interface HelloInterface extends Interface {} export interface Hello extends BaseContract { connect(runner?: ContractRunner | null): Hello; + attach(target: string | Addressable): Hello; waitForDeployment(): Promise; interface: HelloInterface; diff --git a/packages/hardhat-test/typechain-types/StructsInConstructor.ts b/packages/hardhat-test/typechain-types/StructsInConstructor.ts index 0d9729668..5f53c173b 100644 --- a/packages/hardhat-test/typechain-types/StructsInConstructor.ts +++ b/packages/hardhat-test/typechain-types/StructsInConstructor.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, FunctionFragment, @@ -28,6 +29,7 @@ export interface StructsInConstructorInterface extends Interface {} export interface StructsInConstructor extends BaseContract { connect(runner?: ContractRunner | null): StructsInConstructor; + attach(target: string | Addressable): StructsInConstructor; waitForDeployment(): Promise; interface: StructsInConstructorInterface; diff --git a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/EdgeCases.ts b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/EdgeCases.ts index 31006d6f1..8856f2bfe 100644 --- a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/EdgeCases.ts +++ b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/EdgeCases.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, FunctionFragment, Interface, @@ -20,6 +21,7 @@ export interface EdgeCasesInterface extends Interface {} export interface EdgeCases extends BaseContract { connect(runner?: ContractRunner | null): EdgeCases; + attach(target: string | Addressable): EdgeCases; waitForDeployment(): Promise; interface: EdgeCasesInterface; diff --git a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract.ts b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract.ts index d9b1c4a62..ab4a61453 100644 --- a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract.ts +++ b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, FunctionFragment, Interface, @@ -20,6 +21,7 @@ export interface TestContractInterface extends Interface {} export interface TestContract extends BaseContract { connect(runner?: ContractRunner | null): TestContract; + attach(target: string | Addressable): TestContract; waitForDeployment(): Promise; interface: TestContractInterface; diff --git a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract1.ts b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract1.ts index 790f6a613..7e79b0d32 100644 --- a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract1.ts +++ b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/TestContract1.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, FunctionFragment, Interface, @@ -20,6 +21,7 @@ export interface TestContract1Interface extends Interface {} export interface TestContract1 extends BaseContract { connect(runner?: ContractRunner | null): TestContract1; + attach(target: string | Addressable): TestContract1; waitForDeployment(): Promise; interface: TestContract1Interface; diff --git a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/lib/SafeMath.ts b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/lib/SafeMath.ts index 105048e9c..99abb5b3e 100644 --- a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/lib/SafeMath.ts +++ b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/artifacts/contracts/lib/SafeMath.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -48,6 +49,7 @@ export interface SafeMathInterface extends Interface { export interface SafeMath extends BaseContract { connect(runner?: ContractRunner | null): SafeMath; + attach(target: string | Addressable): SafeMath; waitForDeployment(): Promise; interface: SafeMathInterface; diff --git a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/externalArtifacts/ERC20.ts b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/externalArtifacts/ERC20.ts index 2cec5ac72..ba4d714dd 100644 --- a/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/externalArtifacts/ERC20.ts +++ b/packages/hardhat/test/fixture-projects/hardhat-project/typechain-types/externalArtifacts/ERC20.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -140,6 +141,7 @@ export namespace TransferEvent { export interface ERC20 extends BaseContract { connect(runner?: ContractRunner | null): ERC20; + attach(target: string | Addressable): ERC20; waitForDeployment(): Promise; interface: ERC20Interface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/DataTypesInput.ts b/packages/target-ethers-v6-test/types/v0.6.4/DataTypesInput.ts index 28a3dfec1..ecf675162 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/DataTypesInput.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/DataTypesInput.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -400,6 +401,7 @@ export namespace event_struct_2Event { export interface DataTypesInput extends BaseContract { connect(runner?: ContractRunner | null): DataTypesInput; + attach(target: string | Addressable): DataTypesInput; waitForDeployment(): Promise; interface: DataTypesInputInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/DataTypesPure.ts b/packages/target-ethers-v6-test/types/v0.6.4/DataTypesPure.ts index 7b605787c..1c2be43f1 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/DataTypesPure.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/DataTypesPure.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -138,6 +139,7 @@ export interface DataTypesPureInterface extends Interface { export interface DataTypesPure extends BaseContract { connect(runner?: ContractRunner | null): DataTypesPure; + attach(target: string | Addressable): DataTypesPure; waitForDeployment(): Promise; interface: DataTypesPureInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/DataTypesView.ts b/packages/target-ethers-v6-test/types/v0.6.4/DataTypesView.ts index 0dfce6ae7..21bec9f0e 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/DataTypesView.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/DataTypesView.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -138,6 +139,7 @@ export interface DataTypesViewInterface extends Interface { export interface DataTypesView extends BaseContract { connect(runner?: ContractRunner | null): DataTypesView; + attach(target: string | Addressable): DataTypesView; waitForDeployment(): Promise; interface: DataTypesViewInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Events.ts b/packages/target-ethers-v6-test/types/v0.6.4/Events.ts index 13505d614..83915509b 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Events.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Events.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -228,6 +229,7 @@ export namespace UpdateFrequencySetEvent { export interface Events extends BaseContract { connect(runner?: ContractRunner | null): Events; + attach(target: string | Addressable): Events; waitForDeployment(): Promise; interface: EventsInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/A.ts b/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/A.ts index e09106845..1971c708c 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/A.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/A.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, FunctionFragment, Interface, @@ -37,6 +38,7 @@ export namespace CommittedEvent { export interface A extends BaseContract { connect(runner?: ContractRunner | null): A; + attach(target: string | Addressable): A; waitForDeployment(): Promise; interface: AInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/B.ts b/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/B.ts index 171590655..b4dd13b2f 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/B.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Issue428_Reproduction/B.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, FunctionFragment, @@ -52,6 +53,7 @@ export namespace Committed_address_array_Event { export interface B extends BaseContract { connect(runner?: ContractRunner | null): B; + attach(target: string | Addressable): B; waitForDeployment(): Promise; interface: BInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Library/Lib.ts b/packages/target-ethers-v6-test/types/v0.6.4/Library/Lib.ts index f9ca7c6ff..d5eba8ed9 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Library/Lib.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Library/Lib.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -30,6 +31,7 @@ export interface LibInterface extends Interface { export interface Lib extends BaseContract { connect(runner?: ContractRunner | null): Lib; + attach(target: string | Addressable): Lib; waitForDeployment(): Promise; interface: LibInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/LibraryConsumer.ts b/packages/target-ethers-v6-test/types/v0.6.4/LibraryConsumer.ts index 2675f636c..e1a7f6636 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/LibraryConsumer.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/LibraryConsumer.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -33,6 +34,7 @@ export interface LibraryConsumerInterface extends Interface { export interface LibraryConsumer extends BaseContract { connect(runner?: ContractRunner | null): LibraryConsumer; + attach(target: string | Addressable): LibraryConsumer; waitForDeployment(): Promise; interface: LibraryConsumerInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Name-Mangling/NAME12mangling.ts b/packages/target-ethers-v6-test/types/v0.6.4/Name-Mangling/NAME12mangling.ts index c91b91415..67a49be46 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Name-Mangling/NAME12mangling.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Name-Mangling/NAME12mangling.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -31,6 +32,7 @@ export interface NAME12manglingInterface extends Interface { export interface NAME12mangling extends BaseContract { connect(runner?: ContractRunner | null): NAME12mangling; + attach(target: string | Addressable): NAME12mangling; waitForDeployment(): Promise; interface: NAME12manglingInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Overloads.ts b/packages/target-ethers-v6-test/types/v0.6.4/Overloads.ts index 17614f0bd..f0f832a9f 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Overloads.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Overloads.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -46,6 +47,7 @@ export interface OverloadsInterface extends Interface { export interface Overloads extends BaseContract { connect(runner?: ContractRunner | null): Overloads; + attach(target: string | Addressable): Overloads; waitForDeployment(): Promise; interface: OverloadsInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Payable/Payable.ts b/packages/target-ethers-v6-test/types/v0.6.4/Payable/Payable.ts index 8222d3c7b..8c5e19087 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Payable/Payable.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Payable/Payable.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -45,6 +46,7 @@ export interface PayableInterface extends Interface { export interface Payable extends BaseContract { connect(runner?: ContractRunner | null): Payable; + attach(target: string | Addressable): Payable; waitForDeployment(): Promise; interface: PayableInterface; diff --git a/packages/target-ethers-v6-test/types/v0.6.4/Payable/PayableFactory.ts b/packages/target-ethers-v6-test/types/v0.6.4/Payable/PayableFactory.ts index ffca10cf4..ceffc5603 100644 --- a/packages/target-ethers-v6-test/types/v0.6.4/Payable/PayableFactory.ts +++ b/packages/target-ethers-v6-test/types/v0.6.4/Payable/PayableFactory.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -32,6 +33,7 @@ export interface PayableFactoryInterface extends Interface { export interface PayableFactory extends BaseContract { connect(runner?: ContractRunner | null): PayableFactory; + attach(target: string | Addressable): PayableFactory; waitForDeployment(): Promise; interface: PayableFactoryInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/ISimpleToken.ts b/packages/target-ethers-v6-test/types/v0.8.9/ISimpleToken.ts index e4493ce8d..3b6232306 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/ISimpleToken.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/ISimpleToken.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -34,6 +35,7 @@ export interface ISimpleTokenInterface extends Interface { export interface ISimpleToken extends BaseContract { connect(runner?: ContractRunner | null): ISimpleToken; + attach(target: string | Addressable): ISimpleToken; waitForDeployment(): Promise; interface: ISimpleTokenInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Issue552_Reproduction.ts b/packages/target-ethers-v6-test/types/v0.8.9/Issue552_Reproduction.ts index db637736c..58658895c 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Issue552_Reproduction.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Issue552_Reproduction.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -72,6 +73,7 @@ export interface Issue552_ReproductionInterface extends Interface { export interface Issue552_Reproduction extends BaseContract { connect(runner?: ContractRunner | null): Issue552_Reproduction; + attach(target: string | Addressable): Issue552_Reproduction; waitForDeployment(): Promise; interface: Issue552_ReproductionInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/KingOfTheHill.ts b/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/KingOfTheHill.ts index df85cd561..5e0455228 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/KingOfTheHill.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/KingOfTheHill.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -65,6 +66,7 @@ export namespace HighestBidIncreasedEvent { export interface KingOfTheHill extends BaseContract { connect(runner?: ContractRunner | null): KingOfTheHill; + attach(target: string | Addressable): KingOfTheHill; waitForDeployment(): Promise; interface: KingOfTheHillInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/Withdrawable.ts b/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/Withdrawable.ts index 8231ca56d..9bf3e8921 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/Withdrawable.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/KingOfTheHill/Withdrawable.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -29,6 +30,7 @@ export interface WithdrawableInterface extends Interface { export interface Withdrawable extends BaseContract { connect(runner?: ContractRunner | null): Withdrawable; + attach(target: string | Addressable): Withdrawable; waitForDeployment(): Promise; interface: WithdrawableInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/NameClashes.ts b/packages/target-ethers-v6-test/types/v0.8.9/NameClashes.ts index b3b663825..7f9d0afaf 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/NameClashes.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/NameClashes.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -92,6 +93,7 @@ export interface NameClashesInterface extends Interface { export interface NameClashes extends BaseContract { connect(runner?: ContractRunner | null): NameClashes; + attach(target: string | Addressable): NameClashes; waitForDeployment(): Promise; interface: NameClashesInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721.ts b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721.ts index a572f5af8..9ec7bf8ad 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -167,6 +168,7 @@ export namespace TransferEvent { export interface ERC721 extends BaseContract { connect(runner?: ContractRunner | null): ERC721; + attach(target: string | Addressable): ERC721; waitForDeployment(): Promise; interface: ERC721Interface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721Enumerable.ts b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721Enumerable.ts index 4b5afba88..1f70fbb58 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721Enumerable.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/ERC721Enumerable.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -194,6 +195,7 @@ export namespace TransferEvent { export interface ERC721Enumerable extends BaseContract { connect(runner?: ContractRunner | null): ERC721Enumerable; + attach(target: string | Addressable): ERC721Enumerable; waitForDeployment(): Promise; interface: ERC721EnumerableInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721.ts b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721.ts index bc1b4ede1..cdc9f7f0a 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -167,6 +168,7 @@ export namespace TransferEvent { export interface IERC721 extends BaseContract { connect(runner?: ContractRunner | null): IERC721; + attach(target: string | Addressable): IERC721; waitForDeployment(): Promise; interface: IERC721Interface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Enumerable.ts b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Enumerable.ts index bfaae3cd3..281ed833e 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Enumerable.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Enumerable.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -194,6 +195,7 @@ export namespace TransferEvent { export interface IERC721Enumerable extends BaseContract { connect(runner?: ContractRunner | null): IERC721Enumerable; + attach(target: string | Addressable): IERC721Enumerable; waitForDeployment(): Promise; interface: IERC721EnumerableInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Receiver.ts b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Receiver.ts index fc8627ec2..5a7ca38a8 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Receiver.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/IERC721Receiver.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -37,6 +38,7 @@ export interface IERC721ReceiverInterface extends Interface { export interface IERC721Receiver extends BaseContract { connect(runner?: ContractRunner | null): IERC721Receiver; + attach(target: string | Addressable): IERC721Receiver; waitForDeployment(): Promise; interface: IERC721ReceiverInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/Rarity.ts b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/Rarity.ts index a1a7e1186..169c4cc89 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/Rarity/Rarity.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/Rarity/Rarity.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -313,6 +314,7 @@ export namespace summonedEvent { export interface Rarity extends BaseContract { connect(runner?: ContractRunner | null): Rarity; + attach(target: string | Addressable): Rarity; waitForDeployment(): Promise; interface: RarityInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/SimpleToken.ts b/packages/target-ethers-v6-test/types/v0.8.9/SimpleToken.ts index 760f9e2d7..b92eecf07 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/SimpleToken.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/SimpleToken.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BigNumberish, BytesLike, @@ -34,6 +35,7 @@ export interface SimpleTokenInterface extends Interface { export interface SimpleToken extends BaseContract { connect(runner?: ContractRunner | null): SimpleToken; + attach(target: string | Addressable): SimpleToken; waitForDeployment(): Promise; interface: SimpleTokenInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/nested/a/NestedLibrary.ts b/packages/target-ethers-v6-test/types/v0.8.9/nested/a/NestedLibrary.ts index 1ee0dbf6f..127880cb6 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/nested/a/NestedLibrary.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/nested/a/NestedLibrary.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -29,6 +30,7 @@ export interface NestedLibraryInterface extends Interface { export interface NestedLibrary extends BaseContract { connect(runner?: ContractRunner | null): NestedLibrary; + attach(target: string | Addressable): NestedLibrary; waitForDeployment(): Promise; interface: NestedLibraryInterface; diff --git a/packages/target-ethers-v6-test/types/v0.8.9/nested/b/NestedLibrary.ts b/packages/target-ethers-v6-test/types/v0.8.9/nested/b/NestedLibrary.ts index 1ee0dbf6f..127880cb6 100644 --- a/packages/target-ethers-v6-test/types/v0.8.9/nested/b/NestedLibrary.ts +++ b/packages/target-ethers-v6-test/types/v0.8.9/nested/b/NestedLibrary.ts @@ -2,6 +2,7 @@ /* tslint:disable */ /* eslint-disable */ import type { + Addressable, BaseContract, BytesLike, FunctionFragment, @@ -29,6 +30,7 @@ export interface NestedLibraryInterface extends Interface { export interface NestedLibrary extends BaseContract { connect(runner?: ContractRunner | null): NestedLibrary; + attach(target: string | Addressable): NestedLibrary; waitForDeployment(): Promise; interface: NestedLibraryInterface; diff --git a/packages/target-ethers-v6/src/codegen/index.ts b/packages/target-ethers-v6/src/codegen/index.ts index 697dd21e2..65d27536a 100644 --- a/packages/target-ethers-v6/src/codegen/index.ts +++ b/packages/target-ethers-v6/src/codegen/index.ts @@ -67,6 +67,7 @@ export function codegenContractTypings(contract: Contract, codegenConfig: Codege export interface ${contract.name} extends BaseContract { ${codegenConfig.discriminateTypes ? `contractName: '${contract.name}';\n` : ``} connect(runner?: ContractRunner | null): ${contract.name}; + attach(target: string | Addressable): ${contract.name}; waitForDeployment(): Promise; interface: ${contract.name}Interface; @@ -104,6 +105,7 @@ export function codegenContractTypings(contract: Contract, codegenConfig: Codege createImportsForUsedIdentifiers( { 'type ethers': [ + 'Addressable', 'BaseContract', 'BigNumberish', 'BytesLike',