tx · 3PL9wCceaWydMQqoFNBNTz2FxxHonpb83HKqLh58dGJ8

3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4:  -0.05000000 Waves

2023.08.28 10:35 [2730231] smart account 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4 > SELF 0.00000000 Waves

{ "type": 13, "id": "3PL9wCceaWydMQqoFNBNTz2FxxHonpb83HKqLh58dGJ8", "fee": 5000000, "feeAssetId": null, "timestamp": 1693208116548, "version": 2, "chainId": 84, "sender": "3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4", "senderPublicKey": "DU1U4j8FqHUMRr9WgfF3yo67ULEFkjp7dtMWMpjBK1ar", "proofs": [ "skeeSke7Hyfdjwnc1gujxBx6bMFh9QegNZuKdoSUS45RPSfv9QGb3ncjv1Y3m1A5mhWPNXjPGG5PP8xaPzSSfTn", "3RC5haG6uByKa1PAuA8FB6hcHj54JNnYTkDe4F73cJb1a2ezzsufTJb9wn72XGhp2TQqqHxJT7T1ZSeQeWiN8wrN" ], "script": "base64:BgImCAISBwoFCAgICAESABIDCgEBEgASABIDCgEIEgASBQoDCAgIEgAbAAZTQ0FMRTgAgMLXLwAJa0ludGVyZXN0AghpbnRlcmVzdAANa1VzZXJJbnRlcmVzdAINX3VzZXJJbnRlcmVzdAAOa1VzZXJBdmFpbGFibGUCE191c2VyQXZhaWxhYmxlQ2xhaW0AEGtVc2VyVG9rZW5TdGFrZWQCEF91c2VyVG9rZW5TdGFrZWQAEWtUb3RhbFRva2VuU3Rha2VkAhB0b3RhbFRva2VuU3Rha2VkAAxrTkZUSW50ZXJlc3QCC05GVEludGVyZXN0ABBrTkZUVXNlckludGVyZXN0AhBfTkZUVXNlckludGVyZXN0ABZrTkZUVXNlckF2YWlsYWJsZUNsYWltAhZfTkZUVXNlckF2YWlsYWJsZUNsYWltAA9rTkZUVG90YWxTdGFrZWQCDk5GVFRvdGFsU3Rha2VkAA5rdXNlck5GVFN0YWtlZAIOX3VzZXJORlRTdGFr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ZWQDCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwABBQhhZG1pbjJQSwABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFCGFkbWluM1BLAAEAAAkAZwIJAGQCCQBkAgUSYWRtaW5QdWJLZXkxU2lnbmVkBRJhZG1pblB1YktleTJTaWduZWQFEmFkbWluUHViS2V5M1NpZ25lZAACBAckbWF0Y2gwBQJ0eAMJAAECBQckbWF0Y2gwAhdJbnZva2VTY3JpcHRUcmFuc2FjdGlvbgQDaW52BQckbWF0Y2gwBAZpc1NlbGYJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXkECmlzUmlnaHRGZWUDCQAAAggFA2ludgNmZWUAoPc2CQAAAggFA2ludgpmZWVBc3NldElkBQR1bml0BwQKaXNJbml0Q2FsbAkAAAIIBQNpbnYIZnVuY3Rpb24CBGluaXQEDGlzbm9QYXltZW50cwkAAAIJAJADAQgFA2ludghwYXltZW50cwAAAwMDAwUKaXNSaWdodEZlZQUKaXNJbml0Q2FsbAcFBmlzU2VsZgcFDGlzbm9QYXltZW50cwcGBRNtdWx0aVNpZ25lZEJ5QWRtaW5zBRNtdWx0aVNpZ25lZEJ5QWRtaW5zrNl9NA==", "height": 2730231, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: JCcveBURngrSofoCxyUV2Ki6TcFZu1x6FkUHCdQXfdt7 Next: BFikV3gGw5x6eVhrTx6y2Fm26S7mSk4gwT8qAGsE5jVM Diff:
OldNewDifferences
250250 then (curInterest + fraction(pmtToken, SCALE8, totalTokenStaked))
251251 else curInterest
252252 let interestNFTNew = if ((totalNFTStaked > 0))
253- then (curNFTInterest + fraction(pmtNFT, SCALE8, totalNFTStaked))
253+ then (curNFTInterest + (pmtNFT / totalNFTStaked))
254254 else curNFTInterest
255255 [IntegerEntry(kInterest, interestNew), IntegerEntry(kNFTInterest, interestNFTNew)]
256256 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SCALE8 = 100000000
55
66 let kInterest = "interest"
77
88 let kUserInterest = "_userInterest"
99
1010 let kUserAvailable = "_userAvailableClaim"
1111
1212 let kUserTokenStaked = "_userTokenStaked"
1313
1414 let kTotalTokenStaked = "totalTokenStaked"
1515
1616 let kNFTInterest = "NFTInterest"
1717
1818 let kNFTUserInterest = "_NFTUserInterest"
1919
2020 let kNFTUserAvailableClaim = "_NFTUserAvailableClaim"
2121
2222 let kNFTTotalStaked = "NFTTotalStaked"
2323
2424 let kuserNFTStaked = "_userNFTStaked"
2525
2626 let kuserNFTStakedId = "_userNFTStakedId"
2727
2828 let kNFTCreated = "_NFTCreated"
2929
3030 let kTokenid = "tokenId"
3131
3232 let kPersentForNFT = "percentForNFT"
3333
3434 let kAdmin1PK = "admin_pub_1"
3535
3636 let kAdmin2PK = "admin_pub_2"
3737
3838 let kAdmin3PK = "admin_pub_3"
3939
4040 let admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kAdmin1PK), "Can't get admin1PK"))
4141
4242 let admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kAdmin2PK), "Can't get admin2PK"))
4343
4444 let admin3PK = fromBase58String(valueOrErrorMessage(getString(this, kAdmin3PK), "Can't get operatorPK"))
4545
4646 let tokenId = valueOrErrorMessage(getString(this, kTokenid), "Can't get staking token")
4747
4848 func isAdminCall (i) = if (containsElement([admin1PK, admin2PK, admin3PK], i.callerPublicKey))
4949 then unit
5050 else throw("Only admin can call this function")
5151
5252
5353 func isSelfCall (i) = if ((i.caller == this))
5454 then unit
5555 else throw("Only contract itself can call this function")
5656
5757
5858 func assetIdToStr (assetId) = match assetId {
5959 case id: ByteVector =>
6060 toBase58String(id)
6161 case waves: Unit =>
6262 "WAVES"
6363 case _ =>
6464 throw("Not Asset id")
6565 }
6666
6767
6868 func claimCalc (user) = {
6969 let totalTokenStaked = valueOrElse(getInteger(this, kTotalTokenStaked), 0)
7070 let curInterest = valueOrElse(getInteger(this, kInterest), 0)
7171 let availableForClaim = valueOrElse(getInteger(this, (user + kUserAvailable)), 0)
7272 let userInterest = valueOrElse(getInteger(this, (user + kUserInterest)), curInterest)
7373 let userTokenStaked = valueOrElse(getInteger(this, (user + kUserTokenStaked)), 0)
7474 let claimAmount = fraction(userTokenStaked, (curInterest - userInterest), SCALE8)
7575 $Tuple4(curInterest, (claimAmount + availableForClaim), userTokenStaked, totalTokenStaked)
7676 }
7777
7878
7979 func claimCalcNft (user) = {
8080 let totalNftStaked = valueOrElse(getInteger(this, kNFTTotalStaked), 0)
8181 let curInterest = valueOrElse(getInteger(this, kNFTInterest), 0)
8282 let availableForClaim = valueOrElse(getInteger(this, (user + kNFTUserAvailableClaim)), 0)
8383 let userInterest = valueOrElse(getInteger(this, (user + kNFTUserInterest)), curInterest)
8484 let userNftStaked = valueOrElse(getInteger(this, (user + kuserNFTStaked)), 0)
8585 let claimAmount = fraction(userNftStaked, (curInterest - userInterest), SCALE8)
8686 $Tuple4(curInterest, (claimAmount + availableForClaim), userNftStaked, totalNftStaked)
8787 }
8888
8989
9090 @Callable(i)
9191 func init (tokenId,adm1Pub,adm2Pub,adm3Pub,toNFTPercent) = valueOrElse(isSelfCall(i), if (isDefined(getString(this, kTokenid)))
9292 then throw("DApp already inited")
9393 else if (!(isDefined(assetInfo(fromBase58String(tokenId)))))
9494 then throw("asset id is not correct asset id")
9595 else if ((size(fromBase58String(adm1Pub)) != 32))
9696 then throw("group1Admin1PubKey is not correct")
9797 else if ((size(fromBase58String(adm2Pub)) != 32))
9898 then throw("group1Admin1PubKey is not correct")
9999 else if ((size(fromBase58String(adm3Pub)) != 32))
100100 then throw("group1Admin1PubKey is not correct")
101101 else [StringEntry(kTokenid, tokenId), StringEntry(kAdmin1PK, adm1Pub), StringEntry(kAdmin2PK, adm2Pub), StringEntry(kAdmin3PK, adm3Pub), IntegerEntry(kPersentForNFT, toNFTPercent)])
102102
103103
104104
105105 @Callable(i)
106106 func stake () = if ((size(i.payments) != 1))
107107 then throw("One payment expected")
108108 else {
109109 let $t036953770 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
110110 let pmtAmount = $t036953770._1
111111 let pmtAssetId = $t036953770._2
112112 if ((pmtAssetId != fromBase58String(tokenId)))
113113 then throw("Wrong payment asset")
114114 else {
115115 let user = toString(i.caller)
116116 let $t038913987 = claimCalc(user)
117117 let userNewInterest = $t038913987._1
118118 let claimAmountAvailable = $t038913987._2
119119 let userTokenStaked = $t038913987._3
120120 let totalTokenStaked = $t038913987._4
121121 [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked + pmtAmount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked + pmtAmount))]
122122 }
123123 }
124124
125125
126126
127127 @Callable(i)
128128 func unstake (amount) = {
129129 let user = toString(i.caller)
130130 if ((0 >= amount))
131131 then throw("Amount must be greater than 0")
132132 else {
133133 let $t044014497 = claimCalc(user)
134134 let userNewInterest = $t044014497._1
135135 let claimAmountAvailable = $t044014497._2
136136 let userTokenStaked = $t044014497._3
137137 let totalTokenStaked = $t044014497._4
138138 if ((amount > userTokenStaked))
139139 then throw("You can't unstake more than staked")
140140 else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked - amount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked - amount))]
141141 }
142142 }
143143
144144
145145
146146 @Callable(i)
147147 func claim () = {
148148 let user = toString(i.caller)
149149 let $t049135009 = claimCalc(user)
150150 let userNewInterest = $t049135009._1
151151 let claimAmountAvailable = $t049135009._2
152152 let userTokenStaked = $t049135009._3
153153 let totalTokenStaked = $t049135009._4
154154 if ((claimAmountAvailable == 0))
155155 then throw("Nothing to claim")
156156 else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))]
157157 }
158158
159159
160160
161161 @Callable(i)
162162 func stakeNFT () = if ((size(i.payments) != 1))
163163 then throw("One payment expected")
164164 else {
165165 let $t053745449 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166166 let pmtAmount = $t053745449._1
167167 let pmtAssetId = $t053745449._2
168168 let pmtAssetIdStr = assetIdToStr(pmtAssetId)
169169 if (!(isDefined(getString(this, (pmtAssetIdStr + kNFTCreated)))))
170170 then throw("Wrong nft asset")
171171 else {
172172 let user = toString(i.caller)
173173 let $t056305725 = claimCalcNft(user)
174174 let userNewInterest = $t056305725._1
175175 let claimAmountAvailable = $t056305725._2
176176 let userNFTStaked = $t056305725._3
177177 let totalNFTStaked = $t056305725._4
178178 [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), claimAmountAvailable), IntegerEntry((user + kuserNFTStaked), (userNFTStaked + pmtAmount)), IntegerEntry(kNFTTotalStaked, (totalNFTStaked + pmtAmount)), IntegerEntry((((user + "_") + pmtAssetIdStr) + kuserNFTStakedId), 1)]
179179 }
180180 }
181181
182182
183183
184184 @Callable(i)
185185 func unstakeNFT (id) = {
186186 let user = toString(i.caller)
187187 if (isDefined(getString(this, (((user + id) + "_") + kuserNFTStakedId))))
188188 then throw("You didn't staked")
189189 else {
190190 let $t062506345 = claimCalcNft(user)
191191 let userNewInterest = $t062506345._1
192192 let claimAmountAvailable = $t062506345._2
193193 let userNFTStaked = $t062506345._3
194194 let totalNFTStaked = $t062506345._4
195195 [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), claimAmountAvailable), IntegerEntry((user + kuserNFTStaked), (userNFTStaked - 1)), IntegerEntry(kNFTTotalStaked, (totalNFTStaked - 1)), DeleteEntry((((user + "_") + id) + kuserNFTStakedId)), ScriptTransfer(i.caller, 1, fromBase58String(id))]
196196 }
197197 }
198198
199199
200200
201201 @Callable(i)
202202 func claimNFT () = {
203203 let user = toString(i.caller)
204204 let $t067796874 = claimCalcNft(user)
205205 let userNewInterest = $t067796874._1
206206 let claimAmountAvailable = $t067796874._2
207207 let userNFTStaked = $t067796874._3
208208 let totalNFTStaked = $t067796874._4
209209 if ((claimAmountAvailable == 0))
210210 then throw("Nothing to claim")
211211 else [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))]
212212 }
213213
214214
215215
216216 @Callable(i)
217217 func issueNFT (userAddr,name,descr) = valueOrElse(isAdminCall(i), {
218218 let uAddr = valueOrErrorMessage(addressFromString(userAddr), "Wrong user address")
219219 let issue = Issue(name, descr, 1, 0, false)
220220 let nftId = calculateAssetId(issue)
221221 [issue, StringEntry((toBase58String(nftId) + kNFTCreated), userAddr), ScriptTransfer(uAddr, 1, nftId)]
222222 })
223223
224224
225225
226226 @Callable(i)
227227 func airdrop () = valueOrElse(isAdminCall(i), if ((size(i.payments) != 1))
228228 then throw("One payment expected")
229229 else {
230230 let $t076747749 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
231231 let pmtAmount = $t076747749._1
232232 let pmtAssetId = $t076747749._2
233233 if ((pmtAssetId != fromBase58String(tokenId)))
234234 then throw("Wrong payment asset")
235235 else {
236236 let percentForNFT = getIntegerValue(this, kPersentForNFT)
237237 let totalTokenStaked = valueOrElse(getInteger(this, kTotalTokenStaked), 0)
238238 let totalNFTStaked = valueOrElse(getInteger(this, kNFTTotalStaked), 0)
239239 let curInterest = valueOrElse(getInteger(this, kInterest), 0)
240240 let curNFTInterest = valueOrElse(getInteger(this, kNFTInterest), 0)
241241 let $t081728347 = if ((totalNFTStaked == 0))
242242 then $Tuple2(0, pmtAmount)
243243 else {
244244 let nftP = fraction(pmtAmount, percentForNFT, 100)
245245 $Tuple2(nftP, (pmtAmount - nftP))
246246 }
247247 let pmtNFT = $t081728347._1
248248 let pmtToken = $t081728347._2
249249 let interestNew = if ((totalTokenStaked > 0))
250250 then (curInterest + fraction(pmtToken, SCALE8, totalTokenStaked))
251251 else curInterest
252252 let interestNFTNew = if ((totalNFTStaked > 0))
253- then (curNFTInterest + fraction(pmtNFT, SCALE8, totalNFTStaked))
253+ then (curNFTInterest + (pmtNFT / totalNFTStaked))
254254 else curNFTInterest
255255 [IntegerEntry(kInterest, interestNew), IntegerEntry(kNFTInterest, interestNFTNew)]
256256 }
257257 })
258258
259259
260260 @Verifier(tx)
261261 func verify () = {
262262 let multiSignedByAdmins = {
263263 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
264264 then 1
265265 else 0
266266 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
267267 then 1
268268 else 0
269269 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
270270 then 1
271271 else 0
272272 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
273273 }
274274 match tx {
275275 case inv: InvokeScriptTransaction =>
276276 let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
277277 let isRightFee = if ((inv.fee == 900000))
278278 then (inv.feeAssetId == unit)
279279 else false
280280 let isInitCall = (inv.function == "init")
281281 let isnoPayments = (size(inv.payments) == 0)
282282 if (if (if (if (isRightFee)
283283 then isInitCall
284284 else false)
285285 then isSelf
286286 else false)
287287 then isnoPayments
288288 else false)
289289 then true
290290 else multiSignedByAdmins
291291 case _ =>
292292 multiSignedByAdmins
293293 }
294294 }
295295

github/deemru/w8io/026f985 
39.80 ms