Skip to content

Commit

Permalink
wip: add debug for handler
Browse files Browse the repository at this point in the history
  • Loading branch information
boodyvo committed Nov 6, 2024
1 parent 2b40405 commit 88c6096
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rpc/backend/sign_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (b *Backend) SignTypedData(address common.Address, typedData apitypes.Typed

// TODO(boodyvo): identify the signing mode
// Sign the requested hash with the wallet
signature, _, err := b.clientCtx.Keyring.SignByAddress(from, sigHash, signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON)
signature, _, err := b.clientCtx.Keyring.SignByAddress(from, sigHash, signing.SignMode_SIGN_MODE_TEXTUAL)
if err != nil {
b.logger.Error("keyring.SignByAddress failed", "address", address.Hex())
return nil, err
Expand Down
5 changes: 5 additions & 0 deletions x/evm/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,21 @@ package evm

import (
errorsmod "cosmossdk.io/errors"
"fmt"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
"runtime/debug"

"github.com/evmos/ethermint/x/evm/types"
)

// NewHandler returns a handler for Ethermint type messages.
func NewHandler(server types.MsgServer) baseapp.MsgServiceHandler {
return func(ctx sdk.Context, msg sdk.Msg) (result *sdk.Result, err error) {
fmt.Println("evm handler execution", msg)
debug.PrintStack()

ctx = ctx.WithEventManager(sdk.NewEventManager())

switch msg := msg.(type) {
Expand Down

0 comments on commit 88c6096

Please sign in to comment.