web3.js
web3.js copied to clipboard
Implement at `Contract` the parsing of the logs similar to `new ethers.Interface(ABI).parseLog(...)`
trafficstars
Currently the Contract can decode its own events. But it is helpful to enable parsing a provided logs data, similar to new ethers.Interface(ABI).parseLog(...).
(This feature is needed at https://github.com/web3/web3-plugin-zksync/blob/758df6f2cf324a7c8e17730672f2ce0a831d407b/src/utils.ts#L801)
Additionally add a static method to the Contract class similar to:
contractFunctionId(value: string): string {
return web3Utils.keccak256(web3Utils.utf8ToBytes(value));
}
@avkos - is this still required for the plugin?