Skip to content

Commit

Permalink
Exposing web3.eth.Contract.setProvider() as per public documentation (#…
Browse files Browse the repository at this point in the history
…5001)

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

* Additional TS defs for web3.eth.Contract.setProvider()

* changelog update

Co-authored-by: Steven de Salas <sdesalas@users.noreply.github.com>
  • Loading branch information
jdevcs and sdesalas authored May 4, 2022
1 parent 7c4f1a5 commit 1f7ae5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
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

0 comments on commit 1f7ae5d

Please sign in to comment.