Warnings on "Bad" Contract
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
We got a few WARNINGS when indexing the approval_for_all event:
[[event]]
name = "approval_for_all"
start = 0
contract = "*"
signature = "event ApprovalForAll(address indexed owner, address indexed operator, bool approved)"
This is due to a couple of contracts (here is one for example that implement the event differently (approved is indexed).
event ApprovalForAll(address indexed _owner, address indexed _operator, bool indexed _approved);
There are only a handful of contracts doing this (2 that I have seen so far), and we may have to create another table for them (say indexed_approval_for_all). We should also try to figure out how to skip the warning.
Example Digest
2023-09-23T20:20:59.020545Z WARN arak::indexer: failed to decode log err=unexpected end of buffer while decoding log=Log { removed: false, log_index: 4, transaction_index: 5, transaction_hash: Digest(0xe251d1a9973af6fd015b753887d835a667146e6c78793073c1ac380ba32cc575), block_hash: Digest(0x8ade0d9f16dbcc24d6dee66f1062a459cf2dbdbeb756a23ac2107b72637fe5be), block_number: 6729704, address: Address(0x8853B05833029e3Cf8d3Cbb592f9784FA43d2a79), data: 0x, topics: [Digest(0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31), Digest(0x00000000000000000000000080efc17ccdc8fe6a625cc4ed1fdaf71fd81a2c99), Digest(0x00000000000000000000000080f7697f0052aaef8a3ff5dbdb39cf623e0baa49), Digest(0x0000000000000000000000000000000000000000000000000000000000000001)] }
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the approval_for_all event definition and the arak::indexer warning shown in the issue, then reproduce decoding against the example log. Compare the standard and indexed approved signatures and determine how both variants should be handled. Done means these contracts index without the unexpected-end-of-buffer warning, with the chosen event-table behavior covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100