Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions deployment/ccip/view/v1_0/rmn_proxy_contract.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ import (

"github.com/ethereum/go-ethereum/common"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_0_0/rmn_proxy_contract"

"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type RMNProxyView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
RMN common.Address `json:"rmn"`
}

func GenerateRMNProxyView(r *rmn_proxy_contract.RMNProxy) (RMNProxyView, error) {
if r == nil {
return RMNProxyView{}, errors.New("cannot generate view for nil RMNProxy")
}
meta, err := commoncldchangesets.NewContractMetaData(r, r.Address())
meta, err := stateutils.NewContractMetaData(r, r.Address())
if err != nil {
return RMNProxyView{}, fmt.Errorf("failed to generate contract metadata for RMNProxy: %w", err)
}
Expand Down
8 changes: 4 additions & 4 deletions deployment/ccip/view/v1_2/price_registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (

"github.com/ethereum/go-ethereum/common"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

price_registry_1_2_0 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/price_registry"

"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type PriceRegistryView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
FeeTokens []common.Address `json:"feeTokens"`
StalenessThreshold string `json:"stalenessThreshold"`
Updaters []common.Address `json:"updaters"`
Expand All @@ -22,7 +22,7 @@ func GeneratePriceRegistryView(pr *price_registry_1_2_0.PriceRegistry) (PriceReg
if pr == nil {
return PriceRegistryView{}, errors.New("cannot generate view for nil PriceRegistry")
}
meta, err := commoncldchangesets.NewContractMetaData(pr, pr.Address())
meta, err := stateutils.NewContractMetaData(pr, pr.Address())
if err != nil {
return PriceRegistryView{}, fmt.Errorf("failed to generate contract metadata for PriceRegistry %s: %w", pr.Address(), err)
}
Expand Down
8 changes: 4 additions & 4 deletions deployment/ccip/view/v1_2/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (

"github.com/ethereum/go-ethereum/common"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router"

"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type RouterView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
IsTestRouter bool `json:"isTestRouter"`
WrappedNative common.Address `json:"wrappedNative,omitempty"`
ARMProxy common.Address `json:"armProxy,omitempty"`
Expand All @@ -20,7 +20,7 @@ type RouterView struct {
}

func GenerateRouterView(r *router.Router, isTestRouter bool) (RouterView, error) {
meta, err := commoncldchangesets.NewContractMetaData(r, r.Address())
meta, err := stateutils.NewContractMetaData(r, r.Address())
if err != nil {
return RouterView{}, fmt.Errorf("view error to get router metadata: %w", err)
}
Expand Down
8 changes: 4 additions & 4 deletions deployment/ccip/view/v1_5/offramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"errors"
"fmt"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_offramp"

"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type OffRampView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
StaticConfig evm_2_evm_offramp.EVM2EVMOffRampStaticConfig `json:"staticConfig"`
DynamicConfig evm_2_evm_offramp.EVM2EVMOffRampDynamicConfig `json:"dynamicConfig"`
}
Expand All @@ -19,7 +19,7 @@ func GenerateOffRampView(r *evm_2_evm_offramp.EVM2EVMOffRamp) (OffRampView, erro
if r == nil {
return OffRampView{}, errors.New("cannot generate view for nil OffRamp")
}
meta, err := commoncldchangesets.NewContractMetaData(r, r.Address())
meta, err := stateutils.NewContractMetaData(r, r.Address())
if err != nil {
return OffRampView{}, fmt.Errorf("failed to generate contract metadata for OffRamp %s: %w", r.Address(), err)
}
Expand Down
6 changes: 3 additions & 3 deletions deployment/ccip/view/v1_5/onramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"errors"
"fmt"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/evm_2_evm_onramp"
)

type OnRampView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
StaticConfig evm_2_evm_onramp.EVM2EVMOnRampStaticConfig `json:"staticConfig"`
DynamicConfig evm_2_evm_onramp.EVM2EVMOnRampDynamicConfig `json:"dynamicConfig"`
}
Expand All @@ -19,7 +19,7 @@ func GenerateOnRampView(r *evm_2_evm_onramp.EVM2EVMOnRamp) (OnRampView, error) {
if r == nil {
return OnRampView{}, errors.New("cannot generate view for nil OnRamp")
}
meta, err := commoncldchangesets.NewContractMetaData(r, r.Address())
meta, err := stateutils.NewContractMetaData(r, r.Address())
if err != nil {
return OnRampView{}, fmt.Errorf("failed to generate contract metadata for OnRamp %s: %w", r.Address(), err)
}
Expand Down
7 changes: 4 additions & 3 deletions deployment/ccip/view/v1_5/rmn.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ import (
"fmt"

"github.com/ethereum/go-ethereum/common"
commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/rmn_contract"

"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type RMNView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
ConfigDetails rmn_contract.GetConfigDetails `json:"configDetails"`
PermaBlessedCommitStores []common.Address `json:"permaBlessedCommitStores"`
}
Expand All @@ -20,7 +21,7 @@ func GenerateRMNView(r *rmn_contract.RMNContract) (RMNView, error) {
if r == nil {
return RMNView{}, errors.New("cannot generate view for nil RMN")
}
meta, err := commoncldchangesets.NewContractMetaData(r, r.Address())
meta, err := stateutils.NewContractMetaData(r, r.Address())
if err != nil {
return RMNView{}, fmt.Errorf("failed to generate contract metadata for RMN: %w", err)
}
Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/view/v1_5/tokenadminregistry.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@ import (
"github.com/ethereum/go-ethereum/common"
"golang.org/x/sync/errgroup"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/token_admin_registry"

"github.com/smartcontractkit/chainlink/deployment/ccip/view/shared"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type TokenAdminRegistryView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
Tokens map[common.Address]TokenDetails `json:"tokens"`
}

Expand All @@ -34,7 +33,7 @@ func GenerateTokenAdminRegistryView(taContract *token_admin_registry.TokenAdminR
if err != nil {
return TokenAdminRegistryView{}, fmt.Errorf("view error for token admin registry: %w", err)
}
tvMeta, err := commoncldchangesets.NewContractMetaData(taContract, taContract.Address())
tvMeta, err := stateutils.NewContractMetaData(taContract, taContract.Address())
if err != nil {
return TokenAdminRegistryView{}, fmt.Errorf("metadata error for token admin registry: %w", err)
}
Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/view/v1_6/ccip_home.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@ import (
"github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3"
"github.com/smartcontractkit/chainlink-ccip/pluginconfig"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/ccip_home"
capabilities_registry "github.com/smartcontractkit/chainlink-evm/gethwrappers/keystone/generated/capabilities_registry_1_1_0"

"github.com/smartcontractkit/chainlink-common/keystore/corekeys/p2pkey"

"github.com/smartcontractkit/chainlink/deployment/ccip/shared"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
cciptypes "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/types"
)

Expand Down Expand Up @@ -85,7 +84,7 @@ type CCIPHomeVersionedConfig struct {
}

type CCIPHomeView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
ChainConfigs []CCIPHomeChainConfigArgView `json:"chainConfigs"`
CapabilityRegistry common.Address `json:"capabilityRegistry"`
Dons []DonView `json:"dons"`
Expand All @@ -106,7 +105,7 @@ func GenerateCCIPHomeView(cr *capabilities_registry.CapabilitiesRegistry, ch *cc
if ch == nil {
return CCIPHomeView{}, errors.New("cannot generate view for nil CCIPHome")
}
meta, err := commoncldchangesets.NewContractMetaData(ch, ch.Address())
meta, err := stateutils.NewContractMetaData(ch, ch.Address())
if err != nil {
return CCIPHomeView{}, fmt.Errorf("failed to generate contract metadata for CCIPHome %s: %w", ch.Address(), err)
}
Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/view/v1_6/feequoter.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ import (

"github.com/ethereum/go-ethereum/common"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

router1_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_3/fee_quoter"

"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type FeeQuoterView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
AuthorizedCallers []string `json:"authorizedCallers,omitempty"`
FeeTokensConfig []FeeTokenConfig `json:"feeTokensConfig,omitempty"`
StaticConfig FeeQuoterStaticConfig `json:"staticConfig"`
Expand Down Expand Up @@ -70,7 +69,7 @@ func GenerateFeeQuoterView(fqContract *fee_quoter.FeeQuoter, router, testRouter
for _, ac := range authorizedCallers {
fq.AuthorizedCallers = append(fq.AuthorizedCallers, ac.Hex())
}
fq.ContractMetaData, err = commoncldchangesets.NewContractMetaData(fqContract, fqContract.Address())
fq.ContractMetaData, err = stateutils.NewContractMetaData(fqContract, fqContract.Address())
if err != nil {
return FeeQuoterView{}, fmt.Errorf("metadata error for FeeQuoter: %w", err)
}
Expand Down
6 changes: 3 additions & 3 deletions deployment/ccip/view/v1_6/noncemanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (

"github.com/ethereum/go-ethereum/common"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/nonce_manager"
)

type NonceManagerView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
AuthorizedCallers []common.Address `json:"authorizedCallers,omitempty"`
}

Expand All @@ -20,7 +20,7 @@ func GenerateNonceManagerView(nm *nonce_manager.NonceManager) (NonceManagerView,
if err != nil {
return NonceManagerView{}, fmt.Errorf("view error for nonce manager: %w", err)
}
nmMeta, err := commoncldchangesets.NewContractMetaData(nm, nm.Address())
nmMeta, err := stateutils.NewContractMetaData(nm, nm.Address())
if err != nil {
return NonceManagerView{}, fmt.Errorf("metadata error for nonce manager: %w", err)
}
Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/view/v1_6/offramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (
router1_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/offramp"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink/deployment/ccip/view/shared"
"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type OffRampView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
DynamicConfig offramp.OffRampDynamicConfig `json:"dynamicConfig"`
SourceChainConfigs map[uint64]OffRampSourceChainConfig `json:"sourceChainConfigs"`
SourceChainConfigsBasedOnTestRouter map[uint64]OffRampSourceChainConfig `json:"sourceChainConfigsBasedOnTestRouter"`
Expand All @@ -33,7 +32,7 @@ func GenerateOffRampView(
offRampContract offramp.OffRampInterface,
routerContract, testRouterContract *router1_2.Router,
) (OffRampView, error) {
tv, err := commoncldchangesets.NewContractMetaData(offRampContract, offRampContract.Address())
tv, err := stateutils.NewContractMetaData(offRampContract, offRampContract.Address())
if err != nil {
return OffRampView{}, err
}
Expand Down
9 changes: 4 additions & 5 deletions deployment/ccip/view/v1_6/onramp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ import (
"github.com/ethereum/go-ethereum/common"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_0/token_admin_registry"

router1_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/onramp"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"
router1_2 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_2_0/router"

"github.com/smartcontractkit/chainlink/deployment/ccip/view/v1_2"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type OnRampView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
DynamicConfig onramp.OnRampDynamicConfig `json:"dynamicConfig"`
StaticConfig onramp.OnRampStaticConfig `json:"staticConfig"`
DestChainSpecificData map[uint64]DestChainSpecificData `json:"destChainSpecificData"`
Expand All @@ -33,7 +32,7 @@ func GenerateOnRampView(
routerContract, testRouterContract *router1_2.Router,
taContract *token_admin_registry.TokenAdminRegistry,
) (OnRampView, error) {
tv, err := commoncldchangesets.NewContractMetaData(onRampContract, onRampContract.Address())
tv, err := stateutils.NewContractMetaData(onRampContract, onRampContract.Address())
if err != nil {
return OnRampView{}, fmt.Errorf("failed to get contract metadata: %w", err)
}
Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/view/v1_6/rmnhome.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import (

"github.com/ethereum/go-ethereum/accounts/abi/bind"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_home"
"github.com/smartcontractkit/chainlink-common/keystore/corekeys/p2pkey"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type RMNHomeView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
CandidateConfig *RMNHomeVersionedConfig `json:"candidateConfig,omitempty"`
ActiveConfig *RMNHomeVersionedConfig `json:"activeConfig,omitempty"`
}
Expand Down Expand Up @@ -164,7 +163,7 @@ func GenerateRMNHomeView(rmnReader *rmn_home.RMNHome) (RMNHomeView, error) {
return RMNHomeView{}, fmt.Errorf("failed to generate candidate config for contract %s: %w", address, err)
}

contractMetaData, err := commoncldchangesets.NewContractMetaData(rmnReader, rmnReader.Address())
contractMetaData, err := stateutils.NewContractMetaData(rmnReader, rmnReader.Address())
if err != nil {
return RMNHomeView{}, fmt.Errorf("failed to create contract metadata for contract %s: %w", address, err)
}
Expand Down
7 changes: 3 additions & 4 deletions deployment/ccip/view/v1_6/rmnremote.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (

chain_selectors "github.com/smartcontractkit/chain-selectors"

commoncldchangesets "github.com/smartcontractkit/cld-changesets/pkg/cldfutil"

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_0/rmn_remote"

"github.com/smartcontractkit/chainlink/deployment/ccip/changeset/globals"
"github.com/smartcontractkit/chainlink/deployment/internal/stateutils"
)

type RMNRemoteCurseEntry struct {
Expand All @@ -18,7 +17,7 @@ type RMNRemoteCurseEntry struct {
}

type RMNRemoteView struct {
commoncldchangesets.ContractMetaData
stateutils.ContractMetaData
IsCursed bool `json:"isCursed"`
Config RMNRemoteVersionedConfig `json:"config"`
CursedSubjectEntries []RMNRemoteCurseEntry `json:"cursedSubjectEntries,omitempty"`
Expand Down Expand Up @@ -47,7 +46,7 @@ func mapCurseSubjects(subjects [][16]byte, family string) []RMNRemoteCurseEntry
}

func GenerateRMNRemoteView(rmnReader *rmn_remote.RMNRemote) (RMNRemoteView, error) {
tv, err := commoncldchangesets.NewContractMetaData(rmnReader, rmnReader.Address())
tv, err := stateutils.NewContractMetaData(rmnReader, rmnReader.Address())
if err != nil {
return RMNRemoteView{}, err
}
Expand Down
Loading
Loading