Skip to content
Open
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/link_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import (
"github.com/Masterminds/semver/v3"
"github.com/ethereum/go-ethereum/common"

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

cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
linkcontracts "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/contracts/link"
"github.com/smartcontractkit/chainlink-evm/gethwrappers/shared/generated/initial/link_token"

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

type LinkTokenView struct {
cldfutil.ContractMetaData
view.ContractMetaData
Decimals uint8 `json:"decimals"`
Supply *big.Int `json:"supply"`
Minters []common.Address `json:"minters"`
Expand Down Expand Up @@ -45,7 +45,7 @@ func GenerateLinkTokenView(lt *link_token.LinkToken) (LinkTokenView, error) {
}

return LinkTokenView{
ContractMetaData: cldfutil.ContractMetaData{
ContractMetaData: view.ContractMetaData{
TypeAndVersion: cldf.TypeAndVersion{
Type: linkcontracts.LinkToken,
Version: *semver.MustParse("1.0.0"),
Expand Down
14 changes: 7 additions & 7 deletions deployment/ccip/view/v1_0/mcms.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (

"github.com/smartcontractkit/chainlink-evm/pkg/utils"

"github.com/smartcontractkit/cld-changesets/pkg/cldfutil"
"github.com/smartcontractkit/chainlink/deployment/internal/view"
)

type Role struct {
Expand Down Expand Up @@ -56,7 +56,7 @@ var (
// --- evm ---

type MCMSView struct {
cldfutil.ContractMetaData
view.ContractMetaData
// Note config is json marshallable.
Config mcmstypes.Config `json:"config"`
}
Expand Down Expand Up @@ -91,7 +91,7 @@ func GenerateMCMSView(mcms owner_helpers.ManyChainMultiSig) (MCMSView, error) {

return MCMSView{
// Has no type and version on the contract
ContractMetaData: cldfutil.ContractMetaData{
ContractMetaData: view.ContractMetaData{
Owner: owner,
Address: mcms.Address(),
},
Expand All @@ -100,7 +100,7 @@ func GenerateMCMSView(mcms owner_helpers.ManyChainMultiSig) (MCMSView, error) {
}

type TimelockView struct {
cldfutil.ContractMetaData
view.ContractMetaData
MembersByRole map[string][]common.Address `json:"membersByRole"`
}

Expand All @@ -123,20 +123,20 @@ func GenerateTimelockView(tl owner_helpers.RBACTimelock) (TimelockView, error) {

return TimelockView{
// Has no type and version or owner.
ContractMetaData: cldfutil.ContractMetaData{
ContractMetaData: view.ContractMetaData{
Address: tl.Address(),
},
MembersByRole: membersByRole,
}, nil
}

type CallProxyView struct {
cldfutil.ContractMetaData
view.ContractMetaData
}

func GenerateCallProxyView(cp owner_helpers.CallProxy) (CallProxyView, error) {
return CallProxyView{
ContractMetaData: cldfutil.ContractMetaData{
ContractMetaData: view.ContractMetaData{
Address: cp.Address(),
},
}, nil
Expand Down
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/view"
)

type RMNProxyView struct {
commoncldchangesets.ContractMetaData
view.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 := view.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_0/static_link_token.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import (

"github.com/Masterminds/semver/v3"

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

cldf "github.com/smartcontractkit/chainlink-deployments-framework/deployment"
linkcontracts "github.com/smartcontractkit/chainlink-deployments-framework/engine/cld/contracts/link"
"github.com/smartcontractkit/chainlink-evm/gethwrappers/generated/link_token_interface"

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

type StaticLinkTokenView struct {
cldfutil.ContractMetaData
view.ContractMetaData
Decimals uint8 `json:"decimals"`
Supply *big.Int `json:"supply"`
}
Expand All @@ -30,7 +30,7 @@ func GenerateStaticLinkTokenView(lt *link_token_interface.LinkToken) (StaticLink
}

return StaticLinkTokenView{
ContractMetaData: cldfutil.ContractMetaData{
ContractMetaData: view.ContractMetaData{
TypeAndVersion: cldf.TypeAndVersion{
Type: linkcontracts.StaticLinkToken,
Version: *semver.MustParse("1.0.0"),
Expand Down
6 changes: 3 additions & 3 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"
"github.com/smartcontractkit/chainlink/deployment/internal/view"

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

type PriceRegistryView struct {
commoncldchangesets.ContractMetaData
view.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 := view.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
6 changes: 3 additions & 3 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/deployment/internal/view"

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

type RouterView struct {
commoncldchangesets.ContractMetaData
view.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 := view.NewContractMetaData(r, r.Address())
if err != nil {
return RouterView{}, fmt.Errorf("view error to get router metadata: %w", err)
}
Expand Down
4 changes: 2 additions & 2 deletions deployment/ccip/view/v1_5/commit_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package v1_5
import (
"github.com/ethereum/go-ethereum/common"

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

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

type CommitStoreView struct {
commoncldchangesets.ContractMetaData
view.ContractMetaData
DynamicConfig commit_store.CommitStoreDynamicConfig `json:"dynamicConfig"`
ExpectedNextSequenceNumber uint64 `json:"expectedNextSequenceNumber"`
LatestPriceEpochAndRound uint64 `json:"latestPriceEpochAndRound"`
Expand Down
6 changes: 3 additions & 3 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/deployment/internal/view"

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

type OffRampView struct {
commoncldchangesets.ContractMetaData
view.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 := view.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/view"

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

type OnRampView struct {
commoncldchangesets.ContractMetaData
view.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 := view.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/view"
)

type RMNView struct {
commoncldchangesets.ContractMetaData
view.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 := view.NewContractMetaData(r, r.Address())
if err != nil {
return RMNView{}, fmt.Errorf("failed to generate contract metadata for RMN: %w", err)
}
Expand Down
5 changes: 2 additions & 3 deletions deployment/ccip/view/v1_5/token_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import (
"github.com/ethereum/go-ethereum/accounts/abi/bind"
"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/burn_mint_token_pool_and_proxy"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_1/token_pool"

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

type TokenPoolContract interface {
Expand Down Expand Up @@ -109,7 +108,7 @@ func GenerateTokenPoolView(pool TokenPoolContract, priceFeed common.Address) (v1
}

return v1_5_1.TokenPoolView{
ContractMetaData: commoncldchangesets.ContractMetaData{
ContractMetaData: view.ContractMetaData{
TypeAndVersion: typeAndVersion,
Address: pool.Address(),
Owner: owner,
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/view"
)

type TokenAdminRegistryView struct {
commoncldchangesets.ContractMetaData
view.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 := view.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_5_1/token_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"github.com/ethereum/go-ethereum/common"
"golang.org/x/exp/maps"

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

"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_1/burn_from_mint_token_pool"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_1/burn_mint_token_pool"
"github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_5_1/burn_with_from_mint_token_pool"
Expand All @@ -19,6 +17,7 @@ import (
lock_release_token_pool_v1_6_1 "github.com/smartcontractkit/chainlink-ccip/chains/evm/gobindings/generated/v1_6_1/lock_release_token_pool"

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

type TokenPoolContract interface {
Expand Down Expand Up @@ -107,7 +106,7 @@ type PoolView struct {
}

type TokenPoolView struct {
commoncldchangesets.ContractMetaData
view.ContractMetaData
Token common.Address `json:"token"`
TokenPriceFeed common.Address `json:"tokenPriceFeed"`
RemoteChainConfigs map[uint64]RemoteChainConfig `json:"remoteChainConfigs"`
Expand Down Expand Up @@ -191,7 +190,7 @@ func GenerateTokenPoolView(pool TokenPoolContract, priceFeed common.Address) (To
}

return TokenPoolView{
ContractMetaData: commoncldchangesets.ContractMetaData{
ContractMetaData: view.ContractMetaData{
TypeAndVersion: typeAndVersion,
Address: pool.Address(),
Owner: owner,
Expand Down
Loading
Loading