Skip to content

Commit

Permalink
fix(taiko-client): check if preconfirmation whitelist address is set …
Browse files Browse the repository at this point in the history
…before fetching it (#18982)
  • Loading branch information
davidtaikocha authored Feb 21, 2025
1 parent e14cad6 commit 1883e05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/taiko-client/cmd/flags/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ var (
EnvVars: []string{"PRECONFIRMATION_SERVER_SIGNATURE_CHECK"},
}
PreconfWhitelistAddress = &cli.StringFlag{
Name: "preconfWhitelist",
Usage: "PreconfWhitelist L1 `address`",
Name: "preconfirmation.whitelist",
Usage: "PreconfWhitelist contract L1 `address`",
Required: false,
Category: driverCategory,
EnvVars: []string{"PRECONF_WHITELIST"},
EnvVars: []string{"PRECONFIRMATION_WHITELIST"},
}
)

Expand Down
4 changes: 4 additions & 0 deletions packages/taiko-client/pkg/rpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,10 @@ func (c *Client) GetProofVerifierPacaya(opts *bind.CallOpts) (common.Address, er

// GetPreconfWhiteListOperator resolves the current preconf whitelist operator address.
func (c *Client) GetPreconfWhiteListOperator(opts *bind.CallOpts) (common.Address, error) {
if c.PacayaClients.PreconfWhitelist == nil {
return common.Address{}, errors.New("preconf whitelist contract is not set")
}

var cancel context.CancelFunc
if opts == nil {
opts = &bind.CallOpts{Context: context.Background()}
Expand Down

0 comments on commit 1883e05

Please sign in to comment.