mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 07:17:04 +00:00
[Web3]: Add Test for getPastLogs
This commit is contained in:
@@ -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,15 @@ 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