Skip to content

Commit

Permalink
chore: add inflation calc
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Sep 30, 2024
1 parent 9f6f118 commit 0d08a36
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions x/arkeo/keeper/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,14 @@ func (mgr Manager) circulatingSupplyAfterInflationCalc(ctx cosmos.Context) (sdk.
return sdk.NewDecCoin(configs.Denom, sdkmath.NewInt(0)), err
}

// // Get the inflation rate
// inflationRate := mgr.keeper.GetInflationRate(ctx)
// sdkContext.Logger().Info(fmt.Sprintf("inflation rate: %d", inflationRate))
// Get the inflation rate
inflationRate := mgr.keeper.GetInflationRate(ctx)
sdkContext.Logger().Info(fmt.Sprintf("inflation rate: %d", inflationRate))

// // Multiply circulating supply by inflation rate to get the newly minted token amount
// newTokenAmountMintedDec := circulatingSupply.Amount.Mul(inflationRate).QuoInt64(100)
// Multiply circulating supply by inflation rate to get the newly minted token amount
newTokenAmountMintedDec := circulatingSupply.Amount.Mul(inflationRate).QuoInt64(100)

// sdkContext.Logger().Info(fmt.Sprintf("minted token value: %v", sdkmath.Int(circulatingSupply.Amount)))
sdkContext.Logger().Info(fmt.Sprintf("minted token value: %v", sdkmath.Int(circulatingSupply.Amount)))

return sdk.NewDecCoin(configs.Denom, circulatingSupply.Amount.RoundInt()), nil
return sdk.NewDecCoin(configs.Denom, newTokenAmountMintedDec.RoundInt()), nil
}

0 comments on commit 0d08a36

Please sign in to comment.