Skip to content

Commit

Permalink
Merge pull request #10 from notional-labs/fix/test_denom
Browse files Browse the repository at this point in the history
fix/unittest and lint
  • Loading branch information
hoank101 authored Mar 7, 2024
2 parents 534ba70 + b27c9c3 commit c2f1141
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 117 deletions.
125 changes: 43 additions & 82 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ func (s *KeeperTestHelper) Setup(_ *testing.T) {
GRPCQueryRouter: s.App.GRPCQueryRouter(),
Ctx: s.Ctx,
}
s.TestAccs = CreateRandomAccounts(10)
s.TestAccs = createRandomAccounts(10)

s.StakingHelper = stakinghelper.NewHelper(s.Suite.T(), s.Ctx, &s.App.StakingKeeper.Keeper)
s.StakingHelper.Denom = "upica"
s.StakingHelper.Denom = "stake"
}

func (s *KeeperTestHelper) ConfirmUpgradeSucceeded(upgradeName string, upgradeHeight int64) {
Expand Down Expand Up @@ -109,7 +109,7 @@ func (s *KeeperTestHelper) SetupValidator(bondStatus stakingtypes.BondStatus) sd
valPriv := secp256k1.GenPrivKey()
valPub := valPriv.PubKey()
valAddr := sdk.ValAddress(valPub.Address())
bondDenom := "upica"
bondDenom := "stake"
selfBond := sdk.NewCoins(sdk.Coin{Amount: sdk.NewInt(100), Denom: bondDenom})

s.FundAcc(sdk.AccAddress(valAddr), selfBond)
Expand Down Expand Up @@ -203,56 +203,14 @@ func SetupWithGenesisValSet(
) *ComposableApp {
t.Helper()
app, genesisState := setup(t, true, 5)
genesisState = genesisStateWithValSet(t, app, genesisState, valSet, genAccs, balances...)

stateBytes, err := json.MarshalIndent(genesisState, "", " ")
require.NoError(t, err)

// init chain will set the validator set and initialize the genesis accounts
app.InitChain(
abci.RequestInitChain{
ChainId: SimAppChainID,
Validators: []abci.ValidatorUpdate{},
ConsensusParams: DefaultConsensusParams,
AppStateBytes: stateBytes,
},
)

// commit genesis changes
app.Commit()
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{
ChainID: SimAppChainID,
Height: app.LastBlockHeight() + 1,
AppHash: app.LastCommitID().Hash,
ValidatorsHash: valSet.Hash(),
NextValidatorsHash: valSet.Hash(),
}})

return app
}

// SetupWithEmptyStore setup a wasmd app instance with empty DB
func SetupWithEmptyStore(tb testing.TB) *ComposableApp {
tb.Helper()
app, _ := setup(tb, false, 0)
return app
}

type GenerateAccountStrategy func(int) []sdk.AccAddress

func genesisStateWithValSet(t *testing.T,
app *ComposableApp, genesisState GenesisState,
valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount,
balances ...banktypes.Balance,
) GenesisState {
// set genesis accounts
authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs)
genesisState[authtypes.ModuleName] = app.AppCodec().MustMarshalJSON(authGenesis)
genesisState[authtypes.ModuleName] = app.appCodec.MustMarshalJSON(authGenesis)

validators := make([]stakingtypes.Validator, 0, len(valSet.Validators))
delegations := make([]stakingtypes.Delegation, 0, len(valSet.Validators))

bondAmt := sdk.DefaultPowerReduction
bondAmt := sdk.NewInt(1000000000000)

for _, val := range valSet.Validators {
pk, err := cryptocodec.FromTmPubKeyInterface(val.PubKey)
Expand All @@ -275,47 +233,61 @@ func genesisStateWithValSet(t *testing.T,
validators = append(validators, validator)
delegations = append(delegations, stakingtypes.NewDelegation(genAccs[0].GetAddress(), val.Address.Bytes(), sdk.OneDec()))
}
// set validators and delegations
defaultStParams := stakingtypes.DefaultParams()
stParams := stakingtypes.NewParams(
defaultStParams.UnbondingTime,
defaultStParams.MaxValidators,
defaultStParams.MaxEntries,
defaultStParams.HistoricalEntries,
typesconfig.BaseCoinUnit,
defaultStParams.MinCommissionRate,
)

// set validators and delegations
stakingGenesis := stakingtypes.NewGenesisState(stParams, validators, delegations)
genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis)
stakingGenesis := stakingtypes.NewGenesisState(stakingtypes.DefaultParams(), validators, delegations)
genesisState[stakingtypes.ModuleName] = app.appCodec.MustMarshalJSON(stakingGenesis)

totalSupply := sdk.NewCoins()
for _, b := range balances {
// add genesis acc tokens to total supply
totalSupply = totalSupply.Add(b.Coins...)
}

for range delegations {
// add delegated tokens to total supply
totalSupply = totalSupply.Add(sdk.NewCoin(typesconfig.BaseCoinUnit, bondAmt))
// add genesis acc tokens and delegated tokens to total supply
totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(sdk.DefaultBondDenom, bondAmt))...)
}

// add bonded amount to bonded pool module account
balances = append(balances, banktypes.Balance{
Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(),
Coins: sdk.Coins{sdk.NewCoin(typesconfig.BaseCoinUnit, bondAmt)},
Coins: sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, bondAmt)},
})

// update total supply
bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{},
banktypes.DefaultGenesisState().SendEnabled)
bankGenesis := banktypes.NewGenesisState(banktypes.DefaultGenesisState().Params, balances, totalSupply, []banktypes.Metadata{}, []banktypes.SendEnabled{})
genesisState[banktypes.ModuleName] = app.appCodec.MustMarshalJSON(bankGenesis)

stateBytes, err := json.MarshalIndent(genesisState, "", " ")
require.NoError(t, err)

// init chain will set the validator set and initialize the genesis accounts
app.InitChain(
abci.RequestInitChain{
Time: ctxTime,
Validators: []abci.ValidatorUpdate{},
ConsensusParams: DefaultConsensusParams,
AppStateBytes: stateBytes,
},
)

// commit genesis changes
app.Commit()
app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{
Height: app.LastBlockHeight() + 1,
AppHash: app.LastCommitID().Hash,
ValidatorsHash: valSet.Hash(),
NextValidatorsHash: valSet.Hash(),
}})

genesisState[banktypes.ModuleName] = app.AppCodec().MustMarshalJSON(bankGenesis)
return app
}

return genesisState
// SetupWithEmptyStore setup a wasmd app instance with empty DB
func SetupWithEmptyStore(tb testing.TB) *ComposableApp {
tb.Helper()
app, _ := setup(tb, false, 0)
return app
}

type GenerateAccountStrategy func(int) []sdk.AccAddress

// createRandomAccounts is a strategy used by addTestAddrs() in order to generated addresses in random order.
func createRandomAccounts(accNum int) []sdk.AccAddress {
testAddrs := make([]sdk.AccAddress, accNum)
Expand Down Expand Up @@ -388,14 +360,3 @@ func FundAccount(bankKeeper bankkeeper.Keeper, ctx sdk.Context, addr sdk.AccAddr

return bankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, amounts)
}

// CreateRandomAccounts is a function return a list of randomly generated AccAddresses
func CreateRandomAccounts(numAccts int) []sdk.AccAddress {
testAddrs := make([]sdk.AccAddress, numAccts)
for i := 0; i < numAccts; i++ {
pk := ed25519.GenPrivKey().PubKey()
testAddrs[i] = sdk.AccAddress(pk.Address())
}

return testAddrs
}
57 changes: 25 additions & 32 deletions app/upgrades/v6_4_6/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/bech32"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
authvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
vestingtypes "github.com/cosmos/cosmos-sdk/x/auth/vesting/types"
banktestutil "github.com/cosmos/cosmos-sdk/x/bank/testutil"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
Expand All @@ -25,7 +24,7 @@ import (
)

const (
COIN_DENOM = "upica"
COIN_DENOM = "stake"
CONNECTION_0 = "connection-0"
PORT_0 = "port-0"
CHANNEL_0 = "channel-0"
Expand Down Expand Up @@ -161,26 +160,26 @@ func prepareForTestingAuthModule(s *UpgradeTestSuite) (sdk.AccAddress, sdk.AccAd

addr2 := s.TestAccs[2]
baseAccount2 := authtypes.NewBaseAccount(addr2, nil, 0, 0)
baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount2, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))), 60)
baseVestingAccount := vestingtypes.NewBaseVestingAccount(baseAccount2, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))), 60)
s.App.AccountKeeper.SetAccount(s.Ctx, baseVestingAccount)

continuousVestingAccount := CreateVestingAccount(s)

addr3 := s.TestAccs[3]
baseAccount3 := authtypes.NewBaseAccount(addr3, nil, 0, 0)
baseVestingAccount2 := authvesting.NewBaseVestingAccount(baseAccount3, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))), 60)
delayedVestingAccount := authvesting.NewDelayedVestingAccountRaw(baseVestingAccount2)
baseVestingAccount2 := vestingtypes.NewBaseVestingAccount(baseAccount3, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))), 60)
delayedVestingAccount := vestingtypes.NewDelayedVestingAccountRaw(baseVestingAccount2)
s.App.AccountKeeper.SetAccount(s.Ctx, delayedVestingAccount)

addr4 := s.TestAccs[4]
baseAccount4 := authtypes.NewBaseAccount(addr4, nil, 0, 0)
baseVestingAccount3 := authvesting.NewBaseVestingAccount(baseAccount4, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))), 60)
periodicVestingAccount := authvesting.NewPeriodicVestingAccountRaw(baseVestingAccount3, 0, vestingtypes.Periods{})
baseVestingAccount3 := vestingtypes.NewBaseVestingAccount(baseAccount4, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))), 60)
periodicVestingAccount := vestingtypes.NewPeriodicVestingAccountRaw(baseVestingAccount3, 0, vestingtypes.Periods{})
s.App.AccountKeeper.SetAccount(s.Ctx, periodicVestingAccount)

addr5 := s.TestAccs[5]
baseAccount5 := authtypes.NewBaseAccount(addr5, nil, 0, 0)
permanentLockedAccount := authvesting.NewPermanentLockedAccount(baseAccount5, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))))
permanentLockedAccount := vestingtypes.NewPermanentLockedAccount(baseAccount5, sdk.NewCoins(sdk.NewCoin(COIN_DENOM, math.NewIntFromUint64(1))))
s.App.AccountKeeper.SetAccount(s.Ctx, permanentLockedAccount)

return baseAccount.GetAddress(), stakingModuleAccount.GetAddress(), baseVestingAccount.GetAddress(), continuousVestingAccount.GetAddress(), delayedVestingAccount.GetAddress(), periodicVestingAccount.GetAddress(), permanentLockedAccount.GetAddress()
Expand Down Expand Up @@ -251,7 +250,7 @@ func checkUpgradeSlashingModule(s *UpgradeTestSuite, oldConsAddress sdk.ConsAddr
s.Suite.Equal(valSigningInfo.Address, newBech32Addr)
}

func checkUpgradeStakingModule(s *UpgradeTestSuite, oldValAddress sdk.ValAddress, oldValAddress2 sdk.ValAddress, acc1 sdk.AccAddress, afterOneDay time.Time) {
func checkUpgradeStakingModule(s *UpgradeTestSuite, oldValAddress, oldValAddress2 sdk.ValAddress, acc1 sdk.AccAddress, afterOneDay time.Time) {
// CONVERT TO ACC TO NEW PREFIX
_, bz, _ := bech32.DecodeAndConvert(oldValAddress.String())
newBech32Addr, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixValAddr, bz)
Expand Down Expand Up @@ -296,13 +295,13 @@ func checkUpgradeStakingModule(s *UpgradeTestSuite, oldValAddress sdk.ValAddress
s.Suite.Equal(strings.Contains(RedelegationQueueTimeSlice[0].ValidatorSrcAddress, "pica"), true)
}

func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, stakingModuleAccount sdk.AccAddress, baseVestingAccount sdk.AccAddress, continuousVestingAccount sdk.AccAddress, delayedVestingAccount sdk.AccAddress, periodicVestingAccount sdk.AccAddress, permanentLockedAccount sdk.AccAddress) {
func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount, stakingModuleAccount, baseVestingAccount, continuousVestingAccount, delayedVestingAccount, periodicVestingAccount, permanentLockedAccount sdk.AccAddress) {
/* CHECK BASE ACCOUNT */
_, bz, _ := bech32.DecodeAndConvert(baseAccount.String())
newBech32AddrBaseAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrBA authtypes.AccountI
newPrefixAddrBA = s.App.AccountKeeper.GetAccount(s.Ctx, baseAccount)
switch acci := newPrefixAddrBA.(type) {
var newPrefixAddr authtypes.AccountI
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, baseAccount)
switch acci := newPrefixAddr.(type) {
case *authtypes.BaseAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrBaseAccount)
Expand All @@ -313,9 +312,8 @@ func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, sta
/* CHECK MODULE ACCOUNT */
_, bz, _ = bech32.DecodeAndConvert(stakingModuleAccount.String())
newBech32AddrModuleAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrMA authtypes.AccountI
newPrefixAddrMA = s.App.AccountKeeper.GetAccount(s.Ctx, stakingModuleAccount)
switch acci := newPrefixAddrMA.(type) {
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, stakingModuleAccount)
switch acci := newPrefixAddr.(type) {
case *authtypes.ModuleAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrModuleAccount)
Expand All @@ -326,9 +324,8 @@ func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, sta
/* CHECK BASE VESTING ACCOUNT */
_, bz, _ = bech32.DecodeAndConvert(baseVestingAccount.String())
newBech32AddrBaseVestingAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrBVA authtypes.AccountI
newPrefixAddrBVA = s.App.AccountKeeper.GetAccount(s.Ctx, baseVestingAccount)
switch acci := newPrefixAddrBVA.(type) {
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, baseVestingAccount)
switch acci := newPrefixAddr.(type) {
case *vestingtypes.BaseVestingAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrBaseVestingAccount)
Expand All @@ -339,9 +336,8 @@ func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, sta
// CHECK CONTINUOUS VESTING ACCOUNT AND MULTISIG
_, bz, _ = bech32.DecodeAndConvert(continuousVestingAccount.String())
newBech32AddrConVestingAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrCVA authtypes.AccountI
newPrefixAddrCVA = s.App.AccountKeeper.GetAccount(s.Ctx, continuousVestingAccount)
switch acci := newPrefixAddrCVA.(type) {
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, continuousVestingAccount)
switch acci := newPrefixAddr.(type) {
case *vestingtypes.ContinuousVestingAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrConVestingAccount)
Expand All @@ -352,9 +348,8 @@ func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, sta
// CHECK DELAYED VESTING ACCOUNT
_, bz, _ = bech32.DecodeAndConvert(delayedVestingAccount.String())
newBech32AddrDelayedVestingAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrDVA authtypes.AccountI
newPrefixAddrDVA = s.App.AccountKeeper.GetAccount(s.Ctx, delayedVestingAccount)
switch acci := newPrefixAddrDVA.(type) {
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, delayedVestingAccount)
switch acci := newPrefixAddr.(type) {
case *vestingtypes.DelayedVestingAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrDelayedVestingAccount)
Expand All @@ -365,9 +360,8 @@ func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, sta
// CHECK PERIODIC VESTING ACCOUNT
_, bz, _ = bech32.DecodeAndConvert(periodicVestingAccount.String())
newBech32AddrPeriodicVestingAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrPVA authtypes.AccountI
newPrefixAddrPVA = s.App.AccountKeeper.GetAccount(s.Ctx, periodicVestingAccount)
switch acci := newPrefixAddrPVA.(type) {
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, periodicVestingAccount)
switch acci := newPrefixAddr.(type) {
case *vestingtypes.PeriodicVestingAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrPeriodicVestingAccount)
Expand All @@ -378,9 +372,8 @@ func checkUpgradeAuthModule(s *UpgradeTestSuite, baseAccount sdk.AccAddress, sta
// CHECK PERMANENT LOCKED ACCOUNT
_, bz, _ = bech32.DecodeAndConvert(permanentLockedAccount.String())
newBech32AddrPermanentVestingAccount, _ := bech32.ConvertAndEncode(utils.NewBech32PrefixAccAddr, bz)
var newPrefixAddrPLA authtypes.AccountI
newPrefixAddrPLA = s.App.AccountKeeper.GetAccount(s.Ctx, permanentLockedAccount)
switch acci := newPrefixAddrPLA.(type) {
newPrefixAddr = s.App.AccountKeeper.GetAccount(s.Ctx, permanentLockedAccount)
switch acci := newPrefixAddr.(type) {
case *vestingtypes.PermanentLockedAccount:
acc := acci
s.Suite.Equal(acc.Address, newBech32AddrPermanentVestingAccount)
Expand Down Expand Up @@ -417,7 +410,7 @@ func checkUpgradeTransferMiddlewareModule(s *UpgradeTestSuite) {

func CreateVestingAccount(s *UpgradeTestSuite,
) vestingtypes.ContinuousVestingAccount {
str := `{"@type":"/cosmos.vesting.v1beta1.ContinuousVestingAccount","base_vesting_account":{"base_account":{"address":"centauri1alga5e8vr6ccr9yrg0kgxevpt5xgmgrvfkc5p8","pub_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":4,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlnzK22KrkylnvTCvZZc8eZnydtQuzCWLjJJSMFUvVHf"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Aiw2Ftg+fnoHDU7M3b0VMRsI0qurXlerW0ahtfzSDZA4"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AvEHv+MVYRVau8FbBcJyG0ql85Tbbn7yhSA0VGmAY4ku"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Az5VHWqi3zMJu1rLGcu2EgNXLLN+al4Dy/lj6UZTzTCl"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ai4GlSH3uG+joMnAFbQC3jQeHl9FPvVTlRmwIFt7d7TI"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A2kAzH2bZr530jmFq/bRFrT2q8SRqdnfIebba+YIBqI1"}]},"account_number":46,"sequence":27},"original_vesting":[{"denom":"upica","amount":"22165200000000"}],"delegated_free":[{"denom":"upica","amount":"443382497453"}],"delegated_vesting":[{"denom":"upica","amount":"22129422502547"}],"end_time":1770994800},"start_time":1676300400}`
str := `{"@type":"/cosmos.vesting.v1beta1.ContinuousVestingAccount","base_vesting_account":{"base_account":{"address":"centauri1alga5e8vr6ccr9yrg0kgxevpt5xgmgrvfkc5p8","pub_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":4,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlnzK22KrkylnvTCvZZc8eZnydtQuzCWLjJJSMFUvVHf"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Aiw2Ftg+fnoHDU7M3b0VMRsI0qurXlerW0ahtfzSDZA4"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AvEHv+MVYRVau8FbBcJyG0ql85Tbbn7yhSA0VGmAY4ku"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Az5VHWqi3zMJu1rLGcu2EgNXLLN+al4Dy/lj6UZTzTCl"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ai4GlSH3uG+joMnAFbQC3jQeHl9FPvVTlRmwIFt7d7TI"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A2kAzH2bZr530jmFq/bRFrT2q8SRqdnfIebba+YIBqI1"}]},"account_number":46,"sequence":27},"original_vesting":[{"denom":"stake","amount":"22165200000000"}],"delegated_free":[{"denom":"stake","amount":"443382497453"}],"delegated_vesting":[{"denom":"stake","amount":"22129422502547"}],"end_time":1770994800},"start_time":1676300400}`

var acc vestingtypes.ContinuousVestingAccount
if err := json.Unmarshal([]byte(str), &acc); err != nil {
Expand Down
1 change: 0 additions & 1 deletion bech32-migration/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func IterateStoreByPrefix(
newValue := fn(iterator.Value())
store.Set(iterator.Key(), newValue)
}

}

// AccAddressFromBech32 creates an AccAddress from a Bech32 string.
Expand Down
2 changes: 1 addition & 1 deletion cmd/picad/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const (

const (
HumanReadableCoinUnit = "PICA"
BaseCoinUnit = "upica"
BaseCoinUnit = "stake"
DefaultBondDenom = BaseCoinUnit
)

Expand Down
2 changes: 1 addition & 1 deletion x/transfermiddleware/ibc_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
customibctesting "github.com/notional-labs/composable/v6/app/ibctesting"
)

var govAuthorityAddress = "pica10556m38z4x6pqalr9rl5ytf3cff8q46nf36090" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m
var govAuthorityAddress = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m

type TransferTestSuite struct {
suite.Suite
Expand Down

0 comments on commit c2f1141

Please sign in to comment.