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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- [\#609](https://github.com/cosmos/evm/pull/609) Make `erc20Keeper` optional in the EVM keeper
- [\#624](https://github.com/cosmos/evm/pull/624) Cleanup unnecessary `fix-revert-gas-refund-height`.
- [\#635](https://github.com/cosmos/evm/pull/635) Move DefaultStaticPrecompiles to /evm and allow projects to set it by default alongside the keeper.
- [\#639](https://github.com/cosmos/evm/pull/639) Remove `/types` and move types into respective folders.
- [\#630](https://github.com/cosmos/evm/pull/630) Reduce feemarket parameter loading to minimize memory allocations.
- [\#577](https://github.com/cosmos/evm/pull/577) Cleanup precompiles boilerplate code.
- [\#648](https://github.com/cosmos/evm/pull/648) Move all `ante` logic such as `NewAnteHandler` from the `evmd` package to `evm/ante` so it can be used as library functions.
Expand Down
5 changes: 2 additions & 3 deletions ante/cosmos/eip712.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
anteinterfaces "github.com/cosmos/evm/ante/interfaces"
"github.com/cosmos/evm/crypto/ethsecp256k1"
"github.com/cosmos/evm/ethereum/eip712"
"github.com/cosmos/evm/types"

errorsmod "cosmossdk.io/errors"

Expand All @@ -30,7 +29,7 @@ var evmCodec codec.ProtoCodecMarshaler

func init() {
registry := codectypes.NewInterfaceRegistry()
types.RegisterInterfaces(registry)
eip712.RegisterInterfaces(registry)
evmCodec = codec.NewProtoCodec(registry)
}

Expand Down Expand Up @@ -204,7 +203,7 @@ func VerifySignature(
return errorsmod.Wrap(errortypes.ErrUnknownExtensionOptions, "tx doesn't contain expected amount of extension options")
}

extOpt, ok := opts[0].GetCachedValue().(*types.ExtensionOptionsWeb3Tx)
extOpt, ok := opts[0].GetCachedValue().(*eip712.ExtensionOptionsWeb3Tx)
if !ok {
return errorsmod.Wrap(errortypes.ErrUnknownExtensionOptions, "unknown extension option")
}
Expand Down
6 changes: 3 additions & 3 deletions ante/evm/08_gas_consume.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
ethtypes "github.com/ethereum/go-ethereum/core/types"

anteinterfaces "github.com/cosmos/evm/ante/interfaces"
"github.com/cosmos/evm/types"
antetypes "github.com/cosmos/evm/ante/types"
evmtypes "github.com/cosmos/evm/x/vm/types"

errorsmod "cosmossdk.io/errors"
Expand Down Expand Up @@ -99,7 +99,7 @@ func GetMsgPriority(

// TODO: (@fedekunze) Why is this necessary? This seems to be a duplicate from the CheckGasWanted function.
func CheckBlockGasLimit(ctx sdktypes.Context, gasWanted uint64, minPriority int64) (sdktypes.Context, error) {
blockGasLimit := types.BlockGasLimit(ctx)
blockGasLimit := antetypes.BlockGasLimit(ctx)

// return error if the tx gas is greater than the block limit (max gas)

Expand All @@ -122,7 +122,7 @@ func CheckBlockGasLimit(ctx sdktypes.Context, gasWanted uint64, minPriority int6
// FIXME: use a custom gas configuration that doesn't add any additional gas and only
// takes into account the gas consumed at the end of the EVM transaction.
ctx = ctx.
WithGasMeter(types.NewInfiniteGasMeterWithLimit(gasWanted)).
WithGasMeter(evmtypes.NewInfiniteGasMeterWithLimit(gasWanted)).
WithPriority(minPriority)

return ctx, nil
Expand Down
2 changes: 1 addition & 1 deletion ante/evm/10_gas_wanted.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"math/big"

anteinterfaces "github.com/cosmos/evm/ante/interfaces"
"github.com/cosmos/evm/types"
"github.com/cosmos/evm/ante/types"
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
evmtypes "github.com/cosmos/evm/x/vm/types"

Expand Down
2 changes: 1 addition & 1 deletion ante/evm/fee_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/ethereum/go-ethereum/params"

cosmosevmtypes "github.com/cosmos/evm/types"
cosmosevmtypes "github.com/cosmos/evm/ante/types"
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
evmtypes "github.com/cosmos/evm/x/vm/types"

Expand Down
2 changes: 1 addition & 1 deletion ante/evm/fee_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import (
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

"github.com/cosmos/evm/ante/evm"
"github.com/cosmos/evm/ante/types"
"github.com/cosmos/evm/config"
"github.com/cosmos/evm/encoding"
testconstants "github.com/cosmos/evm/testutil/constants"
"github.com/cosmos/evm/types"
feemarkettypes "github.com/cosmos/evm/x/feemarket/types"
evmtypes "github.com/cosmos/evm/x/vm/types"

Expand Down
File renamed without changes.
File renamed without changes.
44 changes: 22 additions & 22 deletions types/dynamic_fee.pb.go → ante/types/dynamic_fee.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading