diff --git a/go.mod b/go.mod index 4a7e28f411..2ff55e24ed 100644 --- a/go.mod +++ b/go.mod @@ -62,6 +62,7 @@ require ( github.com/cockroachdb/errors v1.10.0 github.com/cometbft/cometbft v0.37.4 github.com/cometbft/cometbft-db v0.8.0 + github.com/golang/mock v1.6.0 github.com/huandu/skiplist v1.2.0 github.com/nanmu42/etherscan-api v1.10.0 github.com/onrik/ethrpc v1.2.0 @@ -95,7 +96,6 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/glog v1.1.2 // indirect - github.com/golang/mock v1.6.0 // indirect github.com/google/pprof v0.0.0-20230602150820-91b7bce49751 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/iancoleman/orderedmap v0.3.0 // indirect @@ -353,4 +353,4 @@ replace ( replace github.com/cometbft/cometbft-db => github.com/notional-labs/cometbft-db v0.0.0-20230321185329-6dc7c0ca6345 -replace github.com/evmos/ethermint => github.com/zeta-chain/ethermint v0.0.0-20240521185249-8bae394152de +replace github.com/evmos/ethermint => github.com/zeta-chain/ethermint v0.0.0-20240529195014-204348d5452d diff --git a/go.sum b/go.sum index 05683f638c..1f0a6991ac 100644 --- a/go.sum +++ b/go.sum @@ -1732,8 +1732,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zeta-chain/ethermint v0.0.0-20240521185249-8bae394152de h1:TvN2pOvj+PxXeFdrBzCbNGSfXU+Bnnl7ZGlBJ3lmgoM= -github.com/zeta-chain/ethermint v0.0.0-20240521185249-8bae394152de/go.mod h1:s1zA6OpXv3Tb5I0M6M6j5fo/AssaZL/pgkc7G0W2kN8= +github.com/zeta-chain/ethermint v0.0.0-20240529195014-204348d5452d h1:uOpeOcEJoIG7F7/I1peSOQA3Q6VP8W7L7Cu/Xd5yEzM= +github.com/zeta-chain/ethermint v0.0.0-20240529195014-204348d5452d/go.mod h1:s1zA6OpXv3Tb5I0M6M6j5fo/AssaZL/pgkc7G0W2kN8= github.com/zeta-chain/go-tss v0.1.1-0.20240430111318-1785e48eb127 h1:AGQepvsMIVHAHPlplzNcSCyMoGBY1DfO4WHG/QHUSIU= github.com/zeta-chain/go-tss v0.1.1-0.20240430111318-1785e48eb127/go.mod h1:bVpAoSlRYYCY/R34horVU3cheeHqhSVxygelc++emIU= github.com/zeta-chain/keystone/keys v0.0.0-20231105174229-903bc9405da2 h1:gd2uE0X+ZbdFJ8DubxNqLbOVlCB12EgWdzSNRAR82tM= diff --git a/rpc/types/events.go b/rpc/types/events.go index cf16d06024..50f6f04513 100644 --- a/rpc/types/events.go +++ b/rpc/types/events.go @@ -411,14 +411,14 @@ func fillTxAttribute(tx *ParsedTx, key, value string) error { if !success { return nil } - case "TxNonce": + case evmtypes.AttributeKeyTxNonce: nonce, err := strconv.ParseUint(value, 10, 64) if err != nil { return err } tx.Nonce = nonce - case "TxData": + case evmtypes.AttributeKeyTxData: hexBytes, err := hexutil.Decode(value) if err != nil { return err diff --git a/x/fungible/keeper/evm.go b/x/fungible/keeper/evm.go index 1b8a9494aa..c2cdd1d7ed 100644 --- a/x/fungible/keeper/evm.go +++ b/x/fungible/keeper/evm.go @@ -789,9 +789,9 @@ func (k Keeper) CallEVMWithData( if !noEthereumTxEvent { // adding txData for more info in rpc methods in order to parse synthetic txs - attrs = append(attrs, sdk.NewAttribute("TxData", hexutil.Encode(msg.Data()))) + attrs = append(attrs, sdk.NewAttribute(evmtypes.AttributeKeyTxData, hexutil.Encode(msg.Data()))) // adding nonce for more info in rpc methods in order to parse synthetic txs - attrs = append(attrs, sdk.NewAttribute("TxNonce", fmt.Sprint(nonce))) + attrs = append(attrs, sdk.NewAttribute(evmtypes.AttributeKeyTxNonce, fmt.Sprint(nonce))) ctx.EventManager().EmitEvents(sdk.Events{ sdk.NewEvent( evmtypes.EventTypeEthereumTx,