Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

fix(prover): prover rpc didnt have taiko token address #407

Merged
merged 15 commits into from
Sep 26, 2023
1 change: 1 addition & 0 deletions cmd/flags/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,5 @@ var ProverFlags = MergeFlags(CommonFlags, []cli.Flag{
ProverHTTPServerPort,
ProverCapacity,
MaxExpiry,
TaikoTokenAddress,
})
2 changes: 2 additions & 0 deletions prover/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Config struct {
L2HttpEndpoint string
TaikoL1Address common.Address
TaikoL2Address common.Address
TaikoTokenAddress common.Address
L1ProverPrivKey *ecdsa.PrivateKey
ZKEvmRpcdEndpoint string
ZkEvmRpcdParamsPath string
Expand Down Expand Up @@ -134,6 +135,7 @@ func NewConfigFromCliContext(c *cli.Context) (*Config, error) {
L2HttpEndpoint: c.String(flags.L2HTTPEndpoint.Name),
TaikoL1Address: common.HexToAddress(c.String(flags.TaikoL1Address.Name)),
TaikoL2Address: common.HexToAddress(c.String(flags.TaikoL2Address.Name)),
TaikoTokenAddress: common.HexToAddress(c.String(flags.TaikoTokenAddress.Name)),
L1ProverPrivKey: l1ProverPrivKey,
ZKEvmRpcdEndpoint: c.String(flags.ZkEvmRpcdEndpoint.Name),
ZkEvmRpcdParamsPath: c.String(flags.ZkEvmRpcdParamsPath.Name),
Expand Down
15 changes: 8 additions & 7 deletions prover/prover.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,14 @@ func InitFromConfig(ctx context.Context, p *Prover, cfg *Config) (err error) {

// Clients
if p.rpc, err = rpc.NewClient(p.ctx, &rpc.ClientConfig{
L1Endpoint: cfg.L1WsEndpoint,
L2Endpoint: cfg.L2WsEndpoint,
TaikoL1Address: cfg.TaikoL1Address,
TaikoL2Address: cfg.TaikoL2Address,
RetryInterval: cfg.BackOffRetryInterval,
Timeout: cfg.RPCTimeout,
BackOffMaxRetrys: new(big.Int).SetUint64(p.cfg.BackOffMaxRetrys),
L1Endpoint: cfg.L1WsEndpoint,
L2Endpoint: cfg.L2WsEndpoint,
TaikoL1Address: cfg.TaikoL1Address,
TaikoL2Address: cfg.TaikoL2Address,
TaikoTokenAddress: cfg.TaikoTokenAddress,
RetryInterval: cfg.BackOffRetryInterval,
Timeout: cfg.RPCTimeout,
BackOffMaxRetrys: new(big.Int).SetUint64(p.cfg.BackOffMaxRetrys),
}); err != nil {
return err
}
Expand Down
Loading