Skip to content

Commit

Permalink
update capability view definition (#15086)
Browse files Browse the repository at this point in the history
* update capability view defintion

* test wip

* wip, better types for view

* finish type refactoring

* cleanup

* more denormalized form

* code cleanup

* simplify helpers
  • Loading branch information
krehermann authored Nov 4, 2024
1 parent e466f4f commit 1b555ff
Show file tree
Hide file tree
Showing 6 changed files with 626 additions and 29 deletions.
2 changes: 1 addition & 1 deletion deployment/ccip/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (c CCIPChainState) GenerateView() (view.ChainView, error) {
chainView.RMNProxy[c.RMNProxy.Address().Hex()] = rmnProxyView
}
if c.CapabilityRegistry != nil {
capRegView, err := common_v1_0.GenerateCapRegView(c.CapabilityRegistry)
capRegView, err := common_v1_0.GenerateCapabilityRegistryView(c.CapabilityRegistry)
if err != nil {
return chainView, err
}
Expand Down
14 changes: 7 additions & 7 deletions deployment/ccip/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ type ChainView struct {
TokenAdminRegistry map[string]v1_5.TokenAdminRegistryView `json:"tokenAdminRegistry,omitempty"`
CommitStore map[string]v1_5.CommitStoreView `json:"commitStore,omitempty"`
// v1.6
FeeQuoter map[string]v1_6.FeeQuoterView `json:"feeQuoter,omitempty"`
NonceManager map[string]v1_6.NonceManagerView `json:"nonceManager,omitempty"`
RMN map[string]v1_6.RMNRemoteView `json:"rmn,omitempty"`
OnRamp map[string]v1_6.OnRampView `json:"onRamp,omitempty"`
OffRamp map[string]v1_6.OffRampView `json:"offRamp,omitempty"`
CapabilityRegistry map[string]common_v1_0.CapRegView `json:"capabilityRegistry,omitempty"`
FeeQuoter map[string]v1_6.FeeQuoterView `json:"feeQuoter,omitempty"`
NonceManager map[string]v1_6.NonceManagerView `json:"nonceManager,omitempty"`
RMN map[string]v1_6.RMNRemoteView `json:"rmn,omitempty"`
OnRamp map[string]v1_6.OnRampView `json:"onRamp,omitempty"`
OffRamp map[string]v1_6.OffRampView `json:"offRamp,omitempty"`
CapabilityRegistry map[string]common_v1_0.CapabilityRegistryView `json:"capabilityRegistry,omitempty"`
}

func NewChain() ChainView {
Expand All @@ -43,7 +43,7 @@ func NewChain() ChainView {
RMN: make(map[string]v1_6.RMNRemoteView),
OnRamp: make(map[string]v1_6.OnRampView),
OffRamp: make(map[string]v1_6.OffRampView),
CapabilityRegistry: make(map[string]common_v1_0.CapRegView),
CapabilityRegistry: make(map[string]common_v1_0.CapabilityRegistryView),
}
}

Expand Down
Loading

0 comments on commit 1b555ff

Please sign in to comment.