diff --git a/action/rlp_tx_test.go b/action/rlp_tx_test.go index 9c4c7fa509..118f39c258 100644 --- a/action/rlp_tx_test.go +++ b/action/rlp_tx_test.go @@ -402,6 +402,24 @@ var ( } ) +func TestNewEthSignerError(t *testing.T) { + require := require.New(t) + singer, err := NewEthSigner(iotextypes.Encoding_ETHEREUM_ACCESSLIST, 1) + require.ErrorIs(err, ErrInvalidAct) + require.Nil(singer) + + tx := types.NewTx(&types.DynamicFeeTx{ + To: nil, + Nonce: 4, + Value: big.NewInt(4), + Gas: 4, + GasTipCap: big.NewInt(44), + GasFeeCap: big.NewInt(1045), + }) + _, _, _, err = ExtractTypeSigPubkey(tx) + require.ErrorIs(err, ErrNotSupported) +} + func TestEthTxDecodeVerify(t *testing.T) { require := require.New(t)