Skip to content

Commit

Permalink
add change PowerReduction to 18
Browse files Browse the repository at this point in the history
  • Loading branch information
VegeBun-csj committed Jan 31, 2024
1 parent 54b5c47 commit 1191fbb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ import (

appparams "github.com/DoraFactory/doravota/app/params"
"github.com/DoraFactory/doravota/docs"

votatypes "github.com/DoraFactory/doravota/types"
)

const (
Expand Down Expand Up @@ -257,6 +259,8 @@ func init() {
}

DefaultNodeHome = filepath.Join(userHomeDir, "."+Name)

sdk.DefaultPowerReduction = votatypes.DefaultPowerReduction
}

// Override Wasm size limitation from WASMD.
Expand Down
13 changes: 13 additions & 0 deletions types/precision.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package types

import (
"math/big"

sdk "github.com/cosmos/cosmos-sdk/types"
)

const (
BaseDenomUnit = 18
)

var DefaultPowerReduction = sdk.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(BaseDenomUnit), nil)) // 10^18

0 comments on commit 1191fbb

Please sign in to comment.