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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions contracts/ccip/registry-pools/burn-mint-token-pool/daml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sdk-version: 3.4.11
name: ccip-registry-burn-mint-token-pool-v2
source: daml
version: 2.1.1
build-options:
- "-Wno-crypto-text-is-alpha"
- "-Werror=unused-dependency"
data-dependencies:
- ../../../dependencies/splice/splice-api-token-metadata-v1-1.0.0.dar
- ../../../dependencies/splice/splice-api-token-holding-v1-1.0.0.dar
- ../../../dependencies/splice/splice-api-token-burn-mint-v1-1.0.0.dar
- ../../../dependencies/splice/splice-api-token-transfer-instruction-v1-1.0.0.dar
- ../../../mcms/api/.daml/dist/mcms-api-1.0.0.dar
- ../../../chainlink/api/.daml/dist/chainlink-api-2.0.0.dar
- ../../codec/.daml/dist/ccip-codec-v2-2.0.0.dar
- ../../api/.daml/dist/ccip-api-v2-2.0.0.dar
- ../../extension-api/.daml/dist/ccip-extension-api-v2-2.0.0.dar
- ../../events/.daml/dist/ccip-events-v2-2.0.0.dar
- ../../tickets/.daml/dist/ccip-tickets-v2-2.0.0.dar
- ../../core/.daml/dist/ccip-core-v2-2.1.1.dar
- ../../utils/.daml/dist/ccip-utils-v2-2.1.0.dar
- ../rate-limiter/.daml/dist/ccip-registry-rate-limiter-v2-2.0.1.dar
dependencies:
- daml-prim
- daml-stdlib

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
-- | Types for BurnMintTokenPool, extracted to avoid circular dependencies
module CCIP.Registry.BurnMintTokenPoolV2Types where

import DA.Crypto.Text (BytesHex)

import qualified Chainlink.InstanceAddress

import qualified CCIP.CodecV2.FinalityConfig

data ChainUpdate = ChainUpdate
with
remoteChainSelector : Numeric 0 -- Chain selector for this config update
remotePools : [BytesHex] -- Allowed remote pool addresses for this chain
remoteTokenAddress : BytesHex -- The token address on the remote chain
inboundCCVs : [Chainlink.InstanceAddress.RawInstanceAddress] -- Required CCVs for incoming transfers
outboundCCVs : [Chainlink.InstanceAddress.RawInstanceAddress] -- Required CCVs for outgoing transfers
finalityConfig : CCIP.CodecV2.FinalityConfig.FinalityConfig -- Allowed finality policy, "WaitForFinality" means finalized-only
inboundRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress -- Required rate limiter for incoming transfers
inboundCustomBlockConfirmationsRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress -- Required rate limiter for FTF incoming transfers
outboundRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress -- Required rate limiter for outgoing transfers
deriving (Eq, Show)

data RemoteChainConfig = RemoteChainConfig
with
remotePools : [BytesHex] -- Allowed remote pool addresses for this chain
remoteTokenAddress : BytesHex -- The token address on the remote chain
inboundCCVs : [Chainlink.InstanceAddress.RawInstanceAddress] -- Required CCVs for incoming transfers
outboundCCVs : [Chainlink.InstanceAddress.RawInstanceAddress] -- Required CCVs for outgoing transfers
finalityConfig : CCIP.CodecV2.FinalityConfig.FinalityConfig -- Allowed finality policy, "WaitForFinality" means finalized-only
inboundRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress -- Required rate limiter for incoming transfers
inboundCustomBlockConfirmationsRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress -- Required rate limiter for FTF incoming transfers
outboundRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress -- Required rate limiter for outgoing transfers
deriving (Eq, Show)

data TokenTransferFeeConfigArgs = TokenTransferFeeConfigArgs
with
destChainSelector : Numeric 0 -- Chain selector for this config update
isEnabled : Bool -- Whether this config is enabled
destGasOverhead : Int -- Gas charged to execute the token transfer on the destination chain.
destBytesOverhead : Int -- Data availability bytes.
feeUSDCents : Numeric 0 -- Fee to charge for token transfers, multiples of 0.01 USD.
feeBps : Numeric 0 -- Proportional token fee in bps, applied by the pool during LockOrBurn.
deriving (Eq, Show)

data TokenTransferFeeConfig = TokenTransferFeeConfig
with
isEnabled : Bool -- Whether this config is enabled
destGasOverhead : Int -- Gas charged to execute the token transfer on the destination chain.
destBytesOverhead : Int -- Data availability bytes.
feeUSDCents : Numeric 0 -- Fee to charge for token transfers, multiples of 0.01 USD.
feeBps : Numeric 0 -- Proportional token fee in bps, applied by the pool during LockOrBurn.
deriving (Eq, Show)

data RateLimitConfigArgs = RateLimitConfigArgs
with
remoteChainSelector : Numeric 0
inboundRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress
inboundCustomBlockConfirmationsRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress
outboundRateLimiter : Chainlink.InstanceAddress.RawInstanceAddress
deriving (Eq, Show)

-- | Transfer timeout configuration for pending TransferInstructions.
-- Splice 0.6.11 enforces tokenStandardMaxTTL (default 90 days) on transfer
-- lifetimes, so executeBefore cannot be unbounded. Use RelativeHours for tokens
-- with stricter expiry constraints. Indefinite caps at the Splice default max.
data TransferTimeout
= Indefinite -- Use now + 90 days - capped by Splice tokenStandardMaxTTL
| RelativeHours Int -- Use now + N hours - for tokens with expiry constraints
deriving (Eq, Show)

-- ===========================================================================
-- MCMS Choice Params Types
-- ===========================================================================

-- | Params for SetDynamicConfig choice
data SetDynamicConfigParams = SetDynamicConfigParams
with
rateLimitAdmin : Optional Party
deriving (Eq, Show)

-- | Params for SetObservers choice
data SetObserversParams = SetObserversParams
with
observers : [Party]
deriving (Eq, Show)

-- | Params for ApplyChainUpdates choice
data ApplyChainUpdatesParams = ApplyChainUpdatesParams
with
remoteChainSelectorsToRemove : [Numeric 0]
chainsToAdd : [ChainUpdate]
deriving (Eq, Show)

-- | Params for ApplyTokenTransferFeeConfigUpdates choice
data ApplyTokenTransferFeeConfigUpdatesParams = ApplyTokenTransferFeeConfigUpdatesParams
with
tokenTransferFeeConfigArgs : [TokenTransferFeeConfigArgs]
disableTokenTransferFeeConfigArgs : [Numeric 0]
deriving (Eq, Show)

-- | Params for SetRateLimiterReferences choice (poolOwner only; MCMS entrypoint).
-- | Updates which RateLimiter contract identities the pool references per remote chain.
data SetRateLimiterReferencesParams = SetRateLimiterReferencesParams
with
rateLimitConfigArgs : [RateLimitConfigArgs]
deriving (Eq, Show)

-- | Params for SetRateLimitConfig (tune capacity/rate/isEnabled; MCMS entrypoint).
-- | rateLimiterInstanceAddress: full Chainlink.InstanceAddress.RawInstanceAddress (instanceId@owner), not bare instanceId.
-- | Resolved against MCMS contractIds map key; pool choice receives the resulting ContractId.
data SetRateLimitConfigParams = SetRateLimitConfigParams
with
caller : Party
rateLimiterInstanceAddress : Chainlink.InstanceAddress.RawInstanceAddress
newIsEnabled : Bool
newCapacity : Numeric 0
newRate : Numeric 0
deriving (Eq, Show)

-- | Params for SetTransferTimeout choice
data SetTransferTimeoutParams = SetTransferTimeoutParams
with
transferTimeout : TransferTimeout
deriving (Eq, Show)

-- | MCMS params: set one ChoiceContext entry from a serialized AnyValue payload.
-- | valuePayload must be exactly encodeAnyValue output (see CCIP.ContextCodec); AV_ContractId is not round-trippable in bytes—use AddPoolReceiveContextContractValueParams instead.
data AddPoolReceiveContextNonContractValueParams = AddPoolReceiveContextNonContractValueParams
with
contextKey : Text
valuePayload : BytesHex
deriving (Eq, Show)

-- | MCMS params: set one ChoiceContext entry to AV_ContractId by resolving referentInstanceAddress in the MCMS contractIds map.
data AddPoolReceiveContextContractValueParams = AddPoolReceiveContextContractValueParams
with
contextKey : Text
referentInstanceAddress : Chainlink.InstanceAddress.RawInstanceAddress
deriving (Eq, Show)

-- | MCMS params: remove one ChoiceContext entry by key.
data RemovePoolReceiveContextValueParams = RemovePoolReceiveContextValueParams
with
contextKey : Text
deriving (Eq, Show)

-- | Config for one RateLimiter to deploy alongside a lane, via Initialize. Direction/mode are
-- implied by which slot of LaneDeploySpec this occupies, not repeated here.
data RateLimiterDeploySpec = RateLimiterDeploySpec
with
instanceId : Text
isEnabled : Bool
capacity : Numeric 0
rate : Numeric 0
deriving (Eq, Show)

-- | Config for one remote-chain lane to wire up via Initialize: routing/CCV/finality config,
-- plus the three rate limiters to deploy alongside it (matching ChainUpdate's shape).
data LaneDeploySpec = LaneDeploySpec
with
remoteChainSelector : Numeric 0
remotePools : [BytesHex]
remoteTokenAddress : BytesHex
inboundCCVs : [Chainlink.InstanceAddress.RawInstanceAddress]
outboundCCVs : [Chainlink.InstanceAddress.RawInstanceAddress]
finalityConfig : CCIP.CodecV2.FinalityConfig.FinalityConfig
inbound : RateLimiterDeploySpec
outbound : RateLimiterDeploySpec
inboundCustomFinality : RateLimiterDeploySpec
deriving (Eq, Show)
25 changes: 25 additions & 0 deletions contracts/ccip/registry-pools/lock-release-token-pool/daml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sdk-version: 3.4.11
name: ccip-registry-lock-release-token-pool-v2
source: daml
version: 2.1.1
build-options:
- "-Wno-crypto-text-is-alpha"
- "-Werror=unused-dependency"
data-dependencies:
- ../../../dependencies/splice/splice-api-token-metadata-v1-1.0.0.dar
- ../../../dependencies/splice/splice-api-token-holding-v1-1.0.0.dar
- ../../../dependencies/splice/splice-api-token-burn-mint-v1-1.0.0.dar
- ../../../dependencies/splice/splice-api-token-transfer-instruction-v1-1.0.0.dar
- ../../../mcms/api/.daml/dist/mcms-api-1.0.0.dar
- ../../../chainlink/api/.daml/dist/chainlink-api-2.0.0.dar
- ../../codec/.daml/dist/ccip-codec-v2-2.0.0.dar
- ../../api/.daml/dist/ccip-api-v2-2.0.0.dar
- ../../extension-api/.daml/dist/ccip-extension-api-v2-2.0.0.dar
- ../../events/.daml/dist/ccip-events-v2-2.0.0.dar
- ../../tickets/.daml/dist/ccip-tickets-v2-2.0.0.dar
- ../../core/.daml/dist/ccip-core-v2-2.1.1.dar
- ../../utils/.daml/dist/ccip-utils-v2-2.1.0.dar
- ../rate-limiter/.daml/dist/ccip-registry-rate-limiter-v2-2.0.1.dar
dependencies:
- daml-prim
- daml-stdlib
Loading
Loading