AlphaWallet / AlphaWallet/alpha-wallet-android

Find the construction event for contracts

Open
#2,508 1 comment 0 reactions 0 assignees View on GitHub
Free for all
Dominant language
Java
Stars
646
Forks
579
PR merge metrics
No merged PRs in 30d

Description

This is required to put a lower bound on how far down to pickup log events.

The most obvious approach is to use the Etherscan (etc) Transaction fetch API in reverse, so you'd search ascending from block 1 to block 9999999999 and limit the search to only 1 transaction.

This sometimes would find a bad result, where people have accidentally written to the contract before it was created, but this edge condition is harmless - it would just result in a longer sync.

You would store this block number in realm, possibly in the same RealmAuxData as the log scanning uses, see ```updateEventReads``` in class Token.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.