Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
- (docs) [#1361](https://github.com/evmos/evmos/pull/1361) Update `vesting` module docs with new behavior for `ClawbackVestingAccounts`
- (evm) [#1349](https://github.com/evmos/evmos/pull/1349) Restrict the Evmos codebase from working with chain IDs other than `9000` and `9001`
- (test) [#1352](https://github.com/evmos/evmos/pull/1352) Deprecate usage of `aphoton` as denomination on tests
- (test) [#1369](https://github.com/evmos/evmos/pull/1369) Refactor code to use `BaseDenom` for simplification

## [v11.0.1] - 2023-02-04

Expand Down
4 changes: 2 additions & 2 deletions app/ante/cosmos/min_price_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
cosmosante "github.com/evmos/evmos/v11/app/ante/cosmos"
evmtypes "github.com/evmos/evmos/v11/x/evm/types"
"github.com/evmos/evmos/v11/utils"
)

var execTypes = []struct {
Expand All @@ -18,7 +18,7 @@ var execTypes = []struct {
}

func (suite *AnteTestSuite) TestMinGasPriceDecorator() {
denom := evmtypes.DefaultEVMDenom
denom := utils.BaseDenom
testMsg := banktypes.MsgSend{
FromAddress: "evmos1x8fhpj9nmhqk8z9kpgjt95ck2xwyue0ptzkucp",
ToAddress: "evmos1dx67l23hz9l0k9hcher8xz04uj7wf3yu26l2yn",
Expand Down
6 changes: 4 additions & 2 deletions app/ante/cosmos/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ import (

"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
"github.com/evmos/evmos/v11/ethereum/eip712"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/simapp"
"github.com/cosmos/cosmos-sdk/testutil/testdata"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

"github.com/evmos/evmos/v11/app"
ante "github.com/evmos/evmos/v11/app/ante"
"github.com/evmos/evmos/v11/encoding"
"github.com/evmos/evmos/v11/ethereum/eip712"
"github.com/evmos/evmos/v11/utils"
"github.com/evmos/evmos/v11/x/evm/statedb"
evmtypes "github.com/evmos/evmos/v11/x/evm/types"
feemarkettypes "github.com/evmos/evmos/v11/x/feemarket/types"
Expand Down Expand Up @@ -79,7 +81,7 @@ func (suite *AnteTestSuite) SetupTest() {
})

suite.ctx = suite.app.BaseApp.NewContext(checkTx, tmproto.Header{Height: 2, ChainID: "evmos_9000-1", Time: time.Now().UTC()})
suite.ctx = suite.ctx.WithMinGasPrices(sdk.NewDecCoins(sdk.NewDecCoin(evmtypes.DefaultEVMDenom, sdk.OneInt())))
suite.ctx = suite.ctx.WithMinGasPrices(sdk.NewDecCoins(sdk.NewDecCoin(utils.BaseDenom, sdk.OneInt())))
suite.ctx = suite.ctx.WithBlockGasMeter(sdk.NewGasMeter(1000000000000000000))
suite.app.EvmKeeper.WithChainID(suite.ctx)

Expand Down
4 changes: 2 additions & 2 deletions app/ante/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/evmos/evmos/v11/app"
"github.com/evmos/evmos/v11/crypto/ethsecp256k1"
"github.com/evmos/evmos/v11/encoding"
claimstypes "github.com/evmos/evmos/v11/x/claims/types"
"github.com/evmos/evmos/v11/utils"
evmtypes "github.com/evmos/evmos/v11/x/evm/types"
feemarkettypes "github.com/evmos/evmos/v11/x/feemarket/types"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down Expand Up @@ -72,7 +72,7 @@ func (suite *AnteTestSuite) SetupTest() {
LastResultsHash: tmhash.Sum([]byte("last_result")),
})

suite.denom = claimstypes.DefaultClaimsDenom
suite.denom = utils.BaseDenom
evmParams := suite.app.EvmKeeper.GetParams(suite.ctx)
evmParams.EvmDenom = suite.denom
_ = suite.app.EvmKeeper.SetParams(suite.ctx, evmParams)
Expand Down
3 changes: 1 addition & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import (

"github.com/evmos/evmos/v11/encoding"
"github.com/evmos/evmos/v11/utils"
claimstypes "github.com/evmos/evmos/v11/x/claims/types"
)

func TestEvmosExport(t *testing.T) {
Expand All @@ -39,7 +38,7 @@ func TestEvmosExport(t *testing.T) {
acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0)
balance := banktypes.Balance{
Address: acc.GetAddress().String(),
Coins: sdk.NewCoins(sdk.NewCoin(claimstypes.DefaultParams().ClaimsDenom, sdk.NewInt(100000000000000))),
Coins: sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, sdk.NewInt(100000000000000))),
}

db := dbm.NewMemDB()
Expand Down
9 changes: 4 additions & 5 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
claimstypes "github.com/evmos/evmos/v11/x/claims/types"

"github.com/evmos/evmos/v11/encoding"
feemarkettypes "github.com/evmos/evmos/v11/x/feemarket/types"
Expand Down Expand Up @@ -97,7 +96,7 @@ func Setup(
acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0)
balance := banktypes.Balance{
Address: acc.GetAddress().String(),
Coins: sdk.NewCoins(sdk.NewCoin(claimstypes.DefaultParams().ClaimsDenom, sdk.NewInt(100000000000000))),
Coins: sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, sdk.NewInt(100000000000000))),
}

db := dbm.NewMemDB()
Expand Down Expand Up @@ -171,7 +170,7 @@ func GenesisStateWithValSet(app *Evmos, genesisState simapp.GenesisState,
}
// set validators and delegations
stakingparams := stakingtypes.DefaultParams()
stakingparams.BondDenom = claimstypes.DefaultGenesis().Params.GetClaimsDenom()
stakingparams.BondDenom = utils.BaseDenom
stakingGenesis := stakingtypes.NewGenesisState(stakingparams, validators, delegations)
genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis)

Expand All @@ -183,13 +182,13 @@ func GenesisStateWithValSet(app *Evmos, genesisState simapp.GenesisState,

for range delegations {
// add delegated tokens to total supply
totalSupply = totalSupply.Add(sdk.NewCoin(claimstypes.DefaultParams().ClaimsDenom, bondAmt))
totalSupply = totalSupply.Add(sdk.NewCoin(utils.BaseDenom, 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(claimstypes.DefaultParams().ClaimsDenom, bondAmt)},
Coins: sdk.Coins{sdk.NewCoin(utils.BaseDenom, bondAmt)},
})

// update total supply
Expand Down
3 changes: 2 additions & 1 deletion indexer/kv_indexer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
evmenc "github.com/evmos/evmos/v11/encoding"
"github.com/evmos/evmos/v11/indexer"
"github.com/evmos/evmos/v11/tests"
"github.com/evmos/evmos/v11/utils"
"github.com/evmos/evmos/v11/x/evm/types"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down Expand Up @@ -40,7 +41,7 @@ func TestKVIndexer(t *testing.T) {
clientCtx := client.Context{}.WithTxConfig(encodingConfig.TxConfig).WithCodec(encodingConfig.Codec)

// build cosmos-sdk wrapper tx
tmTx, err := tx.BuildTx(clientCtx.TxConfig.NewTxBuilder(), types.DefaultEVMDenom)
tmTx, err := tx.BuildTx(clientCtx.TxConfig.NewTxBuilder(), utils.BaseDenom)
require.NoError(t, err)
txBz, err := clientCtx.TxConfig.TxEncoder()(tmTx)
require.NoError(t, err)
Expand Down
3 changes: 2 additions & 1 deletion rpc/backend/backend_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/evmos/evmos/v11/rpc/backend/mocks"
rpctypes "github.com/evmos/evmos/v11/rpc/types"
"github.com/evmos/evmos/v11/tests"
"github.com/evmos/evmos/v11/utils"
evmtypes "github.com/evmos/evmos/v11/x/evm/types"
)

Expand Down Expand Up @@ -184,7 +185,7 @@ func (suite *BackendTestSuite) signAndEncodeEthTx(msgEthereumTx *evmtypes.MsgEth
err := msgEthereumTx.Sign(ethSigner, signer)
suite.Require().NoError(err)

tx, err := msgEthereumTx.BuildTx(suite.backend.clientCtx.TxConfig.NewTxBuilder(), evmtypes.DefaultEVMDenom)
tx, err := msgEthereumTx.BuildTx(suite.backend.clientCtx.TxConfig.NewTxBuilder(), utils.BaseDenom)
suite.Require().NoError(err)

txEncoder := suite.backend.clientCtx.TxConfig.TxEncoder()
Expand Down
4 changes: 2 additions & 2 deletions testutil/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (

"github.com/evmos/evmos/v11/crypto/ethsecp256k1"
"github.com/evmos/evmos/v11/encoding"
"github.com/evmos/evmos/v11/utils"

"github.com/evmos/evmos/v11/app"
)
Expand Down Expand Up @@ -108,13 +109,12 @@ func DeliverTx(
) (abci.ResponseDeliverTx, error) {
encodingConfig := encoding.MakeConfig(app.ModuleBasics)
accountAddress := sdk.AccAddress(priv.PubKey().Address().Bytes())
denom := appEvmos.ClaimsKeeper.GetParams(ctx).ClaimsDenom

txBuilder := encodingConfig.TxConfig.NewTxBuilder()

txBuilder.SetGasLimit(100_000_000)
amt, _ := sdk.NewIntFromString("1000000000000000000000")
txBuilder.SetFeeAmount(sdk.Coins{{Denom: denom, Amount: amt}})
txBuilder.SetFeeAmount(sdk.Coins{{Denom: utils.BaseDenom, Amount: amt}})
if err := txBuilder.SetMsgs(msgs...); err != nil {
return abci.ResponseDeliverTx{}, err
}
Expand Down
8 changes: 4 additions & 4 deletions x/claims/genesis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
tmversion "github.com/tendermint/tendermint/proto/tendermint/version"
"github.com/tendermint/tendermint/version"

"github.com/evmos/evmos/v11/tests"
feemarkettypes "github.com/evmos/evmos/v11/x/feemarket/types"

"github.com/evmos/evmos/v11/app"
"github.com/evmos/evmos/v11/tests"
"github.com/evmos/evmos/v11/testutil"
"github.com/evmos/evmos/v11/utils"
"github.com/evmos/evmos/v11/x/claims"
"github.com/evmos/evmos/v11/x/claims/types"
feemarkettypes "github.com/evmos/evmos/v11/x/feemarket/types"
)

type GenesisTestSuite struct {
Expand Down Expand Up @@ -66,7 +66,7 @@ func (suite *GenesisTestSuite) SetupTest() {
suite.Require().NoError(err)

stakingParams := suite.app.StakingKeeper.GetParams(suite.ctx)
stakingParams.BondDenom = params.GetClaimsDenom()
stakingParams.BondDenom = utils.BaseDenom
suite.app.StakingKeeper.SetParams(suite.ctx, stakingParams)

suite.genesis = *types.DefaultGenesis()
Expand Down
4 changes: 2 additions & 2 deletions x/claims/keeper/ibc_callbacks_ibc_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (suite *IBCTestingSuite) SetupTest() {
// Mint coins to pay tx fees
amt, ok := sdk.NewIntFromString("1000000000000000000000")
suite.Require().True(ok)
coinEvmos := sdk.NewCoin(types.DefaultClaimsDenom, amt)
coinEvmos := sdk.NewCoin(utils.BaseDenom, amt)
coins := sdk.NewCoins(coinEvmos)

err := evmosChainA.BankKeeper.MintCoins(suite.chainA.GetContext(), inflationtypes.ModuleName, coins)
Expand All @@ -64,7 +64,7 @@ func (suite *IBCTestingSuite) SetupTest() {
suite.Require().NoError(err)

evmParams := evmosChainA.EvmKeeper.GetParams(suite.chainA.GetContext())
evmParams.EvmDenom = types.DefaultClaimsDenom
evmParams.EvmDenom = utils.BaseDenom
err = evmosChainA.EvmKeeper.SetParams(suite.chainA.GetContext(), evmParams)
suite.Require().NoError(err)
err = evmosChainB.EvmKeeper.SetParams(suite.chainB.GetContext(), evmParams)
Expand Down
Loading