AlphaWallet / AlphaWallet/alpha-wallet-android

Find the construction event for contracts

Offen
#2,508 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Free for all
Vorherrschende Sprache
Java
Sterne
646
Forks
579
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.