Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CLIConfig ¶
type CLIConfig struct { // L1EthRpc is the HTTP provider URL for L1. L1EthRpc string // RollupRpc is the HTTP provider URL for the rollup node. RollupRpc string // L2OOAddress is the L2OutputOracle contract address. L2OOAddress string // PollInterval is the delay between querying L2 for more transaction // and creating a new batch. PollInterval time.Duration // AllowNonFinalized can be set to true to propose outputs // for L2 blocks derived from non-finalized L1 data. AllowNonFinalized bool TxMgrConfig txmgr.CLIConfig RPCConfig ptrpc.CLIConfig LogConfig ptlog.CLIConfig MetricsConfig ptmetrics.CLIConfig PprofConfig ptpprof.CLIConfig }
CLIConfig is a well typed config that is parsed from the CLI params. This also contains config options for auxiliary services. It is transformed into a `Config` before the L2 output submitter is started.
type Config ¶
type Config struct { L2OutputOracleAddr common.Address PollInterval time.Duration NetworkTimeout time.Duration TxManager txmgr.TxManager L1Client *ethclient.Client RollupClient *sources.RollupClient AllowNonFinalized bool }
Config contains the well typed fields that are used to initialize the output submitter. It is intended for programmatic use.
type L2OutputSubmitter ¶
type L2OutputSubmitter struct {
// contains filtered or unexported fields
}
L2OutputSubmitter is responsible for proposing outputs
func NewL2OutputSubmitter ¶
NewL2OutputSubmitter creates a new L2 Output Submitter
func NewL2OutputSubmitterFromCLIConfig ¶
func NewL2OutputSubmitterFromCLIConfig(cfg CLIConfig, l log.Logger, m metrics.Metricer) (*L2OutputSubmitter, error)
NewL2OutputSubmitterFromCLIConfig creates a new L2 Output Submitter given the CLI Config
func (*L2OutputSubmitter) FetchNextOutputInfo ¶
func (l *L2OutputSubmitter) FetchNextOutputInfo(ctx context.Context) (*eth.OutputResponse, bool, error)
FetchNextOutputInfo gets the block number of the next proposal. It returns: the next block number, if the proposal should be made, error
func (*L2OutputSubmitter) ProposeL2OutputTxData ¶
func (l *L2OutputSubmitter) ProposeL2OutputTxData(output *eth.OutputResponse) ([]byte, error)
ProposeL2OutputTxData creates the transaction data for the ProposeL2Output function
func (*L2OutputSubmitter) Start ¶
func (l *L2OutputSubmitter) Start() error
func (*L2OutputSubmitter) Stop ¶
func (l *L2OutputSubmitter) Stop()