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