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

Fix TypeScript 'ContractOptions' interface #2939

Merged
merged 5 commits into from
Jul 16, 2019
Merged
Changes from 3 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
16 changes: 10 additions & 6 deletions packages/web3-eth-contract/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import BN = require('bn.js');
import {provider} from 'web3-providers';
import {AbiInput, AbiOutput, AbiItem} from 'web3-utils';
import {PromiEvent} from 'web3-core';
import {PromiEvent, Web3ModuleOptions} from 'web3-core';

export class Contract {
constructor(
Expand Down Expand Up @@ -94,11 +94,15 @@ export interface EstimateGasOptions {
value?: number | string | BN;
}

export interface ContractOptions {
from: string;
gasPrice: string;
gas: number;
data: string;
export interface ContractOptions extends Web3ModuleOptions {
// Sender to use for contract calls
from?: string;
// Gas price to use for contract calls
gasPrice?: string;
// Gas to use for contract calls
gas?: number;
// Contract code
data?: string;
}

export interface EventOptions {
Expand Down