Skip to content

Commit

Permalink
pick denom for testing as stake
Browse files Browse the repository at this point in the history
  • Loading branch information
tungleanh0902 committed Mar 6, 2024
1 parent 534ba70 commit 296bcbf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (s *KeeperTestHelper) Setup(_ *testing.T) {
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
4 changes: 2 additions & 2 deletions app/upgrades/v6_4_6/upgrades_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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 @@ -417,7 +417,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
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

0 comments on commit 296bcbf

Please sign in to comment.