subspace/test/test7.js

17 lines
584 B
JavaScript
Raw Normal View History

const Web3Eth = require('web3-eth');
2019-09-27 20:04:01 +00:00
const Subspace = require('../dist/node.js');
2019-09-27 20:04:01 +00:00
let eth = new Web3Eth("wss://mainnet.infura.io/ws/v3/_____________");
2019-09-27 20:04:01 +00:00
async function run() {
const subspace = new Subspace(eth.currentProvider);
await subspace.init()
// Testing single block with a event
2019-09-27 20:04:01 +00:00
subspace.trackLogs({address: "0x744d70fdbe2ba4cf95131626614a1763df805b9e", topics: ["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925", "0x00000000000000000000000068f47e166e1aa7d6529e021feff86eada87aaee3", null]}).subscribe((v) => {
console.log(v);
});
}
run()