diff --git a/Makefile b/Makefile index 7ba594f0..af2b6996 100644 --- a/Makefile +++ b/Makefile @@ -255,7 +255,7 @@ start-localnet-ci: build ./build/atomoned genesis add-genesis-account val 10000000000000000000000000stake --home ~/.atomoned-liveness --keyring-backend test ./build/atomoned genesis gentx val 1000000000stake --home ~/.atomoned-liveness --chain-id liveness ./build/atomoned genesis collect-gentxs --home ~/.atomoned-liveness - sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatom"/' ~/.atomoned-liveness/config/app.toml + sed -i.bak'' 's/minimum-gas-prices = ""/minimum-gas-prices = "0uatone"/' ~/.atomoned-liveness/config/app.toml ./build/atomoned start --home ~/.atomoned-liveness --x-crisis-skip-assert-invariants .PHONY: start-localnet-ci diff --git a/ante/gov_vote_ante.go b/ante/gov_vote_ante.go index cd8992e6..1daea9cf 100644 --- a/ante/gov_vote_ante.go +++ b/ante/gov_vote_ante.go @@ -15,7 +15,7 @@ import ( ) var ( - minStakedTokens = sdk.NewDec(1000000) // 1_000_000 uatom (or 1 atom) + minStakedTokens = sdk.NewDec(1000000) // 1_000_000 uatone (or 1 atone) maxDelegationsChecked = 100 // number of delegation to check for the minStakedTokens ) diff --git a/ante/gov_vote_ante_test.go b/ante/gov_vote_ante_test.go index 7c5c70c1..c55bdd0b 100644 --- a/ante/gov_vote_ante_test.go +++ b/ante/gov_vote_ante_test.go @@ -60,19 +60,19 @@ func TestVoteSpamDecoratorGovV1Beta1(t *testing.T) { expectPass bool }{ { - name: "delegate 0 atom", + name: "delegate 0 atone", bondAmt: sdk.ZeroInt(), validators: []sdk.ValAddress{valAddr1}, expectPass: false, }, { - name: "delegate 0.1 atom", + name: "delegate 0.1 atone", bondAmt: sdk.NewInt(100000), validators: []sdk.ValAddress{valAddr1}, expectPass: false, }, { - name: "delegate 1 atom", + name: "delegate 1 atone", bondAmt: sdk.NewInt(1000000), validators: []sdk.ValAddress{valAddr1}, expectPass: true, @@ -90,7 +90,7 @@ func TestVoteSpamDecoratorGovV1Beta1(t *testing.T) { expectPass: false, }, { - name: "delegate 10 atom", + name: "delegate 10 atone", bondAmt: sdk.NewInt(10000000), validators: []sdk.ValAddress{valAddr1}, expectPass: true, @@ -174,19 +174,19 @@ func TestVoteSpamDecoratorGovV1(t *testing.T) { expectPass bool }{ { - name: "delegate 0 atom", + name: "delegate 0 atone", bondAmt: sdk.ZeroInt(), validators: []sdk.ValAddress{valAddr1}, expectPass: false, }, { - name: "delegate 0.1 atom", + name: "delegate 0.1 atone", bondAmt: sdk.NewInt(100000), validators: []sdk.ValAddress{valAddr1}, expectPass: false, }, { - name: "delegate 1 atom", + name: "delegate 1 atone", bondAmt: sdk.NewInt(1000000), validators: []sdk.ValAddress{valAddr1}, expectPass: true, @@ -204,7 +204,7 @@ func TestVoteSpamDecoratorGovV1(t *testing.T) { expectPass: false, }, { - name: "delegate 10 atom", + name: "delegate 10 atone", bondAmt: sdk.NewInt(10000000), validators: []sdk.ValAddress{valAddr1}, expectPass: true, diff --git a/app/helpers/test_helpers.go b/app/helpers/test_helpers.go index 822e7aeb..d1095c69 100644 --- a/app/helpers/test_helpers.go +++ b/app/helpers/test_helpers.go @@ -122,7 +122,7 @@ func setup() (*atomoneapp.AtomOneApp, atomoneapp.GenesisState) { db := dbm.NewMemDB() appOptions := make(simtestutil.AppOptionsMap, 0) appOptions[server.FlagInvCheckPeriod] = 5 - appOptions[server.FlagMinGasPrices] = "0uatom" + appOptions[server.FlagMinGasPrices] = "0uatone" encConfig := atomoneapp.RegisterEncodingConfig() diff --git a/tests/e2e/e2e_bank_test.go b/tests/e2e/e2e_bank_test.go index 1af799b0..402da55e 100644 --- a/tests/e2e/e2e_bank_test.go +++ b/tests/e2e/e2e_bank_test.go @@ -21,26 +21,26 @@ func (s *IntegrationTestSuite) testBankTokenTransfer() { bob, _ := c.genesisAccounts[2].keyInfo.GetAddress() charlie, _ := c.genesisAccounts[3].keyInfo.GetAddress() - var beforeAliceUAtomBalance, - beforeBobUAtomBalance, - beforeCharlieUAtomBalance, - afterAliceUAtomBalance, - afterBobUAtomBalance, - afterCharlieUAtomBalance sdk.Coin + var beforeAliceUAtoneBalance, + beforeBobUAtoneBalance, + beforeCharlieUAtoneBalance, + afterAliceUAtoneBalance, + afterBobUAtoneBalance, + afterCharlieUAtoneBalance sdk.Coin // get balances of sender and recipient accounts s.Require().Eventually( func() bool { - beforeAliceUAtomBalance, err = getSpecificBalance(chainEndpoint, alice.String(), uatomDenom) + beforeAliceUAtoneBalance, err = getSpecificBalance(chainEndpoint, alice.String(), uatoneDenom) s.Require().NoError(err) - beforeBobUAtomBalance, err = getSpecificBalance(chainEndpoint, bob.String(), uatomDenom) + beforeBobUAtoneBalance, err = getSpecificBalance(chainEndpoint, bob.String(), uatoneDenom) s.Require().NoError(err) - beforeCharlieUAtomBalance, err = getSpecificBalance(chainEndpoint, charlie.String(), uatomDenom) + beforeCharlieUAtoneBalance, err = getSpecificBalance(chainEndpoint, charlie.String(), uatoneDenom) s.Require().NoError(err) - return beforeAliceUAtomBalance.IsValid() && beforeBobUAtomBalance.IsValid() && beforeCharlieUAtomBalance.IsValid() + return beforeAliceUAtoneBalance.IsValid() && beforeBobUAtoneBalance.IsValid() && beforeCharlieUAtoneBalance.IsValid() }, 10*time.Second, 5*time.Second, @@ -52,14 +52,14 @@ func (s *IntegrationTestSuite) testBankTokenTransfer() { // check that the transfer was successful s.Require().Eventually( func() bool { - afterAliceUAtomBalance, err = getSpecificBalance(chainEndpoint, alice.String(), uatomDenom) + afterAliceUAtoneBalance, err = getSpecificBalance(chainEndpoint, alice.String(), uatoneDenom) s.Require().NoError(err) - afterBobUAtomBalance, err = getSpecificBalance(chainEndpoint, bob.String(), uatomDenom) + afterBobUAtoneBalance, err = getSpecificBalance(chainEndpoint, bob.String(), uatoneDenom) s.Require().NoError(err) - decremented := beforeAliceUAtomBalance.Sub(tokenAmount).Sub(standardFees).IsEqual(afterAliceUAtomBalance) - incremented := beforeBobUAtomBalance.Add(tokenAmount).IsEqual(afterBobUAtomBalance) + decremented := beforeAliceUAtoneBalance.Sub(tokenAmount).Sub(standardFees).IsEqual(afterAliceUAtoneBalance) + incremented := beforeBobUAtoneBalance.Add(tokenAmount).IsEqual(afterBobUAtoneBalance) return decremented && incremented }, @@ -68,26 +68,26 @@ func (s *IntegrationTestSuite) testBankTokenTransfer() { ) // save the updated account balances of alice and bob - beforeAliceUAtomBalance, beforeBobUAtomBalance = afterAliceUAtomBalance, afterBobUAtomBalance + beforeAliceUAtoneBalance, beforeBobUAtoneBalance = afterAliceUAtoneBalance, afterBobUAtoneBalance // alice sends tokens to bob and charlie, at once s.execBankMultiSend(s.chainA, valIdx, alice.String(), []string{bob.String(), charlie.String()}, tokenAmount.String(), standardFees.String(), false) s.Require().Eventually( func() bool { - afterAliceUAtomBalance, err = getSpecificBalance(chainEndpoint, alice.String(), uatomDenom) + afterAliceUAtoneBalance, err = getSpecificBalance(chainEndpoint, alice.String(), uatoneDenom) s.Require().NoError(err) - afterBobUAtomBalance, err = getSpecificBalance(chainEndpoint, bob.String(), uatomDenom) + afterBobUAtoneBalance, err = getSpecificBalance(chainEndpoint, bob.String(), uatoneDenom) s.Require().NoError(err) - afterCharlieUAtomBalance, err = getSpecificBalance(chainEndpoint, charlie.String(), uatomDenom) + afterCharlieUAtoneBalance, err = getSpecificBalance(chainEndpoint, charlie.String(), uatoneDenom) s.Require().NoError(err) // assert alice's account gets decremented the amount of tokens twice - decremented := beforeAliceUAtomBalance.Sub(tokenAmount).Sub(tokenAmount).Sub(standardFees).IsEqual(afterAliceUAtomBalance) - incremented := beforeBobUAtomBalance.Add(tokenAmount).IsEqual(afterBobUAtomBalance) && - beforeCharlieUAtomBalance.Add(tokenAmount).IsEqual(afterCharlieUAtomBalance) + decremented := beforeAliceUAtoneBalance.Sub(tokenAmount).Sub(tokenAmount).Sub(standardFees).IsEqual(afterAliceUAtoneBalance) + incremented := beforeBobUAtoneBalance.Add(tokenAmount).IsEqual(afterBobUAtoneBalance) && + beforeCharlieUAtoneBalance.Add(tokenAmount).IsEqual(afterCharlieUAtoneBalance) return decremented && incremented }, diff --git a/tests/e2e/e2e_distribution_test.go b/tests/e2e/e2e_distribution_test.go index ebcc5bdd..5c5739d0 100644 --- a/tests/e2e/e2e_distribution_test.go +++ b/tests/e2e/e2e_distribution_test.go @@ -18,12 +18,12 @@ func (s *IntegrationTestSuite) testDistribution() { delegatorAddress, _ := s.chainA.genesisAccounts[2].keyInfo.GetAddress() newWithdrawalAddress, _ := s.chainA.genesisAccounts[3].keyInfo.GetAddress() - fees := sdk.NewCoin(uatomDenom, sdk.NewInt(1000)) + fees := sdk.NewCoin(uatoneDenom, sdk.NewInt(1000)) - beforeBalance, err := getSpecificBalance(chainEndpoint, newWithdrawalAddress.String(), uatomDenom) + beforeBalance, err := getSpecificBalance(chainEndpoint, newWithdrawalAddress.String(), uatoneDenom) s.Require().NoError(err) if beforeBalance.IsNil() { - beforeBalance = sdk.NewCoin(uatomDenom, sdk.NewInt(0)) + beforeBalance = sdk.NewCoin(uatoneDenom, sdk.NewInt(0)) } s.execSetWithdrawAddress(s.chainA, 0, fees.String(), delegatorAddress.String(), newWithdrawalAddress.String(), atomoneHomePath) @@ -43,7 +43,7 @@ func (s *IntegrationTestSuite) testDistribution() { s.execWithdrawReward(s.chainA, 0, delegatorAddress.String(), valOperAddressA, atomoneHomePath) s.Require().Eventually( func() bool { - afterBalance, err := getSpecificBalance(chainEndpoint, newWithdrawalAddress.String(), uatomDenom) + afterBalance, err := getSpecificBalance(chainEndpoint, newWithdrawalAddress.String(), uatoneDenom) s.Require().NoError(err) return afterBalance.IsGTE(beforeBalance) @@ -64,23 +64,23 @@ func (s *IntegrationTestSuite) fundCommunityPool() { chainAAPIEndpoint := fmt.Sprintf("http://%s", s.valResources[s.chainA.id][0].GetHostPort("1317/tcp")) sender, _ := s.chainA.validators[0].keyInfo.GetAddress() - beforeDistUatomBalance, _ := getSpecificBalance(chainAAPIEndpoint, distModuleAddress, tokenAmount.Denom) - if beforeDistUatomBalance.IsNil() { + beforeDistUatoneBalance, _ := getSpecificBalance(chainAAPIEndpoint, distModuleAddress, tokenAmount.Denom) + if beforeDistUatoneBalance.IsNil() { // Set balance to 0 if previous balance does not exist - beforeDistUatomBalance = sdk.NewInt64Coin(uatomDenom, 0) + beforeDistUatoneBalance = sdk.NewInt64Coin(uatoneDenom, 0) } s.execDistributionFundCommunityPool(s.chainA, 0, sender.String(), tokenAmount.String(), standardFees.String()) // there are still tokens being added to the community pool through block production rewards but they should be less than 500 tokens - marginOfErrorForBlockReward := sdk.NewInt64Coin(uatomDenom, 500) + marginOfErrorForBlockReward := sdk.NewInt64Coin(uatoneDenom, 500) s.Require().Eventually( func() bool { afterDistPhotonBalance, err := getSpecificBalance(chainAAPIEndpoint, distModuleAddress, tokenAmount.Denom) s.Require().NoErrorf(err, "Error getting balance: %s", afterDistPhotonBalance) - return afterDistPhotonBalance.Sub(beforeDistUatomBalance.Add(tokenAmount.Add(standardFees))).IsLT(marginOfErrorForBlockReward) + return afterDistPhotonBalance.Sub(beforeDistUatoneBalance.Add(tokenAmount.Add(standardFees))).IsLT(marginOfErrorForBlockReward) }, 15*time.Second, 5*time.Second, diff --git a/tests/e2e/e2e_exec_test.go b/tests/e2e/e2e_exec_test.go index f419495e..9239bd48 100644 --- a/tests/e2e/e2e_exec_test.go +++ b/tests/e2e/e2e_exec_test.go @@ -606,7 +606,7 @@ func (s *IntegrationTestSuite) getLatestBlockHeight(c *chain, valIdx int) int { // func (s *IntegrationTestSuite) verifyBalanceChange(endpoint string, expectedAmount sdk.Coin, recipientAddress string) { // s.Require().Eventually( // func() bool { -// afterAtomBalance, err := getSpecificBalance(endpoint, recipientAddress, uatomDenom) +// afterAtomBalance, err := getSpecificBalance(endpoint, recipientAddress, uatoneDenom) // s.Require().NoError(err) // return afterAtomBalance.IsEqual(expectedAmount) @@ -665,7 +665,7 @@ func (s *IntegrationTestSuite) execWithdrawReward( "withdraw-rewards", validatorAddress, fmt.Sprintf("--%s=%s", flags.FlagFrom, delegatorAddress), - fmt.Sprintf("--%s=%s", flags.FlagGasPrices, "300uatom"), + fmt.Sprintf("--%s=%s", flags.FlagGasPrices, "300uatone"), fmt.Sprintf("--%s=%s", flags.FlagGas, "auto"), fmt.Sprintf("--%s=%s", flags.FlagGasAdjustment, "1.5"), fmt.Sprintf("--%s=%s", flags.FlagChainID, c.id), diff --git a/tests/e2e/e2e_feegrant_test.go b/tests/e2e/e2e_feegrant_test.go index 3f4913ec..ad04c967 100644 --- a/tests/e2e/e2e_feegrant_test.go +++ b/tests/e2e/e2e_feegrant_test.go @@ -39,7 +39,7 @@ func (s *IntegrationTestSuite) testFeeGrant() { withKeyValue(flagAllowedMessages, sdk.MsgTypeURL(&banktypes.MsgSend{})), ) - bobBalance, err := getSpecificBalance(api, bob.String(), uatomDenom) + bobBalance, err := getSpecificBalance(api, bob.String(), uatoneDenom) s.Require().NoError(err) // withdrawal all balance + fee + fee granter flag should succeed @@ -56,7 +56,7 @@ func (s *IntegrationTestSuite) testFeeGrant() { // check if the bob balance was subtracted without the fees expectedBobBalance := bobBalance.Sub(tokenAmount) - bobBalance, err = getSpecificBalance(api, bob.String(), uatomDenom) + bobBalance, err = getSpecificBalance(api, bob.String(), uatoneDenom) s.Require().NoError(err) s.Require().Equal(expectedBobBalance, bobBalance) diff --git a/tests/e2e/e2e_gov_test.go b/tests/e2e/e2e_gov_test.go index 0d69a3a3..2469823c 100644 --- a/tests/e2e/e2e_gov_test.go +++ b/tests/e2e/e2e_gov_test.go @@ -120,10 +120,10 @@ func (s *IntegrationTestSuite) GovCommunityPoolSpend() { sender := senderAddress.String() recipientAddress, _ := s.chainA.validators[1].keyInfo.GetAddress() recipient := recipientAddress.String() - sendAmount := sdk.NewCoin(uatomDenom, sdk.NewInt(10000000)) // 10uatom + sendAmount := sdk.NewCoin(uatoneDenom, sdk.NewInt(10000000)) // 10uatone s.writeGovCommunitySpendProposal(s.chainA, sendAmount, recipient) - beforeRecipientBalance, err := getSpecificBalance(chainAAPIEndpoint, recipient, uatomDenom) + beforeRecipientBalance, err := getSpecificBalance(chainAAPIEndpoint, recipient, uatoneDenom) s.Require().NoError(err) // Gov tests may be run in arbitrary order, each test must increment proposalCounter to have the correct proposal id to submit and query @@ -135,7 +135,7 @@ func (s *IntegrationTestSuite) GovCommunityPoolSpend() { s.Require().Eventually( func() bool { - afterRecipientBalance, err := getSpecificBalance(chainAAPIEndpoint, recipient, uatomDenom) + afterRecipientBalance, err := getSpecificBalance(chainAAPIEndpoint, recipient, uatoneDenom) s.Require().NoError(err) return afterRecipientBalance.Sub(sendAmount).IsEqual(beforeRecipientBalance) @@ -147,10 +147,10 @@ func (s *IntegrationTestSuite) GovCommunityPoolSpend() { func (s *IntegrationTestSuite) submitLegacyGovProposal(chainAAPIEndpoint, sender string, proposalID int, proposalType string, submitFlags []string, depositFlags []string, voteFlags []string, voteCommand string, withDeposit bool) { s.T().Logf("Submitting Gov Proposal: %s", proposalType) - // min deposit of 1000uatom is required in e2e tests, otherwise the gov antehandler causes the proposal to be dropped + // min deposit of 1000uatone is required in e2e tests, otherwise the gov antehandler causes the proposal to be dropped sflags := submitFlags if withDeposit { - sflags = append(sflags, "--deposit=1000uatom") + sflags = append(sflags, "--deposit=1000uatone") } s.submitGovCommand(chainAAPIEndpoint, sender, proposalID, "submit-legacy-proposal", sflags, govtypesv1beta1.StatusDepositPeriod) s.T().Logf("Depositing Gov Proposal: %s", proposalType) @@ -162,7 +162,7 @@ func (s *IntegrationTestSuite) submitLegacyGovProposal(chainAAPIEndpoint, sender // NOTE: in SDK >= v0.47 the submit-proposal does not have a --deposit flag // Instead, the depoist is added to the "deposit" field of the proposal JSON (usually stored as a file) // you can use `atomoned tx gov draft-proposal` to create a proposal file that you can use -// min initial deposit of 100uatom is required in e2e tests, otherwise the proposal would be dropped +// min initial deposit of 100uatone is required in e2e tests, otherwise the proposal would be dropped func (s *IntegrationTestSuite) submitGovProposal(chainAAPIEndpoint, sender string, proposalID int, proposalType string, submitFlags []string, depositFlags []string, voteFlags []string, voteCommand string) { s.T().Logf("Submitting Gov Proposal: %s", proposalType) sflags := submitFlags diff --git a/tests/e2e/e2e_setup_test.go b/tests/e2e/e2e_setup_test.go index a5fbe435..8da315ab 100644 --- a/tests/e2e/e2e_setup_test.go +++ b/tests/e2e/e2e_setup_test.go @@ -49,9 +49,9 @@ const ( keysCommand = "keys" atomoneHomePath = "/home/nonroot/.atomone" photonDenom = "photon" - uatomDenom = "uatom" + uatoneDenom = "uatone" stakeDenom = "stake" - initBalanceStr = "110000000000stake,100000000000000000photon,100000000000000000uatom" + initBalanceStr = "110000000000stake,100000000000000000photon,100000000000000000uatone" minGasPrice = "0.00001" gas = 200000 govProposalBlockBuffer = 35 @@ -73,10 +73,10 @@ const ( var ( atomoneConfigPath = filepath.Join(atomoneHomePath, "config") stakingAmount = sdk.NewInt(100000000000) - stakingAmountCoin = sdk.NewCoin(uatomDenom, stakingAmount) - tokenAmount = sdk.NewCoin(uatomDenom, sdk.NewInt(3300000000)) // 3,300uatom - standardFees = sdk.NewCoin(uatomDenom, sdk.NewInt(330000)) // 0.33uatom - depositAmount = sdk.NewCoin(uatomDenom, sdk.NewInt(330000000)) // 3,300uatom + stakingAmountCoin = sdk.NewCoin(uatoneDenom, stakingAmount) + tokenAmount = sdk.NewCoin(uatoneDenom, sdk.NewInt(3300000000)) // 3,300uatone + standardFees = sdk.NewCoin(uatoneDenom, sdk.NewInt(330000)) // 0.33uatone + depositAmount = sdk.NewCoin(uatoneDenom, sdk.NewInt(330000000)) // 3,300uatone distModuleAddress = authtypes.NewModuleAddress(distrtypes.ModuleName).String() govModuleAddress = authtypes.NewModuleAddress(govtypes.ModuleName).String() proposalCounter = 0 @@ -197,7 +197,7 @@ func (s *IntegrationTestSuite) initNodes(c *chain) { } s.Require().NoError( - modifyGenesis(val0ConfigDir, "", initBalanceStr, addrAll, uatomDenom), + modifyGenesis(val0ConfigDir, "", initBalanceStr, addrAll, uatoneDenom), ) // copy the genesis file to the remaining validators for _, val := range c.validators[1:] { @@ -336,7 +336,7 @@ func (s *IntegrationTestSuite) addGenesisVestingAndJailedAccounts( } stakingModuleBalances := banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.NotBondedPoolName).String(), - Coins: sdk.NewCoins(sdk.NewCoin(uatomDenom, sdk.NewInt(slashingShares))), + Coins: sdk.NewCoins(sdk.NewCoin(uatoneDenom, sdk.NewInt(slashingShares))), } bankGenState.Balances = append( bankGenState.Balances, @@ -350,13 +350,13 @@ func (s *IntegrationTestSuite) addGenesisVestingAndJailedAccounts( // update the denom metadata for the bank module bankGenState.DenomMetadata = append(bankGenState.DenomMetadata, banktypes.Metadata{ Description: "An example stable token", - Display: uatomDenom, - Base: uatomDenom, - Symbol: uatomDenom, - Name: uatomDenom, + Display: uatoneDenom, + Base: uatoneDenom, + Symbol: uatoneDenom, + Name: uatoneDenom, DenomUnits: []*banktypes.DenomUnit{ { - Denom: uatomDenom, + Denom: uatoneDenom, Exponent: 0, }, }, @@ -500,7 +500,7 @@ func (s *IntegrationTestSuite) initValidatorConfigs(c *chain) { appConfig := srvconfig.DefaultConfig() appConfig.API.Enable = true appConfig.API.Address = "tcp://0.0.0.0:1317" - appConfig.MinGasPrices = fmt.Sprintf("%s%s", minGasPrice, uatomDenom) + appConfig.MinGasPrices = fmt.Sprintf("%s%s", minGasPrice, uatoneDenom) appConfig.GRPC.Address = "0.0.0.0:9090" srvconfig.SetConfigTemplate(srvconfig.DefaultConfigTemplate) @@ -594,7 +594,7 @@ func (s *IntegrationTestSuite) writeGovCommunitySpendProposal(c *chain, amount s }] } ], - "deposit": "100uatom", + "deposit": "100uatone", "proposer": "Proposing validator address", "metadata": "Community Pool Spend", "title": "Fund Team!", @@ -641,7 +641,7 @@ func (s *IntegrationTestSuite) writeLiquidStakingParamsUpdateProposal(c *chain, } ], "metadata": "ipfs://CID", - "deposit": "100uatom", + "deposit": "100uatone", "title": "Update LSM Params", "summary": "e2e-test updating LSM staking params" }` diff --git a/tests/e2e/e2e_staking_test.go b/tests/e2e/e2e_staking_test.go index ef7ade61..17c1fc2b 100644 --- a/tests/e2e/e2e_staking_test.go +++ b/tests/e2e/e2e_staking_test.go @@ -24,7 +24,7 @@ func (s *IntegrationTestSuite) testStaking() { delegatorAddress, _ := s.chainA.genesisAccounts[2].keyInfo.GetAddress() - fees := sdk.NewCoin(uatomDenom, sdk.NewInt(1)) + fees := sdk.NewCoin(uatoneDenom, sdk.NewInt(1)) existingDelegation := sdk.ZeroDec() res, err := queryDelegation(chainEndpoint, validatorAddressA, delegatorAddress.String()) @@ -33,9 +33,9 @@ func (s *IntegrationTestSuite) testStaking() { } delegationAmount := sdk.NewInt(500000000) - delegation := sdk.NewCoin(uatomDenom, delegationAmount) // 500 atom + delegation := sdk.NewCoin(uatoneDenom, delegationAmount) // 500 atom - // Alice delegate uatom to Validator A + // Alice delegate uatone to Validator A s.execDelegate(s.chainA, 0, delegation.String(), validatorAddressA, delegatorAddress.String(), atomoneHomePath, fees.String()) // Validate delegation successful @@ -52,9 +52,9 @@ func (s *IntegrationTestSuite) testStaking() { ) redelegationAmount := delegationAmount.Quo(sdk.NewInt(2)) - redelegation := sdk.NewCoin(uatomDenom, redelegationAmount) // 250 atom + redelegation := sdk.NewCoin(uatoneDenom, redelegationAmount) // 250 atom - // Alice re-delegate half of her uatom delegation from Validator A to Validator B + // Alice re-delegate half of her uatone delegation from Validator A to Validator B s.execRedelegate(s.chainA, 0, redelegation.String(), validatorAddressA, validatorAddressB, delegatorAddress.String(), atomoneHomePath, fees.String()) // Validate re-delegation successful @@ -83,7 +83,7 @@ func (s *IntegrationTestSuite) testStaking() { s.Require().NoError(err) currDelegationAmount = amt.TruncateInt() - currDelegation = sdk.NewCoin(uatomDenom, currDelegationAmount) + currDelegation = sdk.NewCoin(uatoneDenom, currDelegationAmount) return currDelegation.IsValid() }, @@ -91,7 +91,7 @@ func (s *IntegrationTestSuite) testStaking() { 5*time.Second, ) - // Alice unbonds all her uatom delegation from Validator A + // Alice unbonds all her uatone delegation from Validator A s.execUnbondDelegation(s.chainA, 0, currDelegation.String(), validatorAddressA, delegatorAddress.String(), atomoneHomePath, fees.String()) var ubdDelegationEntry types.UnbondingDelegationEntry diff --git a/tests/e2e/e2e_vesting_test.go b/tests/e2e/e2e_vesting_test.go index e53adbf9..e1ae6541 100644 --- a/tests/e2e/e2e_vesting_test.go +++ b/tests/e2e/e2e_vesting_test.go @@ -32,11 +32,11 @@ type ( var ( genesisVestingKeys = []string{continuousVestingKey, delayedVestingKey, lockedVestingKey, periodicVestingKey} - vestingAmountVested = sdk.NewCoin(uatomDenom, sdk.NewInt(99900000000)) - vestingAmount = sdk.NewCoin(uatomDenom, sdk.NewInt(350000)) + vestingAmountVested = sdk.NewCoin(uatoneDenom, sdk.NewInt(99900000000)) + vestingAmount = sdk.NewCoin(uatoneDenom, sdk.NewInt(350000)) vestingBalance = sdk.NewCoins(vestingAmountVested).Add(vestingAmount) - vestingDelegationAmount = sdk.NewCoin(uatomDenom, sdk.NewInt(500000000)) - vestingDelegationFees = sdk.NewCoin(uatomDenom, sdk.NewInt(1)) + vestingDelegationAmount = sdk.NewCoin(uatoneDenom, sdk.NewInt(500000000)) + vestingDelegationFees = sdk.NewCoin(uatoneDenom, sdk.NewInt(1)) ) func (s *IntegrationTestSuite) testDelayedVestingAccount(api string) { @@ -54,9 +54,9 @@ func (s *IntegrationTestSuite) testDelayedVestingAccount(api string) { s.Require().NoError(err) // Check address balance - balance, err := getSpecificBalance(api, vestingDelayedAcc.String(), uatomDenom) + balance, err := getSpecificBalance(api, vestingDelayedAcc.String(), uatoneDenom) s.Require().NoError(err) - s.Require().Equal(vestingBalance.AmountOf(uatomDenom), balance.Amount) + s.Require().Equal(vestingBalance.AmountOf(uatoneDenom), balance.Amount) // Delegate coins should succeed s.execDelegate(chain, valIdx, vestingDelegationAmount.String(), valOpAddr, @@ -78,7 +78,7 @@ func (s *IntegrationTestSuite) testDelayedVestingAccount(api string) { waitTime := acc.EndTime - time.Now().Unix() if waitTime > vestingTxDelay { // Transfer coins should fail - balance, err := getSpecificBalance(api, vestingDelayedAcc.String(), uatomDenom) + balance, err := getSpecificBalance(api, vestingDelayedAcc.String(), uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -94,7 +94,7 @@ func (s *IntegrationTestSuite) testDelayedVestingAccount(api string) { } // Transfer coins should succeed - balance, err = getSpecificBalance(api, vestingDelayedAcc.String(), uatomDenom) + balance, err = getSpecificBalance(api, vestingDelayedAcc.String(), uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -123,9 +123,9 @@ func (s *IntegrationTestSuite) testContinuousVestingAccount(api string) { s.Require().NoError(err) // Check address balance - balance, err := getSpecificBalance(api, continuousVestingAcc.String(), uatomDenom) + balance, err := getSpecificBalance(api, continuousVestingAcc.String(), uatoneDenom) s.Require().NoError(err) - s.Require().Equal(vestingBalance.AmountOf(uatomDenom), balance.Amount) + s.Require().Equal(vestingBalance.AmountOf(uatoneDenom), balance.Amount) // Delegate coins should succeed s.execDelegate(chain, valIdx, vestingDelegationAmount.String(), @@ -147,7 +147,7 @@ func (s *IntegrationTestSuite) testContinuousVestingAccount(api string) { waitStartTime := acc.StartTime - time.Now().Unix() if waitStartTime > vestingTxDelay { // Transfer coins should fail - balance, err := getSpecificBalance(api, continuousVestingAcc.String(), uatomDenom) + balance, err := getSpecificBalance(api, continuousVestingAcc.String(), uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -165,7 +165,7 @@ func (s *IntegrationTestSuite) testContinuousVestingAccount(api string) { waitEndTime := acc.EndTime - time.Now().Unix() if waitEndTime > vestingTxDelay { // Transfer coins should fail - balance, err := getSpecificBalance(api, continuousVestingAcc.String(), uatomDenom) + balance, err := getSpecificBalance(api, continuousVestingAcc.String(), uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -181,7 +181,7 @@ func (s *IntegrationTestSuite) testContinuousVestingAccount(api string) { } // Transfer coins should succeed - balance, err = getSpecificBalance(api, continuousVestingAcc.String(), uatomDenom) + balance, err = getSpecificBalance(api, continuousVestingAcc.String(), uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -218,13 +218,13 @@ func (s *IntegrationTestSuite) testPeriodicVestingAccount(api string) { //nolint s.Require().NoError(err) // Check address balance - balance, err := getSpecificBalance(api, periodicVestingAddr, uatomDenom) + balance, err := getSpecificBalance(api, periodicVestingAddr, uatoneDenom) s.Require().NoError(err) - expectedBalance := sdk.NewCoin(uatomDenom, sdk.NewInt(0)) + expectedBalance := sdk.NewCoin(uatoneDenom, sdk.NewInt(0)) for _, period := range acc.VestingPeriods { - // _, coin := ante.Find(period.Amount, uatomDenom) - _, coin := period.Amount.Find(uatomDenom) + // _, coin := ante.Find(period.Amount, uatoneDenom) + _, coin := period.Amount.Find(uatoneDenom) expectedBalance = expectedBalance.Add(coin) } s.Require().Equal(expectedBalance, balance) @@ -232,7 +232,7 @@ func (s *IntegrationTestSuite) testPeriodicVestingAccount(api string) { //nolint waitStartTime := acc.StartTime - time.Now().Unix() if waitStartTime > vestingTxDelay { // Transfer coins should fail - balance, err = getSpecificBalance(api, periodicVestingAddr, uatomDenom) + balance, err = getSpecificBalance(api, periodicVestingAddr, uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -251,7 +251,7 @@ func (s *IntegrationTestSuite) testPeriodicVestingAccount(api string) { //nolint waitFirstPeriod := firstPeriod - time.Now().Unix() if waitFirstPeriod > vestingTxDelay { // Transfer coins should fail - balance, err = getSpecificBalance(api, periodicVestingAddr, uatomDenom) + balance, err = getSpecificBalance(api, periodicVestingAddr, uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -284,7 +284,7 @@ func (s *IntegrationTestSuite) testPeriodicVestingAccount(api string) { //nolint ) // Transfer coins should succeed - balance, err = getSpecificBalance(api, periodicVestingAddr, uatomDenom) + balance, err = getSpecificBalance(api, periodicVestingAddr, uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -302,7 +302,7 @@ func (s *IntegrationTestSuite) testPeriodicVestingAccount(api string) { //nolint time.Sleep(time.Duration(waitSecondPeriod) * time.Second) // Transfer coins should succeed - balance, err = getSpecificBalance(api, periodicVestingAddr, uatomDenom) + balance, err = getSpecificBalance(api, periodicVestingAddr, uatoneDenom) s.Require().NoError(err) s.execBankSend( chain, @@ -323,11 +323,11 @@ func generateVestingPeriod() ([]byte, error) { StartTime: time.Now().Add(time.Duration(rand.Intn(20)+95) * time.Second).Unix(), Periods: []period{ { - Coins: "850000000" + uatomDenom, + Coins: "850000000" + uatoneDenom, Length: 35, }, { - Coins: "2000000000" + uatomDenom, + Coins: "2000000000" + uatoneDenom, Length: 35, }, }, diff --git a/x/gov/README.md b/x/gov/README.md index dbad79e2..c8523cf2 100644 --- a/x/gov/README.md +++ b/x/gov/README.md @@ -715,7 +715,7 @@ The governance module contains the following parameters: | Key | Type | Example | |-------------------------------|------------------|-----------------------------------------| -| min_deposit | array (coins) | [{"denom":"uatom","amount":"10000000"}] | +| min_deposit | array (coins) | [{"denom":"uatone","amount":"10000000"}] | | max_deposit_period | string (time ns) | "172800000000000" (17280s) | | voting_period | string (time ns) | "172800000000000" (17280s) | | quorum | string (dec) | "0.334000000000000000" |