Documentation / @etherfold/browser / ExtendedLastSync
Type Alias: ExtendedLastSync<ABI> ​
ExtendedLastSync<
ABI> =LastSync<ABI> &object
Defined in: packages/browser/src/IndexerState.ts:84
Type Declaration ​
numBlocksProcessedSoFar ​
numBlocksProcessedSoFar:
number
syncPercentage ​
syncPercentage:
number
How far the fold has got across the span THIS indexer covers, 0 to 100.
Derived by derivedProgress, the same function the port publishes from, so this hook and a tab holding a port cannot disagree about how far the fold has got. Where the port leaves the figure ABSENT -- before the first fetch a container publishes a cursor of 0 of 0, so it has learnt no tip -- this field is typed non-optional and reads 0: "nothing known yet", never a full bar and never NaN.
totalPercentage ​
totalPercentage:
number
How far the fold has got across the WHOLE CHAIN, 0 to 100.
Rarely what an application wants, and deliberately not carried across the port for that reason: a deployment whose contract starts at block 20,000,000 reads 99.9% from its first fetch. syncPercentage is the one with a denominator an app means. 0 before a tip has been learnt.
Type Parameters ​
ABI ​
ABI extends Abi