From 00b225269357c587ea7bf58c3e1b37252584b08f Mon Sep 17 00:00:00 2001 From: MalteHerrmann Date: Tue, 13 Aug 2024 15:40:28 +0200 Subject: [PATCH] more wip --- ante/cosmos/authz_test.go | 2 +- ante/cosmos/eip712.go | 2 +- ante/cosmos/reject_msgs.go | 2 +- ante/cosmos/setup_test.go | 4 +- ante/evm/01_setup_ctx.go | 2 +- ante/evm/04_validate.go | 2 +- ante/evm/04_validate_test.go | 4 +- ante/evm/05_signature_verification.go | 2 +- ante/evm/06_account_verification.go | 6 +- ante/evm/06_account_verification_test.go | 12 ++-- ante/evm/07_can_transfer.go | 4 +- ante/evm/07_can_transfer_test.go | 10 ++-- ante/evm/08_gas_consume.go | 2 +- ante/evm/08_gas_consume_test.go | 6 +- ante/evm/09_increment_sequence.go | 2 +- ante/evm/09_increment_sequence_test.go | 6 +- ante/evm/10_gas_wanted_test.go | 8 +-- ante/evm/11_emit_event.go | 2 +- ante/evm/fee_checker.go | 2 +- ante/evm/fee_checker_test.go | 2 +- ante/evm/setup_test.go | 2 +- ante/evm/utils.go | 2 +- ante/evm/utils_test.go | 2 +- ante/interfaces/evm.go | 6 +- contracts/erc20.go | 2 +- contracts/utils/utils.go | 2 +- encoding/config_test.go | 2 +- example_chain/ante/cosmos_handler.go | 2 +- example_chain/ante/evm_handler.go | 4 +- example_chain/ante/handler_options.go | 2 +- example_chain/app.go | 16 ++--- example_chain/go.mod | 2 +- example_chain/go.sum | 4 +- ibc/testing/chain.go | 3 +- ibc/utils.go | 5 +- indexer/kv_indexer.go | 2 +- indexer/kv_indexer_test.go | 2 +- precompiles/authorization/events.go | 4 +- precompiles/authorization/types.go | 2 +- precompiles/authorization/types_test.go | 11 ++-- precompiles/bank/bank.go | 8 +-- precompiles/bank/integration_test.go | 27 ++++----- precompiles/bank/query.go | 2 +- precompiles/bank/query_test.go | 4 +- precompiles/bank/setup_test.go | 14 ++--- precompiles/bank/testdata/bank.go | 4 +- precompiles/bank/types.go | 2 +- precompiles/bank/utils_test.go | 8 +-- precompiles/bech32/bech32.go | 6 +- precompiles/bech32/bech32_test.go | 6 +- precompiles/bech32/methods.go | 2 +- precompiles/bech32/methods_test.go | 6 +- precompiles/bech32/setup_test.go | 6 +- precompiles/common/abi.go | 2 +- precompiles/common/events.go | 2 +- precompiles/common/precompile.go | 4 +- precompiles/common/types.go | 2 +- precompiles/common/types_test.go | 8 +-- precompiles/distribution/distribution.go | 8 +-- precompiles/distribution/distribution_test.go | 18 +++--- precompiles/distribution/events.go | 4 +- precompiles/distribution/events_test.go | 18 +++--- precompiles/distribution/integration_test.go | 21 ++++--- precompiles/distribution/query.go | 4 +- precompiles/distribution/query_test.go | 10 ++-- precompiles/distribution/setup_test.go | 8 +-- precompiles/distribution/tx.go | 11 ++-- precompiles/distribution/tx_test.go | 47 +++++++-------- precompiles/distribution/types.go | 9 ++- precompiles/distribution/utils_test.go | 36 +++++------ precompiles/erc20/approve.go | 6 +- precompiles/erc20/approve_test.go | 10 ++-- precompiles/erc20/erc20.go | 10 ++-- precompiles/erc20/erc20_test.go | 4 +- precompiles/erc20/errors.go | 8 +-- precompiles/erc20/errors_test.go | 4 +- precompiles/erc20/events.go | 6 +- precompiles/erc20/events_test.go | 8 +-- precompiles/erc20/integration_test.go | 30 +++++----- precompiles/erc20/query.go | 6 +- precompiles/erc20/query_test.go | 12 ++-- precompiles/erc20/setup_test.go | 10 ++-- .../erc20/testdata/erc20_allowance_caller.go | 4 +- .../erc20/testdata/erc20_no_metadata.go | 4 +- .../erc20/testdata/erc20_test_caller.go | 4 +- .../testdata/erc20minter_openzeppelinv5.go | 4 +- precompiles/erc20/tx.go | 12 ++-- precompiles/erc20/tx_test.go | 10 ++-- precompiles/erc20/types_test.go | 4 +- precompiles/erc20/utils_test.go | 20 +++---- precompiles/ics20/approve.go | 4 +- precompiles/ics20/approve_common.go | 6 +- precompiles/ics20/approve_test.go | 36 +++++------ precompiles/ics20/events.go | 4 +- precompiles/ics20/events_test.go | 18 +++--- precompiles/ics20/ics20.go | 12 ++-- precompiles/ics20/integration_test.go | 53 ++++++++-------- precompiles/ics20/query.go | 6 +- precompiles/ics20/query_test.go | 20 +++---- precompiles/ics20/setup_test.go | 10 ++-- precompiles/ics20/tx.go | 8 +-- precompiles/ics20/tx_test.go | 50 ++++++++-------- precompiles/ics20/types.go | 6 +- precompiles/ics20/utils_test.go | 60 +++++++++---------- precompiles/p256/integration_test.go | 14 ++--- precompiles/p256/p256.go | 6 +- precompiles/p256/p256_test.go | 6 +- precompiles/p256/setup_test.go | 2 +- precompiles/staking/approve.go | 6 +- precompiles/staking/approve_test.go | 14 ++--- precompiles/staking/events.go | 6 +- precompiles/staking/events_test.go | 8 +-- precompiles/staking/integration_test.go | 37 ++++++------ precompiles/staking/query.go | 6 +- precompiles/staking/query_test.go | 10 ++-- precompiles/staking/setup_test.go | 8 +-- precompiles/staking/staking.go | 10 ++-- precompiles/staking/staking_test.go | 16 ++--- .../staking/testdata/staking_caller.go | 4 +- .../staking/testdata/staking_caller_two.go | 4 +- precompiles/staking/tx.go | 8 +-- precompiles/staking/tx_test.go | 16 ++--- precompiles/staking/types.go | 2 +- precompiles/staking/utils_test.go | 47 +++++++-------- precompiles/testutil/fund.go | 4 +- rpc/backend/account_info.go | 2 +- rpc/backend/account_info_test.go | 2 +- rpc/backend/backend.go | 2 +- rpc/backend/backend_suite_test.go | 2 +- rpc/backend/blocks.go | 2 +- rpc/backend/blocks_test.go | 2 +- rpc/backend/call_tx.go | 4 +- rpc/backend/call_tx_test.go | 2 +- rpc/backend/chain_info.go | 2 +- rpc/backend/chain_info_test.go | 2 +- rpc/backend/client_test.go | 2 +- rpc/backend/evm_query_client_test.go | 2 +- rpc/backend/filters_test.go | 2 +- rpc/backend/mocks/evm_query_client.go | 2 +- rpc/backend/node_info.go | 2 +- rpc/backend/sign_tx.go | 2 +- rpc/backend/sign_tx_test.go | 2 +- rpc/backend/tracing.go | 2 +- rpc/backend/tracing_test.go | 2 +- rpc/backend/tx_info.go | 2 +- rpc/backend/tx_info_test.go | 2 +- rpc/backend/utils.go | 2 +- rpc/namespaces/ethereum/debug/api.go | 2 +- rpc/namespaces/ethereum/eth/api.go | 2 +- rpc/namespaces/ethereum/eth/filters/api.go | 2 +- .../ethereum/eth/filters/filter_system.go | 2 +- rpc/namespaces/ethereum/personal/api.go | 2 +- rpc/types/events.go | 2 +- rpc/types/events_test.go | 2 +- rpc/types/query_client.go | 2 +- rpc/types/utils.go | 2 +- rpc/websockets.go | 2 +- testutil/constants.go | 14 +++++ testutil/integration/os/network/config.go | 3 +- .../integration/os/network/config_test.go | 6 +- testutil/integration/os/network/network.go | 14 ++--- testutil/integration/os/utils/genesis.go | 4 +- testutil/integration/os/utils/unit.go | 6 +- testutil/network/network.go | 15 ++--- x/evm/ante/ctx_test.go | 4 +- x/evm/client/cli/query.go | 4 +- x/evm/client/cli/tx.go | 4 +- x/evm/config/configurator.go | 4 +- x/evm/config/configurator_test.go | 6 +- x/evm/core/core/utils.go | 2 +- x/evm/core/logger/access_list_tracer.go | 2 +- x/evm/core/logger/logger.go | 2 +- x/evm/core/logger/logger_json.go | 2 +- x/evm/core/tracers/js/goja.go | 6 +- x/evm/core/tracers/js/tracer_test.go | 4 +- x/evm/core/tracers/native/4byte.go | 4 +- x/evm/core/tracers/native/call.go | 4 +- x/evm/core/tracers/native/noop.go | 4 +- x/evm/core/tracers/native/prestate.go | 4 +- x/evm/core/tracers/native/revertreason.go | 4 +- x/evm/core/tracers/native/tracer.go | 2 +- x/evm/core/tracers/tracers.go | 2 +- x/evm/genesis.go | 4 +- x/evm/genesis_test.go | 18 +++--- x/evm/keeper/abci_test.go | 2 +- x/evm/keeper/benchmark_test.go | 6 +- x/evm/keeper/call_evm.go | 4 +- x/evm/keeper/call_evm_test.go | 10 ++-- x/evm/keeper/config.go | 6 +- x/evm/keeper/fees.go | 2 +- x/evm/keeper/fees_test.go | 4 +- x/evm/keeper/gas.go | 2 +- x/evm/keeper/grpc_query.go | 14 ++--- x/evm/keeper/grpc_query_test.go | 14 ++--- x/evm/keeper/integration_test.go | 16 ++--- x/evm/keeper/keeper.go | 8 +-- x/evm/keeper/keeper_test.go | 8 +-- x/evm/keeper/migrations.go | 4 +- x/evm/keeper/msg_server.go | 2 +- x/evm/keeper/msg_server_test.go | 4 +- x/evm/keeper/params.go | 4 +- x/evm/keeper/params_benchmark_test.go | 2 +- x/evm/keeper/params_test.go | 2 +- x/evm/keeper/precompiles.go | 4 +- x/evm/keeper/setup_test.go | 18 +++--- x/evm/keeper/state_transition.go | 10 ++-- .../keeper/state_transition_benchmark_test.go | 2 +- x/evm/keeper/state_transition_test.go | 8 +-- x/evm/keeper/statedb.go | 4 +- x/evm/keeper/statedb_benchmark_test.go | 2 +- x/evm/keeper/statedb_test.go | 18 +++--- x/evm/keeper/static_precompiles.go | 26 ++++---- x/evm/keeper/testdata/contracts.go | 4 +- x/evm/keeper/utils.go | 2 +- x/evm/keeper/utils_test.go | 10 ++-- x/evm/migrations/v7/migrate.go | 4 +- x/evm/migrations/v7/migrate_test.go | 10 ++-- x/evm/module.go | 6 +- x/evm/statedb/config.go | 2 +- x/evm/statedb/integration_test.go | 16 ++--- x/evm/statedb/interfaces.go | 2 +- x/evm/statedb/mock_test.go | 4 +- x/evm/statedb/state_object.go | 2 +- x/evm/statedb/statedb.go | 4 +- x/evm/statedb/statedb_test.go | 4 +- x/evm/types/access_list_test.go | 2 +- x/evm/types/access_list_tx.go | 2 +- x/evm/types/access_list_tx_test.go | 2 +- x/evm/types/compiled_contract_test.go | 2 +- x/evm/types/dynamic_fee_tx.go | 2 +- x/evm/types/dynamic_fee_tx_test.go | 4 +- x/evm/types/genesis.go | 2 +- x/evm/types/genesis_test.go | 2 +- x/evm/types/interfaces.go | 4 +- x/evm/types/legacy_tx.go | 2 +- x/evm/types/legacy_tx_test.go | 2 +- x/evm/types/logs.go | 2 +- x/evm/types/logs_test.go | 4 +- x/evm/types/msg.go | 2 +- x/evm/types/msg_test.go | 10 ++-- x/evm/types/opcodes_hooks.go | 2 +- x/evm/types/params.go | 8 +-- x/evm/types/permissions.go | 2 +- x/evm/types/permissions_test.go | 4 +- x/evm/types/tracer.go | 4 +- x/evm/types/tx.go | 2 +- x/evm/types/tx_args_test.go | 2 +- x/evm/types/utils_test.go | 8 +-- x/feemarket/keeper/integration_test.go | 2 +- x/feemarket/keeper/utils_test.go | 5 +- 250 files changed, 873 insertions(+), 869 deletions(-) diff --git a/ante/cosmos/authz_test.go b/ante/cosmos/authz_test.go index 8cf9da41..a58a2cee 100644 --- a/ante/cosmos/authz_test.go +++ b/ante/cosmos/authz_test.go @@ -18,10 +18,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" cosmosante "github.com/evmos/os/ante/cosmos" "github.com/evmos/os/testutil" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" ) func TestAuthzLimiterDecorator(t *testing.T) { diff --git a/ante/cosmos/eip712.go b/ante/cosmos/eip712.go index d0fe9915..dab204e8 100644 --- a/ante/cosmos/eip712.go +++ b/ante/cosmos/eip712.go @@ -19,10 +19,10 @@ import ( ethcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/crypto/secp256k1" "github.com/ethereum/go-ethereum/signer/core/apitypes" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/ethsecp256k1" "github.com/evmos/os/ethereum/eip712" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) var evmosCodec codec.ProtoCodecMarshaler diff --git a/ante/cosmos/reject_msgs.go b/ante/cosmos/reject_msgs.go index 5bdebe1c..e3bc1e7d 100644 --- a/ante/cosmos/reject_msgs.go +++ b/ante/cosmos/reject_msgs.go @@ -7,7 +7,7 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // RejectMessagesDecorator prevents invalid msg types from being executed diff --git a/ante/cosmos/setup_test.go b/ante/cosmos/setup_test.go index 8f98f403..f0997c29 100644 --- a/ante/cosmos/setup_test.go +++ b/ante/cosmos/setup_test.go @@ -20,8 +20,6 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/ante" evmante "github.com/evmos/os/ante/evm" "github.com/evmos/os/crypto/ethsecp256k1" @@ -32,6 +30,8 @@ import ( chaintestutil "github.com/evmos/os/example_chain/testutil" "github.com/evmos/os/testutil" "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" ) diff --git a/ante/evm/01_setup_ctx.go b/ante/evm/01_setup_ctx.go index 9ef56516..d7727133 100644 --- a/ante/evm/01_setup_ctx.go +++ b/ante/evm/01_setup_ctx.go @@ -8,8 +8,8 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - evmante "github.com/evmos/evmos/v19/x/evm/ante" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmante "github.com/evmos/os/x/evm/ante" ) var _ sdktypes.AnteDecorator = &EthSetupContextDecorator{} diff --git a/ante/evm/04_validate.go b/ante/evm/04_validate.go index 859546d1..85f49fd7 100644 --- a/ante/evm/04_validate.go +++ b/ante/evm/04_validate.go @@ -9,8 +9,8 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/cosmos/cosmos-sdk/types/tx" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmtypes "github.com/evmos/os/x/evm/types" ) // ValidateMsg validates an Ethereum specific message type and returns an error if invalid diff --git a/ante/evm/04_validate_test.go b/ante/evm/04_validate_test.go index 6686ec60..8bbc5150 100644 --- a/ante/evm/04_validate_test.go +++ b/ante/evm/04_validate_test.go @@ -8,9 +8,9 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/ante/evm" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + evmtypes "github.com/evmos/os/x/evm/types" ) type validateMsgParams struct { diff --git a/ante/evm/05_signature_verification.go b/ante/evm/05_signature_verification.go index 3988ab75..0b2d1edb 100644 --- a/ante/evm/05_signature_verification.go +++ b/ante/evm/05_signature_verification.go @@ -10,8 +10,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmtypes "github.com/evmos/os/x/evm/types" ) // EthSigVerificationDecorator validates an ethereum signatures diff --git a/ante/evm/06_account_verification.go b/ante/evm/06_account_verification.go index 904877e5..79ecd07a 100644 --- a/ante/evm/06_account_verification.go +++ b/ante/evm/06_account_verification.go @@ -9,9 +9,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/keeper" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/keeper" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" ) // VerifyAccountBalance checks that the account balance is greater than the total transaction cost. diff --git a/ante/evm/06_account_verification_test.go b/ante/evm/06_account_verification_test.go index bbfe5515..a3697b8a 100644 --- a/ante/evm/06_account_verification_test.go +++ b/ante/evm/06_account_verification_test.go @@ -7,13 +7,13 @@ import ( "cosmossdk.io/math" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/ante/evm" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *EvmAnteTestSuite) TestVerifyAccountBalance() { diff --git a/ante/evm/07_can_transfer.go b/ante/evm/07_can_transfer.go index ee8c7873..d0dacbf4 100644 --- a/ante/evm/07_can_transfer.go +++ b/ante/evm/07_can_transfer.go @@ -12,9 +12,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" ) // CanTransfer checks if the sender is allowed to transfer funds according to the EVM block diff --git a/ante/evm/07_can_transfer_test.go b/ante/evm/07_can_transfer_test.go index fcb445c3..3984f725 100644 --- a/ante/evm/07_can_transfer_test.go +++ b/ante/evm/07_can_transfer_test.go @@ -9,12 +9,12 @@ import ( "cosmossdk.io/math" errortypes "github.com/cosmos/cosmos-sdk/types/errors" gethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/ante/evm" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *EvmAnteTestSuite) TestCanTransfer() { diff --git a/ante/evm/08_gas_consume.go b/ante/evm/08_gas_consume.go index 8376829f..27d7b7ea 100644 --- a/ante/evm/08_gas_consume.go +++ b/ante/evm/08_gas_consume.go @@ -11,9 +11,9 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // UpdateCumulativeGasWanted updates the cumulative gas wanted diff --git a/ante/evm/08_gas_consume_test.go b/ante/evm/08_gas_consume_test.go index 00d4fb8f..206bbb1b 100644 --- a/ante/evm/08_gas_consume_test.go +++ b/ante/evm/08_gas_consume_test.go @@ -5,10 +5,10 @@ package evm_test import ( sdktypes "github.com/cosmos/cosmos-sdk/types" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" evmante "github.com/evmos/os/ante/evm" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" ) func (suite *EvmAnteTestSuite) TestUpdateCumulativeGasWanted() { diff --git a/ante/evm/09_increment_sequence.go b/ante/evm/09_increment_sequence.go index 70d9f677..eeb3cc36 100644 --- a/ante/evm/09_increment_sequence.go +++ b/ante/evm/09_increment_sequence.go @@ -10,7 +10,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // IncrementNonce increments the sequence of the account. diff --git a/ante/evm/09_increment_sequence_test.go b/ante/evm/09_increment_sequence_test.go index bd59db1c..0e64a141 100644 --- a/ante/evm/09_increment_sequence_test.go +++ b/ante/evm/09_increment_sequence_test.go @@ -5,10 +5,10 @@ package evm_test import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" "github.com/evmos/os/ante/evm" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" ) func (suite *EvmAnteTestSuite) TestIncrementSequence() { diff --git a/ante/evm/10_gas_wanted_test.go b/ante/evm/10_gas_wanted_test.go index 7cabcda2..f5686033 100644 --- a/ante/evm/10_gas_wanted_test.go +++ b/ante/evm/10_gas_wanted_test.go @@ -6,11 +6,11 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" sdktypes "github.com/cosmos/cosmos-sdk/types" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" "github.com/evmos/os/ante/evm" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" ) func (suite *EvmAnteTestSuite) TestCheckGasWanted() { diff --git a/ante/evm/11_emit_event.go b/ante/evm/11_emit_event.go index 9a9c4b5e..bad3d596 100644 --- a/ante/evm/11_emit_event.go +++ b/ante/evm/11_emit_event.go @@ -9,8 +9,8 @@ import ( errorsmod "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmtypes "github.com/evmos/os/x/evm/types" ) // EthEmitEventDecorator emit events in ante handler in case of tx execution failed (out of block gas limit). diff --git a/ante/evm/fee_checker.go b/ante/evm/fee_checker.go index 4d8416bd..f51f063d 100644 --- a/ante/evm/fee_checker.go +++ b/ante/evm/fee_checker.go @@ -12,9 +12,9 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/ethereum/go-ethereum/params" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" evmostypes "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // NewDynamicFeeChecker returns a `TxFeeChecker` that applies a dynamic fee to diff --git a/ante/evm/fee_checker_test.go b/ante/evm/fee_checker_test.go index cde359cf..520fd89e 100644 --- a/ante/evm/fee_checker_test.go +++ b/ante/evm/fee_checker_test.go @@ -14,10 +14,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" "github.com/ethereum/go-ethereum/params" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" "github.com/evmos/os/encoding" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) var _ anteinterfaces.DynamicFeeEVMKeeper = MockEVMKeeper{} diff --git a/ante/evm/setup_test.go b/ante/evm/setup_test.go index c42d5945..94f1724b 100644 --- a/ante/evm/setup_test.go +++ b/ante/evm/setup_test.go @@ -16,13 +16,13 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" evmosante "github.com/evmos/os/ante" "github.com/evmos/os/encoding" "github.com/evmos/os/ethereum/eip712" app "github.com/evmos/os/example_chain" chainante "github.com/evmos/os/example_chain/ante" "github.com/evmos/os/testutil" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" ) diff --git a/ante/evm/utils.go b/ante/evm/utils.go index 862d08c6..7058ddb4 100644 --- a/ante/evm/utils.go +++ b/ante/evm/utils.go @@ -12,8 +12,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmtypes "github.com/evmos/os/x/evm/types" ) // DecoratorUtils contain a bunch of relevant variables used for a variety of checks diff --git a/ante/evm/utils_test.go b/ante/evm/utils_test.go index 4415ed60..390412c1 100644 --- a/ante/evm/utils_test.go +++ b/ante/evm/utils_test.go @@ -34,10 +34,10 @@ import ( ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/ethsecp256k1" "github.com/evmos/os/ethereum/eip712" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *AnteTestSuite) BuildTestEthTx( diff --git a/ante/interfaces/evm.go b/ante/interfaces/evm.go index 82309d97..c06cdd85 100644 --- a/ante/interfaces/evm.go +++ b/ante/interfaces/evm.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" ) diff --git a/contracts/erc20.go b/contracts/erc20.go index a2793bc7..16e6ef35 100644 --- a/contracts/erc20.go +++ b/contracts/erc20.go @@ -6,8 +6,8 @@ package contracts import ( _ "embed" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) var ( diff --git a/contracts/utils/utils.go b/contracts/utils/utils.go index cfd68f6d..da1b1f33 100644 --- a/contracts/utils/utils.go +++ b/contracts/utils/utils.go @@ -10,7 +10,7 @@ import ( "path/filepath" "runtime" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // LoadContractFromJSONFile is a helper method to convert the embedded bytes from a JSON file, diff --git a/encoding/config_test.go b/encoding/config_test.go index c2d9f61b..683e324c 100644 --- a/encoding/config_test.go +++ b/encoding/config_test.go @@ -5,10 +5,10 @@ import ( "testing" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/encoding" app "github.com/evmos/os/example_chain" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/example_chain/ante/cosmos_handler.go b/example_chain/ante/cosmos_handler.go index f281c324..56fa01aa 100644 --- a/example_chain/ante/cosmos_handler.go +++ b/example_chain/ante/cosmos_handler.go @@ -7,9 +7,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth/ante" sdkvesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" evmoscosmosante "github.com/evmos/os/ante/cosmos" evmante "github.com/evmos/os/ante/evm" + evmtypes "github.com/evmos/os/x/evm/types" ) // newCosmosAnteHandler creates the default ante handler for Cosmos transactions diff --git a/example_chain/ante/evm_handler.go b/example_chain/ante/evm_handler.go index 54fd3faa..6d945ad7 100644 --- a/example_chain/ante/evm_handler.go +++ b/example_chain/ante/evm_handler.go @@ -13,10 +13,10 @@ import ( txtypes "github.com/cosmos/cosmos-sdk/types/tx" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmkeeper "github.com/evmos/evmos/v19/x/evm/keeper" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" evmante "github.com/evmos/os/ante/evm" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmkeeper "github.com/evmos/os/x/evm/keeper" + evmtypes "github.com/evmos/os/x/evm/types" ) // newMonoEVMAnteHandler creates the sdk.AnteHandler implementation for the EVM transactions. diff --git a/example_chain/ante/handler_options.go b/example_chain/ante/handler_options.go index 5a3dc48b..5c99f711 100644 --- a/example_chain/ante/handler_options.go +++ b/example_chain/ante/handler_options.go @@ -12,8 +12,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/ante" authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" anteinterfaces "github.com/evmos/os/ante/interfaces" + evmtypes "github.com/evmos/os/x/evm/types" ) // HandlerOptions defines the list of module keepers required to run the Evmos diff --git a/example_chain/app.go b/example_chain/app.go index 4213daf1..fa7f65df 100644 --- a/example_chain/app.go +++ b/example_chain/app.go @@ -89,14 +89,6 @@ import ( upgradeclient "github.com/cosmos/cosmos-sdk/x/upgrade/client" upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper" upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types" - "github.com/evmos/evmos/v19/x/erc20" - erc20client "github.com/evmos/evmos/v19/x/erc20/client" - erc20keeper "github.com/evmos/evmos/v19/x/erc20/keeper" - erc20types "github.com/evmos/evmos/v19/x/erc20/types" - "github.com/evmos/evmos/v19/x/evm" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmkeeper "github.com/evmos/evmos/v19/x/evm/keeper" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" evmosante "github.com/evmos/os/ante" evmosevmante "github.com/evmos/os/ante/evm" evmosencoding "github.com/evmos/os/encoding" @@ -105,6 +97,14 @@ import ( srvflags "github.com/evmos/os/server/flags" evmostypes "github.com/evmos/os/types" evmosutils "github.com/evmos/os/utils" + "github.com/evmos/os/x/erc20" + erc20client "github.com/evmos/os/x/erc20/client" + erc20keeper "github.com/evmos/os/x/erc20/keeper" + erc20types "github.com/evmos/os/x/erc20/types" + "github.com/evmos/os/x/evm" + "github.com/evmos/os/x/evm/core/vm" + evmkeeper "github.com/evmos/os/x/evm/keeper" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/evmos/os/x/feemarket" feemarketkeeper "github.com/evmos/os/x/feemarket/keeper" feemarkettypes "github.com/evmos/os/x/feemarket/types" diff --git a/example_chain/go.mod b/example_chain/go.mod index 4cc0d272..a6b30491 100644 --- a/example_chain/go.mod +++ b/example_chain/go.mod @@ -10,7 +10,7 @@ require ( github.com/cometbft/cometbft v0.37.9 github.com/cometbft/cometbft-db v0.12.0 github.com/cosmos/cosmos-sdk v0.47.12 - github.com/evmos/evmos/v19 v19.0.0-20240731212153-b36241652b57 + github.com/evmos/os v19.0.0-20240731212153-b36241652b57 github.com/evmos/os v0.0.0-20240806115830-ab675cc0c776 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.1 diff --git a/example_chain/go.sum b/example_chain/go.sum index 1982deee..39c5cb7a 100644 --- a/example_chain/go.sum +++ b/example_chain/go.sum @@ -432,8 +432,8 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evmos/cosmos-sdk v0.47.12-evmos.2 h1:NODyhYKCqu8JNLeR6b6ff0+TS3KYdcBiMZ4sVzXXD8I= github.com/evmos/cosmos-sdk v0.47.12-evmos.2/go.mod h1:ADjORYzUQqQv/FxDi0H0K5gW/rAk1CiDR3ZKsExfJV0= -github.com/evmos/evmos/v19 v19.0.0-20240731212153-b36241652b57 h1:C+JOScyVYgoASWrdIBmCYPBRbOpQgvGMCc8URWdq+xQ= -github.com/evmos/evmos/v19 v19.0.0-20240731212153-b36241652b57/go.mod h1:HEPvi70nAyQyzYaDqtB2x33lwQ80wKVIyTRNnufjTg8= +github.com/evmos/os v19.0.0-20240731212153-b36241652b57 h1:C+JOScyVYgoASWrdIBmCYPBRbOpQgvGMCc8URWdq+xQ= +github.com/evmos/os v19.0.0-20240731212153-b36241652b57/go.mod h1:HEPvi70nAyQyzYaDqtB2x33lwQ80wKVIyTRNnufjTg8= github.com/evmos/go-ethereum v1.10.26-evmos-rc4 h1:vwDVMScuB2KSu8ze5oWUuxm6v3bMUp6dL3PWvJNJY+I= github.com/evmos/go-ethereum v1.10.26-evmos-rc4/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= diff --git a/ibc/testing/chain.go b/ibc/testing/chain.go index e01c76fa..dc7257dd 100644 --- a/ibc/testing/chain.go +++ b/ibc/testing/chain.go @@ -20,6 +20,7 @@ import ( "github.com/cosmos/ibc-go/v7/testing/mock" "github.com/evmos/os/crypto/ethsecp256k1" + "github.com/evmos/os/testutil" evmostypes "github.com/evmos/os/types" "github.com/evmos/os/utils" ) @@ -67,7 +68,7 @@ func NewTestChain(t *testing.T, coord *ibcgotesting.Coordinator, chainID string) balance := banktypes.Balance{ Address: baseAcc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, amount)), + Coins: sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, amount)), } app := SetupWithGenesisValSet(t, valSet, []authtypes.GenesisAccount{baseAcc}, chainID, balance) diff --git a/ibc/utils.go b/ibc/utils.go index e892f9d8..db320a72 100644 --- a/ibc/utils.go +++ b/ibc/utils.go @@ -10,7 +10,6 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" transferkeeper "github.com/evmos/os/x/ibc/transfer/keeper" @@ -31,14 +30,14 @@ func GetTransferSenderRecipient(data transfertypes.FungibleTokenPacketData) ( ) { // validate the sender bech32 address from the counterparty chain // and change the bech32 human readable prefix (HRP) of the sender to `evmos` - sender, err = utils.GetEvmosAddressFromBech32(data.Sender) + sender, err = utils.GetAccAddressFromBech32(data.Sender) if err != nil { return nil, nil, "", "", errorsmod.Wrap(err, "invalid sender") } // validate the recipient bech32 address from the counterparty chain // and change the bech32 human readable prefix (HRP) of the recipient to `evmos` - recipient, err = utils.GetEvmosAddressFromBech32(data.Receiver) + recipient, err = utils.GetAccAddressFromBech32(data.Receiver) if err != nil { return nil, nil, "", "", errorsmod.Wrap(err, "invalid recipient") } diff --git a/indexer/kv_indexer.go b/indexer/kv_indexer.go index 0f40a003..3e7ea86e 100644 --- a/indexer/kv_indexer.go +++ b/indexer/kv_indexer.go @@ -16,9 +16,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" evmostypes "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) const ( diff --git a/indexer/kv_indexer_test.go b/indexer/kv_indexer_test.go index 15bc882c..6b25152f 100644 --- a/indexer/kv_indexer_test.go +++ b/indexer/kv_indexer_test.go @@ -12,13 +12,13 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/ethsecp256k1" evmenc "github.com/evmos/os/encoding" app "github.com/evmos/os/example_chain" "github.com/evmos/os/indexer" "github.com/evmos/os/testutil" utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/precompiles/authorization/events.go b/precompiles/authorization/events.go index 6876b942..61e70d47 100644 --- a/precompiles/authorization/events.go +++ b/precompiles/authorization/events.go @@ -11,8 +11,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/authorization/types.go b/precompiles/authorization/types.go index 8890a95e..208ec11d 100644 --- a/precompiles/authorization/types.go +++ b/precompiles/authorization/types.go @@ -16,7 +16,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" + cmn "github.com/evmos/os/precompiles/common" ) const ( diff --git a/precompiles/authorization/types_test.go b/precompiles/authorization/types_test.go index 5401fcb0..211ac69b 100644 --- a/precompiles/authorization/types_test.go +++ b/precompiles/authorization/types_test.go @@ -5,12 +5,11 @@ import ( "testing" "cosmossdk.io/math" - "github.com/evmos/evmos/v19/utils" - "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/testutil" + testutiltx "github.com/evmos/os/testutil/tx" "github.com/stretchr/testify/require" ) @@ -57,7 +56,7 @@ func TestCheckApprovalArgs(t *testing.T) { for _, tc := range testcases { t.Run(tc.name, func(t *testing.T) { - _, _, _, err := authorization.CheckApprovalArgs(tc.args, utils.BaseDenom) + _, _, _, err := authorization.CheckApprovalArgs(tc.args, testutil.ExampleAttoDenom) if tc.expErr { require.Error(t, err) require.Contains(t, err.Error(), tc.ErrContains) diff --git a/precompiles/bank/bank.go b/precompiles/bank/bank.go index e54f05d3..7c18fd85 100644 --- a/precompiles/bank/bank.go +++ b/precompiles/bank/bank.go @@ -10,10 +10,10 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - erc20keeper "github.com/evmos/evmos/v19/x/erc20/keeper" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + cmn "github.com/evmos/os/precompiles/common" + erc20keeper "github.com/evmos/os/x/erc20/keeper" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" ) const ( diff --git a/precompiles/bank/integration_test.go b/precompiles/bank/integration_test.go index 13fd70ef..f6e6c9de 100644 --- a/precompiles/bank/integration_test.go +++ b/precompiles/bank/integration_test.go @@ -4,24 +4,23 @@ import ( "math/big" "testing" - "github.com/evmos/evmos/v19/precompiles/bank/testdata" + "github.com/evmos/os/precompiles/bank/testdata" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - integrationutils "github.com/evmos/evmos/v19/testutil/integration/evmos/utils" - "github.com/evmos/evmos/v19/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + "github.com/evmos/os/testutil/integration/evmos/network" + integrationutils "github.com/evmos/os/testutil/integration/evmos/utils" + evmtypes "github.com/evmos/os/x/evm/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" - evmosutiltx "github.com/evmos/evmos/v19/testutil/tx" + evmosutiltx "github.com/evmos/os/testutil/tx" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/evmos/evmos/v19/precompiles/bank" + "github.com/evmos/os/precompiles/bank" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/testutil/integration/evmos/keyring" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" @@ -174,7 +173,7 @@ var _ = Describe("Bank Extension -", func() { err = is.precompile.UnpackIntoInterface(&balances, bank.BalancesMethod, ethRes.Ret) Expect(err).ToNot(HaveOccurred(), "failed to unpack balances") - balanceAfter, err := is.grpcHandler.GetBalance(sender.AccAddr, utils.BaseDenom) + balanceAfter, err := is.grpcHandler.GetBalance(sender.AccAddr, testutil.ExampleAttoDenom) Expect(err).ToNot(HaveOccurred(), "failed to get balance") Expect(sdk.NewInt(balances[0].Amount.Int64())).To(Equal(balanceAfter.Balance.Amount)) @@ -318,7 +317,7 @@ var _ = Describe("Bank Extension -", func() { err = is.precompile.UnpackIntoInterface(&balances, bank.BalancesMethod, ethRes.Ret) Expect(err).ToNot(HaveOccurred(), "failed to unpack balances") - balanceAfter, err := is.grpcHandler.GetBalance(sender.AccAddr, utils.BaseDenom) + balanceAfter, err := is.grpcHandler.GetBalance(sender.AccAddr, testutil.ExampleAttoDenom) Expect(err).ToNot(HaveOccurred(), "failed to get balance") Expect(sdk.NewInt(balances[0].Amount.Int64())).To(Equal(balanceAfter.Balance.Amount)) diff --git a/precompiles/bank/query.go b/precompiles/bank/query.go index f34d8fb8..2c76f432 100644 --- a/precompiles/bank/query.go +++ b/precompiles/bank/query.go @@ -8,7 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/bank/query_test.go b/precompiles/bank/query_test.go index eac61c98..88466907 100644 --- a/precompiles/bank/query_test.go +++ b/precompiles/bank/query_test.go @@ -4,8 +4,8 @@ import ( "math/big" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/evmos/evmos/v19/precompiles/bank" - evmosutiltx "github.com/evmos/evmos/v19/testutil/tx" + "github.com/evmos/os/precompiles/bank" + evmosutiltx "github.com/evmos/os/testutil/tx" ) func (s *PrecompileTestSuite) TestBalances() { diff --git a/precompiles/bank/setup_test.go b/precompiles/bank/setup_test.go index 6cf47d23..f666039a 100644 --- a/precompiles/bank/setup_test.go +++ b/precompiles/bank/setup_test.go @@ -5,15 +5,15 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/bank" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - integrationutils "github.com/evmos/evmos/v19/testutil/integration/evmos/utils" + "github.com/evmos/os/precompiles/bank" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" + integrationutils "github.com/evmos/os/testutil/integration/evmos/utils" "github.com/stretchr/testify/suite" ) diff --git a/precompiles/bank/testdata/bank.go b/precompiles/bank/testdata/bank.go index 03f89685..a539e389 100644 --- a/precompiles/bank/testdata/bank.go +++ b/precompiles/bank/testdata/bank.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadBankCallerContract() (evmtypes.CompiledContract, error) { diff --git a/precompiles/bank/types.go b/precompiles/bank/types.go index 636b492b..a6655d90 100644 --- a/precompiles/bank/types.go +++ b/precompiles/bank/types.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" + cmn "github.com/evmos/os/precompiles/common" ) // Balance contains the amount for a corresponding ERC-20 contract address diff --git a/precompiles/bank/utils_test.go b/precompiles/bank/utils_test.go index aa260e4b..b0da1a51 100644 --- a/precompiles/bank/utils_test.go +++ b/precompiles/bank/utils_test.go @@ -6,10 +6,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/bank" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + "github.com/evmos/os/precompiles/bank" + "github.com/evmos/os/testutil/integration/evmos/factory" + evmtypes "github.com/evmos/os/x/evm/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/gomega" diff --git a/precompiles/bech32/bech32.go b/precompiles/bech32/bech32.go index 177858f5..f357ca26 100644 --- a/precompiles/bech32/bech32.go +++ b/precompiles/bech32/bech32.go @@ -9,9 +9,9 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" ) var _ vm.PrecompiledContract = &Precompile{} diff --git a/precompiles/bech32/bech32_test.go b/precompiles/bech32/bech32_test.go index 2c6d3579..03ad35a4 100644 --- a/precompiles/bech32/bech32_test.go +++ b/precompiles/bech32/bech32_test.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/cmd/config" - "github.com/evmos/evmos/v19/precompiles/bech32" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/cmd/config" + "github.com/evmos/os/precompiles/bech32" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestNewPrecompile() { diff --git a/precompiles/bech32/methods.go b/precompiles/bech32/methods.go index 809ae58b..3687d97a 100644 --- a/precompiles/bech32/methods.go +++ b/precompiles/bech32/methods.go @@ -10,7 +10,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" + cmn "github.com/evmos/os/precompiles/common" ) const ( diff --git a/precompiles/bech32/methods_test.go b/precompiles/bech32/methods_test.go index bd06bb1a..b5d99865 100644 --- a/precompiles/bech32/methods_test.go +++ b/precompiles/bech32/methods_test.go @@ -5,9 +5,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/cmd/config" - "github.com/evmos/evmos/v19/precompiles/bech32" - cmn "github.com/evmos/evmos/v19/precompiles/common" + "github.com/evmos/os/cmd/config" + "github.com/evmos/os/precompiles/bech32" + cmn "github.com/evmos/os/precompiles/common" ) func (s *PrecompileTestSuite) TestHexToBech32() { diff --git a/precompiles/bech32/setup_test.go b/precompiles/bech32/setup_test.go index a01b0c74..56e7f8c3 100644 --- a/precompiles/bech32/setup_test.go +++ b/precompiles/bech32/setup_test.go @@ -3,10 +3,10 @@ package bech32_test import ( "testing" - "github.com/evmos/evmos/v19/precompiles/bech32" + "github.com/evmos/os/precompiles/bech32" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" "github.com/stretchr/testify/suite" ) diff --git a/precompiles/common/abi.go b/precompiles/common/abi.go index 8ad70937..4279316e 100644 --- a/precompiles/common/abi.go +++ b/precompiles/common/abi.go @@ -14,7 +14,7 @@ import ( "github.com/ethereum/go-ethereum/common/math" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - contractutils "github.com/evmos/evmos/v19/contracts/utils" + contractutils "github.com/evmos/os/contracts/utils" ) // MakeTopic converts a filter query argument into a filter topic. diff --git a/precompiles/common/events.go b/precompiles/common/events.go index af8b1e42..28c60103 100644 --- a/precompiles/common/events.go +++ b/precompiles/common/events.go @@ -7,7 +7,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // EmitEventArgs are the arguments required to emit an authorization event. diff --git a/precompiles/common/precompile.go b/precompiles/common/precompile.go index b18392f7..4a9691d0 100644 --- a/precompiles/common/precompile.go +++ b/precompiles/common/precompile.go @@ -12,8 +12,8 @@ import ( authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/statedb" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/statedb" ) // Precompile is a common struct for all precompiles that holds the common data each diff --git a/precompiles/common/types.go b/precompiles/common/types.go index c99e2c93..443520b4 100644 --- a/precompiles/common/types.go +++ b/precompiles/common/types.go @@ -11,7 +11,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - evmosutils "github.com/evmos/evmos/v19/utils" + evmosutils "github.com/evmos/os/utils" ) var ( diff --git a/precompiles/common/types_test.go b/precompiles/common/types_test.go index bb70f115..b94bcc92 100644 --- a/precompiles/common/types_test.go +++ b/precompiles/common/types_test.go @@ -5,8 +5,8 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/utils" + "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/testutil" "github.com/stretchr/testify/require" ) @@ -21,7 +21,7 @@ func TestNewCoinsResponse(t *testing.T) { } for _, tc := range testCases { - coin := sdk.NewCoin(utils.BaseDenom, tc.amount) + coin := sdk.NewCoin(testutil.ExampleAttoDenom, tc.amount) coins := sdk.NewCoins(coin) res := common.NewCoinsResponse(coins) require.Equal(t, 1, len(res)) @@ -38,7 +38,7 @@ func TestNewDecCoinsResponse(t *testing.T) { } for _, tc := range testCases { - coin := sdk.NewDecCoin(utils.BaseDenom, tc.amount) + coin := sdk.NewDecCoin(testutil.ExampleAttoDenom, tc.amount) coins := sdk.NewDecCoins(coin) res := common.NewDecCoinsResponse(coins) require.Equal(t, 1, len(res)) diff --git a/precompiles/distribution/distribution.go b/precompiles/distribution/distribution.go index 788c7528..469c0cd2 100644 --- a/precompiles/distribution/distribution.go +++ b/precompiles/distribution/distribution.go @@ -11,10 +11,10 @@ import ( authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - stakingkeeper "github.com/evmos/evmos/v19/x/staking/keeper" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" + stakingkeeper "github.com/evmos/os/x/staking/keeper" ) var _ vm.PrecompiledContract = &Precompile{} diff --git a/precompiles/distribution/distribution_test.go b/precompiles/distribution/distribution_test.go index 67884f14..2f58f3fd 100644 --- a/precompiles/distribution/distribution_test.go +++ b/precompiles/distribution/distribution_test.go @@ -8,11 +8,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/precompiles/distribution" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/app" + "github.com/evmos/os/precompiles/distribution" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" ) func (s *PrecompileTestSuite) TestIsTransaction() { @@ -75,7 +75,7 @@ func (s *PrecompileTestSuite) TestRun() { valAddr, err := sdk.ValAddressFromBech32(s.validators[0].OperatorAddress) s.Require().NoError(err) val, _ := s.app.StakingKeeper.GetValidator(s.ctx, valAddr) - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))) s.app.DistrKeeper.AllocateTokensToValidator(s.ctx, val, sdk.NewDecCoinsFromCoins(coins...)) input, err := s.precompile.Pack( @@ -97,7 +97,7 @@ func (s *PrecompileTestSuite) TestRun() { s.Require().NoError(err) caller := common.BytesToAddress(valAddr) - valCommission := sdk.DecCoins{sdk.NewDecCoinFromDec(utils.BaseDenom, math.LegacyNewDecWithPrec(1000000000000000000, 1))} + valCommission := sdk.DecCoins{sdk.NewDecCoinFromDec(testutil.ExampleAttoDenom, math.LegacyNewDecWithPrec(1000000000000000000, 1))} // set outstanding rewards s.app.DistrKeeper.SetValidatorOutstandingRewards(s.ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: valCommission}) // set commission @@ -119,7 +119,7 @@ func (s *PrecompileTestSuite) TestRun() { valAddr, err := sdk.ValAddressFromBech32(s.validators[0].OperatorAddress) s.Require().NoError(err) val, _ := s.app.StakingKeeper.GetValidator(s.ctx, valAddr) - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))) s.app.DistrKeeper.AllocateTokensToValidator(s.ctx, val, sdk.NewDecCoinsFromCoins(coins...)) input, err := s.precompile.Pack( @@ -140,7 +140,7 @@ func (s *PrecompileTestSuite) TestRun() { valAddr, err := sdk.ValAddressFromBech32(s.validators[0].OperatorAddress) s.Require().NoError(err) val, _ := s.app.StakingKeeper.GetValidator(s.ctx, valAddr) - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))) s.app.DistrKeeper.AllocateTokensToValidator(s.ctx, val, sdk.NewDecCoinsFromCoins(coins...)) input, err := s.precompile.Pack( diff --git a/precompiles/distribution/events.go b/precompiles/distribution/events.go index 8b70b544..c3bc1c42 100644 --- a/precompiles/distribution/events.go +++ b/precompiles/distribution/events.go @@ -11,8 +11,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/distribution/events_test.go b/precompiles/distribution/events_test.go index 49d9c704..98802930 100644 --- a/precompiles/distribution/events_test.go +++ b/precompiles/distribution/events_test.go @@ -8,11 +8,11 @@ import ( "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/cmd/config" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/distribution" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/cmd/config" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/distribution" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestSetWithdrawAddressEvent() { @@ -91,7 +91,7 @@ func (s *PrecompileTestSuite) TestWithdrawDelegatorRewardsEvent() { valAddr, err := sdk.ValAddressFromBech32(operatorAddress) s.Require().NoError(err) val, _ := s.app.StakingKeeper.GetValidator(s.ctx, valAddr) - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))) s.app.DistrKeeper.AllocateTokensToValidator(s.ctx, val, sdk.NewDecCoinsFromCoins(coins...)) return []interface{}{ s.address, @@ -160,7 +160,7 @@ func (s *PrecompileTestSuite) TestWithdrawValidatorCommissionEvent() { func(operatorAddress string) []interface{} { valAddr, err := sdk.ValAddressFromBech32(operatorAddress) s.Require().NoError(err) - valCommission := sdk.DecCoins{sdk.NewDecCoinFromDec(utils.BaseDenom, math.LegacyNewDecWithPrec(1000000000000000000, 1))} + valCommission := sdk.DecCoins{sdk.NewDecCoinFromDec(testutil.ExampleAttoDenom, math.LegacyNewDecWithPrec(1000000000000000000, 1))} // set outstanding rewards s.app.DistrKeeper.SetValidatorOutstandingRewards(s.ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: valCommission}) // set commission @@ -221,7 +221,7 @@ func (s *PrecompileTestSuite) TestClaimRewardsEvent() { }{ { "success", - sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))), + sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))), func() { log := s.stateDB.Logs()[0] s.Require().Equal(log.Address, s.precompile.Address()) @@ -259,7 +259,7 @@ func (s *PrecompileTestSuite) TestFundCommunityPoolEvent() { }{ { "success - the correct event is emitted", - sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))), + sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))), func() { log := s.stateDB.Logs()[0] s.Require().Equal(log.Address, s.precompile.Address()) diff --git a/precompiles/distribution/integration_test.go b/precompiles/distribution/integration_test.go index e4e7d4d4..3e6f79f7 100644 --- a/precompiles/distribution/integration_test.go +++ b/precompiles/distribution/integration_test.go @@ -13,15 +13,14 @@ import ( distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/distribution" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - evmosutil "github.com/evmos/evmos/v19/testutil" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/distribution" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/precompiles/testutil/contracts" + evmosutil "github.com/evmos/os/testutil" + testutiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" @@ -1536,7 +1535,7 @@ var _ = Describe("Calling distribution precompile from another contract", func() }, }...) - expectedBalance = sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewInt(2e18)} + expectedBalance = sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewInt(2e18)} // populate default arguments defaultClaimRewardsArgs = defaultCallArgs.WithMethodName( "testClaimRewards", @@ -1940,7 +1939,7 @@ var _ = Describe("Calling distribution precompile from another contract", func() // send some funds to the Reverter contracts to transfer to the // delegator during the tx - err = evmosutil.FundAccount(s.ctx, s.app.BankKeeper, reverterAddr.Bytes(), sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, testContractInitialBalance))) + err = evmosutil.FundAccount(s.ctx, s.app.BankKeeper, reverterAddr.Bytes(), sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, testContractInitialBalance))) Expect(err).To(BeNil(), "error while funding the smart contract: %v", err) }) diff --git a/precompiles/distribution/query.go b/precompiles/distribution/query.go index 5299989a..d87c407e 100644 --- a/precompiles/distribution/query.go +++ b/precompiles/distribution/query.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/ethereum/go-ethereum/accounts/abi" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/distribution/query_test.go b/precompiles/distribution/query_test.go index 394c1ac6..9e09fb34 100644 --- a/precompiles/distribution/query_test.go +++ b/precompiles/distribution/query_test.go @@ -10,13 +10,13 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/x/distribution/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" - "github.com/evmos/evmos/v19/testutil" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" + "github.com/evmos/os/testutil" + testutiltx "github.com/evmos/os/testutil/tx" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/distribution" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/distribution" ) var ( diff --git a/precompiles/distribution/setup_test.go b/precompiles/distribution/setup_test.go index 2d891d43..88355631 100644 --- a/precompiles/distribution/setup_test.go +++ b/precompiles/distribution/setup_test.go @@ -3,8 +3,8 @@ package distribution_test import ( "testing" - "github.com/evmos/evmos/v19/precompiles/distribution" - "github.com/evmos/evmos/v19/x/evm/statedb" + "github.com/evmos/os/precompiles/distribution" + "github.com/evmos/os/x/evm/statedb" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" @@ -18,8 +18,8 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmosapp "github.com/evmos/evmos/v19/app" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmosapp "github.com/evmos/os/app" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/suite" ) diff --git a/precompiles/distribution/tx.go b/precompiles/distribution/tx.go index d220c50c..1963a16a 100644 --- a/precompiles/distribution/tx.go +++ b/precompiles/distribution/tx.go @@ -6,16 +6,15 @@ package distribution import ( "fmt" - "github.com/evmos/evmos/v19/utils" - - cmn "github.com/evmos/evmos/v19/precompiles/common" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/testutil" "github.com/ethereum/go-ethereum/common" sdk "github.com/cosmos/cosmos-sdk/types" distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) const ( @@ -84,7 +83,7 @@ func (p *Precompile) ClaimRewards( if contract.CallerAddress != origin { // rewards go to the withdrawer address withdrawerHexAddr := p.getWithdrawerHexAddr(ctx, delegatorAddr) - p.SetBalanceChangeEntries(cmn.NewBalanceChangeEntry(withdrawerHexAddr, totalCoins.AmountOf(utils.BaseDenom).BigInt(), cmn.Add)) + p.SetBalanceChangeEntries(cmn.NewBalanceChangeEntry(withdrawerHexAddr, totalCoins.AmountOf(testutil.ExampleAttoDenom).BigInt(), cmn.Add)) } if err := p.EmitClaimRewardsEvent(ctx, stateDB, delegatorAddr, totalCoins); err != nil { @@ -244,7 +243,7 @@ func (p *Precompile) FundCommunityPool( // when calling the precompile from a smart contract // This prevents the stateDB from overwriting the changed balance in the bank keeper when committing the EVM state. if contract.CallerAddress != origin { - p.SetBalanceChangeEntries(cmn.NewBalanceChangeEntry(depositorHexAddr, msg.Amount.AmountOf(utils.BaseDenom).BigInt(), cmn.Sub)) + p.SetBalanceChangeEntries(cmn.NewBalanceChangeEntry(depositorHexAddr, msg.Amount.AmountOf(testutil.ExampleAttoDenom).BigInt(), cmn.Sub)) } if err = p.EmitFundCommunityPoolEvent(ctx, stateDB, depositorHexAddr, msg.Amount); err != nil { diff --git a/precompiles/distribution/tx_test.go b/precompiles/distribution/tx_test.go index f6e1afc7..be0f1786 100644 --- a/precompiles/distribution/tx_test.go +++ b/precompiles/distribution/tx_test.go @@ -5,17 +5,16 @@ import ( "math/big" "cosmossdk.io/math" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/x/evm/core/vm" "github.com/ethereum/go-ethereum/common" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/distribution/types" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/distribution" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/utils" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/distribution" + utiltx "github.com/evmos/os/testutil/tx" ) func (s *PrecompileTestSuite) TestSetWithdrawAddress() { @@ -172,7 +171,7 @@ func (s *PrecompileTestSuite) TestWithdrawDelegatorRewards() { valAddr, err := sdk.ValAddressFromBech32(operatorAddress) s.Require().NoError(err) val, _ := s.app.StakingKeeper.GetValidator(s.ctx, valAddr) - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))) s.app.DistrKeeper.AllocateTokensToValidator(s.ctx, val, sdk.NewDecCoinsFromCoins(coins...)) return []interface{}{ s.address, @@ -183,10 +182,10 @@ func (s *PrecompileTestSuite) TestWithdrawDelegatorRewards() { var coins []cmn.Coin err := s.precompile.UnpackIntoInterface(&coins, distribution.WithdrawDelegatorRewardsMethod, data) s.Require().NoError(err, "failed to unpack output") - s.Require().Equal(coins[0].Denom, utils.BaseDenom) + s.Require().Equal(coins[0].Denom, testutil.ExampleAttoDenom) s.Require().Equal(coins[0].Amount, big.NewInt(1000000000000000000)) // Check bank balance after the withdrawal of rewards - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(6000000000000000000)) }, 20000, @@ -200,7 +199,7 @@ func (s *PrecompileTestSuite) TestWithdrawDelegatorRewards() { s.SetupTest() // sanity check to make sure the starting balance is always 5 EVMOS - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(5000000000000000000)) var contract *vm.Contract @@ -256,7 +255,7 @@ func (s *PrecompileTestSuite) TestWithdrawValidatorCommission() { func(operatorAddress string) []interface{} { valAddr, err := sdk.ValAddressFromBech32(operatorAddress) s.Require().NoError(err) - valCommission := sdk.DecCoins{sdk.NewDecCoinFromDec(utils.BaseDenom, math.LegacyNewDecWithPrec(1000000000000000000, 1))} + valCommission := sdk.DecCoins{sdk.NewDecCoinFromDec(testutil.ExampleAttoDenom, math.LegacyNewDecWithPrec(1000000000000000000, 1))} // set outstanding rewards s.app.DistrKeeper.SetValidatorOutstandingRewards(s.ctx, valAddr, types.ValidatorOutstandingRewards{Rewards: valCommission}) // set commission @@ -269,12 +268,12 @@ func (s *PrecompileTestSuite) TestWithdrawValidatorCommission() { var coins []cmn.Coin err := s.precompile.UnpackIntoInterface(&coins, distribution.WithdrawValidatorCommissionMethod, data) s.Require().NoError(err, "failed to unpack output") - s.Require().Equal(coins[0].Denom, utils.BaseDenom) + s.Require().Equal(coins[0].Denom, testutil.ExampleAttoDenom) s.Require().Equal(coins[0].Amount, big.NewInt(100000000000000000)) // Check bank balance after the withdrawal of commission - balance := s.app.BankKeeper.GetBalance(s.ctx, s.validators[0].GetOperator().Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.validators[0].GetOperator().Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(100000000000000000)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) }, 20000, false, @@ -287,9 +286,9 @@ func (s *PrecompileTestSuite) TestWithdrawValidatorCommission() { s.SetupTest() // Sanity check to make sure the starting balance is always 0 - balance := s.app.BankKeeper.GetBalance(s.ctx, s.validators[0].GetOperator().Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.validators[0].GetOperator().Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(0)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) validatorAddress := common.BytesToAddress(s.validators[0].GetOperator().Bytes()) var contract *vm.Contract @@ -363,7 +362,7 @@ func (s *PrecompileTestSuite) TestClaimRewards() { } }, func([]byte) { - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(7e18)) }, 20000, @@ -392,7 +391,7 @@ func (s *PrecompileTestSuite) TestClaimRewards() { } }, func([]byte) { - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(7e18)) }, 20000, @@ -408,7 +407,7 @@ func (s *PrecompileTestSuite) TestClaimRewards() { } }, func([]byte) { - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(6e18)) }, 20000, @@ -425,12 +424,12 @@ func (s *PrecompileTestSuite) TestClaimRewards() { contract, s.ctx = testutil.NewPrecompileContract(s.T(), s.ctx, s.address, s.precompile, tc.gas) // Sanity check to make sure the starting balance is always 5 EVMOS - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(5e18)) // Distribute rewards to the 2 validators, 1 EVMOS each for _, val := range s.validators { - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e18))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e18))) s.app.DistrKeeper.AllocateTokensToValidator(s.ctx, val, sdk.NewDecCoinsFromCoins(coins...)) } @@ -491,8 +490,8 @@ func (s *PrecompileTestSuite) TestFundCommunityPool() { func([]byte) { coins := s.app.DistrKeeper.GetFeePoolCommunityCoins(s.ctx) expectedAmount := new(big.Int).Mul(big.NewInt(1e18), new(big.Int).Exp(big.NewInt(10), big.NewInt(int64(sdk.Precision)), nil)) - s.Require().Equal(expectedAmount, coins.AmountOf(utils.BaseDenom).BigInt()) - userBalance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + s.Require().Equal(expectedAmount, coins.AmountOf(testutil.ExampleAttoDenom).BigInt()) + userBalance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(big.NewInt(4e18), userBalance.Amount.BigInt()) }, 20000, @@ -509,7 +508,7 @@ func (s *PrecompileTestSuite) TestFundCommunityPool() { contract, s.ctx = testutil.NewPrecompileContract(s.T(), s.ctx, s.address, s.precompile, tc.gas) // Sanity check to make sure the starting balance is always 5 EVMOS - balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.address.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount.BigInt(), big.NewInt(5e18)) bz, err := s.precompile.FundCommunityPool(s.ctx, s.address, contract, s.stateDB, &method, tc.malleate()) diff --git a/precompiles/distribution/types.go b/precompiles/distribution/types.go index 6e8fd16f..f4185b74 100644 --- a/precompiles/distribution/types.go +++ b/precompiles/distribution/types.go @@ -7,8 +7,6 @@ import ( "fmt" "math/big" - "github.com/evmos/evmos/v19/utils" - "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -16,8 +14,9 @@ import ( distributiontypes "github.com/cosmos/cosmos-sdk/x/distribution/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/cmd/config" - cmn "github.com/evmos/evmos/v19/precompiles/common" + "github.com/evmos/os/cmd/config" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/testutil" ) // EventSetWithdrawAddress defines the event data for the SetWithdrawAddress transaction. @@ -171,7 +170,7 @@ func NewMsgFundCommunityPool(args []interface{}) (*distributiontypes.MsgFundComm msg := &distributiontypes.MsgFundCommunityPool{ Depositor: sdk.AccAddress(depositorAddress.Bytes()).String(), - Amount: sdk.Coins{sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewIntFromBigInt(amount)}}, + Amount: sdk.Coins{sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewIntFromBigInt(amount)}}, } if err := msg.ValidateBasic(); err != nil { diff --git a/precompiles/distribution/utils_test.go b/precompiles/distribution/utils_test.go index b1159781..faee8e57 100644 --- a/precompiles/distribution/utils_test.go +++ b/precompiles/distribution/utils_test.go @@ -20,16 +20,16 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmosapp "github.com/evmos/evmos/v19/app" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/distribution" - evmosutil "github.com/evmos/evmos/v19/testutil" - evmosutiltx "github.com/evmos/evmos/v19/testutil/tx" - evmostypes "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + evmosapp "github.com/evmos/os/app" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/distribution" + "github.com/evmos/os/testutil" + evmosutil "github.com/evmos/os/testutil" + evmosutiltx "github.com/evmos/os/testutil/tx" + evmostypes "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" ) // SetupWithGenesisValSet initializes a new EvmosApp with a validator set and genesis accounts @@ -76,7 +76,7 @@ func (s *PrecompileTestSuite) SetupWithGenesisValSet(valSet *tmtypes.ValidatorSe // set validators and delegations stakingParams := stakingtypes.DefaultParams() // set bond demon to be aevmos - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom stakingGenesis := stakingtypes.NewGenesisState(stakingParams, validators, delegations) genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) @@ -84,13 +84,13 @@ func (s *PrecompileTestSuite) SetupWithGenesisValSet(valSet *tmtypes.ValidatorSe totalSupply := sdk.NewCoins() for _, b := range balances { // add genesis acc tokens and delegated tokens to total supply - totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(utils.BaseDenom, totalBondAmt))...) + totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(testutil.ExampleAttoDenom, totalBondAmt))...) } // add bonded amount to bonded pool module account balances = append(balances, banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(utils.BaseDenom, totalBondAmt)}, + Coins: sdk.Coins{sdk.NewCoin(testutil.ExampleAttoDenom, totalBondAmt)}, }) // update total supply @@ -160,7 +160,7 @@ func (s *PrecompileTestSuite) DoSetupTest() { balance := banktypes.Balance{ Address: baseAcc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, amount)), + Coins: sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, amount)), } s.SetupWithGenesisValSet(s.valSet, []authtypes.GenesisAccount{baseAcc}, balance) @@ -170,7 +170,7 @@ func (s *PrecompileTestSuite) DoSetupTest() { // bond denom stakingParams := s.app.StakingKeeper.GetParams(s.ctx) - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom s.bondDenom = stakingParams.BondDenom err = s.app.StakingKeeper.SetParams(s.ctx, stakingParams) s.Require().NoError(err) @@ -181,9 +181,9 @@ func (s *PrecompileTestSuite) DoSetupTest() { s.Require().NoError(err) s.precompile = precompile - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(5_000_000_000_000_000_000))) - inflCoins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(2_000_000_000_000_000_000))) - distrCoins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(3_000_000_000_000_000_000))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(5_000_000_000_000_000_000))) + inflCoins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(2_000_000_000_000_000_000))) + distrCoins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(3_000_000_000_000_000_000))) err = s.app.BankKeeper.MintCoins(s.ctx, inflationtypes.ModuleName, coins) s.Require().NoError(err) err = s.app.BankKeeper.SendCoinsFromModuleToModule(s.ctx, inflationtypes.ModuleName, authtypes.FeeCollectorName, inflCoins) diff --git a/precompiles/erc20/approve.go b/precompiles/erc20/approve.go index d74b2336..d346e726 100644 --- a/precompiles/erc20/approve.go +++ b/precompiles/erc20/approve.go @@ -17,9 +17,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + auth "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) // Approve sets the given amount as the allowance of the spender address over diff --git a/precompiles/erc20/approve_test.go b/precompiles/erc20/approve_test.go index b75593f7..011caa70 100644 --- a/precompiles/erc20/approve_test.go +++ b/precompiles/erc20/approve_test.go @@ -9,11 +9,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/x/evm/core/vm" ) //nolint:dupl // tests are not duplicate between the functions diff --git a/precompiles/erc20/erc20.go b/precompiles/erc20/erc20.go index b378097a..569997c3 100644 --- a/precompiles/erc20/erc20.go +++ b/precompiles/erc20/erc20.go @@ -7,18 +7,18 @@ import ( "embed" "fmt" - cmn "github.com/evmos/evmos/v19/precompiles/common" + cmn "github.com/evmos/os/precompiles/common" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - erc20types "github.com/evmos/evmos/v19/x/erc20/types" - transferkeeper "github.com/evmos/evmos/v19/x/ibc/transfer/keeper" + auth "github.com/evmos/os/precompiles/authorization" + erc20types "github.com/evmos/os/x/erc20/types" + transferkeeper "github.com/evmos/os/x/ibc/transfer/keeper" ) const ( diff --git a/precompiles/erc20/erc20_test.go b/precompiles/erc20/erc20_test.go index 54396dbe..fc7ba1b4 100644 --- a/precompiles/erc20/erc20_test.go +++ b/precompiles/erc20/erc20_test.go @@ -6,8 +6,8 @@ package erc20_test import ( "math/big" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - "github.com/evmos/evmos/v19/precompiles/erc20" + auth "github.com/evmos/os/precompiles/authorization" + "github.com/evmos/os/precompiles/erc20" ) func (s *PrecompileTestSuite) TestIsTransaction() { diff --git a/precompiles/erc20/errors.go b/precompiles/erc20/errors.go index 66fb7ffb..1c08b1a8 100644 --- a/precompiles/erc20/errors.go +++ b/precompiles/erc20/errors.go @@ -10,10 +10,10 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/ibc" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/ibc" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" ) // Errors that have formatted information are defined here as a string. diff --git a/precompiles/erc20/errors_test.go b/precompiles/erc20/errors_test.go index 14218e46..852d9d14 100644 --- a/precompiles/erc20/errors_test.go +++ b/precompiles/erc20/errors_test.go @@ -1,8 +1,8 @@ package erc20_test import ( - "github.com/evmos/evmos/v19/precompiles/erc20" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/precompiles/erc20" + evmtypes "github.com/evmos/os/x/evm/types" ) // TODO: This is not yet producing the correct reason bytes so we skip this test for now, diff --git a/precompiles/erc20/events.go b/precompiles/erc20/events.go index 0be677ad..dd630a45 100644 --- a/precompiles/erc20/events.go +++ b/precompiles/erc20/events.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" + auth "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" ) const ( diff --git a/precompiles/erc20/events_test.go b/precompiles/erc20/events_test.go index 8a6fe6b7..f188d589 100644 --- a/precompiles/erc20/events_test.go +++ b/precompiles/erc20/events_test.go @@ -5,10 +5,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - erc20precompile "github.com/evmos/evmos/v19/precompiles/erc20" - utiltx "github.com/evmos/evmos/v19/testutil/tx" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + erc20precompile "github.com/evmos/os/precompiles/erc20" + utiltx "github.com/evmos/os/testutil/tx" ) //nolint:dupl // this is not a duplicate of the approval events test diff --git a/precompiles/erc20/integration_test.go b/precompiles/erc20/integration_test.go index a382027c..2b5ecc70 100644 --- a/precompiles/erc20/integration_test.go +++ b/precompiles/erc20/integration_test.go @@ -10,21 +10,21 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/contracts" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/precompiles/erc20/testdata" - "github.com/evmos/evmos/v19/precompiles/testutil" - contractutils "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - "github.com/evmos/evmos/v19/testutil/integration/evmos/utils" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - erc20types "github.com/evmos/evmos/v19/x/erc20/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/contracts" + auth "github.com/evmos/os/precompiles/authorization" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/precompiles/erc20/testdata" + "github.com/evmos/os/precompiles/testutil" + contractutils "github.com/evmos/os/precompiles/testutil/contracts" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" + "github.com/evmos/os/testutil/integration/evmos/utils" + utiltx "github.com/evmos/os/testutil/tx" + erc20types "github.com/evmos/os/x/erc20/types" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" diff --git a/precompiles/erc20/query.go b/precompiles/erc20/query.go index b3055fca..178c6c02 100644 --- a/precompiles/erc20/query.go +++ b/precompiles/erc20/query.go @@ -15,12 +15,12 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/evmos/evmos/v19/ibc" - auth "github.com/evmos/evmos/v19/precompiles/authorization" + "github.com/evmos/os/ibc" + auth "github.com/evmos/os/precompiles/authorization" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/erc20/query_test.go b/precompiles/erc20/query_test.go index 264fd694..10862645 100644 --- a/precompiles/erc20/query_test.go +++ b/precompiles/erc20/query_test.go @@ -12,12 +12,12 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/app" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/testutil" - "github.com/evmos/evmos/v19/x/evm/core/vm" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + "github.com/evmos/os/app" + auth "github.com/evmos/os/precompiles/authorization" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" ) // Define useful variables for tests here. diff --git a/precompiles/erc20/setup_test.go b/precompiles/erc20/setup_test.go index aa992431..7d5cd46e 100644 --- a/precompiles/erc20/setup_test.go +++ b/precompiles/erc20/setup_test.go @@ -3,11 +3,11 @@ package erc20_test import ( "testing" - erc20precompile "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" + erc20precompile "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" "github.com/stretchr/testify/suite" ) diff --git a/precompiles/erc20/testdata/erc20_allowance_caller.go b/precompiles/erc20/testdata/erc20_allowance_caller.go index 46a47ca7..817b9730 100644 --- a/precompiles/erc20/testdata/erc20_allowance_caller.go +++ b/precompiles/erc20/testdata/erc20_allowance_caller.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadERC20AllowanceCaller() (evmtypes.CompiledContract, error) { diff --git a/precompiles/erc20/testdata/erc20_no_metadata.go b/precompiles/erc20/testdata/erc20_no_metadata.go index 5b5b7c0d..eac14f72 100644 --- a/precompiles/erc20/testdata/erc20_no_metadata.go +++ b/precompiles/erc20/testdata/erc20_no_metadata.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadERC20NoMetadataContract() (evmtypes.CompiledContract, error) { diff --git a/precompiles/erc20/testdata/erc20_test_caller.go b/precompiles/erc20/testdata/erc20_test_caller.go index 58bc5b01..083c492b 100644 --- a/precompiles/erc20/testdata/erc20_test_caller.go +++ b/precompiles/erc20/testdata/erc20_test_caller.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadERC20TestCaller() (evmtypes.CompiledContract, error) { diff --git a/precompiles/erc20/testdata/erc20minter_openzeppelinv5.go b/precompiles/erc20/testdata/erc20minter_openzeppelinv5.go index e3604dbe..a1ae371b 100644 --- a/precompiles/erc20/testdata/erc20minter_openzeppelinv5.go +++ b/precompiles/erc20/testdata/erc20minter_openzeppelinv5.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadERC20MinterV5Contract() (evmtypes.CompiledContract, error) { diff --git a/precompiles/erc20/tx.go b/precompiles/erc20/tx.go index a4f69840..ef5853c3 100644 --- a/precompiles/erc20/tx.go +++ b/precompiles/erc20/tx.go @@ -13,9 +13,9 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" ) const ( @@ -110,9 +110,9 @@ func (p *Precompile) transfer( } // TODO: where should we get this - if p.tokenPair.Denom == utils.BaseDenom { - p.SetBalanceChangeEntries(cmn.NewBalanceChangeEntry(from, msg.Amount.AmountOf(utils.BaseDenom).BigInt(), cmn.Sub), - cmn.NewBalanceChangeEntry(to, msg.Amount.AmountOf(utils.BaseDenom).BigInt(), cmn.Add)) + if p.tokenPair.Denom == testutil.ExampleAttoDenom { + p.SetBalanceChangeEntries(cmn.NewBalanceChangeEntry(from, msg.Amount.AmountOf(testutil.ExampleAttoDenom).BigInt(), cmn.Sub), + cmn.NewBalanceChangeEntry(to, msg.Amount.AmountOf(testutil.ExampleAttoDenom).BigInt(), cmn.Add)) } if err = p.EmitTransferEvent(ctx, stateDB, from, to, amount); err != nil { diff --git a/precompiles/erc20/tx_test.go b/precompiles/erc20/tx_test.go index 673292f0..74960319 100644 --- a/precompiles/erc20/tx_test.go +++ b/precompiles/erc20/tx_test.go @@ -7,11 +7,11 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/precompiles/testutil" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - erc20types "github.com/evmos/evmos/v19/x/erc20/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/precompiles/testutil" + utiltx "github.com/evmos/os/testutil/tx" + erc20types "github.com/evmos/os/x/erc20/types" + "github.com/evmos/os/x/evm/core/vm" ) var ( diff --git a/precompiles/erc20/types_test.go b/precompiles/erc20/types_test.go index 92a63a58..b406219a 100644 --- a/precompiles/erc20/types_test.go +++ b/precompiles/erc20/types_test.go @@ -3,8 +3,8 @@ package erc20_test import ( "math/big" - "github.com/evmos/evmos/v19/precompiles/erc20" - utiltx "github.com/evmos/evmos/v19/testutil/tx" + "github.com/evmos/os/precompiles/erc20" + utiltx "github.com/evmos/os/testutil/tx" ) //nolint:dupl // these tests are not duplicates diff --git a/precompiles/erc20/utils_test.go b/precompiles/erc20/utils_test.go index d78872b2..2fe8f57a 100644 --- a/precompiles/erc20/utils_test.go +++ b/precompiles/erc20/utils_test.go @@ -13,16 +13,16 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - auth "github.com/evmos/evmos/v19/precompiles/authorization" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/precompiles/testutil" - commonfactory "github.com/evmos/evmos/v19/testutil/integration/common/factory" - commonnetwork "github.com/evmos/evmos/v19/testutil/integration/common/network" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - network "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - erc20types "github.com/evmos/evmos/v19/x/erc20/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + auth "github.com/evmos/os/precompiles/authorization" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/precompiles/testutil" + commonfactory "github.com/evmos/os/testutil/integration/common/factory" + commonnetwork "github.com/evmos/os/testutil/integration/common/network" + "github.com/evmos/os/testutil/integration/evmos/factory" + network "github.com/evmos/os/testutil/integration/evmos/network" + utiltx "github.com/evmos/os/testutil/tx" + erc20types "github.com/evmos/os/x/erc20/types" + evmtypes "github.com/evmos/os/x/evm/types" //nolint:revive // dot imports are fine for Gomega . "github.com/onsi/gomega" diff --git a/precompiles/ics20/approve.go b/precompiles/ics20/approve.go index 4f5e115b..f44e9c26 100644 --- a/precompiles/ics20/approve.go +++ b/precompiles/ics20/approve.go @@ -7,8 +7,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + "github.com/evmos/os/x/evm/core/vm" ) // Approve implements the ICS20 approve transactions. diff --git a/precompiles/ics20/approve_common.go b/precompiles/ics20/approve_common.go index 35489f60..c7a47883 100644 --- a/precompiles/ics20/approve_common.go +++ b/precompiles/ics20/approve_common.go @@ -9,7 +9,7 @@ import ( "math/big" "time" - "github.com/evmos/evmos/v19/precompiles/authorization" + "github.com/evmos/os/precompiles/authorization" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" @@ -22,8 +22,8 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) // TransferMsgURL is the ICS20 transfer message URL string. diff --git a/precompiles/ics20/approve_test.go b/precompiles/ics20/approve_test.go index 2a1f93b2..7b19ad87 100644 --- a/precompiles/ics20/approve_test.go +++ b/precompiles/ics20/approve_test.go @@ -10,10 +10,10 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/utils" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/testutil" ) type allowanceTestCase struct { @@ -43,7 +43,7 @@ var defaultAllowanceCases = []allowanceTestCase{ // common.BytesToAddress(s.chainA.SenderAccount.GetAddress().Bytes()), // "port-1", // "channel-1", - // utils.BaseDenom, + // testutil.ExampleAttoDenom, // big.NewInt(1e18), // } // }, @@ -59,7 +59,7 @@ var defaultAllowanceCases = []allowanceTestCase{ s.address, "port-1", "channel-1", - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), } }, @@ -100,7 +100,7 @@ var defaultAllowanceCases = []allowanceTestCase{ s.address, "port-1", "channel-1", - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), } }, @@ -322,7 +322,7 @@ func (s *PrecompileTestSuite) TestIncreaseAllowance() { func() []interface{} { path := NewTransferPath(s.chainA, s.chainB) s.coordinator.Setup(path) - overflowTestCoins := maxUint256Coins.Sub(sdk.NewInt64Coin(utils.BaseDenom, 1)) + overflowTestCoins := maxUint256Coins.Sub(sdk.NewInt64Coin(testutil.ExampleAttoDenom, 1)) err := s.NewTransferAuthorization(s.ctx, s.app, differentAddress, s.address, path, overflowTestCoins, nil, nil) s.Require().NoError(err) transferAuthz := s.GetTransferAuthorization(s.ctx, differentAddress, s.address) @@ -331,7 +331,7 @@ func (s *PrecompileTestSuite) TestIncreaseAllowance() { differentAddress, path.EndpointA.ChannelConfig.PortID, path.EndpointB.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(2e18), } }, @@ -353,14 +353,14 @@ func (s *PrecompileTestSuite) TestIncreaseAllowance() { differentAddress, path.EndpointA.ChannelConfig.PortID, path.EndpointB.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), } }, func([]byte, []interface{}) { transferAuthz := s.GetTransferAuthorization(s.ctx, differentAddress, s.address) s.Require().Equal(transferAuthz.Allocations[0].SpendLimit[0].Amount, math.NewInt(2e18)) - s.Require().Equal(transferAuthz.Allocations[0].SpendLimit[0].Denom, utils.BaseDenom) + s.Require().Equal(transferAuthz.Allocations[0].SpendLimit[0].Denom, testutil.ExampleAttoDenom) }, 200000, false, @@ -420,7 +420,7 @@ func (s *PrecompileTestSuite) TestIncreaseAllowance() { differentAddress, path.EndpointA.ChannelConfig.PortID, path.EndpointB.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), } }, @@ -428,7 +428,7 @@ func (s *PrecompileTestSuite) TestIncreaseAllowance() { transferAuthz := s.GetTransferAuthorization(s.ctx, differentAddress, s.address) s.Require().Equal(transferAuthz.Allocations[0].SpendLimit, atomCoins) s.Require().Equal(transferAuthz.Allocations[1].SpendLimit[0].Amount, math.NewInt(2e18)) - s.Require().Equal(transferAuthz.Allocations[1].SpendLimit[0].Denom, utils.BaseDenom) + s.Require().Equal(transferAuthz.Allocations[1].SpendLimit[0].Denom, testutil.ExampleAttoDenom) }, 200000, false, @@ -475,7 +475,7 @@ func (s *PrecompileTestSuite) TestDecreaseAllowance() { differentAddress, path.EndpointA.ChannelConfig.PortID, path.EndpointB.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(2e18), } }, @@ -499,7 +499,7 @@ func (s *PrecompileTestSuite) TestDecreaseAllowance() { differentAddress, path.EndpointA.ChannelConfig.PortID, path.EndpointB.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(500000000000000000), } }, @@ -508,7 +508,7 @@ func (s *PrecompileTestSuite) TestDecreaseAllowance() { s.Require().NotNil(transferAuthz) s.Require().Len(transferAuthz.Allocations, 1, "should have at least one allocation", transferAuthz) s.Require().Len(transferAuthz.Allocations[0].SpendLimit, 1, "should have at least one coin; allocation %s", transferAuthz.Allocations[0]) - s.Require().Equal(transferAuthz.Allocations[0].SpendLimit[0].Denom, utils.BaseDenom) + s.Require().Equal(transferAuthz.Allocations[0].SpendLimit[0].Denom, testutil.ExampleAttoDenom) s.Require().Equal(transferAuthz.Allocations[0].SpendLimit[0].Amount, math.NewInt(500000000000000000)) }, 200000, @@ -574,14 +574,14 @@ func (s *PrecompileTestSuite) TestDecreaseAllowance() { differentAddress, path.EndpointA.ChannelConfig.PortID, path.EndpointB.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18 / 2), } }, func(_ []byte, _ []interface{}) { transferAuthz := s.GetTransferAuthorization(s.ctx, differentAddress, s.address) s.Require().Equal(transferAuthz.Allocations[1].SpendLimit[0].Amount, math.NewInt(1e18/2)) - s.Require().Equal(transferAuthz.Allocations[1].SpendLimit[0].Denom, utils.BaseDenom) + s.Require().Equal(transferAuthz.Allocations[1].SpendLimit[0].Denom, testutil.ExampleAttoDenom) }, 200000, false, diff --git a/precompiles/ics20/events.go b/precompiles/ics20/events.go index cb135f02..dd0027c6 100644 --- a/precompiles/ics20/events.go +++ b/precompiles/ics20/events.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/ics20/events_test.go b/precompiles/ics20/events_test.go index 63f289e7..340d1471 100644 --- a/precompiles/ics20/events_test.go +++ b/precompiles/ics20/events_test.go @@ -6,11 +6,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestTransferEvent() { @@ -32,7 +32,7 @@ func (s *PrecompileTestSuite) TestTransferEvent() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(sender.Bytes()), receiver.String(), @@ -59,7 +59,7 @@ func (s *PrecompileTestSuite) TestTransferEvent() { s.Require().Equal("transfer", ibcTransferEvent.SourcePort) s.Require().Equal("channel-0", ibcTransferEvent.SourceChannel) s.Require().Equal(big.NewInt(1e18), ibcTransferEvent.Amount) - s.Require().Equal(utils.BaseDenom, ibcTransferEvent.Denom) + s.Require().Equal(testutil.ExampleAttoDenom, ibcTransferEvent.Denom) s.Require().Equal("memo", ibcTransferEvent.Memo) }, }, @@ -228,7 +228,7 @@ func (s *PrecompileTestSuite) TestIncreaseAllowanceEvent() { s.address, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), } }, @@ -279,7 +279,7 @@ func (s *PrecompileTestSuite) TestDecreaseAllowanceEvent() { s.address, path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18 / 2), } }, diff --git a/precompiles/ics20/ics20.go b/precompiles/ics20/ics20.go index 9ae43952..e32f0605 100644 --- a/precompiles/ics20/ics20.go +++ b/precompiles/ics20/ics20.go @@ -11,12 +11,12 @@ import ( authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - transferkeeper "github.com/evmos/evmos/v19/x/ibc/transfer/keeper" - stakingkeeper "github.com/evmos/evmos/v19/x/staking/keeper" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" + transferkeeper "github.com/evmos/os/x/ibc/transfer/keeper" + stakingkeeper "github.com/evmos/os/x/staking/keeper" ) var _ vm.PrecompiledContract = &Precompile{} diff --git a/precompiles/ics20/integration_test.go b/precompiles/ics20/integration_test.go index 0aa24e08..ab74c3eb 100644 --- a/precompiles/ics20/integration_test.go +++ b/precompiles/ics20/integration_test.go @@ -14,21 +14,20 @@ import ( channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/ethereum/go-ethereum/common" - evmoscontracts "github.com/evmos/evmos/v19/contracts" - evmostesting "github.com/evmos/evmos/v19/ibc/testing" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - evmosutil "github.com/evmos/evmos/v19/testutil" - teststypes "github.com/evmos/evmos/v19/types/tests" - "github.com/evmos/evmos/v19/utils" - erc20types "github.com/evmos/evmos/v19/x/erc20/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + evmoscontracts "github.com/evmos/os/contracts" + evmostesting "github.com/evmos/os/ibc/testing" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/precompiles/testutil/contracts" + evmosutil "github.com/evmos/os/testutil" + teststypes "github.com/evmos/os/types/tests" + erc20types "github.com/evmos/os/x/erc20/types" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" @@ -210,7 +209,7 @@ var _ = Describe("IBCTransfer Precompile", func() { // s.address, // s.transferPath.EndpointA.ChannelConfig.PortID, // s.transferPath.EndpointA.ChannelID, - // utils.BaseDenom, + // testutil.ExampleAttoDenom, // big.NewInt(1e18), // ) @@ -265,7 +264,7 @@ var _ = Describe("IBCTransfer Precompile", func() { s.differentAddr, s.transferPath.EndpointA.ChannelConfig.PortID, s.transferPath.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), ) @@ -282,7 +281,7 @@ var _ = Describe("IBCTransfer Precompile", func() { Expect(auths).To(HaveLen(1), "expected one authorization") Expect(auths[0].MsgTypeURL()).To(Equal(ics20.TransferMsgURL)) transferAuthz := auths[0].(*transfertypes.TransferAuthorization) - Expect(transferAuthz.Allocations[0].SpendLimit).To(Equal(defaultCoins.Add(sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewInt(1e18)}))) + Expect(transferAuthz.Allocations[0].SpendLimit).To(Equal(defaultCoins.Add(sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewInt(1e18)}))) }) }) @@ -298,7 +297,7 @@ var _ = Describe("IBCTransfer Precompile", func() { s.differentAddr, s.transferPath.EndpointA.ChannelConfig.PortID, s.transferPath.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(2e18), ) @@ -318,7 +317,7 @@ var _ = Describe("IBCTransfer Precompile", func() { // s.address, // s.transferPath.EndpointA.ChannelConfig.PortID, // s.transferPath.EndpointA.ChannelID, - // utils.BaseDenom, + // testutil.ExampleAttoDenom, // big.NewInt(1e18), // ) @@ -371,7 +370,7 @@ var _ = Describe("IBCTransfer Precompile", func() { s.differentAddr, s.transferPath.EndpointA.ChannelConfig.PortID, s.transferPath.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), ) @@ -895,7 +894,7 @@ var _ = Describe("IBCTransfer Precompile", func() { ) expTrace = transfertypes.DenomTrace{ Path: path, - BaseDenom: utils.BaseDenom, + BaseDenom: testutil.ExampleAttoDenom, } }) @@ -927,8 +926,8 @@ var _ = Describe("IBCTransfer Precompile", func() { method = ics20.DenomTracesMethod // setup - create some denom traces to get on the query result expTraces = []transfertypes.DenomTrace{ - {Path: "", BaseDenom: utils.BaseDenom}, - {Path: fmt.Sprintf("%s/%s", s.transferPath.EndpointA.ChannelConfig.PortID, s.transferPath.EndpointA.ChannelID), BaseDenom: utils.BaseDenom}, + {Path: "", BaseDenom: testutil.ExampleAttoDenom}, + {Path: fmt.Sprintf("%s/%s", s.transferPath.EndpointA.ChannelConfig.PortID, s.transferPath.EndpointA.ChannelID), BaseDenom: testutil.ExampleAttoDenom}, expTrace, } @@ -1197,7 +1196,7 @@ var _ = Describe("Calling ICS20 precompile from another contract", func() { WithArgs( s.transferPath.EndpointA.ChannelConfig.PortID, s.transferPath.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, amt, ) }) @@ -1215,7 +1214,7 @@ var _ = Describe("Calling ICS20 precompile from another contract", func() { Expect(auths).To(HaveLen(1), "expected one authorization") Expect(auths[0].MsgTypeURL()).To(Equal(ics20.TransferMsgURL)) transferAuthz := auths[0].(*transfertypes.TransferAuthorization) - Expect(transferAuthz.Allocations[0].SpendLimit.AmountOf(utils.BaseDenom)).To(Equal(defaultCoins.AmountOf(utils.BaseDenom).Add(math.NewIntFromBigInt(amt)))) + Expect(transferAuthz.Allocations[0].SpendLimit.AmountOf(testutil.ExampleAttoDenom)).To(Equal(defaultCoins.AmountOf(testutil.ExampleAttoDenom).Add(math.NewIntFromBigInt(amt)))) }) }) @@ -1239,7 +1238,7 @@ var _ = Describe("Calling ICS20 precompile from another contract", func() { Expect(auths).To(HaveLen(1), "expected one authorization") Expect(auths[0].MsgTypeURL()).To(Equal(ics20.TransferMsgURL)) transferAuthz := auths[0].(*transfertypes.TransferAuthorization) - Expect(transferAuthz.Allocations[0].SpendLimit.AmountOf(utils.BaseDenom)).To(Equal(defaultCoins.AmountOf(utils.BaseDenom).Sub(math.NewIntFromBigInt(amt)))) + Expect(transferAuthz.Allocations[0].SpendLimit.AmountOf(testutil.ExampleAttoDenom)).To(Equal(defaultCoins.AmountOf(testutil.ExampleAttoDenom).Sub(math.NewIntFromBigInt(amt)))) }) }) }) diff --git a/precompiles/ics20/query.go b/precompiles/ics20/query.go index 0854fdcd..c14ccca4 100644 --- a/precompiles/ics20/query.go +++ b/precompiles/ics20/query.go @@ -10,9 +10,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/ics20/query_test.go b/precompiles/ics20/query_test.go index b99f900f..2056db66 100644 --- a/precompiles/ics20/query_test.go +++ b/precompiles/ics20/query_test.go @@ -6,10 +6,10 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibctesting "github.com/cosmos/ibc-go/v7/testing" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/utils" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/testutil" ) func (s *PrecompileTestSuite) TestDenomTrace() { @@ -45,7 +45,7 @@ func (s *PrecompileTestSuite) TestDenomTrace() { "success - denom trace not found, return empty struct", func() []interface{} { expTrace.Path = "transfer/channelToA/transfer/channelToB" - expTrace.BaseDenom = utils.BaseDenom + expTrace.BaseDenom = testutil.ExampleAttoDenom return []interface{}{ expTrace.IBCDenom(), } @@ -65,7 +65,7 @@ func (s *PrecompileTestSuite) TestDenomTrace() { "success - denom trace", func() []interface{} { expTrace.Path = "transfer/channelToA/transfer/channelToB" - expTrace.BaseDenom = utils.BaseDenom + expTrace.BaseDenom = testutil.ExampleAttoDenom s.app.TransferKeeper.SetDenomTrace(s.ctx, expTrace) return []interface{}{ expTrace.IBCDenom(), @@ -124,9 +124,9 @@ func (s *PrecompileTestSuite) TestDenomTraces() { { "success - gets denom traces", func() []interface{} { - expTraces = append(expTraces, types.DenomTrace{Path: "", BaseDenom: utils.BaseDenom}) - expTraces = append(expTraces, types.DenomTrace{Path: "transfer/channelToA/transfer/channelToB", BaseDenom: utils.BaseDenom}) - expTraces = append(expTraces, types.DenomTrace{Path: "transfer/channelToB", BaseDenom: utils.BaseDenom}) + expTraces = append(expTraces, types.DenomTrace{Path: "", BaseDenom: testutil.ExampleAttoDenom}) + expTraces = append(expTraces, types.DenomTrace{Path: "transfer/channelToA/transfer/channelToB", BaseDenom: testutil.ExampleAttoDenom}) + expTraces = append(expTraces, types.DenomTrace{Path: "transfer/channelToB", BaseDenom: testutil.ExampleAttoDenom}) for _, trace := range expTraces { s.app.TransferKeeper.SetDenomTrace(s.ctx, trace) @@ -175,7 +175,7 @@ func (s *PrecompileTestSuite) TestDenomTraces() { func (s *PrecompileTestSuite) TestDenomHash() { reqTrace := types.DenomTrace{ Path: "transfer/channelToA/transfer/channelToB", - BaseDenom: utils.BaseDenom, + BaseDenom: testutil.ExampleAttoDenom, } method := s.precompile.Methods[ics20.DenomHashMethod] testCases := []struct { diff --git a/precompiles/ics20/setup_test.go b/precompiles/ics20/setup_test.go index 76af00b4..9d661be2 100644 --- a/precompiles/ics20/setup_test.go +++ b/precompiles/ics20/setup_test.go @@ -14,11 +14,11 @@ import ( ibctesting "github.com/cosmos/ibc-go/v7/testing" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmosapp "github.com/evmos/evmos/v19/app" - evmosibc "github.com/evmos/evmos/v19/ibc/testing" - "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmosapp "github.com/evmos/os/app" + evmosibc "github.com/evmos/os/ibc/testing" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" diff --git a/precompiles/ics20/tx.go b/precompiles/ics20/tx.go index 4f9a21b2..8970a93a 100644 --- a/precompiles/ics20/tx.go +++ b/precompiles/ics20/tx.go @@ -14,10 +14,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/utils" + cmn "github.com/evmos/os/precompiles/common" ) const ( @@ -69,7 +69,7 @@ func (p *Precompile) Transfer( return nil, err } - if contract.CallerAddress != origin && msg.Token.Denom == utils.BaseDenom { + if contract.CallerAddress != origin && msg.Token.Denom == testutil.ExampleAttoDenom { // escrow address is also changed on this tx, and it is not a module account // so we need to account for this on the UpdateDirties escrowAccAddress := transfertypes.GetEscrowAddress(msg.SourcePort, msg.SourceChannel) diff --git a/precompiles/ics20/tx_test.go b/precompiles/ics20/tx_test.go index 5719e10d..354e8370 100644 --- a/precompiles/ics20/tx_test.go +++ b/precompiles/ics20/tx_test.go @@ -9,12 +9,12 @@ import ( transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/ics20" - evmosutil "github.com/evmos/evmos/v19/testutil" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/testutil" + evmosutil "github.com/evmos/os/testutil" + testutiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/core/vm" ) var ( @@ -52,7 +52,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(s.chainA.SenderAccount.GetAddress().Bytes()), s.chainB.SenderAccount.GetAddress().String(), @@ -73,7 +73,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ "port", "channel-01", - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(s.chainA.SenderAccount.GetAddress().Bytes()), s.chainB.SenderAccount.GetAddress().String(), @@ -123,7 +123,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(2e18), common.BytesToAddress(s.chainA.SenderAccount.GetAddress().Bytes()), s.chainB.SenderAccount.GetAddress().String(), @@ -152,7 +152,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(amt), common.BytesToAddress(differentAddress.Bytes()), receiver.String(), @@ -168,9 +168,9 @@ func (s *PrecompileTestSuite) TestTransfer() { s.Require().Equal(transferAuthz.Allocations[0].SpendLimit, defaultCoins) // the balance on other user's account should remain unchanged - balance := s.app.BankKeeper.GetBalance(s.ctx, differentAddress.Bytes(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, differentAddress.Bytes(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount, math.NewInt(amt)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) }, 200000, true, @@ -186,7 +186,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(sender.Bytes()), receiver.String(), @@ -215,7 +215,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(sender.Bytes()), receiver.String(), @@ -229,9 +229,9 @@ func (s *PrecompileTestSuite) TestTransfer() { authz, _ := s.app.AuthzKeeper.GetAuthorization(s.ctx, callingContractAddr.Bytes(), sender, ics20.TransferMsgURL) s.Require().Nil(authz) - balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount, math.NewInt(4e18)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) }, 200000, false, @@ -248,7 +248,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(sender.Bytes()), receiver.String(), @@ -263,9 +263,9 @@ func (s *PrecompileTestSuite) TestTransfer() { transferAuthz := authz.(*transfertypes.TransferAuthorization) s.Require().Equal(transferAuthz.Allocations[0].SpendLimit, maxUint256Coins) - balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount, math.NewInt(4e18)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) }, 200000, false, @@ -282,7 +282,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(sender.Bytes()), receiver.String(), @@ -297,9 +297,9 @@ func (s *PrecompileTestSuite) TestTransfer() { transferAuthz := authz.(*transfertypes.TransferAuthorization) s.Require().Equal(transferAuthz.Allocations[0].SpendLimit, atomCoins) - balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount, math.NewInt(4e18)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) }, 200000, false, @@ -332,7 +332,7 @@ func (s *PrecompileTestSuite) TestTransfer() { return []interface{}{ path.EndpointA.ChannelConfig.PortID, path.EndpointA.ChannelID, - utils.BaseDenom, + testutil.ExampleAttoDenom, big.NewInt(1e18), common.BytesToAddress(sender.Bytes()), receiver.String(), @@ -347,9 +347,9 @@ func (s *PrecompileTestSuite) TestTransfer() { transferAuthz := authz.(*transfertypes.TransferAuthorization) s.Require().Equal(transferAuthz.Allocations[0].SpendLimit, atomCoins) - balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), utils.BaseDenom) + balance := s.app.BankKeeper.GetBalance(s.ctx, s.chainA.SenderAccount.GetAddress(), testutil.ExampleAttoDenom) s.Require().Equal(balance.Amount, math.NewInt(4e18)) - s.Require().Equal(balance.Denom, utils.BaseDenom) + s.Require().Equal(balance.Denom, testutil.ExampleAttoDenom) }, 200000, false, diff --git a/precompiles/ics20/types.go b/precompiles/ics20/types.go index 169065f1..e7a6e792 100644 --- a/precompiles/ics20/types.go +++ b/precompiles/ics20/types.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/authz" authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" errorsmod "cosmossdk.io/errors" "cosmossdk.io/math" @@ -20,8 +20,8 @@ import ( clienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" ) const ( diff --git a/precompiles/ics20/utils_test.go b/precompiles/ics20/utils_test.go index 636b2ca2..d0910de2 100644 --- a/precompiles/ics20/utils_test.go +++ b/precompiles/ics20/utils_test.go @@ -29,24 +29,24 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - evmosapp "github.com/evmos/evmos/v19/app" - evmoscontracts "github.com/evmos/evmos/v19/contracts" - evmosibc "github.com/evmos/evmos/v19/ibc/testing" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/erc20" - "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - evmosutil "github.com/evmos/evmos/v19/testutil" - evmosutiltx "github.com/evmos/evmos/v19/testutil/tx" - evmostypes "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - feemarkettypes "github.com/evmos/evmos/v19/x/feemarket/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" + evmosapp "github.com/evmos/os/app" + evmoscontracts "github.com/evmos/os/contracts" + evmosibc "github.com/evmos/os/ibc/testing" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/erc20" + "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/precompiles/testutil/contracts" + evmosutil "github.com/evmos/os/testutil" + evmosutiltx "github.com/evmos/os/testutil/tx" + evmostypes "github.com/evmos/os/types" + "github.com/evmos/os/utils" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" + feemarkettypes "github.com/evmos/os/x/feemarket/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/gomega" @@ -59,14 +59,14 @@ type erc20Meta struct { } var ( - maxUint256Coins = sdk.Coins{sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewIntFromBigInt(abi.MaxUint256)}} - maxUint256CmnCoins = []cmn.Coin{{Denom: utils.BaseDenom, Amount: abi.MaxUint256}} - defaultCoins = sdk.Coins{sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewInt(1e18)}} - baseDenomCmnCoin = cmn.Coin{Denom: utils.BaseDenom, Amount: big.NewInt(1e18)} + maxUint256Coins = sdk.Coins{sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewIntFromBigInt(abi.MaxUint256)}} + maxUint256CmnCoins = []cmn.Coin{{Denom: testutil.ExampleAttoDenom, Amount: abi.MaxUint256}} + defaultCoins = sdk.Coins{sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewInt(1e18)}} + baseDenomCmnCoin = cmn.Coin{Denom: testutil.ExampleAttoDenom, Amount: big.NewInt(1e18)} defaultCmnCoins = []cmn.Coin{baseDenomCmnCoin} atomCoins = sdk.Coins{sdk.Coin{Denom: "uatom", Amount: math.NewInt(1e18)}} atomCmnCoin = cmn.Coin{Denom: "uatom", Amount: big.NewInt(1e18)} - mutliSpendLimit = sdk.Coins{sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewInt(1e18)}, sdk.Coin{Denom: "uatom", Amount: math.NewInt(1e18)}} + mutliSpendLimit = sdk.Coins{sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewInt(1e18)}, sdk.Coin{Denom: "uatom", Amount: math.NewInt(1e18)}} mutliCmnCoins = []cmn.Coin{baseDenomCmnCoin, atomCmnCoin} testERC20 = erc20Meta{ Name: "TestCoin", @@ -119,7 +119,7 @@ func (s *PrecompileTestSuite) SetupWithGenesisValSet(valSet *tmtypes.ValidatorSe // set validators and delegations stakingParams := stakingtypes.DefaultParams() // set bond demon to be aevmos - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom stakingGenesis := stakingtypes.NewGenesisState(stakingParams, validators, delegations) genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) @@ -127,13 +127,13 @@ func (s *PrecompileTestSuite) SetupWithGenesisValSet(valSet *tmtypes.ValidatorSe totalSupply := sdk.NewCoins() for _, b := range balances { // add genesis acc tokens and delegated tokens to total supply - totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(utils.BaseDenom, totalBondAmt))...) + totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(testutil.ExampleAttoDenom, totalBondAmt))...) } // add bonded amount to bonded pool module account balances = append(balances, banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(utils.BaseDenom, totalBondAmt)}, + Coins: sdk.Coins{sdk.NewCoin(testutil.ExampleAttoDenom, totalBondAmt)}, }) // update total supply @@ -236,7 +236,7 @@ func (s *PrecompileTestSuite) NewTestChainWithValSet(coord *ibctesting.Coordinat balance := banktypes.Balance{ Address: baseAcc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, amount)), + Coins: sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, amount)), } s.SetupWithGenesisValSet(s.valSet, []authtypes.GenesisAccount{baseAcc}, balance) @@ -255,7 +255,7 @@ func (s *PrecompileTestSuite) NewTestChainWithValSet(coord *ibctesting.Coordinat // bond denom stakingParams := s.app.StakingKeeper.GetParams(s.ctx) - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom s.bondDenom = stakingParams.BondDenom err := s.app.StakingKeeper.SetParams(s.ctx, stakingParams) s.Require().NoError(err) @@ -395,7 +395,7 @@ func (s *PrecompileTestSuite) setupIBCTest() { s.app = s.chainA.App.(*evmosapp.Evmos) evmParams := s.app.EvmKeeper.GetParams(s.chainA.GetContext()) - evmParams.EvmDenom = utils.BaseDenom + evmParams.EvmDenom = testutil.ExampleAttoDenom err := s.app.EvmKeeper.SetParams(s.chainA.GetContext(), evmParams) s.Require().NoError(err) @@ -414,7 +414,7 @@ func (s *PrecompileTestSuite) setupIBCTest() { // Mint coins locked on the evmos account generated with secp. amt, ok := math.NewIntFromString("1000000000000000000000") s.Require().True(ok) - coinEvmos := sdk.NewCoin(utils.BaseDenom, amt) + coinEvmos := sdk.NewCoin(testutil.ExampleAttoDenom, amt) coins := sdk.NewCoins(coinEvmos) err = s.app.BankKeeper.MintCoins(s.chainA.GetContext(), inflationtypes.ModuleName, coins) s.Require().NoError(err) diff --git a/precompiles/p256/integration_test.go b/precompiles/p256/integration_test.go index 24019c75..b7573e18 100644 --- a/precompiles/p256/integration_test.go +++ b/precompiles/p256/integration_test.go @@ -15,13 +15,13 @@ import ( //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/gomega" - "github.com/evmos/evmos/v19/precompiles/p256" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - "github.com/evmos/evmos/v19/testutil/integration/evmos/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/precompiles/p256" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" + "github.com/evmos/os/testutil/integration/evmos/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) type IntegrationTestSuite struct { diff --git a/precompiles/p256/p256.go b/precompiles/p256/p256.go index 0b855573..d6356882 100644 --- a/precompiles/p256/p256.go +++ b/precompiles/p256/p256.go @@ -20,9 +20,9 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/crypto/secp256r1" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/crypto/secp256r1" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" ) var _ vm.PrecompiledContract = &Precompile{} diff --git a/precompiles/p256/p256_test.go b/precompiles/p256/p256_test.go index c03fd518..f04c0022 100644 --- a/precompiles/p256/p256_test.go +++ b/precompiles/p256/p256_test.go @@ -9,9 +9,9 @@ import ( "github.com/cometbft/cometbft/crypto" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/p256" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/precompiles/p256" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" ) var trueValue = common.LeftPadBytes(common.Big1.Bytes(), 32) diff --git a/precompiles/p256/setup_test.go b/precompiles/p256/setup_test.go index 3cc4f021..e03f063f 100644 --- a/precompiles/p256/setup_test.go +++ b/precompiles/p256/setup_test.go @@ -15,7 +15,7 @@ import ( . "github.com/onsi/gomega" "github.com/cometbft/cometbft/crypto" - "github.com/evmos/evmos/v19/precompiles/p256" + "github.com/evmos/os/precompiles/p256" "github.com/stretchr/testify/suite" "golang.org/x/crypto/cryptobyte" "golang.org/x/crypto/cryptobyte/asn1" diff --git a/precompiles/staking/approve.go b/precompiles/staking/approve.go index 618d514a..0b728a6e 100644 --- a/precompiles/staking/approve.go +++ b/precompiles/staking/approve.go @@ -14,9 +14,9 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) var ( diff --git a/precompiles/staking/approve_test.go b/precompiles/staking/approve_test.go index 08cfc9aa..267fd3bf 100644 --- a/precompiles/staking/approve_test.go +++ b/precompiles/staking/approve_test.go @@ -7,17 +7,17 @@ import ( "cosmossdk.io/math" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - evmosutiltx "github.com/evmos/evmos/v19/testutil/tx" + evmosutiltx "github.com/evmos/os/testutil/tx" sdk "github.com/cosmos/cosmos-sdk/types" sdkauthz "github.com/cosmos/cosmos-sdk/x/authz" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/precompiles/testutil" - evmosutil "github.com/evmos/evmos/v19/testutil" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/precompiles/testutil" + evmosutil "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestApprove() { diff --git a/precompiles/staking/events.go b/precompiles/staking/events.go index f1c3dfba..69cc111f 100644 --- a/precompiles/staking/events.go +++ b/precompiles/staking/events.go @@ -8,15 +8,15 @@ import ( "math/big" "reflect" - "github.com/evmos/evmos/v19/precompiles/authorization" + "github.com/evmos/os/precompiles/authorization" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/staking/events_test.go b/precompiles/staking/events_test.go index 1da1e789..51808a26 100644 --- a/precompiles/staking/events_test.go +++ b/precompiles/staking/events_test.go @@ -9,10 +9,10 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestApprovalEvent() { diff --git a/precompiles/staking/integration_test.go b/precompiles/staking/integration_test.go index 809921fd..f2ef03e0 100644 --- a/precompiles/staking/integration_test.go +++ b/precompiles/staking/integration_test.go @@ -19,21 +19,20 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - compiledcontracts "github.com/evmos/evmos/v19/contracts" - "github.com/evmos/evmos/v19/crypto/ethsecp256k1" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/distribution" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/precompiles/staking/testdata" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - evmosutil "github.com/evmos/evmos/v19/testutil" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - vestingtypes "github.com/evmos/evmos/v19/x/vesting/types" + compiledcontracts "github.com/evmos/os/contracts" + "github.com/evmos/os/crypto/ethsecp256k1" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/distribution" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/precompiles/staking/testdata" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/precompiles/testutil/contracts" + evmosutil "github.com/evmos/os/testutil" + testutiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" + vestingtypes "github.com/evmos/os/x/vesting/types" ) // General variables used for integration tests @@ -1695,10 +1694,10 @@ var _ = Describe("Calling staking precompile via Solidity", func() { // send some funds to the StakingCallerTwo & StakingReverter contracts to transfer to the // delegator during the tx - err = evmosutil.FundAccount(s.ctx, s.app.BankKeeper, contractTwoAddr.Bytes(), sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, testContractInitialBalance))) + err = evmosutil.FundAccount(s.ctx, s.app.BankKeeper, contractTwoAddr.Bytes(), sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, testContractInitialBalance))) Expect(err).To(BeNil(), "error while funding the smart contract: %v", err) - err = evmosutil.FundAccount(s.ctx, s.app.BankKeeper, stkReverterAddr.Bytes(), sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, testContractInitialBalance))) + err = evmosutil.FundAccount(s.ctx, s.app.BankKeeper, stkReverterAddr.Bytes(), sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, testContractInitialBalance))) Expect(err).To(BeNil(), "error while funding the smart contract: %v", err) valAddr = s.validators[0].GetOperator() @@ -3193,7 +3192,7 @@ var _ = Describe("Calling staking precompile via Solidity", func() { err = s.precompile.UnpackIntoInterface(&delOut, staking.DelegationMethod, ethRes.Ret) Expect(err).To(BeNil(), "error while unpacking the delegation output: %v", err) Expect(delOut.Balance.Amount.Int64()).To(Equal(int64(0)), "expected a different delegation balance") - Expect(delOut.Balance.Denom).To(Equal(utils.BaseDenom), "expected a different delegation balance") + Expect(delOut.Balance.Denom).To(Equal(testutil.ExampleAttoDenom), "expected a different delegation balance") }) It("which exists should return the delegation", func() { @@ -3208,7 +3207,7 @@ var _ = Describe("Calling staking precompile via Solidity", func() { err = s.precompile.UnpackIntoInterface(&delOut, staking.DelegationMethod, ethRes.Ret) Expect(err).To(BeNil(), "error while unpacking the delegation output: %v", err) Expect(delOut.Balance).To(Equal( - cmn.Coin{Denom: utils.BaseDenom, Amount: big.NewInt(1e18)}), + cmn.Coin{Denom: testutil.ExampleAttoDenom, Amount: big.NewInt(1e18)}), "expected a different delegation balance", ) }) diff --git a/precompiles/staking/query.go b/precompiles/staking/query.go index 2ad3808b..88b40f64 100644 --- a/precompiles/staking/query.go +++ b/precompiles/staking/query.go @@ -12,9 +12,9 @@ import ( stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/precompiles/staking/query_test.go b/precompiles/staking/query_test.go index 782bf14b..157b6215 100644 --- a/precompiles/staking/query_test.go +++ b/precompiles/staking/query_test.go @@ -9,11 +9,11 @@ import ( "github.com/cosmos/cosmos-sdk/types/query" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/staking" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/staking" + testutiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestDelegation() { diff --git a/precompiles/staking/setup_test.go b/precompiles/staking/setup_test.go index 373108ab..3a72bd9e 100644 --- a/precompiles/staking/setup_test.go +++ b/precompiles/staking/setup_test.go @@ -9,10 +9,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmosapp "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmosapp "github.com/evmos/os/app" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" //nolint:revive // dot imports are fine for Ginkgo . "github.com/onsi/ginkgo/v2" diff --git a/precompiles/staking/staking.go b/precompiles/staking/staking.go index 5bcc42b2..047db805 100644 --- a/precompiles/staking/staking.go +++ b/precompiles/staking/staking.go @@ -13,11 +13,11 @@ import ( authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - stakingkeeper "github.com/evmos/evmos/v19/x/staking/keeper" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" + stakingkeeper "github.com/evmos/os/x/staking/keeper" ) var _ vm.PrecompiledContract = &Precompile{} diff --git a/precompiles/staking/staking_test.go b/precompiles/staking/staking_test.go index 4a90d290..b8e1b8aa 100644 --- a/precompiles/staking/staking_test.go +++ b/precompiles/staking/staking_test.go @@ -8,15 +8,15 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/core/vm" sdk "github.com/cosmos/cosmos-sdk/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/precompiles/authorization" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/app" + "github.com/evmos/os/precompiles/authorization" + "github.com/evmos/os/precompiles/staking" + evmtypes "github.com/evmos/os/x/evm/types" ) func (s *PrecompileTestSuite) TestIsTransaction() { @@ -243,7 +243,7 @@ func (s *PrecompileTestSuite) TestRun() { // Needs to be called after setting unbonding delegation // In order to mimic the coins being added to the unboding pool - coin := sdk.NewCoin(utils.BaseDenom, math.NewInt(1000)) + coin := sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1000)) err = s.app.BankKeeper.SendCoinsFromModuleToModule(s.ctx, stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, sdk.Coins{coin}) s.Require().NoError(err, "failed to send coins from module to module") @@ -359,7 +359,7 @@ func (s *PrecompileTestSuite) TestRun() { // Needs to be called after setting unbonding delegation // In order to mimic the coins being added to the unboding pool - coin := sdk.NewCoin(utils.BaseDenom, math.NewInt(1000)) + coin := sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1000)) err := s.app.BankKeeper.SendCoinsFromModuleToModule(s.ctx, stakingtypes.BondedPoolName, stakingtypes.NotBondedPoolName, sdk.Coins{coin}) s.Require().NoError(err, "failed to send coins from module to module") diff --git a/precompiles/staking/testdata/staking_caller.go b/precompiles/staking/testdata/staking_caller.go index 615015d5..cc131377 100644 --- a/precompiles/staking/testdata/staking_caller.go +++ b/precompiles/staking/testdata/staking_caller.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadStakingCallerContract() (evmtypes.CompiledContract, error) { diff --git a/precompiles/staking/testdata/staking_caller_two.go b/precompiles/staking/testdata/staking_caller_two.go index 8aee45a9..042979aa 100644 --- a/precompiles/staking/testdata/staking_caller_two.go +++ b/precompiles/staking/testdata/staking_caller_two.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadStakingCallerTwoContract() (evmtypes.CompiledContract, error) { diff --git a/precompiles/staking/tx.go b/precompiles/staking/tx.go index dc13d4fd..bdc877ea 100644 --- a/precompiles/staking/tx.go +++ b/precompiles/staking/tx.go @@ -11,11 +11,11 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/x/evm/core/vm" - stakingkeeper "github.com/evmos/evmos/v19/x/staking/keeper" + stakingkeeper "github.com/evmos/os/x/staking/keeper" ) const ( diff --git a/precompiles/staking/tx_test.go b/precompiles/staking/tx_test.go index fa157f4c..c3643082 100644 --- a/precompiles/staking/tx_test.go +++ b/precompiles/staking/tx_test.go @@ -10,12 +10,12 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" geth "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/cmd/config" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/precompiles/testutil" - evmosutiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/cmd/config" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/precompiles/testutil" + evmosutiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/core/vm" ) func (s *PrecompileTestSuite) TestCreateValidator() { @@ -812,7 +812,7 @@ func (s *PrecompileTestSuite) TestDelegate() { // { // "success - delegate and update the authorization for the delegator", // func(operatorAddress string) []interface{} { - // err := s.CreateAuthorization(s.address, staking.DelegateAuthz, &sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewInt(2e18)}) + // err := s.CreateAuthorization(s.address, staking.DelegateAuthz, &sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewInt(2e18)}) // s.Require().NoError(err) // return []interface{}{ // s.address, @@ -834,7 +834,7 @@ func (s *PrecompileTestSuite) TestDelegate() { // { // "success - delegate and delete the authorization for the delegator", // func(operatorAddress string) []interface{} { - // err := s.CreateAuthorization(s.address, staking.DelegateAuthz, &sdk.Coin{Denom: utils.BaseDenom, Amount: math.NewInt(1e18)}) + // err := s.CreateAuthorization(s.address, staking.DelegateAuthz, &sdk.Coin{Denom: testutil.ExampleAttoDenom, Amount: math.NewInt(1e18)}) // s.Require().NoError(err) // return []interface{}{ // s.address, diff --git a/precompiles/staking/types.go b/precompiles/staking/types.go index 22ebf728..fe775c26 100644 --- a/precompiles/staking/types.go +++ b/precompiles/staking/types.go @@ -19,7 +19,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" - cmn "github.com/evmos/evmos/v19/precompiles/common" + cmn "github.com/evmos/os/precompiles/common" ) const ( diff --git a/precompiles/staking/utils_test.go b/precompiles/staking/utils_test.go index df169c1f..fe54f716 100644 --- a/precompiles/staking/utils_test.go +++ b/precompiles/staking/utils_test.go @@ -29,26 +29,25 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - evmosapp "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/crypto/ethsecp256k1" - "github.com/evmos/evmos/v19/precompiles/authorization" - cmn "github.com/evmos/evmos/v19/precompiles/common" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/precompiles/testutil" - "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - evmosutil "github.com/evmos/evmos/v19/testutil" - testutiltx "github.com/evmos/evmos/v19/testutil/tx" - evmostypes "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - inflationtypes "github.com/evmos/evmos/v19/x/inflation/v1/types" - stakingkeeper "github.com/evmos/evmos/v19/x/staking/keeper" - vestingtypes "github.com/evmos/evmos/v19/x/vesting/types" + evmosapp "github.com/evmos/os/app" + "github.com/evmos/os/crypto/ethsecp256k1" + "github.com/evmos/os/precompiles/authorization" + cmn "github.com/evmos/os/precompiles/common" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/precompiles/testutil" + "github.com/evmos/os/precompiles/testutil/contracts" + evmosutil "github.com/evmos/os/testutil" + testutiltx "github.com/evmos/os/testutil/tx" + evmostypes "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" + inflationtypes "github.com/evmos/os/x/inflation/v1/types" + stakingkeeper "github.com/evmos/os/x/staking/keeper" + vestingtypes "github.com/evmos/os/x/vesting/types" ) // stipend to pay EVM tx fees -var accountGasCoverage = sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(1e16))) +var accountGasCoverage = sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(1e16))) // SetupWithGenesisValSet initializes a new EvmosApp with a validator set and genesis accounts // that also act as delegators. For simplicity, each validator is bonded with a delegation @@ -94,7 +93,7 @@ func (s *PrecompileTestSuite) SetupWithGenesisValSet(valSet *tmtypes.ValidatorSe // set validators and delegations stakingParams := stakingtypes.DefaultParams() // set bond demon to be aevmos - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom stakingGenesis := stakingtypes.NewGenesisState(stakingParams, validators, delegations) genesisState[stakingtypes.ModuleName] = app.AppCodec().MustMarshalJSON(stakingGenesis) @@ -105,13 +104,13 @@ func (s *PrecompileTestSuite) SetupWithGenesisValSet(valSet *tmtypes.ValidatorSe totalSupply := sdk.NewCoins() for _, b := range balances { // add genesis acc tokens and delegated tokens to total supply - totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(utils.BaseDenom, totalBondAmt))...) + totalSupply = totalSupply.Add(b.Coins.Add(sdk.NewCoin(testutil.ExampleAttoDenom, totalBondAmt))...) } // add bonded amount to bonded pool module account balances = append(balances, banktypes.Balance{ Address: authtypes.NewModuleAddress(stakingtypes.BondedPoolName).String(), - Coins: sdk.Coins{sdk.NewCoin(utils.BaseDenom, totalBondAmt)}, + Coins: sdk.Coins{sdk.NewCoin(testutil.ExampleAttoDenom, totalBondAmt)}, }) // update total supply @@ -178,7 +177,7 @@ func (s *PrecompileTestSuite) DoSetupTest() { balance := banktypes.Balance{ Address: baseAcc.GetAddress().String(), - Coins: sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, amount)), + Coins: sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, amount)), } s.SetupWithGenesisValSet(valSet, []authtypes.GenesisAccount{baseAcc}, balance) @@ -188,7 +187,7 @@ func (s *PrecompileTestSuite) DoSetupTest() { // bond denom stakingParams := s.app.StakingKeeper.GetParams(s.ctx) - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom s.bondDenom = stakingParams.BondDenom err := s.app.StakingKeeper.SetParams(s.ctx, stakingParams) s.Require().NoError(err) @@ -199,8 +198,8 @@ func (s *PrecompileTestSuite) DoSetupTest() { s.Require().NoError(err) s.precompile = precompile - coins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(5000000000000000000))) - distrCoins := sdk.NewCoins(sdk.NewCoin(utils.BaseDenom, math.NewInt(2000000000000000000))) + coins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(5000000000000000000))) + distrCoins := sdk.NewCoins(sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(2000000000000000000))) err = s.app.BankKeeper.MintCoins(s.ctx, inflationtypes.ModuleName, coins) s.Require().NoError(err) err = s.app.BankKeeper.SendCoinsFromModuleToModule(s.ctx, inflationtypes.ModuleName, authtypes.FeeCollectorName, distrCoins) diff --git a/precompiles/testutil/fund.go b/precompiles/testutil/fund.go index 590025ce..57343fca 100644 --- a/precompiles/testutil/fund.go +++ b/precompiles/testutil/fund.go @@ -7,7 +7,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" - "github.com/evmos/os/utils" + "github.com/evmos/os/testutil" inflationtypes "github.com/evmos/os/x/inflation/v1/types" ) @@ -26,7 +26,7 @@ func FundAccount(ctx sdk.Context, bankKeeper bankkeeper.Keeper, addr sdk.AccAddr // to fund an account with the default Evmos denomination. func FundAccountWithBaseDenom(ctx sdk.Context, bankKeeper bankkeeper.Keeper, addr sdk.AccAddress, amount int64) error { coins := sdk.NewCoins( - sdk.NewCoin(utils.BaseDenom, math.NewInt(amount)), + sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(amount)), ) return FundAccount(ctx, bankKeeper, addr, coins) } diff --git a/rpc/backend/account_info.go b/rpc/backend/account_info.go index d9a8ebcb..bb5cc888 100644 --- a/rpc/backend/account_info.go +++ b/rpc/backend/account_info.go @@ -15,8 +15,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/pkg/errors" ) diff --git a/rpc/backend/account_info_test.go b/rpc/backend/account_info_test.go index 22091d34..2c5e899e 100644 --- a/rpc/backend/account_info_test.go +++ b/rpc/backend/account_info_test.go @@ -11,10 +11,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "google.golang.org/grpc/metadata" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" rpctypes "github.com/evmos/os/rpc/types" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *BackendTestSuite) TestGetCode() { diff --git a/rpc/backend/backend.go b/rpc/backend/backend.go index 93a42a11..598b376b 100644 --- a/rpc/backend/backend.go +++ b/rpc/backend/backend.go @@ -20,10 +20,10 @@ import ( "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/server/config" evmostypes "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // BackendI implements the Cosmos and EVM backend. diff --git a/rpc/backend/backend_suite_test.go b/rpc/backend/backend_suite_test.go index 3d06e1a1..cb98a2f1 100644 --- a/rpc/backend/backend_suite_test.go +++ b/rpc/backend/backend_suite_test.go @@ -16,7 +16,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/hd" "github.com/evmos/os/encoding" app "github.com/evmos/os/example_chain" @@ -25,6 +24,7 @@ import ( rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/testutil" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/suite" ) diff --git a/rpc/backend/blocks.go b/rpc/backend/blocks.go index 6d554f69..cf262ffb 100644 --- a/rpc/backend/blocks.go +++ b/rpc/backend/blocks.go @@ -16,8 +16,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/trie" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/pkg/errors" "google.golang.org/grpc" "google.golang.org/grpc/metadata" diff --git a/rpc/backend/blocks_test.go b/rpc/backend/blocks_test.go index 82e60da0..fc8fbe91 100644 --- a/rpc/backend/blocks_test.go +++ b/rpc/backend/blocks_test.go @@ -16,10 +16,10 @@ import ( "github.com/ethereum/go-ethereum/trie" "google.golang.org/grpc/metadata" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" ethrpc "github.com/evmos/os/rpc/types" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *BackendTestSuite) TestBlockNumber() { diff --git a/rpc/backend/call_tx.go b/rpc/backend/call_tx.go index b9b2739a..294eb345 100644 --- a/rpc/backend/call_tx.go +++ b/rpc/backend/call_tx.go @@ -15,10 +15,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/core/vm" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/pkg/errors" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" diff --git a/rpc/backend/call_tx_test.go b/rpc/backend/call_tx_test.go index f872da05..31268900 100644 --- a/rpc/backend/call_tx_test.go +++ b/rpc/backend/call_tx_test.go @@ -10,10 +10,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/rlp" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" rpctypes "github.com/evmos/os/rpc/types" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" "google.golang.org/grpc/metadata" ) diff --git a/rpc/backend/chain_info.go b/rpc/backend/chain_info.go index 8b238f0e..ad7eb827 100644 --- a/rpc/backend/chain_info.go +++ b/rpc/backend/chain_info.go @@ -15,9 +15,9 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rpc" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" "github.com/pkg/errors" ) diff --git a/rpc/backend/chain_info_test.go b/rpc/backend/chain_info_test.go index 00cd02fd..874100cb 100644 --- a/rpc/backend/chain_info_test.go +++ b/rpc/backend/chain_info_test.go @@ -15,10 +15,10 @@ import ( "github.com/cometbft/cometbft/abci/types" tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" rpc "github.com/evmos/os/rpc/types" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" ) diff --git a/rpc/backend/client_test.go b/rpc/backend/client_test.go index 8b73ba29..af7ec8bf 100644 --- a/rpc/backend/client_test.go +++ b/rpc/backend/client_test.go @@ -15,9 +15,9 @@ import ( "github.com/cometbft/cometbft/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" rpc "github.com/evmos/os/rpc/types" + evmtypes "github.com/evmos/os/x/evm/types" mock "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/rpc/backend/evm_query_client_test.go b/rpc/backend/evm_query_client_test.go index b476dd0b..3d96fab9 100644 --- a/rpc/backend/evm_query_client_test.go +++ b/rpc/backend/evm_query_client_test.go @@ -13,10 +13,10 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" grpctypes "github.com/cosmos/cosmos-sdk/types/grpc" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" rpc "github.com/evmos/os/rpc/types" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" mock "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "google.golang.org/grpc" diff --git a/rpc/backend/filters_test.go b/rpc/backend/filters_test.go index 45c1f786..b853ab53 100644 --- a/rpc/backend/filters_test.go +++ b/rpc/backend/filters_test.go @@ -6,9 +6,9 @@ import ( tmtypes "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend/mocks" ethrpc "github.com/evmos/os/rpc/types" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *BackendTestSuite) TestGetLogs() { diff --git a/rpc/backend/mocks/evm_query_client.go b/rpc/backend/mocks/evm_query_client.go index 16da392c..3dc07c8c 100644 --- a/rpc/backend/mocks/evm_query_client.go +++ b/rpc/backend/mocks/evm_query_client.go @@ -9,7 +9,7 @@ import ( mock "github.com/stretchr/testify/mock" - types "github.com/evmos/evmos/v19/x/evm/types" + types "github.com/evmos/os/x/evm/types" ) // EVMQueryClient is an autogenerated mock type for the EVMQueryClient type diff --git a/rpc/backend/node_info.go b/rpc/backend/node_info.go index 8fa06cae..5ace48bf 100644 --- a/rpc/backend/node_info.go +++ b/rpc/backend/node_info.go @@ -22,11 +22,11 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/ethsecp256k1" rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/server/config" "github.com/evmos/os/testutil" + evmtypes "github.com/evmos/os/x/evm/types" ) // Accounts returns the list of accounts available to this node. diff --git a/rpc/backend/sign_tx.go b/rpc/backend/sign_tx.go index 6d6b7d74..6c34fb6c 100644 --- a/rpc/backend/sign_tx.go +++ b/rpc/backend/sign_tx.go @@ -17,7 +17,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/signer/core/apitypes" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // SendTransaction sends transaction based on received args using Node's key to sign it diff --git a/rpc/backend/sign_tx_test.go b/rpc/backend/sign_tx_test.go index de4d464a..e5d2517e 100644 --- a/rpc/backend/sign_tx_test.go +++ b/rpc/backend/sign_tx_test.go @@ -11,10 +11,10 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" goethcrypto "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/signer/core/apitypes" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/ethsecp256k1" "github.com/evmos/os/rpc/backend/mocks" utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" "google.golang.org/grpc/metadata" ) diff --git a/rpc/backend/tracing.go b/rpc/backend/tracing.go index c42c1ae1..bab54cdc 100644 --- a/rpc/backend/tracing.go +++ b/rpc/backend/tracing.go @@ -11,8 +11,8 @@ import ( tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/pkg/errors" ) diff --git a/rpc/backend/tracing_test.go b/rpc/backend/tracing_test.go index 25679e1d..dc4b078b 100644 --- a/rpc/backend/tracing_test.go +++ b/rpc/backend/tracing_test.go @@ -11,10 +11,10 @@ import ( "github.com/cosmos/cosmos-sdk/crypto" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/crypto/ethsecp256k1" "github.com/evmos/os/indexer" "github.com/evmos/os/rpc/backend/mocks" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *BackendTestSuite) TestTraceTransaction() { diff --git a/rpc/backend/tx_info.go b/rpc/backend/tx_info.go index 6e66607d..1a12c5ab 100644 --- a/rpc/backend/tx_info.go +++ b/rpc/backend/tx_info.go @@ -16,9 +16,9 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/pkg/errors" ) diff --git a/rpc/backend/tx_info_test.go b/rpc/backend/tx_info_test.go index a4cea39e..5b495dd9 100644 --- a/rpc/backend/tx_info_test.go +++ b/rpc/backend/tx_info_test.go @@ -12,11 +12,11 @@ import ( "github.com/cometbft/cometbft/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/indexer" "github.com/evmos/os/rpc/backend/mocks" rpctypes "github.com/evmos/os/rpc/types" evmostypes "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" "google.golang.org/grpc/metadata" ) diff --git a/rpc/backend/utils.go b/rpc/backend/utils.go index 16844fb3..84ef14c6 100644 --- a/rpc/backend/utils.go +++ b/rpc/backend/utils.go @@ -24,8 +24,8 @@ import ( tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" "github.com/cometbft/cometbft/proto/tendermint/crypto" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/types" + evmtypes "github.com/evmos/os/x/evm/types" ) type txGasAndReward struct { diff --git a/rpc/namespaces/ethereum/debug/api.go b/rpc/namespaces/ethereum/debug/api.go index 0c591f67..d08a628b 100644 --- a/rpc/namespaces/ethereum/debug/api.go +++ b/rpc/namespaces/ethereum/debug/api.go @@ -16,7 +16,7 @@ import ( "github.com/davecgh/go-spew/spew" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" stderrors "github.com/pkg/errors" diff --git a/rpc/namespaces/ethereum/eth/api.go b/rpc/namespaces/ethereum/eth/api.go index 7cf9449d..8c30d694 100644 --- a/rpc/namespaces/ethereum/eth/api.go +++ b/rpc/namespaces/ethereum/eth/api.go @@ -13,10 +13,10 @@ import ( "github.com/ethereum/go-ethereum/rpc" "github.com/ethereum/go-ethereum/signer/core/apitypes" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/backend" rpctypes "github.com/evmos/os/rpc/types" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // The Ethereum API allows applications to connect to an node of any evmOS based blockchain. diff --git a/rpc/namespaces/ethereum/eth/filters/api.go b/rpc/namespaces/ethereum/eth/filters/api.go index 9493bde2..cbd7f4cc 100644 --- a/rpc/namespaces/ethereum/eth/filters/api.go +++ b/rpc/namespaces/ethereum/eth/filters/api.go @@ -22,7 +22,7 @@ import ( "github.com/ethereum/go-ethereum/eth/filters" "github.com/ethereum/go-ethereum/rpc" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // FilterAPI gathers diff --git a/rpc/namespaces/ethereum/eth/filters/filter_system.go b/rpc/namespaces/ethereum/eth/filters/filter_system.go index 5f03e9ae..f3ed1a6f 100644 --- a/rpc/namespaces/ethereum/eth/filters/filter_system.go +++ b/rpc/namespaces/ethereum/eth/filters/filter_system.go @@ -24,8 +24,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/ethereum/pubsub" + evmtypes "github.com/evmos/os/x/evm/types" ) var ( diff --git a/rpc/namespaces/ethereum/personal/api.go b/rpc/namespaces/ethereum/personal/api.go index d9aafe0e..e739f0cb 100644 --- a/rpc/namespaces/ethereum/personal/api.go +++ b/rpc/namespaces/ethereum/personal/api.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // PrivateAccountAPI is the personal_ prefixed set of APIs in the Web3 JSON-RPC spec. diff --git a/rpc/types/events.go b/rpc/types/events.go index 55eb3faa..447d0226 100644 --- a/rpc/types/events.go +++ b/rpc/types/events.go @@ -10,8 +10,8 @@ import ( tmrpctypes "github.com/cometbft/cometbft/rpc/core/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/types" + evmtypes "github.com/evmos/os/x/evm/types" ) // EventFormat is the format version of the events. diff --git a/rpc/types/events_test.go b/rpc/types/events_test.go index d1ed6a7c..87cb349d 100644 --- a/rpc/types/events_test.go +++ b/rpc/types/events_test.go @@ -6,7 +6,7 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/ethereum/go-ethereum/common" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/rpc/types/query_client.go b/rpc/types/query_client.go index 91ab9a56..1ee8c44b 100644 --- a/rpc/types/query_client.go +++ b/rpc/types/query_client.go @@ -12,7 +12,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" ) diff --git a/rpc/types/utils.go b/rpc/types/utils.go index b749d0be..92dff873 100644 --- a/rpc/types/utils.go +++ b/rpc/types/utils.go @@ -16,7 +16,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" errortypes "github.com/cosmos/cosmos-sdk/types/errors" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" "github.com/ethereum/go-ethereum/common" diff --git a/rpc/websockets.go b/rpc/websockets.go index 52c9997d..4ef21e40 100644 --- a/rpc/websockets.go +++ b/rpc/websockets.go @@ -29,11 +29,11 @@ import ( rpcclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" tmtypes "github.com/cometbft/cometbft/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" "github.com/evmos/os/rpc/ethereum/pubsub" rpcfilters "github.com/evmos/os/rpc/namespaces/ethereum/eth/filters" "github.com/evmos/os/rpc/types" "github.com/evmos/os/server/config" + evmtypes "github.com/evmos/os/x/evm/types" ) type WebsocketsServer interface { diff --git a/testutil/constants.go b/testutil/constants.go index 49a05e76..360be3c9 100644 --- a/testutil/constants.go +++ b/testutil/constants.go @@ -3,6 +3,12 @@ package testutil +import ( + "math/big" + + "cosmossdk.io/math" +) + const ( // ExampleDenom provides an example denom for use in tests ExampleAttoDenom = "aevmos" @@ -16,3 +22,11 @@ const ( // DefaultGasPrice is used in testing as the default to use for transactions DefaultGasPrice = 20 ) + +var ( + // AttoPowerReduction defines the power reduction for att units (1e18) + AttoPowerReduction = math.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(18), nil)) + + // MicroPowerReduction defines the power reduction for micro units (1e6) + MicroPowerReduction = math.NewIntFromBigInt(new(big.Int).Exp(big.NewInt(10), big.NewInt(6), nil)) +) diff --git a/testutil/integration/os/network/config.go b/testutil/integration/os/network/config.go index 666543c6..9813dafb 100644 --- a/testutil/integration/os/network/config.go +++ b/testutil/integration/os/network/config.go @@ -9,6 +9,7 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/evmos/os/testutil" testtx "github.com/evmos/os/testutil/tx" evmostypes "github.com/evmos/os/types" "github.com/evmos/os/utils" @@ -40,7 +41,7 @@ func DefaultConfig() Config { preFundedAccounts: []sdktypes.AccAddress{account}, // NOTE: Per default, the balances are left empty, and the pre-funded accounts are used. balances: nil, - denom: utils.BaseDenom, + denom: testutil.ExampleAttoDenom, customGenesisState: nil, } } diff --git a/testutil/integration/os/network/config_test.go b/testutil/integration/os/network/config_test.go index 73034038..849d569e 100644 --- a/testutil/integration/os/network/config_test.go +++ b/testutil/integration/os/network/config_test.go @@ -8,17 +8,17 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + "github.com/evmos/os/testutil" grpchandler "github.com/evmos/os/testutil/integration/os/grpc" testkeyring "github.com/evmos/os/testutil/integration/os/keyring" "github.com/evmos/os/testutil/integration/os/network" - "github.com/evmos/os/utils" "github.com/stretchr/testify/require" ) func TestWithBalances(t *testing.T) { - key1Balance := sdk.NewCoins(sdk.NewInt64Coin(utils.BaseDenom, 1e18)) + key1Balance := sdk.NewCoins(sdk.NewInt64Coin(testutil.ExampleAttoDenom, 1e18)) key2Balance := sdk.NewCoins( - sdk.NewInt64Coin(utils.BaseDenom, 2e18), + sdk.NewInt64Coin(testutil.ExampleAttoDenom, 2e18), sdk.NewInt64Coin("other", 3e18), ) diff --git a/testutil/integration/os/network/network.go b/testutil/integration/os/network/network.go index f97e7881..c64d7471 100644 --- a/testutil/integration/os/network/network.go +++ b/testutil/integration/os/network/network.go @@ -9,20 +9,18 @@ import ( "math/big" "time" - banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" - - gethparams "github.com/ethereum/go-ethereum/params" - example_app "github.com/evmos/os/example_chain" - "github.com/evmos/os/types" - abcitypes "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" tmtypes "github.com/cometbft/cometbft/types" sdktypes "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types/v1" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + gethparams "github.com/ethereum/go-ethereum/params" + example_app "github.com/evmos/os/example_chain" commonnetwork "github.com/evmos/os/testutil/integration/common/network" + "github.com/evmos/os/types" erc20types "github.com/evmos/os/x/erc20/types" evmtypes "github.com/evmos/os/x/evm/types" feemarkettypes "github.com/evmos/os/x/feemarket/types" @@ -61,7 +59,7 @@ type IntegrationNetwork struct { cfg Config ctx sdktypes.Context validators []stakingtypes.Validator - app *example_app.Evmos + app *example_app.ExampleChain // This is only needed for IBC chain testing setup valSet *tmtypes.ValidatorSet @@ -242,7 +240,7 @@ func (n *IntegrationNetwork) GetEIP155ChainID() *big.Int { // GetChainConfig returns the network's chain config func (n *IntegrationNetwork) GetEVMChainConfig() *gethparams.ChainConfig { - params := n.app.EvmKeeper.GetParams(n.ctx) + params := n.app.EVMKeeper.GetParams(n.ctx) return params.ChainConfig.EthereumConfig(n.cfg.eip155ChainID) } diff --git a/testutil/integration/os/utils/genesis.go b/testutil/integration/os/utils/genesis.go index 97cfbc0d..311fac54 100644 --- a/testutil/integration/os/utils/genesis.go +++ b/testutil/integration/os/utils/genesis.go @@ -6,9 +6,9 @@ package utils import ( codectypes "github.com/cosmos/cosmos-sdk/codec/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + "github.com/evmos/os/testutil" testkeyring "github.com/evmos/os/testutil/integration/os/keyring" "github.com/evmos/os/testutil/integration/os/network" - "github.com/evmos/os/utils" erc20types "github.com/evmos/os/x/erc20/types" evmtypes "github.com/evmos/os/x/evm/types" ) @@ -54,7 +54,7 @@ func CreateGenesisWithTokenPairs(keyring testkeyring.Keyring) network.CustomGene ContractOwner: erc20types.OWNER_MODULE, // NOTE: Owner is the module account since it's a native token and was registered through governance }, { Erc20Address: WEVMOSContractTestnet, - Denom: utils.BaseDenom, + Denom: testutil.ExampleAttoDenom, Enabled: true, ContractOwner: erc20types.OWNER_MODULE, // NOTE: Owner is the module account since it's a native token and was registered through governance }} diff --git a/testutil/integration/os/utils/unit.go b/testutil/integration/os/utils/unit.go index f404fbc5..5ab71eb8 100644 --- a/testutil/integration/os/utils/unit.go +++ b/testutil/integration/os/utils/unit.go @@ -9,11 +9,11 @@ import ( "fmt" "cosmossdk.io/math" - "github.com/evmos/os/utils" sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" transfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" + "github.com/evmos/os/testutil" "github.com/evmos/os/testutil/integration/os/network" erc20types "github.com/evmos/os/x/erc20/types" inflationtypes "github.com/evmos/os/x/inflation/v1/types" @@ -33,7 +33,7 @@ func RegisterEvmosERC20Coins( ) (erc20types.TokenPair, error) { bondDenom := network.App.StakingKeeper.BondDenom(network.GetContext()) - coin := sdk.NewCoin(utils.BaseDenom, math.NewInt(TokenToMint)) + coin := sdk.NewCoin(testutil.ExampleAttoDenom, math.NewInt(TokenToMint)) err := network.App.BankKeeper.MintCoins( network.GetContext(), inflationtypes.ModuleName, @@ -52,7 +52,7 @@ func RegisterEvmosERC20Coins( return erc20types.TokenPair{}, err } - evmosMetadata, found := network.App.BankKeeper.GetDenomMetaData(network.GetContext(), utils.BaseDenom) + evmosMetadata, found := network.App.BankKeeper.GetDenomMetaData(network.GetContext(), testutil.ExampleAttoDenom) if !found { return erc20types.TokenPair{}, fmt.Errorf("expected evmos denom metadata") } diff --git a/testutil/network/network.go b/testutil/network/network.go index 8a7134a8..cd3cbd23 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -44,7 +44,7 @@ import ( srvconfig "github.com/cosmos/cosmos-sdk/server/config" servertypes "github.com/cosmos/cosmos-sdk/server/types" pruningtypes "github.com/cosmos/cosmos-sdk/store/pruning/types" - "github.com/cosmos/cosmos-sdk/testutil" + cosmostestutil "github.com/cosmos/cosmos-sdk/testutil" simutils "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -53,6 +53,7 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/evmos/os/crypto/hd" example_app "github.com/evmos/os/example_chain" + "github.com/evmos/os/testutil" "github.com/evmos/os/encoding" "github.com/evmos/os/server/config" @@ -113,10 +114,10 @@ func DefaultConfig() Config { ChainID: chainID, NumValidators: 4, BondDenom: "aevmos", - MinGasPrices: fmt.Sprintf("0.000006%s", evmostypes.AttoEvmos), - AccountTokens: sdk.TokensFromConsensusPower(1000000000000000000, evmostypes.PowerReduction), - StakingTokens: sdk.TokensFromConsensusPower(500000000000000000, evmostypes.PowerReduction), - BondedTokens: sdk.TokensFromConsensusPower(100000000000000000, evmostypes.PowerReduction), + MinGasPrices: fmt.Sprintf("0.000006%s", testutil.ExampleAttoDenom), + AccountTokens: sdk.TokensFromConsensusPower(1000000000000000000, testutil.AttoPowerReduction), + StakingTokens: sdk.TokensFromConsensusPower(500000000000000000, testutil.AttoPowerReduction), + BondedTokens: sdk.TokensFromConsensusPower(100000000000000000, testutil.AttoPowerReduction), PruningStrategy: pruningtypes.PruningOptionNothing, CleanupDir: true, SigningAlgo: string(hd.EthSecp256k1Type), @@ -385,7 +386,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { return nil, err } - addr, secret, err := testutil.GenerateSaveCoinKey(kb, nodeDirName, "", true, algo) + addr, secret, err := cosmostestutil.GenerateSaveCoinKey(kb, nodeDirName, "", true, algo) if err != nil { return nil, err } @@ -470,7 +471,7 @@ func New(l Logger, baseDir string, cfg Config) (*Network, error) { return nil, err } - customAppTemplate, _ := config.AppConfig(evmostypes.AttoEvmos) + customAppTemplate, _ := config.AppConfig(cosmostestutil.ExampleAttoDenom) srvconfig.SetConfigTemplate(customAppTemplate) srvconfig.WriteConfigFile(filepath.Join(nodeDir, "config/app.toml"), appCfg) diff --git a/x/evm/ante/ctx_test.go b/x/evm/ante/ctx_test.go index 3ea7d3e3..13a10a7c 100644 --- a/x/evm/ante/ctx_test.go +++ b/x/evm/ante/ctx_test.go @@ -5,8 +5,8 @@ package ante_test import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - evmante "github.com/evmos/evmos/v19/x/evm/ante" + "github.com/evmos/os/testutil/integration/evmos/network" + evmante "github.com/evmos/os/x/evm/ante" ) func (suite *EvmAnteTestSuite) TestBuildEvmExecutionCtx() { diff --git a/x/evm/client/cli/query.go b/x/evm/client/cli/query.go index 2b60d184..90bc2848 100644 --- a/x/evm/client/cli/query.go +++ b/x/evm/client/cli/query.go @@ -3,13 +3,13 @@ package cli import ( - rpctypes "github.com/evmos/evmos/v19/rpc/types" + rpctypes "github.com/evmos/os/rpc/types" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) // GetQueryCmd returns the parent command for all x/bank CLi query commands. diff --git a/x/evm/client/cli/tx.go b/x/evm/client/cli/tx.go index ada021f6..3392ecaa 100644 --- a/x/evm/client/cli/tx.go +++ b/x/evm/client/cli/tx.go @@ -14,8 +14,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - rpctypes "github.com/evmos/evmos/v19/rpc/types" - "github.com/evmos/evmos/v19/x/evm/types" + rpctypes "github.com/evmos/os/rpc/types" + "github.com/evmos/os/x/evm/types" ) // GetTxCmd returns the transaction commands for this module diff --git a/x/evm/config/configurator.go b/x/evm/config/configurator.go index 23e35a26..4083620c 100644 --- a/x/evm/config/configurator.go +++ b/x/evm/config/configurator.go @@ -11,8 +11,8 @@ import ( "golang.org/x/exp/slices" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/types" ) // EVMConfigurator allows to extend x/evm module configurations. The configurator modifies diff --git a/x/evm/config/configurator_test.go b/x/evm/config/configurator_test.go index 18ae698c..deacb0e9 100644 --- a/x/evm/config/configurator_test.go +++ b/x/evm/config/configurator_test.go @@ -6,11 +6,11 @@ package config_test import ( "testing" - "github.com/evmos/evmos/v19/x/evm/config" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/config" + "github.com/evmos/os/x/evm/core/vm" "github.com/stretchr/testify/require" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func TestEVMConfigurator(t *testing.T) { diff --git a/x/evm/core/core/utils.go b/x/evm/core/core/utils.go index 9db7edae..19c640a6 100644 --- a/x/evm/core/core/utils.go +++ b/x/evm/core/core/utils.go @@ -5,7 +5,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // CanTransfer checks whether there are enough funds in the address' account to make a transfer. diff --git a/x/evm/core/logger/access_list_tracer.go b/x/evm/core/logger/access_list_tracer.go index b0d34620..69b329d9 100644 --- a/x/evm/core/logger/access_list_tracer.go +++ b/x/evm/core/logger/access_list_tracer.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // accessList is an accumulator for the set of accounts and storage slots an EVM diff --git a/x/evm/core/logger/logger.go b/x/evm/core/logger/logger.go index bcd1c2a4..1a9d8a06 100644 --- a/x/evm/core/logger/logger.go +++ b/x/evm/core/logger/logger.go @@ -15,7 +15,7 @@ import ( "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" "github.com/holiman/uint256" ) diff --git a/x/evm/core/logger/logger_json.go b/x/evm/core/logger/logger_json.go index 6b2c96ab..9fa84163 100644 --- a/x/evm/core/logger/logger_json.go +++ b/x/evm/core/logger/logger_json.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) type JSONLogger struct { diff --git a/x/evm/core/tracers/js/goja.go b/x/evm/core/tracers/js/goja.go index 9f97605c..8885f375 100644 --- a/x/evm/core/tracers/js/goja.go +++ b/x/evm/core/tracers/js/goja.go @@ -28,9 +28,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - jsassets "github.com/evmos/evmos/v19/x/evm/core/tracers/js/internal/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + jsassets "github.com/evmos/os/x/evm/core/tracers/js/internal/tracers" + "github.com/evmos/os/x/evm/core/vm" ) var assetTracers = make(map[string]string) diff --git a/x/evm/core/tracers/js/tracer_test.go b/x/evm/core/tracers/js/tracer_test.go index c769cd64..841a399a 100644 --- a/x/evm/core/tracers/js/tracer_test.go +++ b/x/evm/core/tracers/js/tracer_test.go @@ -27,8 +27,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/vm" ) type account struct{} diff --git a/x/evm/core/tracers/native/4byte.go b/x/evm/core/tracers/native/4byte.go index a9d47852..20fa2591 100644 --- a/x/evm/core/tracers/native/4byte.go +++ b/x/evm/core/tracers/native/4byte.go @@ -24,8 +24,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/vm" ) func init() { diff --git a/x/evm/core/tracers/native/call.go b/x/evm/core/tracers/native/call.go index faccc46b..d8d0fcc9 100644 --- a/x/evm/core/tracers/native/call.go +++ b/x/evm/core/tracers/native/call.go @@ -26,8 +26,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/vm" ) func init() { diff --git a/x/evm/core/tracers/native/noop.go b/x/evm/core/tracers/native/noop.go index 91dfdbed..d2a7796b 100644 --- a/x/evm/core/tracers/native/noop.go +++ b/x/evm/core/tracers/native/noop.go @@ -22,8 +22,8 @@ import ( "time" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/vm" ) func init() { diff --git a/x/evm/core/tracers/native/prestate.go b/x/evm/core/tracers/native/prestate.go index 35a1117e..68cfe9e2 100644 --- a/x/evm/core/tracers/native/prestate.go +++ b/x/evm/core/tracers/native/prestate.go @@ -25,8 +25,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/vm" ) func init() { diff --git a/x/evm/core/tracers/native/revertreason.go b/x/evm/core/tracers/native/revertreason.go index ed2a7ca8..53ee45a7 100644 --- a/x/evm/core/tracers/native/revertreason.go +++ b/x/evm/core/tracers/native/revertreason.go @@ -26,8 +26,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/core/tracers" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/vm" ) func init() { diff --git a/x/evm/core/tracers/native/tracer.go b/x/evm/core/tracers/native/tracer.go index bc16a1f9..8825eea9 100644 --- a/x/evm/core/tracers/native/tracer.go +++ b/x/evm/core/tracers/native/tracer.go @@ -40,7 +40,7 @@ import ( "encoding/json" "errors" - "github.com/evmos/evmos/v19/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/tracers" ) // init registers itself this packages as a lookup for tracers. diff --git a/x/evm/core/tracers/tracers.go b/x/evm/core/tracers/tracers.go index 50785b0f..5b3cdff4 100644 --- a/x/evm/core/tracers/tracers.go +++ b/x/evm/core/tracers/tracers.go @@ -5,7 +5,7 @@ import ( "errors" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // Context contains some contextual infos for a transaction execution that is not diff --git a/x/evm/genesis.go b/x/evm/genesis.go index 54ca4c61..f4ae116c 100644 --- a/x/evm/genesis.go +++ b/x/evm/genesis.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/keeper" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/keeper" + "github.com/evmos/os/x/evm/types" ) // InitGenesis initializes genesis state based on exported genesis diff --git a/x/evm/genesis_test.go b/x/evm/genesis_test.go index f627b800..bd85a4c5 100644 --- a/x/evm/genesis_test.go +++ b/x/evm/genesis_test.go @@ -6,15 +6,15 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/contracts" - "github.com/evmos/evmos/v19/crypto/ethsecp256k1" - testfactory "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - testhandler "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - testnetwork "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - "github.com/evmos/evmos/v19/x/evm" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/contracts" + "github.com/evmos/os/crypto/ethsecp256k1" + testfactory "github.com/evmos/os/testutil/integration/evmos/factory" + testhandler "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + testnetwork "github.com/evmos/os/testutil/integration/evmos/network" + "github.com/evmos/os/x/evm" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/x/evm/keeper/abci_test.go b/x/evm/keeper/abci_test.go index e52cfb16..c8c01eed 100644 --- a/x/evm/keeper/abci_test.go +++ b/x/evm/keeper/abci_test.go @@ -2,7 +2,7 @@ package keeper_test import ( "github.com/cometbft/cometbft/abci/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *KeeperTestSuite) TestEndBlock() { diff --git a/x/evm/keeper/benchmark_test.go b/x/evm/keeper/benchmark_test.go index eeb276de..4ee02165 100644 --- a/x/evm/keeper/benchmark_test.go +++ b/x/evm/keeper/benchmark_test.go @@ -4,7 +4,7 @@ import ( "math/big" "testing" - "github.com/evmos/evmos/v19/x/evm/keeper/testdata" + "github.com/evmos/os/x/evm/keeper/testdata" sdkmath "cosmossdk.io/math" "github.com/stretchr/testify/require" @@ -14,8 +14,8 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmostypes "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/x/evm/types" + evmostypes "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/types" ) func SetupContract(b *testing.B) (*KeeperTestSuite, common.Address) { diff --git a/x/evm/keeper/call_evm.go b/x/evm/keeper/call_evm.go index 24110f7d..5cf46045 100644 --- a/x/evm/keeper/call_evm.go +++ b/x/evm/keeper/call_evm.go @@ -13,8 +13,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/server/config" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/server/config" + "github.com/evmos/os/x/evm/types" ) // CallEVM performs a smart contract method call using given args diff --git a/x/evm/keeper/call_evm_test.go b/x/evm/keeper/call_evm_test.go index 6d8fd7c6..3d204515 100644 --- a/x/evm/keeper/call_evm_test.go +++ b/x/evm/keeper/call_evm_test.go @@ -4,11 +4,11 @@ import ( "fmt" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/contracts" - "github.com/evmos/evmos/v19/testutil" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/erc20/types" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/contracts" + "github.com/evmos/os/testutil" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/erc20/types" + evmtypes "github.com/evmos/os/x/evm/types" ) const erc20Decimals = uint8(18) diff --git a/x/evm/keeper/config.go b/x/evm/keeper/config.go index 0fd55855..0710180b 100644 --- a/x/evm/keeper/config.go +++ b/x/evm/keeper/config.go @@ -9,9 +9,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) // EVMConfig creates the EVMConfig based on current state diff --git a/x/evm/keeper/fees.go b/x/evm/keeper/fees.go index 101a3e4c..58aff1e0 100644 --- a/x/evm/keeper/fees.go +++ b/x/evm/keeper/fees.go @@ -15,7 +15,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" authante "github.com/cosmos/cosmos-sdk/x/auth/ante" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) // CheckSenderBalance validates that the tx cost value is positive and that the diff --git a/x/evm/keeper/fees_test.go b/x/evm/keeper/fees_test.go index fffaf320..77d46891 100644 --- a/x/evm/keeper/fees_test.go +++ b/x/evm/keeper/fees_test.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" ethparams "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/keeper" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/keeper" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *KeeperTestSuite) TestCheckSenderBalance() { diff --git a/x/evm/keeper/gas.go b/x/evm/keeper/gas.go index 59cacb93..3c09c462 100644 --- a/x/evm/keeper/gas.go +++ b/x/evm/keeper/gas.go @@ -14,7 +14,7 @@ import ( errortypes "github.com/cosmos/cosmos-sdk/types/errors" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) // GetEthIntrinsicGas returns the intrinsic gas cost for the transaction diff --git a/x/evm/keeper/grpc_query.go b/x/evm/keeper/grpc_query.go index f1dfd131..d6373d3e 100644 --- a/x/evm/keeper/grpc_query.go +++ b/x/evm/keeper/grpc_query.go @@ -10,8 +10,8 @@ import ( "math/big" "time" - "github.com/evmos/evmos/v19/x/evm/core/logger" - "github.com/evmos/evmos/v19/x/evm/core/tracers" + "github.com/evmos/os/x/evm/core/logger" + "github.com/evmos/os/x/evm/core/tracers" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -25,12 +25,12 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" ethparams "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" - evmostypes "github.com/evmos/evmos/v19/types" - evmante "github.com/evmos/evmos/v19/x/evm/ante" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + evmostypes "github.com/evmos/os/types" + evmante "github.com/evmos/os/x/evm/ante" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) var _ types.QueryServer = Keeper{} diff --git a/x/evm/keeper/grpc_query_test.go b/x/evm/keeper/grpc_query_test.go index bd4f6d4c..ead5811d 100644 --- a/x/evm/keeper/grpc_query_test.go +++ b/x/evm/keeper/grpc_query_test.go @@ -5,7 +5,7 @@ import ( "fmt" "math/big" - "github.com/evmos/evmos/v19/x/evm/keeper/testdata" + "github.com/evmos/os/x/evm/keeper/testdata" sdkmath "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -14,13 +14,13 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" ethparams "github.com/ethereum/go-ethereum/params" - ethlogger "github.com/evmos/evmos/v19/x/evm/core/logger" - "github.com/evmos/evmos/v19/x/evm/core/vm" + ethlogger "github.com/evmos/os/x/evm/core/logger" + "github.com/evmos/os/x/evm/core/vm" - "github.com/evmos/evmos/v19/server/config" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/server/config" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) // Not valid Ethereum address diff --git a/x/evm/keeper/integration_test.go b/x/evm/keeper/integration_test.go index b7de68e1..ae9deb56 100644 --- a/x/evm/keeper/integration_test.go +++ b/x/evm/keeper/integration_test.go @@ -15,14 +15,14 @@ import ( sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/contracts" - "github.com/evmos/evmos/v19/precompiles/staking" - "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - integrationutils "github.com/evmos/evmos/v19/testutil/integration/evmos/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/contracts" + "github.com/evmos/os/precompiles/staking" + "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/testutil/integration/evmos/network" + integrationutils "github.com/evmos/os/testutil/integration/evmos/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) type IntegrationTestSuite struct { diff --git a/x/evm/keeper/keeper.go b/x/evm/keeper/keeper.go index 60a57e7e..a49025a6 100644 --- a/x/evm/keeper/keeper.go +++ b/x/evm/keeper/keeper.go @@ -17,11 +17,11 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" - evmostypes "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + evmostypes "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) // Keeper grants access to the EVM module state and implements the go-ethereum StateDB interface. diff --git a/x/evm/keeper/keeper_test.go b/x/evm/keeper/keeper_test.go index 8e6d9d47..ffef0e08 100644 --- a/x/evm/keeper/keeper_test.go +++ b/x/evm/keeper/keeper_test.go @@ -6,10 +6,10 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/keeper" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/utils" + "github.com/evmos/os/x/evm/keeper" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/ethereum/go-ethereum/common" diff --git a/x/evm/keeper/migrations.go b/x/evm/keeper/migrations.go index 86ea49a9..a4a1f046 100644 --- a/x/evm/keeper/migrations.go +++ b/x/evm/keeper/migrations.go @@ -4,8 +4,8 @@ package keeper import ( sdk "github.com/cosmos/cosmos-sdk/types" - v7 "github.com/evmos/evmos/v19/x/evm/migrations/v7" - "github.com/evmos/evmos/v19/x/evm/types" + v7 "github.com/evmos/os/x/evm/migrations/v7" + "github.com/evmos/os/x/evm/types" ) // Migrator is a struct for handling in-place store migrations. diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index c3d30010..db46d13e 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -19,7 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/telemetry" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) var _ types.MsgServer = &Keeper{} diff --git a/x/evm/keeper/msg_server_test.go b/x/evm/keeper/msg_server_test.go index 0311379a..1f21609f 100644 --- a/x/evm/keeper/msg_server_test.go +++ b/x/evm/keeper/msg_server_test.go @@ -8,8 +8,8 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) func (suite *KeeperTestSuite) TestEthereumTx() { diff --git a/x/evm/keeper/params.go b/x/evm/keeper/params.go index 6721c549..c4ff70ef 100644 --- a/x/evm/keeper/params.go +++ b/x/evm/keeper/params.go @@ -9,8 +9,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/utils" + "github.com/evmos/os/x/evm/types" ) // GetParams returns the total set of evm parameters. diff --git a/x/evm/keeper/params_benchmark_test.go b/x/evm/keeper/params_benchmark_test.go index a93fe2a8..f53d32a0 100644 --- a/x/evm/keeper/params_benchmark_test.go +++ b/x/evm/keeper/params_benchmark_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "testing" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func BenchmarkSetParams(b *testing.B) { diff --git a/x/evm/keeper/params_test.go b/x/evm/keeper/params_test.go index c894e40a..fe95022a 100644 --- a/x/evm/keeper/params_test.go +++ b/x/evm/keeper/params_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "reflect" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func (suite *KeeperTestSuite) TestParams() { diff --git a/x/evm/keeper/precompiles.go b/x/evm/keeper/precompiles.go index b47bd9fa..d1c9cd90 100644 --- a/x/evm/keeper/precompiles.go +++ b/x/evm/keeper/precompiles.go @@ -6,8 +6,8 @@ package keeper import ( sdktypes "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/types" ) type Precompiles struct { diff --git a/x/evm/keeper/setup_test.go b/x/evm/keeper/setup_test.go index 0541386d..5ecc7c28 100644 --- a/x/evm/keeper/setup_test.go +++ b/x/evm/keeper/setup_test.go @@ -23,14 +23,14 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/crypto/ethsecp256k1" - "github.com/evmos/evmos/v19/encoding" - "github.com/evmos/evmos/v19/testutil" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" - feemarkettypes "github.com/evmos/evmos/v19/x/feemarket/types" + "github.com/evmos/os/app" + "github.com/evmos/os/crypto/ethsecp256k1" + "github.com/evmos/os/encoding" + "github.com/evmos/os/testutil" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/utils" + evmtypes "github.com/evmos/os/x/evm/types" + feemarkettypes "github.com/evmos/os/x/feemarket/types" "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" ) @@ -188,7 +188,7 @@ func (suite *KeeperTestSuite) SetupAppWithT(checkTx bool, t require.TestingT, ch suite.app.StakingKeeper.SetValidator(suite.ctx, validator) stakingParams := stakingtypes.DefaultParams() - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom err = suite.app.StakingKeeper.SetParams(suite.ctx, stakingParams) require.NoError(t, err) diff --git a/x/evm/keeper/state_transition.go b/x/evm/keeper/state_transition.go index 80d0e62b..1b953fe9 100644 --- a/x/evm/keeper/state_transition.go +++ b/x/evm/keeper/state_transition.go @@ -11,16 +11,16 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - evmostypes "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + evmostypes "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - evmoscore "github.com/evmos/evmos/v19/x/evm/core/core" - "github.com/evmos/evmos/v19/x/evm/core/vm" + evmoscore "github.com/evmos/os/x/evm/core/core" + "github.com/evmos/os/x/evm/core/vm" ) // NewEVM generates a go-ethereum VM from the provided Message fields and the chain parameters diff --git a/x/evm/keeper/state_transition_benchmark_test.go b/x/evm/keeper/state_transition_benchmark_test.go index 4a46db8b..44ef5c18 100644 --- a/x/evm/keeper/state_transition_benchmark_test.go +++ b/x/evm/keeper/state_transition_benchmark_test.go @@ -11,7 +11,7 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/x/evm/keeper/state_transition_test.go b/x/evm/keeper/state_transition_test.go index b9a7975b..2e290197 100644 --- a/x/evm/keeper/state_transition_test.go +++ b/x/evm/keeper/state_transition_test.go @@ -17,10 +17,10 @@ import ( "github.com/ethereum/go-ethereum/core" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/keeper" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/keeper" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" ) func (suite *KeeperTestSuite) TestGetHashFn() { diff --git a/x/evm/keeper/statedb.go b/x/evm/keeper/statedb.go index 891f75d8..4abb2640 100644 --- a/x/evm/keeper/statedb.go +++ b/x/evm/keeper/statedb.go @@ -12,8 +12,8 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) var _ statedb.Keeper = &Keeper{} diff --git a/x/evm/keeper/statedb_benchmark_test.go b/x/evm/keeper/statedb_benchmark_test.go index 28aa7ccd..6a0091f1 100644 --- a/x/evm/keeper/statedb_benchmark_test.go +++ b/x/evm/keeper/statedb_benchmark_test.go @@ -10,7 +10,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - utiltx "github.com/evmos/evmos/v19/testutil/tx" + utiltx "github.com/evmos/os/testutil/tx" ) func BenchmarkCreateAccountNew(b *testing.B) { diff --git a/x/evm/keeper/statedb_test.go b/x/evm/keeper/statedb_test.go index 10849a1d..72dcedac 100644 --- a/x/evm/keeper/statedb_test.go +++ b/x/evm/keeper/statedb_test.go @@ -16,15 +16,15 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/contracts" - testfactory "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - testhandler "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - testnetwork "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/contracts" + testfactory "github.com/evmos/os/testutil/integration/evmos/factory" + testhandler "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + testnetwork "github.com/evmos/os/testutil/integration/evmos/network" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/x/evm/keeper/static_precompiles.go b/x/evm/keeper/static_precompiles.go index 7da53ee1..b89a7d1e 100644 --- a/x/evm/keeper/static_precompiles.go +++ b/x/evm/keeper/static_precompiles.go @@ -12,19 +12,19 @@ import ( distributionkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper" channelkeeper "github.com/cosmos/ibc-go/v7/modules/core/04-channel/keeper" "github.com/ethereum/go-ethereum/common" - bankprecompile "github.com/evmos/evmos/v19/precompiles/bank" - "github.com/evmos/evmos/v19/precompiles/bech32" - distprecompile "github.com/evmos/evmos/v19/precompiles/distribution" - ics20precompile "github.com/evmos/evmos/v19/precompiles/ics20" - "github.com/evmos/evmos/v19/precompiles/p256" - stakingprecompile "github.com/evmos/evmos/v19/precompiles/staking" - vestingprecompile "github.com/evmos/evmos/v19/precompiles/vesting" - erc20Keeper "github.com/evmos/evmos/v19/x/erc20/keeper" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/types" - transferkeeper "github.com/evmos/evmos/v19/x/ibc/transfer/keeper" - stakingkeeper "github.com/evmos/evmos/v19/x/staking/keeper" - vestingkeeper "github.com/evmos/evmos/v19/x/vesting/keeper" + bankprecompile "github.com/evmos/os/precompiles/bank" + "github.com/evmos/os/precompiles/bech32" + distprecompile "github.com/evmos/os/precompiles/distribution" + ics20precompile "github.com/evmos/os/precompiles/ics20" + "github.com/evmos/os/precompiles/p256" + stakingprecompile "github.com/evmos/os/precompiles/staking" + vestingprecompile "github.com/evmos/os/precompiles/vesting" + erc20Keeper "github.com/evmos/os/x/erc20/keeper" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/types" + transferkeeper "github.com/evmos/os/x/ibc/transfer/keeper" + stakingkeeper "github.com/evmos/os/x/staking/keeper" + vestingkeeper "github.com/evmos/os/x/vesting/keeper" "golang.org/x/exp/maps" ) diff --git a/x/evm/keeper/testdata/contracts.go b/x/evm/keeper/testdata/contracts.go index e787fa6a..d6868b74 100644 --- a/x/evm/keeper/testdata/contracts.go +++ b/x/evm/keeper/testdata/contracts.go @@ -4,8 +4,8 @@ package testdata import ( - contractutils "github.com/evmos/evmos/v19/contracts/utils" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + contractutils "github.com/evmos/os/contracts/utils" + evmtypes "github.com/evmos/os/x/evm/types" ) func LoadERC20Contract() (evmtypes.CompiledContract, error) { diff --git a/x/evm/keeper/utils.go b/x/evm/keeper/utils.go index 3e2ec918..58b22bad 100644 --- a/x/evm/keeper/utils.go +++ b/x/evm/keeper/utils.go @@ -7,7 +7,7 @@ import ( "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) // IsContract determines if the given address is a smart contract. diff --git a/x/evm/keeper/utils_test.go b/x/evm/keeper/utils_test.go index 89e42f7a..e2af57ac 100644 --- a/x/evm/keeper/utils_test.go +++ b/x/evm/keeper/utils_test.go @@ -5,7 +5,7 @@ import ( "math/big" "time" - "github.com/evmos/evmos/v19/x/evm/keeper/testdata" + "github.com/evmos/os/x/evm/keeper/testdata" "github.com/cosmos/cosmos-sdk/baseapp" sdk "github.com/cosmos/cosmos-sdk/types" @@ -13,10 +13,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/server/config" - "github.com/evmos/evmos/v19/testutil" - "github.com/evmos/evmos/v19/x/evm/statedb" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/server/config" + "github.com/evmos/os/testutil" + "github.com/evmos/os/x/evm/statedb" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/x/evm/migrations/v7/migrate.go b/x/evm/migrations/v7/migrate.go index 9f6bc9ed..2facc973 100644 --- a/x/evm/migrations/v7/migrate.go +++ b/x/evm/migrations/v7/migrate.go @@ -10,8 +10,8 @@ import ( storetypes "github.com/cosmos/cosmos-sdk/store/types" sdk "github.com/cosmos/cosmos-sdk/types" - v6types "github.com/evmos/evmos/v19/x/evm/migrations/v7/types" - "github.com/evmos/evmos/v19/x/evm/types" + v6types "github.com/evmos/os/x/evm/migrations/v7/types" + "github.com/evmos/os/x/evm/types" ) // MigrateStore migrates the x/evm module state from the consensus version 6 to diff --git a/x/evm/migrations/v7/migrate_test.go b/x/evm/migrations/v7/migrate_test.go index e191ea26..250dad12 100644 --- a/x/evm/migrations/v7/migrate_test.go +++ b/x/evm/migrations/v7/migrate_test.go @@ -11,11 +11,11 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" - "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/encoding" - v7 "github.com/evmos/evmos/v19/x/evm/migrations/v7" - v6types "github.com/evmos/evmos/v19/x/evm/migrations/v7/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/app" + "github.com/evmos/os/encoding" + v7 "github.com/evmos/os/x/evm/migrations/v7" + v6types "github.com/evmos/os/x/evm/migrations/v7/types" + "github.com/evmos/os/x/evm/types" ) func TestMigrate(t *testing.T) { diff --git a/x/evm/module.go b/x/evm/module.go index b5a00001..1cb012ea 100644 --- a/x/evm/module.go +++ b/x/evm/module.go @@ -20,9 +20,9 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" - "github.com/evmos/evmos/v19/x/evm/client/cli" - "github.com/evmos/evmos/v19/x/evm/keeper" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/client/cli" + "github.com/evmos/os/x/evm/keeper" + "github.com/evmos/os/x/evm/types" ) // consensusVersion defines the current x/evm module consensus version. diff --git a/x/evm/statedb/config.go b/x/evm/statedb/config.go index bf8fab23..c6bf7b88 100644 --- a/x/evm/statedb/config.go +++ b/x/evm/statedb/config.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) // TxConfig encapulates the readonly information of current tx for `StateDB`. diff --git a/x/evm/statedb/integration_test.go b/x/evm/statedb/integration_test.go index 443ca55e..0e5507f8 100644 --- a/x/evm/statedb/integration_test.go +++ b/x/evm/statedb/integration_test.go @@ -9,14 +9,14 @@ import ( "cosmossdk.io/math" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/contracts" - stakingprecompile "github.com/evmos/evmos/v19/precompiles/staking" - testcontracts "github.com/evmos/evmos/v19/precompiles/testutil/contracts" - testfactory "github.com/evmos/evmos/v19/testutil/integration/evmos/factory" - "github.com/evmos/evmos/v19/testutil/integration/evmos/grpc" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - testnetwork "github.com/evmos/evmos/v19/testutil/integration/evmos/network" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/contracts" + stakingprecompile "github.com/evmos/os/precompiles/staking" + testcontracts "github.com/evmos/os/precompiles/testutil/contracts" + testfactory "github.com/evmos/os/testutil/integration/evmos/factory" + "github.com/evmos/os/testutil/integration/evmos/grpc" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + testnetwork "github.com/evmos/os/testutil/integration/evmos/network" + evmtypes "github.com/evmos/os/x/evm/types" //nolint:revive // okay to use dot imports for Ginkgo . "github.com/onsi/ginkgo/v2" diff --git a/x/evm/statedb/interfaces.go b/x/evm/statedb/interfaces.go index 7839abdd..9f56ad00 100644 --- a/x/evm/statedb/interfaces.go +++ b/x/evm/statedb/interfaces.go @@ -5,7 +5,7 @@ package statedb import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // ExtStateDB defines an extension to the interface provided by the go-ethereum diff --git a/x/evm/statedb/mock_test.go b/x/evm/statedb/mock_test.go index 4f411e6a..0723854f 100644 --- a/x/evm/statedb/mock_test.go +++ b/x/evm/statedb/mock_test.go @@ -8,8 +8,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/statedb" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/statedb" + "github.com/evmos/os/x/evm/types" ) var ( diff --git a/x/evm/statedb/state_object.go b/x/evm/statedb/state_object.go index 51a0b258..73fb98c0 100644 --- a/x/evm/statedb/state_object.go +++ b/x/evm/statedb/state_object.go @@ -9,7 +9,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) // Account is the Ethereum consensus representation of accounts. diff --git a/x/evm/statedb/statedb.go b/x/evm/statedb/statedb.go index 6e46b224..b96b3e90 100644 --- a/x/evm/statedb/statedb.go +++ b/x/evm/statedb/statedb.go @@ -13,8 +13,8 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/types" ) // revision is the identifier of a version of state. diff --git a/x/evm/statedb/statedb_test.go b/x/evm/statedb/statedb_test.go index 2ad01b55..32f350cb 100644 --- a/x/evm/statedb/statedb_test.go +++ b/x/evm/statedb/statedb_test.go @@ -8,8 +8,8 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/x/evm/core/vm" - "github.com/evmos/evmos/v19/x/evm/statedb" + "github.com/evmos/os/x/evm/core/vm" + "github.com/evmos/os/x/evm/statedb" "github.com/stretchr/testify/suite" ) diff --git a/x/evm/types/access_list_test.go b/x/evm/types/access_list_test.go index b4b57d3a..679da101 100644 --- a/x/evm/types/access_list_test.go +++ b/x/evm/types/access_list_test.go @@ -3,7 +3,7 @@ package types_test import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func (suite *TxDataTestSuite) TestTestNewAccessList() { diff --git a/x/evm/types/access_list_tx.go b/x/evm/types/access_list_tx.go index 0cd291f5..31b94f12 100644 --- a/x/evm/types/access_list_tx.go +++ b/x/evm/types/access_list_tx.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/types" + "github.com/evmos/os/types" ) func newAccessListTx(tx *ethtypes.Transaction) (*AccessListTx, error) { diff --git a/x/evm/types/access_list_tx_test.go b/x/evm/types/access_list_tx_test.go index 1e6c04c4..07d86e25 100644 --- a/x/evm/types/access_list_tx_test.go +++ b/x/evm/types/access_list_tx_test.go @@ -4,7 +4,7 @@ import ( "math/big" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func (suite *TxDataTestSuite) TestAccessListTxCopy() { diff --git a/x/evm/types/compiled_contract_test.go b/x/evm/types/compiled_contract_test.go index 8f4a2b04..14873d0b 100644 --- a/x/evm/types/compiled_contract_test.go +++ b/x/evm/types/compiled_contract_test.go @@ -5,7 +5,7 @@ import ( "os" "testing" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/x/evm/types/dynamic_fee_tx.go b/x/evm/types/dynamic_fee_tx.go index c98cbb95..3bbc6fe6 100644 --- a/x/evm/types/dynamic_fee_tx.go +++ b/x/evm/types/dynamic_fee_tx.go @@ -12,7 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/types" + "github.com/evmos/os/types" ) func NewDynamicFeeTx(tx *ethtypes.Transaction) (*DynamicFeeTx, error) { diff --git a/x/evm/types/dynamic_fee_tx_test.go b/x/evm/types/dynamic_fee_tx_test.go index 41767f0f..e7f90311 100644 --- a/x/evm/types/dynamic_fee_tx_test.go +++ b/x/evm/types/dynamic_fee_tx_test.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" ethtypes "github.com/ethereum/go-ethereum/core/types" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/types" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/suite" ) diff --git a/x/evm/types/genesis.go b/x/evm/types/genesis.go index e8138457..122c32f2 100644 --- a/x/evm/types/genesis.go +++ b/x/evm/types/genesis.go @@ -5,7 +5,7 @@ package types import ( "fmt" - "github.com/evmos/evmos/v19/types" + "github.com/evmos/os/types" ) // Validate performs a basic validation of a GenesisAccount fields. diff --git a/x/evm/types/genesis_test.go b/x/evm/types/genesis_test.go index 78368368..35a1a52b 100644 --- a/x/evm/types/genesis_test.go +++ b/x/evm/types/genesis_test.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/stretchr/testify/suite" - "github.com/evmos/evmos/v19/crypto/ethsecp256k1" + "github.com/evmos/os/crypto/ethsecp256k1" ) type GenesisTestSuite struct { diff --git a/x/evm/types/interfaces.go b/x/evm/types/interfaces.go index cece5eca..83a71ca5 100644 --- a/x/evm/types/interfaces.go +++ b/x/evm/types/interfaces.go @@ -11,9 +11,9 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" - feemarkettypes "github.com/evmos/evmos/v19/x/feemarket/types" + feemarkettypes "github.com/evmos/os/x/feemarket/types" ) // AccountKeeper defines the expected account keeper interface diff --git a/x/evm/types/legacy_tx.go b/x/evm/types/legacy_tx.go index 03ce4148..5d55d913 100644 --- a/x/evm/types/legacy_tx.go +++ b/x/evm/types/legacy_tx.go @@ -10,7 +10,7 @@ import ( errorsmod "cosmossdk.io/errors" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/types" + "github.com/evmos/os/types" ) func NewLegacyTx(tx *ethtypes.Transaction) (*LegacyTx, error) { diff --git a/x/evm/types/legacy_tx_test.go b/x/evm/types/legacy_tx_test.go index 92e00fc5..1beb429b 100644 --- a/x/evm/types/legacy_tx_test.go +++ b/x/evm/types/legacy_tx_test.go @@ -6,7 +6,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func (suite *TxDataTestSuite) TestNewLegacyTx() { diff --git a/x/evm/types/logs.go b/x/evm/types/logs.go index e5e54df5..5636ec90 100644 --- a/x/evm/types/logs.go +++ b/x/evm/types/logs.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - evmostypes "github.com/evmos/evmos/v19/types" + evmostypes "github.com/evmos/os/types" ) // NewTransactionLogs creates a new NewTransactionLogs instance. diff --git a/x/evm/types/logs_test.go b/x/evm/types/logs_test.go index f1103b12..2455dd45 100644 --- a/x/evm/types/logs_test.go +++ b/x/evm/types/logs_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/require" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - "github.com/evmos/evmos/v19/x/evm/types" + utiltx "github.com/evmos/os/testutil/tx" + "github.com/evmos/os/x/evm/types" "github.com/ethereum/go-ethereum/common" ) diff --git a/x/evm/types/msg.go b/x/evm/types/msg.go index 16298390..cb472620 100644 --- a/x/evm/types/msg.go +++ b/x/evm/types/msg.go @@ -19,7 +19,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/auth/signing" authtx "github.com/cosmos/cosmos-sdk/x/auth/tx" - "github.com/evmos/evmos/v19/types" + "github.com/evmos/os/types" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" diff --git a/x/evm/types/msg_test.go b/x/evm/types/msg_test.go index c9a7b292..063dd6be 100644 --- a/x/evm/types/msg_test.go +++ b/x/evm/types/msg_test.go @@ -17,12 +17,12 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/evmos/evmos/v19/crypto/ethsecp256k1" - utiltx "github.com/evmos/evmos/v19/testutil/tx" + "github.com/evmos/os/crypto/ethsecp256k1" + utiltx "github.com/evmos/os/testutil/tx" - "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/encoding" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/app" + "github.com/evmos/os/encoding" + "github.com/evmos/os/x/evm/types" ) const invalidAddress = "0x0000" diff --git a/x/evm/types/opcodes_hooks.go b/x/evm/types/opcodes_hooks.go index c2259bda..384dc5c9 100644 --- a/x/evm/types/opcodes_hooks.go +++ b/x/evm/types/opcodes_hooks.go @@ -5,7 +5,7 @@ package types import ( "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // OpCodeHooks extends the geth OpCodeHooks interface to add custom hooks for EVM operations. diff --git a/x/evm/types/params.go b/x/evm/types/params.go index 59e23c73..cfdff180 100644 --- a/x/evm/types/params.go +++ b/x/evm/types/params.go @@ -14,14 +14,14 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/types" - "github.com/evmos/evmos/v19/utils" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/testutil" + "github.com/evmos/os/types" + "github.com/evmos/os/x/evm/core/vm" ) var ( // DefaultEVMDenom defines the default EVM denomination on Evmos - DefaultEVMDenom = utils.BaseDenom + DefaultEVMDenom = testutil.ExampleAttoDenom // DefaultAllowUnprotectedTxs rejects all unprotected txs (i.e false) DefaultAllowUnprotectedTxs = false // DefaultStaticPrecompiles defines the default active precompiles diff --git a/x/evm/types/permissions.go b/x/evm/types/permissions.go index 2cbb2636..32c53b4b 100644 --- a/x/evm/types/permissions.go +++ b/x/evm/types/permissions.go @@ -8,7 +8,7 @@ import ( "slices" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // PermissionPolicy is the interface that defines the permission policy for contract creation and calls. diff --git a/x/evm/types/permissions_test.go b/x/evm/types/permissions_test.go index 5e7961f8..e7c10cbf 100644 --- a/x/evm/types/permissions_test.go +++ b/x/evm/types/permissions_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/ethereum/go-ethereum/common" - testkeyring "github.com/evmos/evmos/v19/testutil/integration/evmos/keyring" - "github.com/evmos/evmos/v19/x/evm/types" + testkeyring "github.com/evmos/os/testutil/integration/evmos/keyring" + "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/suite" ) diff --git a/x/evm/types/tracer.go b/x/evm/types/tracer.go index b35334f1..458bf146 100644 --- a/x/evm/types/tracer.go +++ b/x/evm/types/tracer.go @@ -10,8 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/params" - "github.com/evmos/evmos/v19/x/evm/core/logger" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/logger" + "github.com/evmos/os/x/evm/core/vm" ) const ( diff --git a/x/evm/types/tx.go b/x/evm/types/tx.go index 26a0fb35..3243ce7b 100644 --- a/x/evm/types/tx.go +++ b/x/evm/types/tx.go @@ -9,7 +9,7 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/common" - "github.com/evmos/evmos/v19/x/evm/core/vm" + "github.com/evmos/os/x/evm/core/vm" ) // EvmTxArgs encapsulates all possible params to create all EVM txs types. diff --git a/x/evm/types/tx_args_test.go b/x/evm/types/tx_args_test.go index 1a07d7f2..fed3e8cb 100644 --- a/x/evm/types/tx_args_test.go +++ b/x/evm/types/tx_args_test.go @@ -7,7 +7,7 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/x/evm/types" ) func (suite *TxDataTestSuite) TestTxArgsString() { diff --git a/x/evm/types/utils_test.go b/x/evm/types/utils_test.go index 80066670..a7f46233 100644 --- a/x/evm/types/utils_test.go +++ b/x/evm/types/utils_test.go @@ -14,10 +14,10 @@ import ( proto "github.com/cosmos/gogoproto/proto" - "github.com/evmos/evmos/v19/app" - "github.com/evmos/evmos/v19/encoding" - utiltx "github.com/evmos/evmos/v19/testutil/tx" - evmtypes "github.com/evmos/evmos/v19/x/evm/types" + "github.com/evmos/os/app" + "github.com/evmos/os/encoding" + utiltx "github.com/evmos/os/testutil/tx" + evmtypes "github.com/evmos/os/x/evm/types" "github.com/stretchr/testify/require" ) diff --git a/x/feemarket/keeper/integration_test.go b/x/feemarket/keeper/integration_test.go index 740a5dd3..bb73da40 100644 --- a/x/feemarket/keeper/integration_test.go +++ b/x/feemarket/keeper/integration_test.go @@ -12,8 +12,8 @@ import ( . "github.com/onsi/gomega" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/testutil" "github.com/evmos/os/crypto/ethsecp256k1" + "github.com/evmos/os/testutil" utiltx "github.com/evmos/os/testutil/tx" "github.com/evmos/os/utils" diff --git a/x/feemarket/keeper/utils_test.go b/x/feemarket/keeper/utils_test.go index 4478e301..0412048b 100644 --- a/x/feemarket/keeper/utils_test.go +++ b/x/feemarket/keeper/utils_test.go @@ -19,12 +19,11 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/evmos/evmos/v19/testutil" "github.com/evmos/os/crypto/ethsecp256k1" "github.com/evmos/os/encoding" example_app "github.com/evmos/os/example_chain" + "github.com/evmos/os/testutil" utiltx "github.com/evmos/os/testutil/tx" - "github.com/evmos/os/utils" evmtypes "github.com/evmos/os/x/evm/types" "github.com/evmos/os/x/feemarket/types" "github.com/stretchr/testify/require" @@ -68,7 +67,7 @@ func (suite *KeeperTestSuite) SetupApp(checkTx bool, chainID string) { suite.app.StakingKeeper.SetValidator(suite.ctx, validator) stakingParams := stakingtypes.DefaultParams() - stakingParams.BondDenom = utils.BaseDenom + stakingParams.BondDenom = testutil.ExampleAttoDenom err = suite.app.StakingKeeper.SetParams(suite.ctx, stakingParams) require.NoError(t, err)