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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing web3.eth.Contract.setProvider() as per public documentation #4822

Merged
2 changes: 2 additions & 0 deletions packages/web3-eth-contract/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export class Contract {
options?: ContractOptions
);

static setProvider(provider: string): void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

@sdesalas sdesalas Mar 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hiya, thanks good point. Added TS defs for optional accounts parameter as suggested.

Copy link
Author

@sdesalas sdesalas Mar 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And parameter provider is of type provider too (from web3-core). Fixing.


private _address: string;
private _jsonInterface: AbiItem[];
defaultAccount: string | null;
Expand Down