Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

Commit

Permalink
feat: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtaikocha committed Apr 29, 2024
1 parent 40f030f commit 3b4c4b7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions internal/testutils/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum/go-ethereum/rlp"
"github.com/go-resty/resty/v2"
"github.com/phayes/freeport"
Expand Down Expand Up @@ -130,7 +131,7 @@ func (s *ClientTestSuite) ProposeAndInsertValidBlock(
common.BytesToAddress(RandomBytes(32)),
common.Big1,
100000,
baseFeeInfo.Basefee,
new(big.Int).SetUint64(uint64(10*params.GWei)+baseFeeInfo.Basefee.Uint64()),
[]byte{},
)
signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(s.RPCClient.L2.ChainID), s.TestAddrPrivKey)
Expand Down Expand Up @@ -198,7 +199,7 @@ func (s *ClientTestSuite) ProposeValidBlock(
common.BytesToAddress(RandomBytes(32)),
common.Big1,
100000,
baseFeeInfo.Basefee,
new(big.Int).SetUint64(uint64(10*params.GWei)+baseFeeInfo.Basefee.Uint64()),
[]byte{},
)
signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(s.RPCClient.L2.ChainID), s.TestAddrPrivKey)
Expand Down
4 changes: 3 additions & 1 deletion pkg/rpc/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ package rpc

import (
"context"
"math/big"
"os"
"strconv"
"testing"

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/params"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -42,7 +44,7 @@ func TestL1ContentFrom(t *testing.T) {
testAddr,
common.Big1,
100000,
baseFeeInfo.Basefee,
new(big.Int).SetUint64(uint64(10*params.GWei)+baseFeeInfo.Basefee.Uint64()),
[]byte{},
)
signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(client.L2.ChainID), testAddrPrivKey)
Expand Down
2 changes: 1 addition & 1 deletion pkg/txlist_validator/tx_list_validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func rlpEncodedTransactionBytes(l int, signed bool) []byte {

tx = types.MustSignNewTx(testKey, types.LatestSigner(genesis.Config), txData)
} else {
tx = types.NewTransaction(1, testAddr, common.Big1, 10, common.Big256, nil)
tx = types.NewTransaction(1, testAddr, common.Big1, 10, new(big.Int).SetUint64(10*params.GWei), nil)
}
txs = append(
txs,
Expand Down

0 comments on commit 3b4c4b7

Please sign in to comment.