Commit d42b469d authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into refcell/l1_rpc

parents dae54d2c 51fb98aa
......@@ -57,7 +57,7 @@ func Main(version string) func(cliCtx *cli.Context) error {
signer := func(chainID *big.Int) SignerFn {
return func(ctx context.Context, rawTx types.TxData) (*types.Transaction, error) {
tx := types.NewTx(rawTx)
return signerClient.SignTransaction(ctx, tx)
return signerClient.SignTransaction(ctx, chainID, tx)
}
}
bs, err := NewBatchSubmitterWithSigner(cfg, common.HexToAddress(cfg.SignerConfig.Address), signer, l)
......
......@@ -176,7 +176,7 @@ func NewL2OutputSubmitter(cfg CLIConfig, l log.Logger) (*L2OutputSubmitter, erro
if address.String() != cfg.SignerConfig.Address {
return nil, fmt.Errorf("attempting to sign for %s, expected %s: ", address, cfg.SignerConfig.Address)
}
return signerClient.SignTransaction(ctx, tx)
return signerClient.SignTransaction(ctx, chainID, tx)
}
}
} else {
......
......@@ -5,6 +5,7 @@ import (
"crypto/tls"
"crypto/x509"
"fmt"
"math/big"
"net/http"
"os"
"time"
......@@ -88,8 +89,8 @@ func (s *SignerClient) pingVersion() (string, error) {
return v, nil
}
func (s *SignerClient) SignTransaction(ctx context.Context, tx *types.Transaction) (*types.Transaction, error) {
args := NewTransactionArgsFromTransaction(tx)
func (s *SignerClient) SignTransaction(ctx context.Context, chainId *big.Int, tx *types.Transaction) (*types.Transaction, error) {
args := NewTransactionArgsFromTransaction(chainId, tx)
var result hexutil.Bytes
if err := s.client.CallContext(ctx, &result, "eth_signTransaction", args); err != nil {
......
......@@ -31,7 +31,7 @@ type TransactionArgs struct {
}
// NewTransactionArgsFromTransaction creates a TransactionArgs struct from an EIP-1559 transaction
func NewTransactionArgsFromTransaction(tx *types.Transaction) *TransactionArgs {
func NewTransactionArgsFromTransaction(chainId *big.Int, tx *types.Transaction) *TransactionArgs {
data := hexutil.Bytes(tx.Data())
nonce := hexutil.Uint64(tx.Nonce())
gas := hexutil.Uint64(tx.Gas())
......@@ -42,7 +42,7 @@ func NewTransactionArgsFromTransaction(tx *types.Transaction) *TransactionArgs {
Value: (*hexutil.Big)(tx.Value()),
Gas: &gas,
To: tx.To(),
ChainID: (*hexutil.Big)(tx.ChainId()),
ChainID: (*hexutil.Big)(chainId),
MaxFeePerGas: (*hexutil.Big)(tx.GasFeeCap()),
MaxPriorityFeePerGas: (*hexutil.Big)(tx.GasTipCap()),
AccessList: &accesses,
......
......@@ -2,9 +2,9 @@
"finalSystemOwner": "0x858F0751ef8B4067f0d2668C076BDB50a8549fbF",
"controller": "0x2d30335B0b807bBa1682C487BaAFD2Ad6da5D675",
"l1StartingBlockTag": "0x5164297e1cfd0eb3e09f416269cfb04640180e12ff121b5fe815264620e4318d",
"l1StartingBlockTag": "0x19c7e6b18fe156e45f4cfef707294fd8f079fa9c30a7b7cd6ec1ce3682ec6a2e",
"l1ChainID": 5,
"l2ChainID": 999,
"l2ChainID": 998,
"l2BlockTime": 2,
"maxSequencerDrift": 1200,
......@@ -12,10 +12,10 @@
"channelTimeout": 120,
"p2pSequencerAddress": "0xf1a4a22a65Ff01EBB23A580146a3ED49D70c8932",
"batchInboxAddress": "0xff00000000000000000000000000000000000999",
"batchInboxAddress": "0xff00000000000000000000000000000000000998",
"batchSenderAddress": "0xE0Fa1Cc7a0FD5bD82b9A06b08FD6C4563E6635C2",
"l2OutputOracleSubmissionInterval": 20,
"l2OutputOracleStartingTimestamp": 1673246064,
"l2OutputOracleSubmissionInterval": 120,
"l2OutputOracleStartingTimestamp": 1674507888,
"l2OutputOracleStartingBlockNumber": 1,
"l2OutputOracleProposer": "0xE06d39D4B8DC05E562353F060DED346AC4acC077",
"l2OutputOracleChallenger": "0xE06d39D4B8DC05E562353F060DED346AC4acC077",
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment