diff --git a/src/constants/fixed.ts b/src/constants/fixed.ts index 882887f..1d01e78 100644 --- a/src/constants/fixed.ts +++ b/src/constants/fixed.ts @@ -17,3 +17,5 @@ export let BIG_INT_ONE = BigInt.fromI32(1); export let BIG_INT_1E3 = BigInt.fromI32(1000); export let BYTES_EMPTY = Bytes.empty(); + +export let V2_1_FUEL_FIX_BLOCK = BigInt.fromI32(56450784); // This is a dummy number and would be replaced with the actual blockheight after our contract upgrade diff --git a/src/mappings/v2.1/economicsFactory.ts b/src/mappings/v2.1/economicsFactory.ts index 232bfdd..319420b 100644 --- a/src/mappings/v2.1/economicsFactory.ts +++ b/src/mappings/v2.1/economicsFactory.ts @@ -126,6 +126,7 @@ export function handleIntegratorToppedUp(e: IntegratorToppedUp): void { integrator.totalTopUp = totalTopUp; integrator.totalTopUpUSD = totalTopUpUSD; + integrator.price = totalTopUpUSD.div(totalTopUp); integrator.topUpCount = integrator.topUpCount.plus(BIG_INT_ONE); integratorDay.topUpCount = integratorDay.topUpCount.plus(BIG_INT_ONE);