Commit ddaf933a authored by Andreas Bigger's avatar Andreas Bigger

change recipient to to

parent ca597da5
...@@ -354,11 +354,11 @@ func (l *BatchSubmitter) SendTransaction(ctx context.Context, data []byte) (*typ ...@@ -354,11 +354,11 @@ func (l *BatchSubmitter) SendTransaction(ctx context.Context, data []byte) (*typ
// Create the transaction // Create the transaction
tx, err := l.txMgr.CraftTx(ctx, txmgr.TxCandidate{ tx, err := l.txMgr.CraftTx(ctx, txmgr.TxCandidate{
Recipient: l.Rollup.BatchInboxAddress, To: l.Rollup.BatchInboxAddress,
TxData: data, TxData: data,
From: l.From, From: l.From,
ChainID: l.Rollup.L1ChainID, ChainID: l.Rollup.L1ChainID,
GasLimit: gas, GasLimit: gas,
}) })
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to create tx: %w", err) return nil, fmt.Errorf("failed to create tx: %w", err)
......
...@@ -44,11 +44,11 @@ func TestSendTransaction(t *testing.T) { ...@@ -44,11 +44,11 @@ func TestSendTransaction(t *testing.T) {
gas := uint64(1337) gas := uint64(1337)
candidate := txmgr.TxCandidate{ candidate := txmgr.TxCandidate{
Recipient: batcherInboxAddress, To: batcherInboxAddress,
TxData: txData, TxData: txData,
From: sender, From: sender,
ChainID: chainID, ChainID: chainID,
GasLimit: uint64(0), GasLimit: uint64(0),
} }
tx := types.NewTx(&types.DynamicFeeTx{ tx := types.NewTx(&types.DynamicFeeTx{
......
...@@ -126,8 +126,8 @@ type SimpleTxManager struct { ...@@ -126,8 +126,8 @@ type SimpleTxManager struct {
type TxCandidate struct { type TxCandidate struct {
// TxData is the transaction data to be used in the constructed tx. // TxData is the transaction data to be used in the constructed tx.
TxData []byte TxData []byte
// Recipient is the recipient (or `to`) of the constructed tx. // To is the recipient of the constructed tx.
Recipient common.Address To common.Address
// GasLimit is the gas limit to be used in the constructed tx. // GasLimit is the gas limit to be used in the constructed tx.
GasLimit uint64 GasLimit uint64
// From is the sender (or `from`) of the constructed tx. // From is the sender (or `from`) of the constructed tx.
...@@ -186,7 +186,7 @@ func (m *SimpleTxManager) CraftTx(ctx context.Context, candidate TxCandidate) (* ...@@ -186,7 +186,7 @@ func (m *SimpleTxManager) CraftTx(ctx context.Context, candidate TxCandidate) (*
rawTx := &types.DynamicFeeTx{ rawTx := &types.DynamicFeeTx{
ChainID: candidate.ChainID, ChainID: candidate.ChainID,
Nonce: nonce, Nonce: nonce,
To: &candidate.Recipient, To: &candidate.To,
GasTipCap: gasTipCap, GasTipCap: gasTipCap,
GasFeeCap: gasFeeCap, GasFeeCap: gasFeeCap,
Data: candidate.TxData, Data: candidate.TxData,
...@@ -201,7 +201,7 @@ func (m *SimpleTxManager) CraftTx(ctx context.Context, candidate TxCandidate) (* ...@@ -201,7 +201,7 @@ func (m *SimpleTxManager) CraftTx(ctx context.Context, candidate TxCandidate) (*
// Calculate the intrinsic gas for the transaction // Calculate the intrinsic gas for the transaction
gas, err := m.backend.EstimateGas(ctx, ethereum.CallMsg{ gas, err := m.backend.EstimateGas(ctx, ethereum.CallMsg{
From: candidate.From, From: candidate.From,
To: &candidate.Recipient, To: &candidate.To,
GasFeeCap: gasFeeCap, GasFeeCap: gasFeeCap,
GasTipCap: gasTipCap, GasTipCap: gasTipCap,
Data: rawTx.Data, Data: rawTx.Data,
......
...@@ -57,11 +57,11 @@ func (h testHarness) createTxCandidate() TxCandidate { ...@@ -57,11 +57,11 @@ func (h testHarness) createTxCandidate() TxCandidate {
chainID := big.NewInt(1) chainID := big.NewInt(1)
sender := common.HexToAddress("0xdeadbeef") sender := common.HexToAddress("0xdeadbeef")
return TxCandidate{ return TxCandidate{
Recipient: inbox, To: inbox,
TxData: []byte{0x00, 0x01, 0x02}, TxData: []byte{0x00, 0x01, 0x02},
From: sender, From: sender,
ChainID: chainID, ChainID: chainID,
GasLimit: uint64(1337), GasLimit: uint64(1337),
} }
} }
......
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