Skip to content

Commit

Permalink
Merge pull request #7 from cudoventures/push-uouzozvmzlxp
Browse files Browse the repository at this point in the history
Adjust circulating supply computation to ignore activity on Ethereum.
  • Loading branch information
jgtormo authored Oct 4, 2024
2 parents 2f914cb + f3488cb commit b5296b6
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions internal/tasks/inflation.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ func getCalculateInflationHandler(genesisState cudoMintTypes.GenesisState, cfg c
return err
}

ethCurrentSupply, err := getEthCirculatingSupplyAtHeight(latestEthBlock, client, cfg)
if err != nil {
return err
}
// ethCurrentSupply, err := getEthCirculatingSupplyAtHeight(latestEthBlock, client, cfg)
// if err != nil {
// return err
// }

latestCudosBlock, err := nodeClient.LatestHeight()
if err != nil {
Expand Down Expand Up @@ -65,7 +65,8 @@ func getCalculateInflationHandler(genesisState cudoMintTypes.GenesisState, cfg c
}

startTotalSupply := ethStartSupply.Add(cudosStartSupply)
currentTotalSupply := ethCurrentSupply.Add(cudosCurrentSupply)
// currentTotalSupply := ethCurrentSupply.Add(cudosCurrentSupply)
currentTotalSupply := cudosCurrentSupply.Sub(sdk.NewIntWithDecimal(1944669939, 18))

inflation := currentTotalSupply.Sub(startTotalSupply).ToDec().Quo(startTotalSupply.ToDec())

Expand Down Expand Up @@ -175,7 +176,7 @@ func getCudosNetworkCirculatingSupplyAtHeight(height int64, bankingClient bankQu

for i := 0; i < len(totalSupply.Supply); i++ {
if totalSupply.Supply[i].Denom == cfg.InflationGenesis.MintDenom {
return totalSupply.Supply[i].Amount.Sub(gravityModuleBalance.Amount), nil
return totalSupply.Supply[i].Amount, nil
}
}

Expand Down

0 comments on commit b5296b6

Please sign in to comment.