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
740e63d1
Commit
740e63d1
authored
Dec 19, 2022
by
Joshua Gutow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
op-proposer: Reorganize packge
parent
36245294
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
16 deletions
+14
-16
main.go
op-proposer/cmd/main.go
+2
-3
config.go
op-proposer/proposer/config.go
+1
-1
driver.go
op-proposer/proposer/driver.go
+4
-4
interface.go
op-proposer/proposer/interface.go
+1
-1
l2_output_submitter.go
op-proposer/proposer/l2_output_submitter.go
+2
-3
service.go
op-proposer/proposer/service.go
+4
-4
No files found.
op-proposer/cmd/main.go
View file @
740e63d1
...
@@ -6,8 +6,8 @@ import (
...
@@ -6,8 +6,8 @@ import (
"github.com/urfave/cli"
"github.com/urfave/cli"
proposer
"github.com/ethereum-optimism/optimism/op-proposer"
"github.com/ethereum-optimism/optimism/op-proposer/flags"
"github.com/ethereum-optimism/optimism/op-proposer/flags"
"github.com/ethereum-optimism/optimism/op-proposer/proposer"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
)
)
...
@@ -26,8 +26,7 @@ func main() {
...
@@ -26,8 +26,7 @@ func main() {
app
.
Version
=
fmt
.
Sprintf
(
"%s-%s-%s"
,
Version
,
GitCommit
,
GitDate
)
app
.
Version
=
fmt
.
Sprintf
(
"%s-%s-%s"
,
Version
,
GitCommit
,
GitDate
)
app
.
Name
=
"op-proposer"
app
.
Name
=
"op-proposer"
app
.
Usage
=
"L2Output Submitter"
app
.
Usage
=
"L2Output Submitter"
app
.
Description
=
"Service for generating and submitting L2 Output "
+
app
.
Description
=
"Service for generating and submitting L2 Output checkpoints to the L2OutputOracle contract"
"checkpoints to the L2OutputOracle contract"
app
.
Action
=
proposer
.
Main
(
Version
)
app
.
Action
=
proposer
.
Main
(
Version
)
err
:=
app
.
Run
(
os
.
Args
)
err
:=
app
.
Run
(
os
.
Args
)
...
...
op-proposer/config.go
→
op-proposer/
proposer/
config.go
View file @
740e63d1
package
op_
proposer
package
proposer
import
(
import
(
"time"
"time"
...
...
op-proposer/
drivers/l2output
/driver.go
→
op-proposer/
proposer
/driver.go
View file @
740e63d1
package
l2output
package
proposer
import
(
import
(
"context"
"context"
...
@@ -22,7 +22,7 @@ import (
...
@@ -22,7 +22,7 @@ import (
var
bigOne
=
big
.
NewInt
(
1
)
var
bigOne
=
big
.
NewInt
(
1
)
var
supportedL2OutputVersion
=
eth
.
Bytes32
{}
var
supportedL2OutputVersion
=
eth
.
Bytes32
{}
type
Config
struct
{
type
Driver
Config
struct
{
Log
log
.
Logger
Log
log
.
Logger
Name
string
Name
string
...
@@ -48,14 +48,14 @@ type Config struct {
...
@@ -48,14 +48,14 @@ type Config struct {
}
}
type
Driver
struct
{
type
Driver
struct
{
cfg
Config
cfg
Driver
Config
l2ooContract
*
bindings
.
L2OutputOracle
l2ooContract
*
bindings
.
L2OutputOracle
rawL2ooContract
*
bind
.
BoundContract
rawL2ooContract
*
bind
.
BoundContract
walletAddr
common
.
Address
walletAddr
common
.
Address
l
log
.
Logger
l
log
.
Logger
}
}
func
NewDriver
(
cfg
Config
)
(
*
Driver
,
error
)
{
func
NewDriver
(
cfg
Driver
Config
)
(
*
Driver
,
error
)
{
l2ooContract
,
err
:=
bindings
.
NewL2OutputOracle
(
cfg
.
L2OOAddr
,
cfg
.
L1Client
)
l2ooContract
,
err
:=
bindings
.
NewL2OutputOracle
(
cfg
.
L2OOAddr
,
cfg
.
L1Client
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
err
return
nil
,
err
...
...
op-proposer/
drivers
/interface.go
→
op-proposer/
proposer
/interface.go
View file @
740e63d1
package
drivers
package
proposer
import
(
import
(
"context"
"context"
...
...
op-proposer/l2_output_submitter.go
→
op-proposer/
proposer/
l2_output_submitter.go
View file @
740e63d1
package
op_
proposer
package
proposer
import
(
import
(
"context"
"context"
...
@@ -25,7 +25,6 @@ import (
...
@@ -25,7 +25,6 @@ import (
"github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/client"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-node/sources"
"github.com/ethereum-optimism/optimism/op-proposer/drivers/l2output"
"github.com/ethereum-optimism/optimism/op-proposer/txmgr"
"github.com/ethereum-optimism/optimism/op-proposer/txmgr"
opcrypto
"github.com/ethereum-optimism/optimism/op-service/crypto"
opcrypto
"github.com/ethereum-optimism/optimism/op-service/crypto"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
oplog
"github.com/ethereum-optimism/optimism/op-service/log"
...
@@ -210,7 +209,7 @@ func NewL2OutputSubmitterWithSigner(
...
@@ -210,7 +209,7 @@ func NewL2OutputSubmitterWithSigner(
SafeAbortNonceTooLowCount
:
cfg
.
SafeAbortNonceTooLowCount
,
SafeAbortNonceTooLowCount
:
cfg
.
SafeAbortNonceTooLowCount
,
}
}
l2OutputDriver
,
err
:=
l2output
.
NewDriver
(
l2output
.
Config
{
l2OutputDriver
,
err
:=
NewDriver
(
Driver
Config
{
Log
:
l
,
Log
:
l
,
Name
:
"L2Output Submitter"
,
Name
:
"L2Output Submitter"
,
L1Client
:
l1Client
,
L1Client
:
l1Client
,
...
...
op-proposer/service.go
→
op-proposer/
proposer/
service.go
View file @
740e63d1
package
op_
proposer
package
proposer
import
(
import
(
"context"
"context"
...
@@ -13,9 +13,9 @@ import (
...
@@ -13,9 +13,9 @@ import (
"github.com/ethereum/go-ethereum/log"
"github.com/ethereum/go-ethereum/log"
)
)
// Driver is an interface for creating and submitting transactions for a
// Driver
Interface
is an interface for creating and submitting transactions for a
// specific contract.
// specific contract.
type
Driver
interface
{
type
Driver
Interface
interface
{
// Name is an identifier used to prefix logs for a particular service.
// Name is an identifier used to prefix logs for a particular service.
Name
()
string
Name
()
string
...
@@ -53,7 +53,7 @@ type Driver interface {
...
@@ -53,7 +53,7 @@ type Driver interface {
type
ServiceConfig
struct
{
type
ServiceConfig
struct
{
Log
log
.
Logger
Log
log
.
Logger
Context
context
.
Context
Context
context
.
Context
Driver
Driver
Driver
Driver
Interface
PollInterval
time
.
Duration
PollInterval
time
.
Duration
L1Client
*
ethclient
.
Client
L1Client
*
ethclient
.
Client
TxManagerConfig
txmgr
.
Config
TxManagerConfig
txmgr
.
Config
...
...
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