Skip to content

Commit

Permalink
wip: update message signer
Browse files Browse the repository at this point in the history
  • Loading branch information
boodyvo committed Nov 1, 2024
1 parent 9c8b42a commit 884c77e
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions x/evm/types/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,37 @@ func GetSigners(msg protov2.Message) ([][]byte, error) {
fmt.Println("Eth message tryingTypeAnyV1 error", err)
}

data, err := UnpackTxData(tryingTypeAnyV1)
if err != nil {
return nil, err
var data TxData
switch {
case tryingTypeAnyV1.TypeUrl == "/ethermint.evm.v1.DynamicFeeTx":
msgTyped := &DynamicFeeTx{}
err = msgTyped.Unmarshal(tryingTypeAnyV1.Value)
fmt.Println("Eth message tryingTypeAnyV1 DynamicFeeTx", msgTyped)
if err != nil {
fmt.Println("Eth message tryingTypeAnyV1 DynamicFeeTx error", err)
}
case tryingTypeAnyV1.TypeUrl == "/ethermint.evm.v1.AccessListTx":
msgTyped := &AccessListTx{}
err = msgTyped.Unmarshal(tryingTypeAnyV1.Value)
fmt.Println("Eth message tryingTypeAnyV1 AccessListTx", msgTyped)
if err != nil {
fmt.Println("Eth message tryingTypeAnyV1 AccessListTx error", err)
}
case tryingTypeAnyV1.TypeUrl == "/ethermint.evm.v1.LegacyTx":
msgTyped := &LegacyTx{}
err = msgTyped.Unmarshal(tryingTypeAnyV1.Value)
fmt.Println("Eth message tryingTypeAnyV1 LegacyTx", msgTyped)
if err != nil {
fmt.Println("Eth message tryingTypeAnyV1 LegacyTx error", err)
}
default:
fmt.Println("Eth message tryingTypeAnyV1 unknown")
}

//data, err := UnpackTxData(tryingTypeAnyV1)
//if err != nil {
// return nil, err
//}
// data, err := UnpackTxData(msg.Data)
// if err != nil {
// return nil, err
Expand Down

0 comments on commit 884c77e

Please sign in to comment.