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 #5001

Merged
merged 3 commits into from
May 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,10 +536,9 @@ Released with 1.0.0-beta.37 code base.

### Fixed

- fixed build issues of 1.7.2
- Fixed build issues of 1.7.2

## [Unreleased]
- Improve npm script commands for development purposes (#4848)

## [1.7.4]

Expand All @@ -552,4 +551,8 @@ Released with 1.0.0-beta.37 code base.

### Changed
- Replace deprecated String.prototype.substr() (#4855)
- exporting AbiCoder as coder (#4937)
- Exporting AbiCoder as coder (#4937)

### Added
- Exposing `web3.eth.Contract.setProvider()` as per public documentation (#4822) (#5001)
- Improve npm script commands for development purposes (#4848)
3 changes: 3 additions & 0 deletions packages/web3-eth-contract/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import BN = require('bn.js');
import {Common, PromiEvent, provider, hardfork, chain, BlockNumber, PastLogsOptions, LogsOptions} from 'web3-core';
import {Accounts} from 'web3-eth-accounts';
import {AbiItem} from 'web3-utils';

// TODO: Add generic type!
Expand All @@ -29,6 +30,8 @@ export class Contract {
options?: ContractOptions
);

static setProvider(provider: provider, accounts?: Accounts): void;

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