Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
ddaf933a
Commit
ddaf933a
authored
Mar 22, 2023
by
Andreas Bigger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change recipient to to
⚙
parent
ca597da5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
driver.go
op-batcher/batcher/driver.go
+5
-5
driver_test.go
op-batcher/batcher/driver_test.go
+5
-5
txmgr.go
op-service/txmgr/txmgr.go
+4
-4
txmgr_test.go
op-service/txmgr/txmgr_test.go
+5
-5
No files found.
op-batcher/batcher/driver.go
View file @
ddaf933a
...
@@ -354,7 +354,7 @@ func (l *BatchSubmitter) SendTransaction(ctx context.Context, data []byte) (*typ
...
@@ -354,7 +354,7 @@ 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
,
...
...
op-batcher/batcher/driver_test.go
View file @
ddaf933a
...
@@ -44,7 +44,7 @@ func TestSendTransaction(t *testing.T) {
...
@@ -44,7 +44,7 @@ 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
,
...
...
op-service/txmgr/txmgr.go
View file @
ddaf933a
...
@@ -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
,
...
...
op-service/txmgr/txmgr_test.go
View file @
ddaf933a
...
@@ -57,7 +57,7 @@ func (h testHarness) createTxCandidate() TxCandidate {
...
@@ -57,7 +57,7 @@ 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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment