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:AAIFAAAAAAAAABUIAhIFCgMBAQgSAwoBARIAEgMKAQEAAAAgAAAAAANTRVACAAAAAl9fAAAAAAtrZXlSZWZlcnJhbAkABLkAAAACCQAETAAAAAICAAAAAiVzCQAETAAAAAICAAAACHJlZmVycmFsBQAAAANuaWwFAAAAA1NFUAAAAAAMa2V5V3hBc3NldElkCQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAJd3hBc3NldElkBQAAAANuaWwFAAAAA1NFUAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAACAAAAFCVzX19tYW5hZ2VyUHVibGljS2V5AQAAABZrZXlNYW5hZ2VyVmF1bHRBZGRyZXNzAAAAAAIAAAAXJXNfX21hbmFnZXJWYXVsdEFkZHJlc3MAAAAAFUlkeENmZ0NsYWltU3RhcnRCbG9jawAAAAAAAAAAAQAAAAAYSWR4Q2ZnQ2xhaW1WZXN0aW5nUGVyaW9kAAAAAAAAAAACAAAAABJJZHhDZmdDbGFpbUFzc2V0SWQAAAAAAAAAAAMAAAAAFElkeENmZ0NsYWltQXNzZXRNdWx0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2lvbiBkZW5pZWQDCQAAAAAAAAIFAAAADG11c3RSZWZlcnJhbAUAAAAMbXVzdFJlZmVycmFsBAAAAAl3eEFzc2V0SWQJAAJZAAAAAQkBAAAABXZhbHVlAAAAAQkABCIAAAABBQAAAAxrZXlXeEFzc2V0SWQJAAUUAAAAAgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACHd4QW1vdW50BQAAAAl3eEFzc2V0SWQJAARMAAAAAgkBAAAAGkNsYWltT3BlcmF0aW9uSGlzdG9yeUVudHJ5AAAABgUAAAAXcmVmZXJyYWxDb250cmFjdEFkZHJlc3MFAAAACHd4QW1vdW50AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAUAAAABaQAAAA10cmFuc2FjdGlvbklkBQAAAANuaWwFAAAABHVuaXQJAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tleftuTys=", "height": 2562877, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EqNmKZuDe62QHegQAivcqSSawSVMxqNAiLkMgKYazZyQ Next: none Diff:
OldNewDifferences
1010 func keyManagerPublicKey () = "%s__managerPublicKey"
1111
1212
13-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
13+func keyManagerVaultAddress () = "%s__managerVaultAddress"
1414
1515
1616 let IdxCfgClaimStartBlock = 1
6666 func readTotalsArray () = split(getStringOrFail(keyTotals()), SEP)
6767
6868
69+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
70+
71+
6972 func TotalsEntry (key,origArray,claimedAmt,newLastClaimedHeight) = {
7073 let totalClaimedAmount = parseIntValue(origArray[IdxTotalsTotalClaimedAmount])
7174 let remainingAmount = parseIntValue(origArray[IdxTotalsRemainingAmount])
8184 func ClaimOperationHistoryEntry (userAddress,claimedAssetAmount,claimingBlocks,firstCalculationBlock,lastCalculationBlock,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(claimedAssetAmount, claimingBlocks, firstCalculationBlock, lastCalculationBlock))
8285
8386
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+ }
10298
10399
104100 func mustManager (i) = {
204200 }
205201
206202
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-
242203 @Verifier(tx)
243204 func verify () = {
244205 let targetPublicKey = match managerPublicKeyOrUnit() {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 let keyReferral = makeString(["%s", "referral"], SEP)
77
88 let keyWxAssetId = makeString(["%s", "wxAssetId"], SEP)
99
1010 func keyManagerPublicKey () = "%s__managerPublicKey"
1111
1212
13-func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
13+func keyManagerVaultAddress () = "%s__managerVaultAddress"
1414
1515
1616 let IdxCfgClaimStartBlock = 1
1717
1818 let IdxCfgClaimVestingPeriod = 2
1919
2020 let IdxCfgClaimAssetId = 3
2121
2222 let IdxCfgClaimAssetMult = 4
2323
2424 let IdxCfgClaimAssetOwner = 5
2525
2626 let IdxCfgClaimAssetTotalAmount = 6
2727
2828 let IdxTotalsTotalClaimedAmount = 1
2929
3030 let IdxTotalsRemainingAmount = 2
3131
3232 let IdxTotalsLastClaimedHeight = 3
3333
3434 func throwErr (msg) = throw(makeString(["marketing.ride:", msg], " "))
3535
3636
3737 func getStringOrFail (key) = valueOrErrorMessage(getString(key), (("mandatory this." + key) + " is not defined"))
3838
3939
4040 func formatConfigString (claimStartBlock,vestingPeriod,assetIdBase58,assetMult,assetOwner,assetTotalAmt) = makeString(["%d%d%s%d%s%d%", claimStartBlock, vestingPeriod, assetIdBase58, assetMult, assetOwner, assetTotalAmt], SEP)
4141
4242
4343 func formatConfig (claimStartBlock,vestingPeriod,assetIdBase58,assetMult,claimAssetOwner,claimAssetTotalAmount) = formatConfigString(toString(claimStartBlock), toString(vestingPeriod), assetIdBase58, toString(assetMult), claimAssetOwner, toString(claimAssetTotalAmount))
4444
4545
4646 func formatTotalsString (totalClaimedAmount,remainingAmountForClaim,lastClaimedHeight) = makeString(["%d%d%d", totalClaimedAmount, remainingAmountForClaim, lastClaimedHeight], SEP)
4747
4848
4949 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)
5050
5151
5252 func keyConfig () = "%s__config"
5353
5454
5555 func keyTotals () = "%s__totals"
5656
5757
5858 let keyAmountUnclaimed = makeString(["%s", "amountUnclaimed"], SEP)
5959
6060 func keyOperationHistoryRecord (type,userAddress,txId58) = makeString(["%s%s%s%s__history", type, userAddress, txId58], SEP)
6161
6262
6363 func readConfigArray () = split(getStringOrFail(keyConfig()), SEP)
6464
6565
6666 func readTotalsArray () = split(getStringOrFail(keyTotals()), SEP)
6767
6868
69+func getManagerAddressOrFail () = addressFromStringValue(getStringValue(keyManagerVaultAddress()))
70+
71+
6972 func TotalsEntry (key,origArray,claimedAmt,newLastClaimedHeight) = {
7073 let totalClaimedAmount = parseIntValue(origArray[IdxTotalsTotalClaimedAmount])
7174 let remainingAmount = parseIntValue(origArray[IdxTotalsRemainingAmount])
7275 let lastClaimedHeight = parseIntValue(origArray[IdxTotalsLastClaimedHeight])
7376 let newTotalClaimedAmount = (totalClaimedAmount + claimedAmt)
7477 let newRemainingAmount = (remainingAmount - claimedAmt)
7578 if ((0 > newRemainingAmount))
7679 then throw("invalid math")
7780 else StringEntry(key, formatTotalsString(toString(newTotalClaimedAmount), toString(newRemainingAmount), toString(newLastClaimedHeight)))
7881 }
7982
8083
8184 func ClaimOperationHistoryEntry (userAddress,claimedAssetAmount,claimingBlocks,firstCalculationBlock,lastCalculationBlock,txId) = StringEntry(keyOperationHistoryRecord("claim", userAddress, toBase58String(txId)), formatHistoryRecord(claimedAssetAmount, claimingBlocks, firstCalculationBlock, lastCalculationBlock))
8285
8386
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+ }
10298
10399
104100 func mustManager (i) = {
105101 let pd = throwErr("permission denied")
106102 match managerPublicKeyOrUnit() {
107103 case pk: ByteVector =>
108104 if ((i.callerPublicKey == pk))
109105 then true
110106 else pd
111107 case _: Unit =>
112108 if ((i.caller == this))
113109 then true
114110 else pd
115111 case _ =>
116112 throw("Match error")
117113 }
118114 }
119115
120116
121117 func claimCommon (i,amount) = {
122118 let cfgArray = readConfigArray()
123119 let cfgClaimStartHeight = parseIntValue(cfgArray[IdxCfgClaimStartBlock])
124120 let cfgClaimDuration = parseIntValue(cfgArray[IdxCfgClaimVestingPeriod])
125121 let cfgClaimEnd = (cfgClaimStartHeight + cfgClaimDuration)
126122 let cfgClaimAssetId = fromBase58String(cfgArray[IdxCfgClaimAssetId])
127123 let cfgClaimAssetOwner = addressFromStringValue(cfgArray[IdxCfgClaimAssetOwner])
128124 let cfgClaimAssetTotalAmount = parseIntValue(cfgArray[IdxCfgClaimAssetTotalAmount])
129125 let origTotalsArray = readTotalsArray()
130126 let totalClaimedAmount = parseIntValue(origTotalsArray[IdxTotalsTotalClaimedAmount])
131127 let totalRemainingAmount = parseIntValue(origTotalsArray[IdxTotalsRemainingAmount])
132128 let lastClaimedHeight = parseIntValue(origTotalsArray[IdxTotalsLastClaimedHeight])
133129 if ((i.caller != cfgClaimAssetOwner))
134130 then throw("permissions denied")
135131 else if ((cfgClaimStartHeight > height))
136132 then throw(("Wait claim start block: " + toString(cfgClaimStartHeight)))
137133 else {
138134 let lastCalulationBlock = if ((height > cfgClaimEnd))
139135 then cfgClaimEnd
140136 else height
141137 let firstCalulationBlock = if ((lastClaimedHeight == 0))
142138 then cfgClaimStartHeight
143139 else lastClaimedHeight
144140 let claimingBlocks = (lastCalulationBlock - firstCalulationBlock)
145141 let amountAvailable = fraction(cfgClaimAssetTotalAmount, claimingBlocks, cfgClaimDuration)
146142 let amountUnclaimed = valueOrElse(getInteger(this, keyAmountUnclaimed), 0)
147143 let amountAvailableTotal = (amountAvailable + amountUnclaimed)
148144 let amountToClaim = if (if ((0 >= amount))
149145 then true
150146 else (amount >= amountAvailableTotal))
151147 then amountAvailableTotal
152148 else amount
153149 let amountUnclaimedNew = (amountAvailableTotal - amountToClaim)
154150 $Tuple2([IntegerEntry(keyAmountUnclaimed, amountUnclaimedNew), ScriptTransfer(cfgClaimAssetOwner, amountToClaim, cfgClaimAssetId), TotalsEntry(keyTotals(), readTotalsArray(), amountToClaim, lastCalulationBlock), ClaimOperationHistoryEntry(toString(cfgClaimAssetOwner), amountToClaim, claimingBlocks, firstCalulationBlock, lastCalulationBlock, i.transactionId)], amountToClaim)
155151 }
156152 }
157153
158154
159155 @Callable(i)
160156 func constructor (claimStartBlock,vestingPeriodBlocks,beneficiaryAddress) = {
161157 let vestingEnd = (claimStartBlock + vestingPeriodBlocks)
162158 if (isDefined(getString(keyConfig())))
163159 then throw("already initialized")
164160 else if ((size(i.payments) != 1))
165161 then throw("exactly 1 payment must be attached")
166162 else if ((i.callerPublicKey != base58'2Cbd8ozG7A1RyRNC3nNnZgHu7Ru4K3JCfpyPkhqr9zxq'))
167163 then throw("not authorized")
168164 else {
169165 let beneficiaryAddressParsed = valueOrErrorMessage(addressFromString(beneficiaryAddress), "Invalid beneficiarAddress passed")
170166 let pmt = value(i.payments[0])
171167 let claimAssetId = value(pmt.assetId)
172168 let claimAssetInfo = valueOrErrorMessage(assetInfo(claimAssetId), "fail to load ido asset info")
173169 let claimAssetId58 = toBase58String(claimAssetId)
174170 let claimAssetMult = pow(10, 0, claimAssetInfo.decimals, 0, 0, DOWN)
175171 let claimAssetAmount = pmt.amount
176172 [StringEntry(keyConfig(), formatConfig(claimStartBlock, vestingPeriodBlocks, claimAssetId58, claimAssetMult, toString(beneficiaryAddressParsed), claimAssetAmount)), StringEntry(keyTotals(), formatTotalsString("0", toString(claimAssetAmount), "0"))]
177173 }
178174 }
179175
180176
181177
182178 @Callable(i)
183179 func claimAmount (amount) = claimCommon(i, amount)
184180
185181
186182
187183 @Callable(i)
188184 func claim () = claimCommon(i, -1)
189185
190186
191187
192188 @Callable(i)
193189 func withdrawReferralReward (wxAmount) = {
194190 let referralContractAddress = value(getString(keyReferral))
195191 let mustReferral = if ((toString(i.caller) == referralContractAddress))
196192 then true
197193 else throwErr("permission denied")
198194 if ((mustReferral == mustReferral))
199195 then {
200196 let wxAssetId = fromBase58String(value(getString(keyWxAssetId)))
201197 $Tuple2([ScriptTransfer(i.caller, wxAmount, wxAssetId), ClaimOperationHistoryEntry(referralContractAddress, wxAmount, 0, 0, 0, i.transactionId)], unit)
202198 }
203199 else throw("Strict value is not equal to itself.")
204200 }
205201
206202
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-
242203 @Verifier(tx)
243204 func verify () = {
244205 let targetPublicKey = match managerPublicKeyOrUnit() {
245206 case pk: ByteVector =>
246207 pk
247208 case _: Unit =>
248209 tx.senderPublicKey
249210 case _ =>
250211 throw("Match error")
251212 }
252213 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
253214 }
254215

github/deemru/w8io/169f3d6 
35.20 ms