Skip to content

Commit

Permalink
feat(taiko-client): check if preconf whitelist address is set before …
Browse files Browse the repository at this point in the history
…fetching it
  • Loading branch information
davidtaikocha committed Feb 21, 2025
1 parent 75db2c2 commit 809adb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/taiko-client/cmd/flags/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ 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"},
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 809adb7

Please sign in to comment.