Skip to content

Commit

Permalink
Merge branch 'develop' into feat-fast-confirmation-inbound-evm-btc
Browse files Browse the repository at this point in the history
  • Loading branch information
ws4charlie authored Feb 28, 2025
2 parents 6a063b9 + 0c5bccb commit b408cbf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions app/ante/handler_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import (
"github.com/cosmos/cosmos-sdk/types/tx/signing"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
ethante "github.com/zeta-chain/ethermint/app/ante"
ethermint "github.com/zeta-chain/ethermint/types"
evmtypes "github.com/zeta-chain/ethermint/x/evm/types"
Expand All @@ -37,9 +35,10 @@ import (
)

type HandlerOptions struct {
AccountKeeper evmtypes.AccountKeeper
BankKeeper evmtypes.BankKeeper
IBCKeeper *ibckeeper.Keeper
AccountKeeper evmtypes.AccountKeeper
BankKeeper evmtypes.BankKeeper
// TODO: enable back IBC
// IBCKeeper *ibckeeper.Keeper
FeeMarketKeeper FeeMarketKeeper
EvmKeeper EVMKeeper
FeegrantKeeper ante.FeegrantKeeper
Expand Down Expand Up @@ -76,7 +75,9 @@ func NewLegacyCosmosAnteHandlerEip712(options HandlerOptions) sdk.AnteHandler {
// Note: signature verification uses EIP instead of the cosmos signature validator
ethante.NewLegacyEip712SigVerificationDecorator(options.AccountKeeper, options.SignModeHandler),
ante.NewIncrementSequenceDecorator(options.AccountKeeper),
ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
// TODO: enable back IBC
// check if this ante handler is needed in non legacy cosmos ante handlers
// ibcante.NewRedundantRelayDecorator(options.IBCKeeper),
ethante.NewGasWantedDecorator(options.EvmKeeper, options.FeeMarketKeeper),
)
}
Expand Down
2 changes: 1 addition & 1 deletion testutil/sample/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func BTCAddressP2WPKH(t *testing.T, r *rand.Rand, net *chaincfg.Params) *btcutil
return addr
}

// BtcAddressP2WPKH returns a pkscript for a sample btc P2WPKH address
// BTCAddressP2WPKHScript returns a pkscript for a sample btc P2WPKH address
func BTCAddressP2WPKHScript(t *testing.T, r *rand.Rand, net *chaincfg.Params) []byte {
addr := BTCAddressP2WPKH(t, r, net)
script, err := txscript.PayToAddrScript(addr)
Expand Down
2 changes: 1 addition & 1 deletion testutil/sample/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func Uint64InRange(low, high uint64) uint64 {
return r.Uint64()%(high-low) + low
}

// Uint64InRange returns a sample uint64 in the given ranges
// Uint64InRangeFromRand returns a sample uint64 in the given ranges
func Uint64InRangeFromRand(r *rand.Rand, low, high uint64) uint64 {
if low == high {
return low // avoid division by zero
Expand Down

0 comments on commit b408cbf

Please sign in to comment.