Skip to content

Better Log features (comparible to web3) #12

@SilentCicero

Description

@SilentCicero

Issue Type

  • Feature

Description

We want to be able to grab logs like web3. Just a getLogs kind of method, but with topic filtering:

Currently one has to do something like this:

eth.getLogs({
   address: 'CONTRACT_ADDRESS',
   topics: [`0x${Eth.keccak256(`${abi[0].name}(${abi[0].inputs.map(v => v.type).join(',')})`)}`],
})
.then(console.log);

We can bind that into that contract object like so:

contractObject.filterName.getLogs with the contract address and topic array predefined/filled.

we can also pre-define the topic name output as so:

contractObject.fitlerName.topic which will produce the sha3 hash.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions