Skip to content

Commit

Permalink
feat(taiko-client): update bindings based on protocol TierRouter up…
Browse files Browse the repository at this point in the history
…date (#17475)

Co-authored-by: Gavin Yu <[email protected]>
  • Loading branch information
davidtaikocha and YoGhurt111 authored Jun 4, 2024
1 parent d9dd337 commit 0e9d160
Show file tree
Hide file tree
Showing 7 changed files with 593 additions and 221 deletions.
2 changes: 1 addition & 1 deletion packages/taiko-client/bindings/.githead
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e36d5b7708b11b14e811f066fb7302a15fd7c24a
3ae25fdfc1452c0088afd2711dfbdbbefb670efc
148 changes: 1 addition & 147 deletions packages/taiko-client/bindings/gen_assignment_hook.go

Large diffs are not rendered by default.

486 changes: 445 additions & 41 deletions packages/taiko-client/bindings/gen_guardian_prover.go

Large diffs are not rendered by default.

123 changes: 98 additions & 25 deletions packages/taiko-client/bindings/gen_prover_set.go

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/taiko-client/bindings/gen_taiko_token.go

Large diffs are not rendered by default.

33 changes: 32 additions & 1 deletion packages/taiko-client/bindings/gen_tier_provider.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions packages/taiko-client/pkg/rpc/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,22 @@ func (c *Client) GetTiers(ctx context.Context) ([]*TierProviderTierWithID, error
ctxWithTimeout, cancel := ctxWithTimeoutOrDefault(ctx, defaultTimeout)
defer cancel()

tierProviderAddress, err := c.TaikoL1.Resolve0(&bind.CallOpts{Context: ctx}, StringToBytes32("tier_provider"), false)
tierRouterAddress, err := c.TaikoL1.Resolve0(&bind.CallOpts{Context: ctx}, StringToBytes32("tier_router"), false)
if err != nil {
return nil, err
}

tierProvider, err := bindings.NewTierProvider(tierProviderAddress, c.L1)
tierRouter, err := bindings.NewTierProvider(tierRouterAddress, c.L1)
if err != nil {
return nil, err
}

providerAddress, err := tierRouter.GetProvider(&bind.CallOpts{Context: ctxWithTimeout}, common.Big0)
if err != nil {
return nil, err
}

tierProvider, err := bindings.NewTierProvider(providerAddress, c.L1)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 0e9d160

Please sign in to comment.