Skip to content
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,10 @@ class SvReonboardingIntegrationTest
val action: ActionRequiringConfirmation =
new ARC_DsoRules(
new SRARC_GrantFeaturedAppRight(
new DsoRules_GrantFeaturedAppRight(sv4PartyNew.toProtoPrimitive)
new DsoRules_GrantFeaturedAppRight(
sv4PartyNew.toProtoPrimitive,
java.util.Optional.empty(),
)
)
)
actAndCheck(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ class UnhideAndExpireRewardCouponV2TimeBasedIntegrationTest
update = new FeaturedAppRight(
dsoParty.toProtoPrimitive,
aliceParty.toProtoPrimitive,
java.util.Optional.empty(),
).create,
),
)(
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,13 @@ abstract class StoreTestBase
protected def featuredAppRight(
providerParty: PartyId,
contractId: String = nextCid(),
activityWeight: Option[BigDecimal] = None,
) = {
val template = new FeaturedAppRight(dsoParty.toProtoPrimitive, providerParty.toProtoPrimitive)
val template = new FeaturedAppRight(
dsoParty.toProtoPrimitive,
providerParty.toProtoPrimitive,
activityWeight.map(_.bigDecimal).toJava,
)
contract(
FeaturedAppRight.TEMPLATE_ID_WITH_PACKAGE_ID,
new FeaturedAppRight.ContractId(contractId),
Expand Down
38 changes: 19 additions & 19 deletions daml/dars.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ splice-amulet 0.1.18 a31be0483f3175647053f28965a4e6d97e3dbc433ea2338be303fae69bb
splice-amulet 0.1.19 90987abecbcb1d004b063ddfe3b4b5d46cf3814ce89114a86c8cd75ff3cb8a4b
splice-amulet 0.1.2 1446ffdf23326cef2de97923df96618eb615792bea36cf1431f03639448f1645
splice-amulet 0.1.20 23f47481dab6b1ec01339d6e14494d85bb2844c25f45b26fc5c9ef4cd4942d1f
splice-amulet 0.1.21 73e9ffdb6b0bc19a5f67372b118103926da11547ab9109eccae47e4e4cc35d6f
splice-amulet 0.1.21 b39773c1b06d79c334e0778a46091a046caaa7c6c8781df0c8c521bcb6c71c03
splice-amulet 0.1.3 0d89016d5a90eb8bced48bbac99e81c57781b3a36094b8d48b8e4389851e19af
splice-amulet 0.1.4 a36ef8888fb44caae13d96341ce1fabd84fc9e2e7b209bbc3caabb48b6be1668
splice-amulet 0.1.5 b4867a47abbfa2d15482f22c9c50516f0af14036287f299342f5d336391e4997
Expand All @@ -35,16 +35,16 @@ splice-amulet-name-service 0.1.19 7b784f7f03d3e035ea5d828ab64a476e7e0cbfffaec393
splice-amulet-name-service 0.1.2 711a2974d65e6ebd149704da75f3f71234798687ab895b92f066c865dbdeeabb
splice-amulet-name-service 0.1.20 0b6748de2e613f5bc9a108b2496b85d2d661b7344c6c55eada9c0a0bf8efe0a5
splice-amulet-name-service 0.1.21 b342bbbd425902283c20eb5011eeab90cc9f69b4c534b8b757fd51b8ca7be589
splice-amulet-name-service 0.1.22 3921e7bd20670dce7530a84ad04b5f83860c21660bf1553908f76e95767c1950
splice-amulet-name-service 0.1.22 41144c7b9b430648d28178984612c011b6d42a19d72694bbda861ddb05e268ea
splice-amulet-name-service 0.1.3 beb4b85f3f0cf36dfb93fc917d3ac218ee5d41b6e70604720cb228d85e168ee0
splice-amulet-name-service 0.1.4 053c7f4c2a77312e7d465a4fa7dc8cb298754ad12c0c987a7c401bd724e65efc
splice-amulet-name-service 0.1.5 6188c8b5f612278f988fc95c11e9742993ad3ac6ad0809f9af06ee9d366dc4a8
splice-amulet-name-service 0.1.6 a208aab2c4a248ab2eff352bd382f8b3bbadc92464123db587e8b359312a2f6c
splice-amulet-name-service 0.1.7 ba7806d9b2d593eac74a050161c54ae1325d170bf175cb66a9c1e5e5ffb88c3d
splice-amulet-name-service 0.1.8 efeb3f9b2b92e55fac4ec2d6164f95407a01477240c7465e576df4e310f54bd3
splice-amulet-name-service 0.1.9 f1b5915ad45ded616f43f83c735b7ee158b5eb58abe758a721e50eee19b3e531
splice-amulet-name-service-test 0.1.26 e5866e796e7702b4583d13184f9294aeea37c5d3c53385bf980e8e67b290814c
splice-amulet-test 0.1.25 014e5745b27109a8cab6fc7dddc9e7aa5ca3368db1547a7405b31856d807d3fd
splice-amulet-name-service-test 0.1.26 4a5fb93d77f0bc88dd33133eb2f109ea961656a10270c5eb124016dcbe00e21a
splice-amulet-test 0.1.25 44371c0ba07de839508b336f471aac8611e567a73094ee4d2887583cdfab7e0f
splice-api-featured-app-v1 1.0.0 7804375fe5e4c6d5afe067bd314c42fe0b7d005a1300019c73154dd939da4dda
splice-api-featured-app-v2 1.0.0 dd22e3e168a8c7fd0313171922dabf1f7a3b131bd9bfc9ff98e606f8c57707ea
splice-api-reward-assignment-v1 1.0.0 6f7b72361bc2039369651b4195315a2a5849babafec67b3c96e66ea6e560ec35
Expand Down Expand Up @@ -83,23 +83,23 @@ splice-dso-governance 0.1.23 0c94a036ac5168a1dee26b435838e062f0d2f47d6eac4930397
splice-dso-governance 0.1.24 4974c654485d4ecaa6b5caf8ef3c2679efa8195c4b50d4965a8fff1b72e8efa4
splice-dso-governance 0.1.25 dfe102514acd41f79945b8363ca84d8243be97b2b235522ce77c754a36bb8479
splice-dso-governance 0.1.26 45099e955ce443f7895125097a62c509b9ad297091c91d6377ffe94f183c0e3e
splice-dso-governance 0.1.27 014473d35514cb36583bdeca269386e46ae4e2283fe9b04beb2f53cdb408e1a2
splice-dso-governance 0.1.27 3030d48e1071a3710d5489ebe8e3cd2d77aec0be16b3a641de9da5b5c3409676
splice-dso-governance 0.1.3 b0ae3cc03e418790305a3c15f761fe495572de5827f8d322fb8b96996b783c13
splice-dso-governance 0.1.4 dc24fd18b4d151cd1e0ff6bfb7438bafb2f50fe076d0f16f50565e60b153a0be
splice-dso-governance 0.1.5 9e3ca1d22ad495dfabf3d61acae3dc1a7718f527f02092280b58cf69edfdc84c
splice-dso-governance 0.1.6 4e7653cfbf7ca249de4507aca9cd3b91060e5489042a522c589d3c4199580cd8
splice-dso-governance 0.1.7 d406eba1132d464605f4dae3edf8cf5ecbbb34bd8edef0e047e7e526d328718c
splice-dso-governance 0.1.8 1790a114f83d5f290261fae1e7e46fba75a861a3dd603c6b4ef6b67b49053948
splice-dso-governance 0.1.9 9ee83bfd872f91e659b8a8439c5b4eaf240bcf6f19698f884d7d7993ab48c401
splice-dso-governance-test 0.1.33 fc0ffb417a399195b9a9c0d28c7b0322c3de5f87b765f4abd39e4d4ea9f616f3
splice-dso-governance-test 0.1.33 0898ad2597aa75bb5b4b6c6a1db2b2a5541e4fae4dcf8be3488183ca62d92658
splice-test-token-v1 1.0.0 aaa0b576b5a3db49b3a4f7a4710fe6f8ae462aabbde4da89f639eb87fd62e90c
splice-test-token-v1-test 1.0.0 f20429bfde9929d10cef3779f7c6eff35d7bfcd88ad717f1776c75822082b81a
splice-test-token-v1-test 1.0.0 7300a2e63aaf2176e548125467f5e88776e72c90437ea7dd17be444b7d21df97
splice-test-token-v2 1.0.0 a38a96b6f46c14c599b2763bc4fc68911a9cada90f89c599a1401e8e3df685e1
splice-test-token-v2-test 1.0.0 d9637796398ec33c16b1a0d5ea2ac3f70d45c1af85b96910d685d596d5c9e6b4
splice-test-token-v2-test 1.0.0 13dd255f8d3568a8a9bc8384026cdb7b420eb9b35c2de40be329458db9614956
splice-token-standard-utils 2.0.0 9a8f41a2b1456d357dee5677565c21b9a5aa45b80f0ed6be469694445dd4f6e1
splice-token-standard-utils-test 1.0.0 594c1665a2c8de3e1252d9db8e256dac60c0bc8523746321542d5cc60021e202
splice-token-standard-v1-test 1.0.15 6a03b03e49ed4c3c7b7a8653b49c6ab7d41428ade0761e98dfa71aad02f5d847
splice-token-standard-v2-test 1.0.0 2ce199784c01bb064cd43b1f854dbfd0a323d4c9257e0ce6acd2f35313aa7275
splice-token-standard-utils-test 1.0.0 d320712b34e880fa9e67177ce430db794aed32eb8684bfe062edf7b1c2125013
splice-token-standard-v1-test 1.0.15 c2d94ec7b6abdc8676f475e1fb5146f1d63662c3b53a2b4a7b21b6bd56cd15d9
splice-token-standard-v2-test 1.0.0 f7608e529be0b6373f125f31df7d205b0d1f80e8bd9805d52b62b4f47786125d
splice-token-test-dummy-holding 0.0.1 1cd171c6c42ab46dc9cf12d80c6111369e00cea5cdf054924b4f26ce94b1ef5b
splice-token-test-dummy-holding 0.0.2 4f40fb033ef3db89623642c1b494e846097fa32af138b3864a63aa15937a323d
splice-token-test-dummy-holding 0.0.3 26c72abb5a4b485e58f201021de6f9e525c85863fa115536f768d6ee138ef13e
Expand All @@ -120,19 +120,19 @@ splice-util-batched-markers 1.0.0 727c5e97457d3ff841680816eb70d55834827ef756bac8
splice-util-batched-markers 1.0.1 4d91a9b044e0e996e91ee9aac3442591ffc78f16da4ff5c6f55218ba667f6192
splice-util-batched-markers 1.0.2 ec84eb67802403d91892aad61aee2e4eb34fb4e05e9158b3f677537569bcbc09
splice-util-batched-markers 1.0.3 74ee4c91b80c80b6860005ce627bdaed8f7fe6bdf3e60c9dbf3f48402d55126a
splice-util-batched-markers-test 1.0.8 7c5c799b89ce9209c2429b6c5809170eb070abf6365bf4ac9eb15aa19a157331
splice-util-batched-markers-test 1.0.8 736ee12b16b496a20c328dae1b296e7082dc9e1a92c715ce841f918b156a5537
splice-util-featured-app-proxies 1.0.0 48e0c4fe4ea05e3b740404ebe37004ddd741efbdcd665c1c3199a5d6d9d944d7
splice-util-featured-app-proxies 1.1.0 81dd5a9e5c02d0de03208522a895fb85eeb12fbea4aca7c4ad0ad106f3b0bfce
splice-util-featured-app-proxies 1.2.0 653c48879064332d34af5008bdfd8e349493460e67e62b85e8e7e3392831c842
splice-util-featured-app-proxies 1.2.1 06bab917848ef275317c2539b75c23b94e03ceb55b4a1346936f7832084cd7a6
splice-util-featured-app-proxies 1.2.2 2889c094cf9678b2b666221934ea56ab169a31b257450845bd53217a8cdfe44f
splice-util-featured-app-proxies 1.2.3 677ed3473e7d412c06520843790ff27e21aaa7c292208909579592351c8eb55d
splice-util-featured-app-proxies 1.2.4 88bcea6e9990bb2edb5301c042caa25c0594742665866f049f7bd67342d0865d
splice-util-featured-app-proxies-test 1.0.14 3b9a43d19a23aba616363e3e2e23d36011e20290e9c7f5a3c409a3ef68a48b5f
splice-util-featured-app-proxies-test 1.0.14 8e7944ff39363ad706bd43870131833b3b0057115dcb08a5ab510de8864f781b
splice-util-token-standard-wallet 1.0.0 1da198cb7968fa478cfa12aba9fdf128a63a8af6ab284ea6be238cf92a3733ac
splice-util-token-standard-wallet 1.0.1 182892381e4245c39d3126082ec0b41a089edb61e63af518f61eae1f5c9e135a
splice-util-token-standard-wallet 1.1.0 1215d3ee8f3cb428d062d8708c2deca33c91ff99f5edefa70616646e57f93012
splice-util-token-standard-wallet-test 1.0.9 f634a795bb08e18764f619702ae40055765954bdb5e19fdb38e3c4822ca9a286
splice-util-token-standard-wallet-test 1.0.9 067c047cd386e5013399d10238592f2ed96687acf8e09948ad0b8e851e648774
splice-validator-lifecycle 0.1.0 cef96fac957362f1fc097120bd13686cac7f84fbc8053afa994a1f9214d9570c
splice-validator-lifecycle 0.1.1 1ddf05c96002914593c929848b786f34c753fb0be07717d1786be177a564aada
splice-validator-lifecycle 0.1.2 57e2f15f9755db1f00e51c52c319294264a21ad71c6bc1e7cd70db4b164c0aaa
Expand All @@ -158,7 +158,7 @@ splice-wallet 0.1.19 1d8317b1e476c03ea2a85bed8435e5c182abe501db58350009187fa839a
splice-wallet 0.1.2 c162e08a4ec0428bfa870b6d9040989e575c74199c3a80558c62e03196dd5146
splice-wallet 0.1.20 e485c2eb59cca556e0e2ecfaaef45346dd0ba64f9976a3957938d814f846c78c
splice-wallet 0.1.21 f799a58fa53dfe48bae52bd5dbcc2b578a7d4dfee3ae3f4eb7635fe9a8cc67d3
splice-wallet 0.1.22 a78daeeb1a4a2405828b29f8c04814725dbd97ee5a60bd02e839f32518640afa
splice-wallet 0.1.22 3815926638c148e973522f54c101337404d87074caedfb2079c90b9fbd18f29a
splice-wallet 0.1.3 2c35bb4f5084ea66db59717d21750bfd64c43147ef5fd5166615092d592a6917
splice-wallet 0.1.4 141dad2d33b6410b8e1c35a0c4f8f76cb691e4d9a4410ce89f33f373855317e1
splice-wallet 0.1.5 614b525a50c624062d851ce7df5bdb90ddfa0d6871c486cb6e2c7b694bfbce59
Expand All @@ -180,15 +180,15 @@ splice-wallet-payments 0.1.18 06afd4996294b3763b10fc7ed3b2b216dc3ff2196264cf7d62
splice-wallet-payments 0.1.19 eae5715f0ddd5ff4b8000cff13191b76d34e5d80d05465de92ace96fcc97edaf
splice-wallet-payments 0.1.2 775f5eb9c0249509adda5eb3ea4ee31bb953601168c18880df6f2ff09ec4298a
splice-wallet-payments 0.1.20 340afccb702179069fc81044890c435c5c8565df061b2efbfccf618c33a04e37
splice-wallet-payments 0.1.21 dc1a2f4ff4774e00c388f1bfce48a23c3539b8ea0d0ebf99b8df840a058ef873
splice-wallet-payments 0.1.21 185844e9173b22cf0f69ded2564262bf778b995cb3c6070634f41bbf169ef267
splice-wallet-payments 0.1.3 b953b3729c81a55e598a364be7d0c0574750df3de12a7a1b53a300f217cb5c5c
splice-wallet-payments 0.1.4 12177f54873c1094ea169874ad0d7838383fd137f302d16356e93f28dfbc0fcc
splice-wallet-payments 0.1.5 2177b7a579fe6d3d510c7bcda99d39ece104ae24cfd1b78ac5616990d2d6c675
splice-wallet-payments 0.1.6 6124379528eeb6fa17ecdab15577c29abb33d0c0d34dc5f2680a1ac4f49b1649
splice-wallet-payments 0.1.7 4e3e0d9cdadf80f4bf8f3cd3660d5287c084c9a29f23c901aabce597d72fd467
splice-wallet-payments 0.1.8 e48ea337ee3335c8bb3206a2501ce947ac1a7bdb1825cee8f28bad64f5a7bc4b
splice-wallet-payments 0.1.9 7f4e081ad96f2ccded0c053b0cf5ddddae1139dfc3bb89cefcf77ea70f2cecb7
splice-wallet-test 0.1.26 2b0bf628eb66cf49f6b0100e2cce0bddac30b8f81dc2433fc9dc3317ccf2aa80
splice-wallet-test 0.1.26 9c650ad9ed8f84abe79b6e02f6667f4d89d2d1434d858d6542f104fab4cf8502
splitwell 0.1.0 075c76de553ab88383a7c69de134afa82aacfdf8ea8fcfe8852c4b199c3b2669
splitwell 0.1.1 ccb1a0215053062202052e1a052f9214da3fdae5253a6d43e2e155ff4f57fe75
splitwell 0.1.10 d42676a366f7ca7a2409974dd3054aa4d83ab29baa3b2086ad021407b0a1a295
Expand All @@ -204,12 +204,12 @@ splitwell 0.1.19 b526511ebe2db308b63969ee3c04aa9a48be53e04130709eb29ba6aa313e3cc
splitwell 0.1.2 778edd2c228c6b68198d4d033885b2d0dae7daaee55d7df3edd9dfdf1f10fbd0
splitwell 0.1.20 af686139dda12540ab05a292987f5fa2edd0c05af62d9651384d005e9a91043e
splitwell 0.1.21 f646cf275b4c5139711469c92fbe702c498614edf200d8085305b2e43e28936a
splitwell 0.1.22 b97352bf1b70f6be481d7cd2b4ce22396008bbf611b488243a694f30437ed3a9
splitwell 0.1.22 8730dee2e4ebcc1cc9a8d26850eec5e204ef4e6955750c02501a527a6115e9a5
splitwell 0.1.3 7cde068cde689584f86a2499689d5cb165264d96496721e24ac6fb909f770a58
splitwell 0.1.4 85557b86cd4f330f093915db1ea26eac5092de6b5ddae0690146f6059c89419b
splitwell 0.1.5 a68e78774a7be655f5744c8ae0ac8b46d55ef6d1e7661bc27b9296154d56ac74
splitwell 0.1.6 872da0dd7986fd768930f85d6a7310a94a0ef924e7fbb7bb7a4e149f2b5feb74
splitwell 0.1.7 841d1c9c86b5c8f3a39059459ecd8febedf7703e18f117300bb0ebf4423db096
splitwell 0.1.8 63b8153a08ceb4bf40d807acc5712372c3eac548c266be4d5e92470b4f655515
splitwell 0.1.9 b6267905698d2798b9ef171e27d49fb88e052ec0ec0e0675a3a1b275c7d037d4
splitwell-test 0.1.26 6c31cbf23693f06966301eb108c0d648940e88df33c3bb6be758ba5ca7c813b0
splitwell-test 0.1.26 fa311374a5319c29f4b571edee003f925d77695e82c44ce170ebcba8493babf3
Binary file modified daml/dars/splice-amulet-0.1.21.dar
Binary file not shown.
Binary file modified daml/dars/splice-amulet-name-service-0.1.22.dar
Binary file not shown.
Binary file modified daml/dars/splice-dso-governance-0.1.27.dar
Binary file not shown.
Binary file modified daml/dars/splice-wallet-0.1.22.dar
Binary file not shown.
Binary file modified daml/dars/splice-wallet-payments-0.1.21.dar
Binary file not shown.
Binary file modified daml/dars/splitwell-0.1.22.dar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ testAmuletRules = do
exerciseCmd amuletRules (AmuletRules_DevNet_Tap alice.primaryParty 5.0 round)

testChoice app [provider1.primaryParty, app.dso] [app.dso] $ \amuletRules ->
exerciseCmd amuletRules (AmuletRules_DevNet_FeatureApp provider1.primaryParty)
exerciseCmd amuletRules (AmuletRules_DevNet_FeatureApp provider1.primaryParty None)

pure ()

Expand Down
1 change: 1 addition & 0 deletions daml/splice-amulet-test/daml/Splice/Scripts/Util.daml
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,7 @@ featureApp : AmuletApp -> AmuletUser -> Script (ContractId FeaturedAppRight)
featureApp app provider = do
result <- submitExerciseAmuletRulesByKey' app provider AmuletRules_DevNet_FeatureApp with
provider = provider.primaryParty
activityWeight = None
return result.featuredAppRightCid

getNormalizedBalance: Party -> Script Decimal
Expand Down
28 changes: 28 additions & 0 deletions daml/splice-amulet/daml/Splice/Amulet.daml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ data ValidatorRight_ArchiveAsUserResult = ValidatorRight_ArchiveAsUserResult

data FeaturedAppRight_WithdrawResult = FeaturedAppRight_WithdrawResult

data FeaturedAppRight_UpdateResult = FeaturedAppRight_UpdateResult with
featuredAppRightCid : ContractId FeaturedAppRight

data FeaturedAppRight_CancelResult = FeaturedAppRight_CancelResult

data AppRewardCoupon_DsoExpireResult = AppRewardCoupon_DsoExpireResult with
Expand Down Expand Up @@ -271,14 +274,33 @@ template ValidatorRight with

-- TODO(M3-90): cancellation, withdrawal

defaultAppActivityWeight : Decimal
defaultAppActivityWeight = 1.0

-- | The right for an application provider to earn featured app rewards.
template FeaturedAppRight with
dso : Party
provider : Party
activityWeight : Optional Decimal
-- ^ Weight of the this provider's app activity in the computation of traffic-based app rewards.
--
-- If not set, the default weight of 1.0 is used.
where
signatory dso
observer provider
ensure 0.0 <= fromOptional defaultAppActivityWeight activityWeight

choice FeaturedAppRight_Update : FeaturedAppRight_UpdateResult
with
reason : Text
newActivityWeight : Decimal
controller dso
do
featuredAppRightCid <- create this with
-- use `None` for the default to maximize SCU compatibility
activityWeight = if newActivityWeight == defaultAppActivityWeight then None else Some newActivityWeight
return FeaturedAppRight_UpdateResult with
featuredAppRightCid

choice FeaturedAppRight_Withdraw : FeaturedAppRight_WithdrawResult
with
Expand Down Expand Up @@ -708,6 +730,12 @@ instance HasCheckedFetch ValidatorRewardCoupon ForDso where
instance HasCheckedFetch UnclaimedReward ForDso where
contractGroupId UnclaimedReward {..} = ForDso with dso

instance HasCheckedFetch FeaturedAppRight ForDso where
contractGroupId FeaturedAppRight {..} = ForDso with dso

instance HasCheckedFetch FeaturedAppRight ForOwner where
contractGroupId FeaturedAppRight {..} = ForOwner with dso; owner = provider

instance HasCheckedFetch FeaturedAppActivityMarker ForOwner where
contractGroupId FeaturedAppActivityMarker {..} = ForOwner with dso; owner = provider

Expand Down
26 changes: 17 additions & 9 deletions daml/splice-amulet/daml/Splice/AmuletRules.daml
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,11 @@ template AmuletRules
nonconsuming choice AmuletRules_DevNet_FeatureApp : AmuletRules_DevNet_FeatureAppResult
with
provider : Party
activityWeight : Optional Decimal
controller provider
do
require "isDevNet flag is true" isDevNet
featuredAppRightCid <- create FeaturedAppRight with dso; provider
featuredAppRightCid <- create FeaturedAppRight with dso; provider; activityWeight
return AmuletRules_DevNet_FeatureAppResult with ..

-- Bootstrap the open mining rounds by creating
Expand Down Expand Up @@ -1262,10 +1263,14 @@ summarizeAndValidateContext eventLogCid context dso tf = do
openRound <- fetchReferenceData (ForDso with dso) context.openMiningRound
assertDeadlineExceeded "openRound.opensAt" openRound.opensAt

-- check the featured app right, if present
featuredAppProvider <- forA context.featuredAppRight $ \featuredAppRightCid -> do
requireMatchingContract featuredAppRightCid (FeaturedAppRight with dso; provider = tf.provider)
pure tf.provider
-- check the featured app right, if we use app markers
let rewardVersion = (.mintingVersion) <$> openRound.rewardConfig
featuredAppProvider <-
if useFeaturedAppMarkers rewardVersion
then forA context.featuredAppRight $ \featuredAppRightCid -> do
_ <- fetchReferenceData (ForOwner with dso; owner = tf.provider) featuredAppRightCid
pure tf.provider
else pure None

-- pre-resolve issuing mining rounds
issuingMiningRounds <- forA (Map.toList context.issuingMiningRounds) $ \(round, issuingRoundCid) -> do
Expand Down Expand Up @@ -1295,10 +1300,13 @@ summarizeAndValidateExternalPartyContext context dso tf = do
-- check the referenced ExternalPartyConfigState
externalPartyConfigState <- fetchReferenceData (ForDso with dso) context.externalPartyConfigState

-- check the featured app right, if present
featuredAppProvider <- forA context.featuredAppRight $ \featuredAppRightCid -> do
requireMatchingContract featuredAppRightCid (FeaturedAppRight with dso; provider = tf.provider)
pure tf.provider
-- check the featured app right, if we use app markers
featuredAppProvider <-
if useFeaturedAppMarkers externalPartyConfigState.rewardCalculationVersion
then forA context.featuredAppRight $ \featuredAppRightCid -> do
_ <- fetchReferenceData (ForOwner with dso; owner = tf.provider) featuredAppRightCid
pure tf.provider
else pure None

return TransferContextSummaryV2 with
dso = dso
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ testFeaturedAppActivityMarkers = do
let action = ARC_DsoRules with
dsoAction = SRARC_GrantFeaturedAppRight $ DsoRules_GrantFeaturedAppRight with
provider
activityWeight = None

confirmationCids <- forA [sv1, sv2, sv3] $ \svParty -> do
result <- submit (actAs svParty <> readAs dso) $ exerciseCmd dsoRulesCid DsoRules_ConfirmAction with
Expand Down
Loading
Loading