Splice.Amulet

The contracts representing the long-term state of Splice.

Templates

template Amulet

A amulet, which can be locked and whose amount expires over time.

The expiry serves to charge an inactivity fee, and thereby ensures that the SVs can reclaim the corresponding storage space at some point in the future.

Signatory: dso, owner

Field

Type

Description

dso

Party

owner

Party

amount

ExpiringAmount

template AppRewardCoupon

A coupon for receiving app rewards proportional to the usage fee paid as part of a Amulet transfer coordinated by the app of a provider.

Signatory: dso

Field

Type

Description

dso

Party

provider

Party

Application provider

featured

Bool

amount

Decimal

round

Round

beneficiary

Optional Party

The party that can mint this reward. If not set, this is the provider

template FeaturedAppActivityMarker

A marker created by a featured application for activity generated from that app. This is used to record activity other than amulet transfers where regular AppRewardCoupons are not created directly.

Will be converted to a AppRewardCoupon through automation run by the SVs and can then be minted as part of the normal minting process.

Signatory: dso

Field

Type

Description

dso

Party

provider

Party

The featured app provider that created the activity marker.

beneficiary

Party

The party that has the right to mint the reward.

weight

Decimal

The weight of the marker. This is used to split the rewards for a single action, e.g., multiple parties collaborating to enable a transfer, by creating several FeaturedAppActivityMarkers with different beneficiaries such that the weights add up to 1.0.

  • Choice Archive

    Controller: dso

    Returns: ()

    (no fields)

  • interface instance FeaturedAppActivityMarker for FeaturedAppActivityMarker

template FeaturedAppRight

The right for an application provider to earn featured app rewards.

Signatory: dso

Field

Type

Description

dso

Party

provider

Party

template LockedAmulet

Signatory: (DA.Internal.Record.getField @"holders" lock), signatory amulet

Field

Type

Description

amulet

Amulet

lock

TimeLock

template SvRewardCoupon

A coupon for a beneficiary to receive part of the SV issuance for a specific SV node and round.

Signatory: dso

Field

Type

Description

dso

Party

sv

Party

The party identifying the SV node for which the reward is issued.

beneficiary

Party

The beneficiary allowed to receive the reward.

round

Round

weight

Int

Coupons receive a share of the SV issuance proportional to their weight.

template UnclaimedActivityRecord

A record of activity that can be minted by the beneficiary. Note that these do not come out of the per-round issuance but are instead created by burning UnclaimedRewardCoupon as defined through a vote by the SVs. That’s also why expiry is a separate time-based expiry instead of being tied to a round like the other activity records.

Signatory: dso

Field

Type

Description

dso

Party

beneficiary

Party

The owner of the Amulet to be minted.

amount

Decimal

The amount of Amulet to be minted.

reason

Text

A reason to mint the Amulet.

expiresAt

Time

Selected timestamp defining the lifetime of the contract.

template UnclaimedReward

Rewards that have not been claimed and are thus at the disposal of the foundation.

Signatory: dso

Field

Type

Description

dso

Party

amount

Decimal

  • Choice Archive

    Controller: dso

    Returns: ()

    (no fields)

template ValidatorRewardCoupon

A coupon for receiving validator rewards proportional to the usage fee paid by a user hosted by a validator operator.

Signatory: dso

Field

Type

Description

dso

Party

user

Party

amount

Decimal

round

Round

template ValidatorRight

The right to claim amulet issuances for a user’s burns as their validator.

Signatory: user, validator

Field

Type

Description

dso

Party

user

Party

validator

Party

Data Types

data AmuletCreateSummary amuletContractId

Result of an operation that created a new amulet, e.g., by minting a fresh amulet, or by unlocking a locked amulet.

AmuletCreateSummary

Field

Type

Description

amulet

amuletContractId

The new amulet that was created

amuletPrice

Decimal

The amulet price at the round the amulet was created

round

Round

Round for which this amulet was created.

instance GetField "amulet" (AmuletCreateSummary amuletContractId) amuletContractId

instance GetField "amuletPrice" (AmuletCreateSummary amuletContractId) Decimal

instance GetField "amuletSum" LockedAmulet_OwnerExpireLockResult (AmuletCreateSummary (ContractId Amulet))

instance GetField "amuletSum" LockedAmulet_UnlockResult (AmuletCreateSummary (ContractId Amulet))

instance GetField "amuletSum" AmuletRules_DevNet_TapResult (AmuletCreateSummary (ContractId Amulet))

instance GetField "amuletSum" AmuletRules_MintResult (AmuletCreateSummary (ContractId Amulet))

instance GetField "round" (AmuletCreateSummary amuletContractId) Round

instance SetField "amulet" (AmuletCreateSummary amuletContractId) amuletContractId

instance SetField "amuletPrice" (AmuletCreateSummary amuletContractId) Decimal

instance SetField "amuletSum" LockedAmulet_OwnerExpireLockResult (AmuletCreateSummary (ContractId Amulet))

instance SetField "amuletSum" LockedAmulet_UnlockResult (AmuletCreateSummary (ContractId Amulet))

instance SetField "amuletSum" AmuletRules_DevNet_TapResult (AmuletCreateSummary (ContractId Amulet))

instance SetField "amuletSum" AmuletRules_MintResult (AmuletCreateSummary (ContractId Amulet))

instance SetField "round" (AmuletCreateSummary amuletContractId) Round

data AmuletExpireSummary

AmuletExpireSummary

Field

Type

Description

owner

Party

round

Round

Round for which this expiry was registered.

changeToInitialAmountAsOfRoundZero

Decimal

changeToHoldingFeesRate

Decimal

The change of total holding fees introduced by a amulet expiry.

instance GetField "changeToHoldingFeesRate" AmuletExpireSummary Decimal

instance GetField "changeToInitialAmountAsOfRoundZero" AmuletExpireSummary Decimal

instance GetField "expireSum" Amulet_ExpireResult AmuletExpireSummary

instance GetField "expireSum" LockedAmulet_ExpireAmuletResult AmuletExpireSummary

instance GetField "owner" AmuletExpireSummary Party

instance GetField "round" AmuletExpireSummary Round

instance SetField "changeToHoldingFeesRate" AmuletExpireSummary Decimal

instance SetField "changeToInitialAmountAsOfRoundZero" AmuletExpireSummary Decimal

instance SetField "expireSum" Amulet_ExpireResult AmuletExpireSummary

instance SetField "expireSum" LockedAmulet_ExpireAmuletResult AmuletExpireSummary

instance SetField "owner" AmuletExpireSummary Party

instance SetField "round" AmuletExpireSummary Round

data Amulet_ExpireResult

data AppRewardCoupon_DsoExpireResult

data FeaturedAppRight_CancelResult

data FeaturedAppRight_WithdrawResult

data LockedAmulet_ExpireAmuletResult

data LockedAmulet_OwnerExpireLockResult

LockedAmulet_OwnerExpireLockResult

Field

Type

Description

amuletSum

AmuletCreateSummary (ContractId Amulet)

meta

Optional Metadata

instance GetField "amuletSum" LockedAmulet_OwnerExpireLockResult (AmuletCreateSummary (ContractId Amulet))

instance GetField "meta" LockedAmulet_OwnerExpireLockResult (Optional Metadata)

instance SetField "amuletSum" LockedAmulet_OwnerExpireLockResult (AmuletCreateSummary (ContractId Amulet))

instance SetField "meta" LockedAmulet_OwnerExpireLockResult (Optional Metadata)

instance HasExercise LockedAmulet LockedAmulet_OwnerExpireLock LockedAmulet_OwnerExpireLockResult

instance HasFromAnyChoice LockedAmulet LockedAmulet_OwnerExpireLock LockedAmulet_OwnerExpireLockResult

instance HasToAnyChoice LockedAmulet LockedAmulet_OwnerExpireLock LockedAmulet_OwnerExpireLockResult

data LockedAmulet_UnlockResult

data SvRewardCoupon_ArchiveAsBeneficiaryResult

data SvRewardCoupon_DsoExpireResult

data UnclaimedActivityRecord_ArchiveAsBeneficiaryResult

data UnclaimedActivityRecord_DsoExpireResult

data ValidatorRewardCoupon_ArchiveAsValidatorResult

data ValidatorRewardCoupon_DsoExpireResult

data ValidatorRight_ArchiveAsUserResult

data ValidatorRight_ArchiveAsValidatorResult

Functions

amuletMetadata

: Amulet -> Metadata

validateAppRewardBeneficiaries

: [AppRewardBeneficiary] -> Update ()

requireAmuletExpiredForAllOpenRounds

: ContractId OpenMiningRound -> Amulet -> Update ()

Comments