mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Vendored
+1
-1
@@ -122,7 +122,7 @@ export default interface Eth {
|
||||
fromBlock?: BlockType;
|
||||
toBlock?: BlockType;
|
||||
address?: string;
|
||||
topics?: Array<string | string[]>;
|
||||
topics?: Array<string | string[] | null>;
|
||||
},
|
||||
cb?: Callback<Log[]>
|
||||
): Promise<Log[]>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Web3 = require("web3");
|
||||
import BigNumber = require("bn.js");
|
||||
import { TransactionReceipt } from "web3/types";
|
||||
import { TransactionReceipt, Log } from "web3/types";
|
||||
import PromiEvent from "web3/promiEvent";
|
||||
import { NEW_ABI_STANDARD, OLD_ABI_STANDARD } from "web3/test/abi-tests";
|
||||
import { Provider, JsonRPCResponse } from "web3/providers";
|
||||
@@ -37,6 +37,14 @@ web3.eth.setProvider(myProvider);
|
||||
//
|
||||
// web3.eth
|
||||
// --------------------------------------------------------------------------
|
||||
const logs: Promise<Log[]> = web3.eth.getPastLogs({
|
||||
fromBlock: "latest",
|
||||
address: contractAddress,
|
||||
topics: [
|
||||
null,
|
||||
"0x1"
|
||||
]
|
||||
});
|
||||
const storage: Promise<string> = web3.eth.getStorageAt(contractAddress, 0);
|
||||
const balance1: Promise<BigNumber> = web3.eth.getBalance(contractAddress);
|
||||
const balance2: Promise<BigNumber> = web3.eth.getBalance(contractAddress, "latest");
|
||||
|
||||
Reference in New Issue
Block a user