tx · GvAwpcKWukkxh1PUbNgUxnK1yxctB5JspnnZe4LdbPcA 3N3LxL6zCjE2SKmSeuBsuX81AjMcgmrYfpZ: -0.01400000 Waves 2023.05.04 13:11 [2562877] smart account 3N3LxL6zCjE2SKmSeuBsuX81AjMcgmrYfpZ > SELF 0.00000000 Waves
{ "type": 13, "id": "GvAwpcKWukkxh1PUbNgUxnK1yxctB5JspnnZe4LdbPcA", "fee": 1400000, "feeAssetId": null, "timestamp": 1683195113213, "version": 2, "chainId": 84, "sender": "3N3LxL6zCjE2SKmSeuBsuX81AjMcgmrYfpZ", "senderPublicKey": "Dtn5HymigPuZXoT2jADQ1yZeLMcfqrt8n5UJh6GNCpbo", "proofs": [ "4WbNDVejoamwRCmetR8JsTNGR8KJTr3zDPuUZwSTSCeBH8hYtzqqbb3U7wsiShRLC6hreynLvFiE1UHhgJ1EHXdU" ], "script": "base64:AAIFAAAAAAAAABUIAhIFCgMBAQgSAwoBARIAEgMKAQEAAAAgAAAAAANTRVACAAAAAl9fAAAAAAtrZXlSZWZlcnJhbAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAACHJlZmVycmFsBQAAAANuaWwFAAAAA1NFUAAAAAAMa2V5V3hBc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAJd3hBc3NldElkBQAAAANuaWwFAAAAA1NFUAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABZrZXlNYW5hZ2VyVmF1bHRBZGRyZXNzAAAAAAIAAAAXJXNfX21hbmFnZXJWYXVsdEFkZHJlc3MAAAAAFUlkeENmZ0NsYWltU3RhcnRCbG9jawAAAAAAAAAAAQAAAAAYSWR4Q2ZnQ2xhaW1WZXN0aW5nUGVyaW9kAAAAAAAAAAACAAAAABJJZHhDZmdDbGFpbUFzc2V0SWQAAAAAAAAAAAMAAAAAFElkeENmZ0NsYWltQXNzZXRNdWx0A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lvbiBkZW5pZWQDCQAAAAAAAAIFAAAADG11c3RSZWZlcnJhbAUAAAAMbXVzdFJlZmVycmFsBAAAAAl3eEFzc2V0SWQJAAJZAAAAAQkBAAAABXZhbHVlAAAAAQkABCIAAAABBQAAAAxrZXlXeEFzc2V0SWQJAAUUAAAAAgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACHd4QW1vdW50BQAAAAl3eEFzc2V0SWQJAARMAAAAAgkBAAAAGkNsYWltT3BlcmF0aW9uSGlzdG9yeUVudHJ5AAAABgUAAAAXcmVmZXJyYWxDb250cmFjdEFkZHJlc3MFAAAACHd4QW1vdW50AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANuaWwFAAAABHVuaXQJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleftuTys=", "height": 2562877, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EqNmKZuDe62QHegQAivcqSSawSVMxqNAiLkMgKYazZyQ Next: none Diff:
Old | New | Differences | |
---|---|---|---|
10 | 10 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
11 | 11 | ||
12 | 12 | ||
13 | - | func | |
13 | + | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | let IdxCfgClaimStartBlock = 1 | |
66 | 66 | func readTotalsArray () = split(getStringOrFail(keyTotals()), SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | + | func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress())) | |
70 | + | ||
71 | + | ||
69 | 72 | func TotalsEntry (key,origArray,claimedAmt,newLastClaimedHeight) = { | |
70 | 73 | let totalClaimedAmount = parseIntValue(origArray[IdxTotalsTotalClaimedAmount]) | |
71 | 74 | let remainingAmount = parseIntValue(origArray[IdxTotalsRemainingAmount]) | |
81 | 84 | func ClaimOperationHistoryEntry (userAddress,claimedAssetAmount,claimingBlocks,firstCalculationBlock,lastCalculationBlock,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(claimedAssetAmount, claimingBlocks, firstCalculationBlock, lastCalculationBlock)) | |
82 | 85 | ||
83 | 86 | ||
84 | - | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
85 | - | case s: String => | |
86 | - | fromBase58String(s) | |
87 | - | case _: Unit => | |
88 | - | unit | |
89 | - | case _ => | |
90 | - | throw("Match error") | |
91 | - | } | |
92 | - | ||
93 | - | ||
94 | - | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
95 | - | case s: String => | |
96 | - | fromBase58String(s) | |
97 | - | case _: Unit => | |
98 | - | unit | |
99 | - | case _ => | |
100 | - | throw("Match error") | |
101 | - | } | |
87 | + | func managerPublicKeyOrUnit () = { | |
88 | + | let managerVaultAddress = getManagerAddressOrFail() | |
89 | + | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
90 | + | case s: String => | |
91 | + | fromBase58String(s) | |
92 | + | case _: Unit => | |
93 | + | unit | |
94 | + | case _ => | |
95 | + | throw("Match error") | |
96 | + | } | |
97 | + | } | |
102 | 98 | ||
103 | 99 | ||
104 | 100 | func mustManager (i) = { | |
204 | 200 | } | |
205 | 201 | ||
206 | 202 | ||
207 | - | ||
208 | - | @Callable(i) | |
209 | - | func setManager (pendingManagerPublicKey) = { | |
210 | - | let checkCaller = mustManager(i) | |
211 | - | if ((checkCaller == checkCaller)) | |
212 | - | then { | |
213 | - | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
214 | - | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
215 | - | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
216 | - | else throw("Strict value is not equal to itself.") | |
217 | - | } | |
218 | - | else throw("Strict value is not equal to itself.") | |
219 | - | } | |
220 | - | ||
221 | - | ||
222 | - | ||
223 | - | @Callable(i) | |
224 | - | func confirmManager () = { | |
225 | - | let pm = pendingManagerPublicKeyOrUnit() | |
226 | - | let hasPM = if (isDefined(pm)) | |
227 | - | then true | |
228 | - | else throwErr("no pending manager") | |
229 | - | if ((hasPM == hasPM)) | |
230 | - | then { | |
231 | - | let checkPM = if ((i.callerPublicKey == value(pm))) | |
232 | - | then true | |
233 | - | else throwErr("you are not pending manager") | |
234 | - | if ((checkPM == checkPM)) | |
235 | - | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
236 | - | else throw("Strict value is not equal to itself.") | |
237 | - | } | |
238 | - | else throw("Strict value is not equal to itself.") | |
239 | - | } | |
240 | - | ||
241 | - | ||
242 | 203 | @Verifier(tx) | |
243 | 204 | func verify () = { | |
244 | 205 | let targetPublicKey = match managerPublicKeyOrUnit() { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let keyReferral = makeString(["%s", "referral"], SEP) | |
7 | 7 | ||
8 | 8 | let keyWxAssetId = makeString(["%s", "wxAssetId"], SEP) | |
9 | 9 | ||
10 | 10 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
11 | 11 | ||
12 | 12 | ||
13 | - | func | |
13 | + | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | let IdxCfgClaimStartBlock = 1 | |
17 | 17 | ||
18 | 18 | let IdxCfgClaimVestingPeriod = 2 | |
19 | 19 | ||
20 | 20 | let IdxCfgClaimAssetId = 3 | |
21 | 21 | ||
22 | 22 | let IdxCfgClaimAssetMult = 4 | |
23 | 23 | ||
24 | 24 | let IdxCfgClaimAssetOwner = 5 | |
25 | 25 | ||
26 | 26 | let IdxCfgClaimAssetTotalAmount = 6 | |
27 | 27 | ||
28 | 28 | let IdxTotalsTotalClaimedAmount = 1 | |
29 | 29 | ||
30 | 30 | let IdxTotalsRemainingAmount = 2 | |
31 | 31 | ||
32 | 32 | let IdxTotalsLastClaimedHeight = 3 | |
33 | 33 | ||
34 | 34 | func throwErr (msg) = throw(makeString(["marketing.ride:", msg], " ")) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined")) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func formatConfigString (claimStartBlock,vestingPeriod,assetIdBase58,assetMult,assetOwner,assetTotalAmt) = makeString(["%d%d%s%d%s%d%", claimStartBlock, vestingPeriod, assetIdBase58, assetMult, assetOwner, assetTotalAmt], SEP) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func formatConfig (claimStartBlock,vestingPeriod,assetIdBase58,assetMult,claimAssetOwner,claimAssetTotalAmount) = formatConfigString(toString(claimStartBlock), toString(vestingPeriod), assetIdBase58, toString(assetMult), claimAssetOwner, toString(claimAssetTotalAmount)) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func formatTotalsString (totalClaimedAmount,remainingAmountForClaim,lastClaimedHeight) = makeString(["%d%d%d", totalClaimedAmount, remainingAmountForClaim, lastClaimedHeight], SEP) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func formatHistoryRecord (claimedAssetAmount,claimingBlocks,firstCalulationBlock,lastCalulationBlock) = makeString(["%d%d%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(claimedAssetAmount), toString(claimingBlocks), toString(firstCalulationBlock), toString(lastCalulationBlock)], SEP) | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func keyConfig () = "%s__config" | |
53 | 53 | ||
54 | 54 | ||
55 | 55 | func keyTotals () = "%s__totals" | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | let keyAmountUnclaimed = makeString(["%s", "amountUnclaimed"], SEP) | |
59 | 59 | ||
60 | 60 | func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func readConfigArray () = split(getStringOrFail(keyConfig()), SEP) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func readTotalsArray () = split(getStringOrFail(keyTotals()), SEP) | |
67 | 67 | ||
68 | 68 | ||
69 | + | func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress())) | |
70 | + | ||
71 | + | ||
69 | 72 | func TotalsEntry (key,origArray,claimedAmt,newLastClaimedHeight) = { | |
70 | 73 | let totalClaimedAmount = parseIntValue(origArray[IdxTotalsTotalClaimedAmount]) | |
71 | 74 | let remainingAmount = parseIntValue(origArray[IdxTotalsRemainingAmount]) | |
72 | 75 | let lastClaimedHeight = parseIntValue(origArray[IdxTotalsLastClaimedHeight]) | |
73 | 76 | let newTotalClaimedAmount = (totalClaimedAmount + claimedAmt) | |
74 | 77 | let newRemainingAmount = (remainingAmount - claimedAmt) | |
75 | 78 | if ((0 > newRemainingAmount)) | |
76 | 79 | then throw("invalid math") | |
77 | 80 | else StringEntry(key, formatTotalsString(toString(newTotalClaimedAmount), toString(newRemainingAmount), toString(newLastClaimedHeight))) | |
78 | 81 | } | |
79 | 82 | ||
80 | 83 | ||
81 | 84 | func ClaimOperationHistoryEntry (userAddress,claimedAssetAmount,claimingBlocks,firstCalculationBlock,lastCalculationBlock,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(claimedAssetAmount, claimingBlocks, firstCalculationBlock, lastCalculationBlock)) | |
82 | 85 | ||
83 | 86 | ||
84 | - | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
85 | - | case s: String => | |
86 | - | fromBase58String(s) | |
87 | - | case _: Unit => | |
88 | - | unit | |
89 | - | case _ => | |
90 | - | throw("Match error") | |
91 | - | } | |
92 | - | ||
93 | - | ||
94 | - | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
95 | - | case s: String => | |
96 | - | fromBase58String(s) | |
97 | - | case _: Unit => | |
98 | - | unit | |
99 | - | case _ => | |
100 | - | throw("Match error") | |
101 | - | } | |
87 | + | func managerPublicKeyOrUnit () = { | |
88 | + | let managerVaultAddress = getManagerAddressOrFail() | |
89 | + | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
90 | + | case s: String => | |
91 | + | fromBase58String(s) | |
92 | + | case _: Unit => | |
93 | + | unit | |
94 | + | case _ => | |
95 | + | throw("Match error") | |
96 | + | } | |
97 | + | } | |
102 | 98 | ||
103 | 99 | ||
104 | 100 | func mustManager (i) = { | |
105 | 101 | let pd = throwErr("permission denied") | |
106 | 102 | match managerPublicKeyOrUnit() { | |
107 | 103 | case pk: ByteVector => | |
108 | 104 | if ((i.callerPublicKey == pk)) | |
109 | 105 | then true | |
110 | 106 | else pd | |
111 | 107 | case _: Unit => | |
112 | 108 | if ((i.caller == this)) | |
113 | 109 | then true | |
114 | 110 | else pd | |
115 | 111 | case _ => | |
116 | 112 | throw("Match error") | |
117 | 113 | } | |
118 | 114 | } | |
119 | 115 | ||
120 | 116 | ||
121 | 117 | func claimCommon (i,amount) = { | |
122 | 118 | let cfgArray = readConfigArray() | |
123 | 119 | let cfgClaimStartHeight = parseIntValue(cfgArray[IdxCfgClaimStartBlock]) | |
124 | 120 | let cfgClaimDuration = parseIntValue(cfgArray[IdxCfgClaimVestingPeriod]) | |
125 | 121 | let cfgClaimEnd = (cfgClaimStartHeight + cfgClaimDuration) | |
126 | 122 | let cfgClaimAssetId = fromBase58String(cfgArray[IdxCfgClaimAssetId]) | |
127 | 123 | let cfgClaimAssetOwner = addressFromStringValue(cfgArray[IdxCfgClaimAssetOwner]) | |
128 | 124 | let cfgClaimAssetTotalAmount = parseIntValue(cfgArray[IdxCfgClaimAssetTotalAmount]) | |
129 | 125 | let origTotalsArray = readTotalsArray() | |
130 | 126 | let totalClaimedAmount = parseIntValue(origTotalsArray[IdxTotalsTotalClaimedAmount]) | |
131 | 127 | let totalRemainingAmount = parseIntValue(origTotalsArray[IdxTotalsRemainingAmount]) | |
132 | 128 | let lastClaimedHeight = parseIntValue(origTotalsArray[IdxTotalsLastClaimedHeight]) | |
133 | 129 | if ((i.caller != cfgClaimAssetOwner)) | |
134 | 130 | then throw("permissions denied") | |
135 | 131 | else if ((cfgClaimStartHeight > height)) | |
136 | 132 | then throw(("Wait claim start block: " + toString(cfgClaimStartHeight))) | |
137 | 133 | else { | |
138 | 134 | let lastCalulationBlock = if ((height > cfgClaimEnd)) | |
139 | 135 | then cfgClaimEnd | |
140 | 136 | else height | |
141 | 137 | let firstCalulationBlock = if ((lastClaimedHeight == 0)) | |
142 | 138 | then cfgClaimStartHeight | |
143 | 139 | else lastClaimedHeight | |
144 | 140 | let claimingBlocks = (lastCalulationBlock - firstCalulationBlock) | |
145 | 141 | let amountAvailable = fraction(cfgClaimAssetTotalAmount, claimingBlocks, cfgClaimDuration) | |
146 | 142 | let amountUnclaimed = valueOrElse(getInteger(this, keyAmountUnclaimed), 0) | |
147 | 143 | let amountAvailableTotal = (amountAvailable + amountUnclaimed) | |
148 | 144 | let amountToClaim = if (if ((0 >= amount)) | |
149 | 145 | then true | |
150 | 146 | else (amount >= amountAvailableTotal)) | |
151 | 147 | then amountAvailableTotal | |
152 | 148 | else amount | |
153 | 149 | let amountUnclaimedNew = (amountAvailableTotal - amountToClaim) | |
154 | 150 | $Tuple2([IntegerEntry(keyAmountUnclaimed, amountUnclaimedNew), ScriptTransfer(cfgClaimAssetOwner, amountToClaim, cfgClaimAssetId), TotalsEntry(keyTotals(), readTotalsArray(), amountToClaim, lastCalulationBlock), ClaimOperationHistoryEntry(toString(cfgClaimAssetOwner), amountToClaim, claimingBlocks, firstCalulationBlock, lastCalulationBlock, i.transactionId)], amountToClaim) | |
155 | 151 | } | |
156 | 152 | } | |
157 | 153 | ||
158 | 154 | ||
159 | 155 | @Callable(i) | |
160 | 156 | func constructor (claimStartBlock,vestingPeriodBlocks,beneficiaryAddress) = { | |
161 | 157 | let vestingEnd = (claimStartBlock + vestingPeriodBlocks) | |
162 | 158 | if (isDefined(getString(keyConfig()))) | |
163 | 159 | then throw("already initialized") | |
164 | 160 | else if ((size(i.payments) != 1)) | |
165 | 161 | then throw("exactly 1 payment must be attached") | |
166 | 162 | else if ((i.callerPublicKey != base58'2Cbd8ozG7A1RyRNC3nNnZgHu7Ru4K3JCfpyPkhqr9zxq')) | |
167 | 163 | then throw("not authorized") | |
168 | 164 | else { | |
169 | 165 | let beneficiaryAddressParsed = valueOrErrorMessage(addressFromString(beneficiaryAddress), "Invalid beneficiarAddress passed") | |
170 | 166 | let pmt = value(i.payments[0]) | |
171 | 167 | let claimAssetId = value(pmt.assetId) | |
172 | 168 | let claimAssetInfo = valueOrErrorMessage(assetInfo(claimAssetId), "fail to load ido asset info") | |
173 | 169 | let claimAssetId58 = toBase58String(claimAssetId) | |
174 | 170 | let claimAssetMult = pow(10, 0, claimAssetInfo.decimals, 0, 0, DOWN) | |
175 | 171 | let claimAssetAmount = pmt.amount | |
176 | 172 | [StringEntry(keyConfig(), formatConfig(claimStartBlock, vestingPeriodBlocks, claimAssetId58, claimAssetMult, toString(beneficiaryAddressParsed), claimAssetAmount)), StringEntry(keyTotals(), formatTotalsString("0", toString(claimAssetAmount), "0"))] | |
177 | 173 | } | |
178 | 174 | } | |
179 | 175 | ||
180 | 176 | ||
181 | 177 | ||
182 | 178 | @Callable(i) | |
183 | 179 | func claimAmount (amount) = claimCommon(i, amount) | |
184 | 180 | ||
185 | 181 | ||
186 | 182 | ||
187 | 183 | @Callable(i) | |
188 | 184 | func claim () = claimCommon(i, -1) | |
189 | 185 | ||
190 | 186 | ||
191 | 187 | ||
192 | 188 | @Callable(i) | |
193 | 189 | func withdrawReferralReward (wxAmount) = { | |
194 | 190 | let referralContractAddress = value(getString(keyReferral)) | |
195 | 191 | let mustReferral = if ((toString(i.caller) == referralContractAddress)) | |
196 | 192 | then true | |
197 | 193 | else throwErr("permission denied") | |
198 | 194 | if ((mustReferral == mustReferral)) | |
199 | 195 | then { | |
200 | 196 | let wxAssetId = fromBase58String(value(getString(keyWxAssetId))) | |
201 | 197 | $Tuple2([ScriptTransfer(i.caller, wxAmount, wxAssetId), ClaimOperationHistoryEntry(referralContractAddress, wxAmount, 0, 0, 0, i.transactionId)], unit) | |
202 | 198 | } | |
203 | 199 | else throw("Strict value is not equal to itself.") | |
204 | 200 | } | |
205 | 201 | ||
206 | 202 | ||
207 | - | ||
208 | - | @Callable(i) | |
209 | - | func setManager (pendingManagerPublicKey) = { | |
210 | - | let checkCaller = mustManager(i) | |
211 | - | if ((checkCaller == checkCaller)) | |
212 | - | then { | |
213 | - | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
214 | - | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
215 | - | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
216 | - | else throw("Strict value is not equal to itself.") | |
217 | - | } | |
218 | - | else throw("Strict value is not equal to itself.") | |
219 | - | } | |
220 | - | ||
221 | - | ||
222 | - | ||
223 | - | @Callable(i) | |
224 | - | func confirmManager () = { | |
225 | - | let pm = pendingManagerPublicKeyOrUnit() | |
226 | - | let hasPM = if (isDefined(pm)) | |
227 | - | then true | |
228 | - | else throwErr("no pending manager") | |
229 | - | if ((hasPM == hasPM)) | |
230 | - | then { | |
231 | - | let checkPM = if ((i.callerPublicKey == value(pm))) | |
232 | - | then true | |
233 | - | else throwErr("you are not pending manager") | |
234 | - | if ((checkPM == checkPM)) | |
235 | - | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
236 | - | else throw("Strict value is not equal to itself.") | |
237 | - | } | |
238 | - | else throw("Strict value is not equal to itself.") | |
239 | - | } | |
240 | - | ||
241 | - | ||
242 | 203 | @Verifier(tx) | |
243 | 204 | func verify () = { | |
244 | 205 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
245 | 206 | case pk: ByteVector => | |
246 | 207 | pk | |
247 | 208 | case _: Unit => | |
248 | 209 | tx.senderPublicKey | |
249 | 210 | case _ => | |
250 | 211 | throw("Match error") | |
251 | 212 | } | |
252 | 213 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
253 | 214 | } | |
254 | 215 |
github/deemru/w8io/169f3d6 35.20 ms ◑