tx · 5Dfz4gWbFx46iiJjC1P7cAwivWup28SMexg9uV4HrQqq 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9: -0.01400000 Waves 2021.11.18 17:06 [1796579] smart account 3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9 > SELF 0.00000000 Waves
{ "type": 13, "id": "5Dfz4gWbFx46iiJjC1P7cAwivWup28SMexg9uV4HrQqq", "fee": 1400000, "feeAssetId": null, "timestamp": 1637244429557, "version": 2, "chainId": 84, "sender": "3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9", "senderPublicKey": "D1X9WatF6ARMCmm3jC4Ex5Wd5VQ3LY8i1xbHNqeHqeAa", "proofs": [ "3XpupUdXKePZoQzMuABcPoiJcTT35HvRvVy89fDwgSPobZz1wiWfTVznxw7UKxvNtJnNYhmU9FWBokYcyiQdLtC8", "3WbQ5sbdQ6EqybCJDSeDeHCpJdDoLbtmvHjvNRSPSLdZtnuHZWsc3UAThDqCrcv3YAGmowsHHv65FWxHFgd276PK" ], "script": "base64:AAIFAAAAAAAAAB8IAhIAEgQKAggIEgQKAggIEgMKAQQSAwoBCBIDCgEIAAAAEgAAAAAQa2V5UG9vbHNMaXN0TmFtZQIAAAAFcG9vbHMAAAAAEWtleVByZWZpeFBvb2xOYW1lAgAAAAVwb29sXwAAAAASa2V5UHJlZml4UG9vbEluZGV4AgAAAAZpbmRleF8AAAAAB2tleVBhaXICAAAABXBhaXJfAAAAAAtrZXlBc3NldElkQQIAAAAKQV9hc3NldF9pZAAAAAALa2V5QXNzZXRJZEICAAAACkJfYXNzZXRfaWQAAAAAIWtleUxhdW5jaHBhZERhdGFUcmFuc2FjdGlvblN0YXR1cwIAAAAhbGF1bmNocGFkX2RhdGFfdHJhbnNhY3Rpb25fc3RhdHVzAAAAAA9rZXlBZG1pblB1YktleTECAAAAC2FkbWluX3B1Yl8xAAAAAA9rZXlBZG1pblB1YktleTICAAAAC2FkbWluX3B1Yl8yAAAAAA9rZXlBZG1p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JG1hdGNoMAIAAAAWQ3JlYXRlQWxpYXNUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFkxlYXNlQ2FuY2VsVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABBMZWFzZVRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAQSXNzdWVUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGlVwZGF0ZUFzc2V0SW5mb1RyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABlTZXRBc3NldFNjcmlwdFRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE0V4Y2hhbmdlVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAASUmVpc3N1ZVRyYW5zYWN0aW9uBQAAAA1zaWduZWRCeUFkbWluCQAAAgAAAAECAAAAC01hdGNoIGVycm9y6x0hXg==", "height": 1796579, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8J9ZG8fyYyjFnjDL4z5e8vcGHyauDXDQiFS9fsjsbGxW Next: GiBKoK8NbkzVV9KaEuMEKH1SF8KCjU3Wi5Pe3m3Kqg9v Diff:
Old | New | Differences | |
---|---|---|---|
20 | 20 | let keyAdminPubKey2 = "admin_pub_2" | |
21 | 21 | ||
22 | 22 | let keyAdminPubKey3 = "admin_pub_3" | |
23 | + | ||
24 | + | let keyAchievementsWriters = "achievements_writers" | |
23 | 25 | ||
24 | 26 | let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy' | |
25 | 27 | ||
92 | 94 | func launchpadDataTransactionStatus (status) = valueOrElse(isSelfCall(i), [BooleanEntry(keyLaunchpadDataTransactionStatus, status)]) | |
93 | 95 | ||
94 | 96 | ||
97 | + | ||
98 | + | @Callable(i) | |
99 | + | func addAchievementsWriter (address) = { | |
100 | + | let writers = split(valueOrElse(getString(this, keyAchievementsWriters), ""), ",") | |
101 | + | [StringEntry(keyAchievementsWriters, makeString((writers :+ address), ","))] | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | @Callable(i) | |
107 | + | func removeAchievementsWriter (address) = { | |
108 | + | let writers = split(valueOrElse(getString(this, keyAchievementsWriters), ""), ",") | |
109 | + | let index = valueOrErrorMessage(indexOf(writers, address), "Can't find address in the list") | |
110 | + | [StringEntry(keyAchievementsWriters, makeString(removeByIndex(writers, index), ","))] | |
111 | + | } | |
112 | + | ||
113 | + | ||
95 | 114 | @Verifier(tx) | |
96 | 115 | func verify () = { | |
97 | 116 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
119 | 138 | let isSelfInvokeLaunchpadDataTxStatus = if ((inv.dApp == this)) | |
120 | 139 | then containsElement(["launchpadDataTransactionStatus"], inv.function) | |
121 | 140 | else false | |
122 | - | if (if (if (if (if (signedByAdmin) | |
141 | + | let isSelfInvokeAddAchievementsWriter = if ((inv.dApp == this)) | |
142 | + | then containsElement(["addAchievementsWriter"], inv.function) | |
143 | + | else false | |
144 | + | let isSelfInvokeRemoveAchievementsWriter = if ((inv.dApp == this)) | |
145 | + | then containsElement(["removeAchievementsWriter"], inv.function) | |
146 | + | else false | |
147 | + | if (if (if (if (if (if (if (signedByAdmin) | |
123 | 148 | then (size(inv.payments) == 0) | |
124 | 149 | else false) | |
125 | 150 | then isSelfInvokeRenamePool | |
141 | 166 | then (size(inv.payments) == 0) | |
142 | 167 | else false) | |
143 | 168 | then isSelfInvokeLaunchpadDataTxStatus | |
169 | + | else false) | |
170 | + | then true | |
171 | + | else if (if (signedByAdmin) | |
172 | + | then (size(inv.payments) == 0) | |
173 | + | else false) | |
174 | + | then isSelfInvokeAddAchievementsWriter | |
175 | + | else false) | |
176 | + | then true | |
177 | + | else if (if (signedByAdmin) | |
178 | + | then (size(inv.payments) == 0) | |
179 | + | else false) | |
180 | + | then isSelfInvokeRemoveAchievementsWriter | |
144 | 181 | else false | |
145 | 182 | case _: Order|DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
146 | 183 | signedByAdmin |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let keyPoolsListName = "pools" | |
5 | 5 | ||
6 | 6 | let keyPrefixPoolName = "pool_" | |
7 | 7 | ||
8 | 8 | let keyPrefixPoolIndex = "index_" | |
9 | 9 | ||
10 | 10 | let keyPair = "pair_" | |
11 | 11 | ||
12 | 12 | let keyAssetIdA = "A_asset_id" | |
13 | 13 | ||
14 | 14 | let keyAssetIdB = "B_asset_id" | |
15 | 15 | ||
16 | 16 | let keyLaunchpadDataTransactionStatus = "launchpad_data_transaction_status" | |
17 | 17 | ||
18 | 18 | let keyAdminPubKey1 = "admin_pub_1" | |
19 | 19 | ||
20 | 20 | let keyAdminPubKey2 = "admin_pub_2" | |
21 | 21 | ||
22 | 22 | let keyAdminPubKey3 = "admin_pub_3" | |
23 | + | ||
24 | + | let keyAchievementsWriters = "achievements_writers" | |
23 | 25 | ||
24 | 26 | let adminPubKey1 = base58'GFmKZ2naZFRoCvNbwKAQVGmLb1uBeWGDgFabdGBuZiuy' | |
25 | 27 | ||
26 | 28 | let adminPubKey2 = base58'GmJXRyhRA79g8yUGgKBAVdnFfQFDMjQG98b1MmLDh5kk' | |
27 | 29 | ||
28 | 30 | let adminPubKey3 = base58'CFhbV6h41hVjbGHudGtS3fYUv7QAKRxFQzKNtx4B5PqP' | |
29 | 31 | ||
30 | 32 | let pools = match getString(this, keyPoolsListName) { | |
31 | 33 | case string: String => | |
32 | 34 | split(string, ",") | |
33 | 35 | case nothing => | |
34 | 36 | nil | |
35 | 37 | } | |
36 | 38 | ||
37 | 39 | func isSelfCall (i) = if ((i.caller == this)) | |
38 | 40 | then unit | |
39 | 41 | else throw("Only the Oracle itself can invoke this function") | |
40 | 42 | ||
41 | 43 | ||
42 | 44 | func getPoolNameIfValid (poolName) = { | |
43 | 45 | let underscoreIndex = valueOrElse(indexOf(poolName, "_"), -1) | |
44 | 46 | let underscoreLastIndex = valueOrElse(lastIndexOf(poolName, "_"), -1) | |
45 | 47 | let hasSingleUnderscore = if (if ((underscoreIndex == underscoreLastIndex)) | |
46 | 48 | then (underscoreIndex > 0) | |
47 | 49 | else false) | |
48 | 50 | then (underscoreIndex != (size(poolName) - 1)) | |
49 | 51 | else false | |
50 | 52 | if (hasSingleUnderscore) | |
51 | 53 | then poolName | |
52 | 54 | else throw("Pool name must consist of two asset names separated by an underscore character") | |
53 | 55 | } | |
54 | 56 | ||
55 | 57 | ||
56 | 58 | func getAddressIfValid (address) = toString(valueOrErrorMessage(addressFromString(address), (("Can't parse \"" + address) + "\" as address"))) | |
57 | 59 | ||
58 | 60 | ||
59 | 61 | @Callable(i) | |
60 | 62 | func setAdmin () = valueOrElse(isSelfCall(i), [StringEntry(keyAdminPubKey1, toBase58String(adminPubKey1)), StringEntry(keyAdminPubKey2, toBase58String(adminPubKey2)), StringEntry(keyAdminPubKey3, toBase58String(adminPubKey3))]) | |
61 | 63 | ||
62 | 64 | ||
63 | 65 | ||
64 | 66 | @Callable(i) | |
65 | 67 | func addPool (poolAddress,poolName) = valueOrElse(isSelfCall(i), { | |
66 | 68 | let validatedAddress = getAddressIfValid(poolAddress) | |
67 | 69 | let keyName = (keyPrefixPoolName + validatedAddress) | |
68 | 70 | let keyIndex = (keyPrefixPoolIndex + validatedAddress) | |
69 | 71 | let assetIdA = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), keyAssetIdA), "Asset id A is incorrect") | |
70 | 72 | let assetIdB = valueOrErrorMessage(getString(value(addressFromString(poolAddress)), keyAssetIdB), "Asset id B is incorrect") | |
71 | 73 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
72 | 74 | if (isDefined(possiblyAlreadyAddedPool)) | |
73 | 75 | then throw((((("Pool with address \"" + validatedAddress) + "\" is already defined with name \"") + value(possiblyAlreadyAddedPool)) + "\"")) | |
74 | 76 | else [IntegerEntry(keyIndex, size(pools)), StringEntry(keyName, getPoolNameIfValid(poolName)), StringEntry((((keyPair + assetIdA) + "_") + assetIdB), poolAddress), StringEntry(keyPoolsListName, makeString((pools :+ validatedAddress), ","))] | |
75 | 77 | }) | |
76 | 78 | ||
77 | 79 | ||
78 | 80 | ||
79 | 81 | @Callable(i) | |
80 | 82 | func renamePool (poolAddress,newPoolName) = valueOrElse(isSelfCall(i), { | |
81 | 83 | let validatedAddress = getAddressIfValid(poolAddress) | |
82 | 84 | let keyName = (keyPrefixPoolName + validatedAddress) | |
83 | 85 | let possiblyAlreadyAddedPool = getString(this, keyName) | |
84 | 86 | if (isDefined(possiblyAlreadyAddedPool)) | |
85 | 87 | then [StringEntry(keyName, getPoolNameIfValid(newPoolName))] | |
86 | 88 | else throw((("Pool with address \"" + validatedAddress) + "\" has not yet been added")) | |
87 | 89 | }) | |
88 | 90 | ||
89 | 91 | ||
90 | 92 | ||
91 | 93 | @Callable(i) | |
92 | 94 | func launchpadDataTransactionStatus (status) = valueOrElse(isSelfCall(i), [BooleanEntry(keyLaunchpadDataTransactionStatus, status)]) | |
93 | 95 | ||
94 | 96 | ||
97 | + | ||
98 | + | @Callable(i) | |
99 | + | func addAchievementsWriter (address) = { | |
100 | + | let writers = split(valueOrElse(getString(this, keyAchievementsWriters), ""), ",") | |
101 | + | [StringEntry(keyAchievementsWriters, makeString((writers :+ address), ","))] | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | ||
106 | + | @Callable(i) | |
107 | + | func removeAchievementsWriter (address) = { | |
108 | + | let writers = split(valueOrElse(getString(this, keyAchievementsWriters), ""), ",") | |
109 | + | let index = valueOrErrorMessage(indexOf(writers, address), "Can't find address in the list") | |
110 | + | [StringEntry(keyAchievementsWriters, makeString(removeByIndex(writers, index), ","))] | |
111 | + | } | |
112 | + | ||
113 | + | ||
95 | 114 | @Verifier(tx) | |
96 | 115 | func verify () = { | |
97 | 116 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1)) | |
98 | 117 | then 1 | |
99 | 118 | else 0 | |
100 | 119 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2)) | |
101 | 120 | then 1 | |
102 | 121 | else 0 | |
103 | 122 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3)) | |
104 | 123 | then 1 | |
105 | 124 | else 0 | |
106 | 125 | let signedByAdmin = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
107 | 126 | let signedByAdminToCallAddPool = (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 1) | |
108 | 127 | match tx { | |
109 | 128 | case inv: InvokeScriptTransaction => | |
110 | 129 | let isSelfInvokeRenamePool = if ((inv.dApp == this)) | |
111 | 130 | then containsElement(["renamePool"], inv.function) | |
112 | 131 | else false | |
113 | 132 | let isSelfInvokeSetAdmin = if ((inv.dApp == this)) | |
114 | 133 | then containsElement(["setAdmin"], inv.function) | |
115 | 134 | else false | |
116 | 135 | let isSelfInvokeAddPool = if ((inv.dApp == this)) | |
117 | 136 | then containsElement(["addPool"], inv.function) | |
118 | 137 | else false | |
119 | 138 | let isSelfInvokeLaunchpadDataTxStatus = if ((inv.dApp == this)) | |
120 | 139 | then containsElement(["launchpadDataTransactionStatus"], inv.function) | |
121 | 140 | else false | |
122 | - | if (if (if (if (if (signedByAdmin) | |
141 | + | let isSelfInvokeAddAchievementsWriter = if ((inv.dApp == this)) | |
142 | + | then containsElement(["addAchievementsWriter"], inv.function) | |
143 | + | else false | |
144 | + | let isSelfInvokeRemoveAchievementsWriter = if ((inv.dApp == this)) | |
145 | + | then containsElement(["removeAchievementsWriter"], inv.function) | |
146 | + | else false | |
147 | + | if (if (if (if (if (if (if (signedByAdmin) | |
123 | 148 | then (size(inv.payments) == 0) | |
124 | 149 | else false) | |
125 | 150 | then isSelfInvokeRenamePool | |
126 | 151 | else false) | |
127 | 152 | then true | |
128 | 153 | else if (if (signedByAdminToCallAddPool) | |
129 | 154 | then (size(inv.payments) == 0) | |
130 | 155 | else false) | |
131 | 156 | then isSelfInvokeAddPool | |
132 | 157 | else false) | |
133 | 158 | then true | |
134 | 159 | else if (if (signedByAdmin) | |
135 | 160 | then (size(inv.payments) == 0) | |
136 | 161 | else false) | |
137 | 162 | then isSelfInvokeSetAdmin | |
138 | 163 | else false) | |
139 | 164 | then true | |
140 | 165 | else if (if (signedByAdmin) | |
141 | 166 | then (size(inv.payments) == 0) | |
142 | 167 | else false) | |
143 | 168 | then isSelfInvokeLaunchpadDataTxStatus | |
169 | + | else false) | |
170 | + | then true | |
171 | + | else if (if (signedByAdmin) | |
172 | + | then (size(inv.payments) == 0) | |
173 | + | else false) | |
174 | + | then isSelfInvokeAddAchievementsWriter | |
175 | + | else false) | |
176 | + | then true | |
177 | + | else if (if (signedByAdmin) | |
178 | + | then (size(inv.payments) == 0) | |
179 | + | else false) | |
180 | + | then isSelfInvokeRemoveAchievementsWriter | |
144 | 181 | else false | |
145 | 182 | case _: Order|DataTransaction|SponsorFeeTransaction|SetScriptTransaction|CreateAliasTransaction|LeaseCancelTransaction|LeaseTransaction|IssueTransaction|UpdateAssetInfoTransaction|InvokeScriptTransaction|SetAssetScriptTransaction|TransferTransaction|ExchangeTransaction|MassTransferTransaction|BurnTransaction|ReissueTransaction => | |
146 | 183 | signedByAdmin | |
147 | 184 | case _ => | |
148 | 185 | throw("Match error") | |
149 | 186 | } | |
150 | 187 | } | |
151 | 188 |
github/deemru/w8io/026f985 57.15 ms ◑