Skip to content

Commit

Permalink
Test: assert all fields returned from EthGetTransactionByHash have ex…
Browse files Browse the repository at this point in the history
…pected values

Related to #10151 (comment)
  • Loading branch information
maciejwitowski committed Feb 1, 2023
1 parent ccb20d5 commit 73f517d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion itests/eth_transactions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,19 @@ func TestValueTransferValidSignature(t *testing.T) {
ethTx, err := client.EthGetTransactionByHash(ctx, &hash)
require.Nil(t, err)
require.EqualValues(t, ethAddr, ethTx.From)

require.EqualValues(t, ethAddr2, *ethTx.To)
require.EqualValues(t, tx.ChainID, ethTx.ChainID)
require.EqualValues(t, tx.Nonce, ethTx.Nonce)
require.EqualValues(t, hash, ethTx.Hash)
require.EqualValues(t, tx.Value, ethTx.Value)
require.EqualValues(t, 2, ethTx.Type)
require.EqualValues(t, ethtypes.EthBytes{}, ethTx.Input)
require.EqualValues(t, tx.GasLimit, ethTx.Gas)
require.EqualValues(t, tx.MaxFeePerGas, ethTx.MaxFeePerGas)
require.EqualValues(t, tx.MaxPriorityFeePerGas, ethTx.MaxPriorityFeePerGas)
require.EqualValues(t, tx.V, ethTx.V)
require.EqualValues(t, tx.R, ethTx.R)
require.EqualValues(t, tx.S, ethTx.S)
}

func TestLegacyTransaction(t *testing.T) {
Expand Down

0 comments on commit 73f517d

Please sign in to comment.