subspace/packages/core/test/test7.js

17 lines
576 B
JavaScript
Raw Normal View History

2020-03-04 18:48:08 +00:00
const Web3 = require('web3-eth');
const Subspace = require('../dist/index.js').default;
2020-03-04 18:48:08 +00:00
let ethweb3 = new Web3("wss://mainnet.infura.io/ws/v3/_____________");
2019-09-27 20:04:01 +00:00
async function run() {
2020-03-04 18:48:08 +00:00
const subspace = new Subspace(web3);
2019-09-27 20:04:01 +00:00
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()