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

DeployTransactionResponse renamed to ContractSendMethod #2557

Merged
merged 2 commits into from
Mar 22, 2019
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
6 changes: 2 additions & 4 deletions packages/web3-eth-contract/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Contract {

clone(): Contract;

deploy(options: DeployOptions): DeployTransactionResponse;
deploy(options: DeployOptions): ContractSendMethod;

methods: any;

Expand Down Expand Up @@ -64,9 +64,7 @@ export interface DeployOptions {
arguments?: any[];
}

export interface DeployTransactionResponse {
array: any[];

export interface ContractSendMethod {
send(options: SendOptions, callback?: (err: Error, contracts: Contract) => void): PromiEvent<Contract>;

estimateGas(options: EstimateGasOptions, callback?: (err: Error, gas: number) => void): Promise<number>;
Expand Down
2 changes: 1 addition & 1 deletion packages/web3-eth-contract/types/tests/contract-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const contract = new Contract('http://localhost:500', {type: 'constructor'});
// $ExpectType Contract
contract.clone();

// $ExpectType DeployTransactionResponse
// $ExpectType ContractSendMethod
contract.deploy({
data: '0x12345...',
arguments: [123, 'My String']
Expand Down