Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 ethers-v6: fix contract connect type #814

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/ethers-v6-connect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@typechain/ethers-v6": patch
---

馃悰 fix contract connect type
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ export interface DataTypesInputInterface extends Interface {
}

export interface DataTypesInput extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export interface DataTypesPureInterface extends Interface {
}

export interface DataTypesPure extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export interface DataTypesViewInterface extends Interface {
}

export interface DataTypesView extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
2 changes: 1 addition & 1 deletion packages/target-ethers-v6-test/types/v0.6.4/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export namespace UpdateFrequencySetEvent {
}

export interface Events extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export namespace CommittedEvent {
}

export interface A extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export namespace Committed_address_array_Event {
}

export interface B extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
2 changes: 1 addition & 1 deletion packages/target-ethers-v6-test/types/v0.6.4/Library/Lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface LibInterface extends Interface {
}

export interface Lib extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface LibraryConsumerInterface extends Interface {
}

export interface LibraryConsumer extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface NAME12manglingInterface extends Interface {
}

export interface NAME12mangling extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
2 changes: 1 addition & 1 deletion packages/target-ethers-v6-test/types/v0.6.4/Overloads.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface OverloadsInterface extends Interface {
}

export interface Overloads extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface PayableInterface extends Interface {
}

export interface Payable extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface PayableFactoryInterface extends Interface {
}

export interface PayableFactory extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface ISimpleTokenInterface extends Interface {
}

export interface ISimpleToken extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export interface Issue552_ReproductionInterface extends Interface {
}

export interface Issue552_Reproduction extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export namespace HighestBidIncreasedEvent {
}

export interface KingOfTheHill extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface WithdrawableInterface extends Interface {
}

export interface Withdrawable extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export namespace TransferEvent {
}

export interface ERC721 extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export namespace TransferEvent {
}

export interface ERC721Enumerable extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export namespace TransferEvent {
}

export interface IERC721 extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export namespace TransferEvent {
}

export interface IERC721Enumerable extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface IERC721ReceiverInterface extends Interface {
}

export interface IERC721Receiver extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export namespace summonedEvent {
}

export interface Rarity extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
2 changes: 1 addition & 1 deletion packages/target-ethers-v6-test/types/v0.8.9/SimpleToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export interface SimpleTokenInterface extends Interface {
}

export interface SimpleToken extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface NestedLibraryInterface extends Interface {
}

export interface NestedLibrary extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface NestedLibraryInterface extends Interface {
}

export interface NestedLibrary extends BaseContract {
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down
2 changes: 1 addition & 1 deletion packages/target-ethers-v6/src/codegen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function codegenContractTypings(contract: Contract, codegenConfig: Codege

export interface ${contract.name} extends BaseContract {
${codegenConfig.discriminateTypes ? `contractName: '${contract.name}';\n` : ``}
connect(runner?: ContractRunner | null): BaseContract;
connect(runner?: ContractRunner | null): this;
attach(addressOrName: AddressLike): this;
deployed(): Promise<this>;

Expand Down