tx · 8T6vEMJpsX79mNPztRcnRGziBV7db3ebeAQgRM93bTb9

3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4:  -0.05000000 Waves

2023.08.28 09:56 [2730190] smart account 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4 > SELF 0.00000000 Waves

{ "type": 13, "id": "8T6vEMJpsX79mNPztRcnRGziBV7db3ebeAQgRM93bTb9", "fee": 5000000, "feeAssetId": null, "timestamp": 1693205821882, "version": 2, "chainId": 84, "sender": "3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4", "senderPublicKey": "DU1U4j8FqHUMRr9WgfF3yo67ULEFkjp7dtMWMpjBK1ar", "proofs": [ "3iVrrEp4kRu1moNYASzgrDZr8cR9QFxE9r8KvRgkLdRKrraWEZVnnzCSSHkXuR3bsQhmKSDEW4E1g5HszvXpPg1", "4hy8Kwx6Q6Ji1gve1kf6urB7ByEuvixFHPhiH2k1owTD5RZ9dzhCSXKiuD3cZtdbCGS2BkdzVp9Hqz8hxvfHBnvZ" ], "script": "base64:BgImCAISBwoFCAgICAESABIDCgEBEgASABIDCgEIEgASBQoDCAgIEgAbAAZTQ0FMRTgAgMLXLwAJa0ludGVyZXN0AghpbnRlcmVzdAANa1VzZXJJbnRlcmVzdAINX3VzZXJJbnRlcmVzdAAOa1VzZXJBdmFpbGFibGUCE191c2VyQXZhaWxhYmxlQ2xhaW0AEGtVc2VyVG9rZW5TdGFrZWQCEF91c2VyVG9rZW5TdGFrZWQAEWtUb3RhbFRva2VuU3Rha2VkAhB0b3RhbFRva2VuU3Rha2VkAAxrTkZUSW50ZXJlc3QCC05GVEludGVyZXN0ABBrTkZUVXNlckludGVyZXN0AhBfTkZUVXNlckludGVyZXN0ABZrTkZUVXNlckF2YWlsYWJsZUNsYWltAhZfTkZUVXNlckF2YWlsYWJsZUNsYWltAA9rTkZUVG90YWxTdGFrZWQCDk5GVFRvdGFsU3Rha2VkAA5rdXNlck5GVFN0YWtlZAIOX3VzZXJORlRT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2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFCGFkbWluMlBLAAEAAAQSYWRtaW5QdWJLZXkzU2lnbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDAEBmlzU2VsZgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQQKaXNSaWdodEZlZQMJAAACCAUDaW52A2ZlZQCg9zYJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHBAppc0luaXRDYWxsCQAAAggFA2ludghmdW5jdGlvbgIEaW5pdAQMaXNub1BheW1lbnRzCQAAAgkAkAMBCAUDaW52CHBheW1lbnRzAAADAwMDBQppc1JpZ2h0RmVlBQppc0luaXRDYWxsBwUGaXNTZWxmBwUMaXNub1BheW1lbnRzBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnPlenIK", "height": 2730190, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: J5SDjSBRijMgCTmtGHGSL1xvahTHYiUBVjDSDLS1kHLB Next: JCcveBURngrSofoCxyUV2Ki6TcFZu1x6FkUHCdQXfdt7 Diff:
OldNewDifferences
8888
8989
9090 @Callable(i)
91-func init (tokenId,adm1Pub,adm2Pub,adm3Pub,toNFTPercent) = valueOrElse(isSelfCall(i), if (!(isDefined(assetInfo(fromBase58String(tokenId)))))
92- then throw("asset id is not correct asset id")
93- else if ((size(fromBase58String(adm1Pub)) != 32))
94- then throw("group1Admin1PubKey is not correct")
95- else if ((size(fromBase58String(adm2Pub)) != 32))
91+func init (tokenId,adm1Pub,adm2Pub,adm3Pub,toNFTPercent) = valueOrElse(isSelfCall(i), if (isDefined(getString(this, kTokenid)))
92+ then throw("DApp already inited")
93+ else if (!(isDefined(assetInfo(fromBase58String(tokenId)))))
94+ then throw("asset id is not correct asset id")
95+ else if ((size(fromBase58String(adm1Pub)) != 32))
9696 then throw("group1Admin1PubKey is not correct")
97- else if ((size(fromBase58String(adm3Pub)) != 32))
97+ else if ((size(fromBase58String(adm2Pub)) != 32))
9898 then throw("group1Admin1PubKey is not correct")
99- else [StringEntry(kTokenid, tokenId), StringEntry(kAdmin1PK, adm1Pub), StringEntry(kAdmin2PK, adm2Pub), StringEntry(kAdmin3PK, adm3Pub), IntegerEntry(kPersentForNFT, toNFTPercent)])
99+ else if ((size(fromBase58String(adm3Pub)) != 32))
100+ then throw("group1Admin1PubKey is not correct")
101+ else [StringEntry(kTokenid, tokenId), StringEntry(kAdmin1PK, adm1Pub), StringEntry(kAdmin2PK, adm2Pub), StringEntry(kAdmin3PK, adm3Pub), IntegerEntry(kPersentForNFT, toNFTPercent)])
100102
101103
102104
104106 func stake () = if ((size(i.payments) != 1))
105107 then throw("One payment expected")
106108 else {
107- let $t036143689 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
108- let pmtAmount = $t036143689._1
109- let pmtAssetId = $t036143689._2
109+ let $t036953770 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
110+ let pmtAmount = $t036953770._1
111+ let pmtAssetId = $t036953770._2
110112 if ((pmtAssetId != fromBase58String(tokenId)))
111113 then throw("Wrong payment asset")
112114 else {
113115 let user = toString(i.caller)
114- let $t038103906 = claimCalc(user)
115- let userNewInterest = $t038103906._1
116- let claimAmountAvailable = $t038103906._2
117- let userTokenStaked = $t038103906._3
118- let totalTokenStaked = $t038103906._4
116+ let $t038913987 = claimCalc(user)
117+ let userNewInterest = $t038913987._1
118+ let claimAmountAvailable = $t038913987._2
119+ let userTokenStaked = $t038913987._3
120+ let totalTokenStaked = $t038913987._4
119121 [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked + pmtAmount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked + pmtAmount))]
120122 }
121123 }
128130 if ((0 >= amount))
129131 then throw("Amount must be greater than 0")
130132 else {
131- let $t043204416 = claimCalc(user)
132- let userNewInterest = $t043204416._1
133- let claimAmountAvailable = $t043204416._2
134- let userTokenStaked = $t043204416._3
135- let totalTokenStaked = $t043204416._4
133+ let $t044014497 = claimCalc(user)
134+ let userNewInterest = $t044014497._1
135+ let claimAmountAvailable = $t044014497._2
136+ let userTokenStaked = $t044014497._3
137+ let totalTokenStaked = $t044014497._4
136138 if ((amount > userTokenStaked))
137139 then throw("You can't unstake more than staked")
138140 else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked - amount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked - amount))]
144146 @Callable(i)
145147 func claim () = {
146148 let user = toString(i.caller)
147- let $t048324928 = claimCalc(user)
148- let userNewInterest = $t048324928._1
149- let claimAmountAvailable = $t048324928._2
150- let userTokenStaked = $t048324928._3
151- let totalTokenStaked = $t048324928._4
149+ let $t049135009 = claimCalc(user)
150+ let userNewInterest = $t049135009._1
151+ let claimAmountAvailable = $t049135009._2
152+ let userTokenStaked = $t049135009._3
153+ let totalTokenStaked = $t049135009._4
152154 if ((claimAmountAvailable == 0))
153155 then throw("Nothing to claim")
154156 else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))]
160162 func stakeNFT () = if ((size(i.payments) != 0))
161163 then throw("One payment expected")
162164 else {
163- let $t052935368 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
164- let pmtAmount = $t052935368._1
165- let pmtAssetId = $t052935368._2
165+ let $t053745449 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166+ let pmtAmount = $t053745449._1
167+ let pmtAssetId = $t053745449._2
166168 let pmtAssetIdStr = assetIdToStr(pmtAssetId)
167169 if (!(isDefined(getString(this, (pmtAssetIdStr + kNFTCreated)))))
168170 then throw("Wrong nft asset")
169171 else {
170172 let user = toString(i.caller)
171- let $t055495644 = claimCalcNft(user)
172- let userNewInterest = $t055495644._1
173- let claimAmountAvailable = $t055495644._2
174- let userNFTStaked = $t055495644._3
175- let totalNFTStaked = $t055495644._4
173+ let $t056305725 = claimCalcNft(user)
174+ let userNewInterest = $t056305725._1
175+ let claimAmountAvailable = $t056305725._2
176+ let userNFTStaked = $t056305725._3
177+ let totalNFTStaked = $t056305725._4
176178 [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), claimAmountAvailable), IntegerEntry((user + kuserNFTStaked), (userNFTStaked + pmtAmount)), IntegerEntry(kNFTTotalStaked, (totalNFTStaked + pmtAmount)), IntegerEntry((((user + "_") + pmtAssetIdStr) + kuserNFTStakedId), 1)]
177179 }
178180 }
185187 if (isDefined(getString(this, (((user + id) + "_") + kuserNFTStakedId))))
186188 then throw("You didn't staked")
187189 else {
188- let $t061696264 = claimCalcNft(user)
189- let userNewInterest = $t061696264._1
190- let claimAmountAvailable = $t061696264._2
191- let userNFTStaked = $t061696264._3
192- let totalNFTStaked = $t061696264._4
190+ let $t062506345 = claimCalcNft(user)
191+ let userNewInterest = $t062506345._1
192+ let claimAmountAvailable = $t062506345._2
193+ let userNFTStaked = $t062506345._3
194+ let totalNFTStaked = $t062506345._4
193195 [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))]
194196 }
195197 }
199201 @Callable(i)
200202 func claimNFT () = {
201203 let user = toString(i.caller)
202- let $t066986793 = claimCalcNft(user)
203- let userNewInterest = $t066986793._1
204- let claimAmountAvailable = $t066986793._2
205- let userNFTStaked = $t066986793._3
206- let totalNFTStaked = $t066986793._4
204+ let $t067796874 = claimCalcNft(user)
205+ let userNewInterest = $t067796874._1
206+ let claimAmountAvailable = $t067796874._2
207+ let userNFTStaked = $t067796874._3
208+ let totalNFTStaked = $t067796874._4
207209 if ((claimAmountAvailable == 0))
208210 then throw("Nothing to claim")
209211 else [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))]
216218 let uAddr = valueOrErrorMessage(addressFromString(userAddr), "Wrong user address")
217219 let issue = Issue(name, descr, 1, 1, false)
218220 let nftId = calculateAssetId(issue)
219-[StringEntry((toBase58String(nftId) + kNFTCreated), userAddr), ScriptTransfer(uAddr, 1, nftId)]
221+[issue, StringEntry((toBase58String(nftId) + kNFTCreated), userAddr), ScriptTransfer(uAddr, 1, nftId)]
220222 })
221223
222224
225227 func airdrop () = valueOrElse(isAdminCall(i), if ((size(i.payments) != 1))
226228 then throw("One payment expected")
227229 else {
228- let $t075827657 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
229- let pmtAmount = $t075827657._1
230- let pmtAssetId = $t075827657._2
230+ let $t076747749 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
231+ let pmtAmount = $t076747749._1
232+ let pmtAssetId = $t076747749._2
231233 if ((pmtAssetId != fromBase58String(tokenId)))
232234 then throw("Wrong payment asset")
233235 else {
236238 let totalNFTStaked = valueOrElse(getInteger(this, kNFTTotalStaked), 0)
237239 let curInterest = valueOrElse(getInteger(this, kInterest), 0)
238240 let curNFTInterest = valueOrElse(getInteger(this, kNFTInterest), 0)
239- let $t080808255 = if ((totalNFTStaked == 0))
241+ let $t081728347 = if ((totalNFTStaked == 0))
240242 then $Tuple2(0, pmtAmount)
241243 else {
242244 let nftP = fraction(pmtAmount, percentForNFT, 100)
243245 $Tuple2(nftP, (pmtAmount - nftP))
244246 }
245- let pmtNFT = $t080808255._1
246- let pmtToken = $t080808255._2
247+ let pmtNFT = $t081728347._1
248+ let pmtToken = $t081728347._2
247249 let interestNew = if ((totalTokenStaked > 0))
248250 then (curInterest + fraction(pmtToken, SCALE8, totalTokenStaked))
249251 else curInterest
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)
91-func init (tokenId,adm1Pub,adm2Pub,adm3Pub,toNFTPercent) = valueOrElse(isSelfCall(i), if (!(isDefined(assetInfo(fromBase58String(tokenId)))))
92- then throw("asset id is not correct asset id")
93- else if ((size(fromBase58String(adm1Pub)) != 32))
94- then throw("group1Admin1PubKey is not correct")
95- else if ((size(fromBase58String(adm2Pub)) != 32))
91+func init (tokenId,adm1Pub,adm2Pub,adm3Pub,toNFTPercent) = valueOrElse(isSelfCall(i), if (isDefined(getString(this, kTokenid)))
92+ then throw("DApp already inited")
93+ else if (!(isDefined(assetInfo(fromBase58String(tokenId)))))
94+ then throw("asset id is not correct asset id")
95+ else if ((size(fromBase58String(adm1Pub)) != 32))
9696 then throw("group1Admin1PubKey is not correct")
97- else if ((size(fromBase58String(adm3Pub)) != 32))
97+ else if ((size(fromBase58String(adm2Pub)) != 32))
9898 then throw("group1Admin1PubKey is not correct")
99- else [StringEntry(kTokenid, tokenId), StringEntry(kAdmin1PK, adm1Pub), StringEntry(kAdmin2PK, adm2Pub), StringEntry(kAdmin3PK, adm3Pub), IntegerEntry(kPersentForNFT, toNFTPercent)])
99+ else if ((size(fromBase58String(adm3Pub)) != 32))
100+ then throw("group1Admin1PubKey is not correct")
101+ else [StringEntry(kTokenid, tokenId), StringEntry(kAdmin1PK, adm1Pub), StringEntry(kAdmin2PK, adm2Pub), StringEntry(kAdmin3PK, adm3Pub), IntegerEntry(kPersentForNFT, toNFTPercent)])
100102
101103
102104
103105 @Callable(i)
104106 func stake () = if ((size(i.payments) != 1))
105107 then throw("One payment expected")
106108 else {
107- let $t036143689 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
108- let pmtAmount = $t036143689._1
109- let pmtAssetId = $t036143689._2
109+ let $t036953770 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
110+ let pmtAmount = $t036953770._1
111+ let pmtAssetId = $t036953770._2
110112 if ((pmtAssetId != fromBase58String(tokenId)))
111113 then throw("Wrong payment asset")
112114 else {
113115 let user = toString(i.caller)
114- let $t038103906 = claimCalc(user)
115- let userNewInterest = $t038103906._1
116- let claimAmountAvailable = $t038103906._2
117- let userTokenStaked = $t038103906._3
118- let totalTokenStaked = $t038103906._4
116+ let $t038913987 = claimCalc(user)
117+ let userNewInterest = $t038913987._1
118+ let claimAmountAvailable = $t038913987._2
119+ let userTokenStaked = $t038913987._3
120+ let totalTokenStaked = $t038913987._4
119121 [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked + pmtAmount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked + pmtAmount))]
120122 }
121123 }
122124
123125
124126
125127 @Callable(i)
126128 func unstake (amount) = {
127129 let user = toString(i.caller)
128130 if ((0 >= amount))
129131 then throw("Amount must be greater than 0")
130132 else {
131- let $t043204416 = claimCalc(user)
132- let userNewInterest = $t043204416._1
133- let claimAmountAvailable = $t043204416._2
134- let userTokenStaked = $t043204416._3
135- let totalTokenStaked = $t043204416._4
133+ let $t044014497 = claimCalc(user)
134+ let userNewInterest = $t044014497._1
135+ let claimAmountAvailable = $t044014497._2
136+ let userTokenStaked = $t044014497._3
137+ let totalTokenStaked = $t044014497._4
136138 if ((amount > userTokenStaked))
137139 then throw("You can't unstake more than staked")
138140 else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked - amount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked - amount))]
139141 }
140142 }
141143
142144
143145
144146 @Callable(i)
145147 func claim () = {
146148 let user = toString(i.caller)
147- let $t048324928 = claimCalc(user)
148- let userNewInterest = $t048324928._1
149- let claimAmountAvailable = $t048324928._2
150- let userTokenStaked = $t048324928._3
151- let totalTokenStaked = $t048324928._4
149+ let $t049135009 = claimCalc(user)
150+ let userNewInterest = $t049135009._1
151+ let claimAmountAvailable = $t049135009._2
152+ let userTokenStaked = $t049135009._3
153+ let totalTokenStaked = $t049135009._4
152154 if ((claimAmountAvailable == 0))
153155 then throw("Nothing to claim")
154156 else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))]
155157 }
156158
157159
158160
159161 @Callable(i)
160162 func stakeNFT () = if ((size(i.payments) != 0))
161163 then throw("One payment expected")
162164 else {
163- let $t052935368 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
164- let pmtAmount = $t052935368._1
165- let pmtAssetId = $t052935368._2
165+ let $t053745449 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
166+ let pmtAmount = $t053745449._1
167+ let pmtAssetId = $t053745449._2
166168 let pmtAssetIdStr = assetIdToStr(pmtAssetId)
167169 if (!(isDefined(getString(this, (pmtAssetIdStr + kNFTCreated)))))
168170 then throw("Wrong nft asset")
169171 else {
170172 let user = toString(i.caller)
171- let $t055495644 = claimCalcNft(user)
172- let userNewInterest = $t055495644._1
173- let claimAmountAvailable = $t055495644._2
174- let userNFTStaked = $t055495644._3
175- let totalNFTStaked = $t055495644._4
173+ let $t056305725 = claimCalcNft(user)
174+ let userNewInterest = $t056305725._1
175+ let claimAmountAvailable = $t056305725._2
176+ let userNFTStaked = $t056305725._3
177+ let totalNFTStaked = $t056305725._4
176178 [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), claimAmountAvailable), IntegerEntry((user + kuserNFTStaked), (userNFTStaked + pmtAmount)), IntegerEntry(kNFTTotalStaked, (totalNFTStaked + pmtAmount)), IntegerEntry((((user + "_") + pmtAssetIdStr) + kuserNFTStakedId), 1)]
177179 }
178180 }
179181
180182
181183
182184 @Callable(i)
183185 func unstakeNFT (id) = {
184186 let user = toString(i.caller)
185187 if (isDefined(getString(this, (((user + id) + "_") + kuserNFTStakedId))))
186188 then throw("You didn't staked")
187189 else {
188- let $t061696264 = claimCalcNft(user)
189- let userNewInterest = $t061696264._1
190- let claimAmountAvailable = $t061696264._2
191- let userNFTStaked = $t061696264._3
192- let totalNFTStaked = $t061696264._4
190+ let $t062506345 = claimCalcNft(user)
191+ let userNewInterest = $t062506345._1
192+ let claimAmountAvailable = $t062506345._2
193+ let userNFTStaked = $t062506345._3
194+ let totalNFTStaked = $t062506345._4
193195 [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))]
194196 }
195197 }
196198
197199
198200
199201 @Callable(i)
200202 func claimNFT () = {
201203 let user = toString(i.caller)
202- let $t066986793 = claimCalcNft(user)
203- let userNewInterest = $t066986793._1
204- let claimAmountAvailable = $t066986793._2
205- let userNFTStaked = $t066986793._3
206- let totalNFTStaked = $t066986793._4
204+ let $t067796874 = claimCalcNft(user)
205+ let userNewInterest = $t067796874._1
206+ let claimAmountAvailable = $t067796874._2
207+ let userNFTStaked = $t067796874._3
208+ let totalNFTStaked = $t067796874._4
207209 if ((claimAmountAvailable == 0))
208210 then throw("Nothing to claim")
209211 else [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))]
210212 }
211213
212214
213215
214216 @Callable(i)
215217 func issueNFT (userAddr,name,descr) = valueOrElse(isAdminCall(i), {
216218 let uAddr = valueOrErrorMessage(addressFromString(userAddr), "Wrong user address")
217219 let issue = Issue(name, descr, 1, 1, false)
218220 let nftId = calculateAssetId(issue)
219-[StringEntry((toBase58String(nftId) + kNFTCreated), userAddr), ScriptTransfer(uAddr, 1, nftId)]
221+[issue, StringEntry((toBase58String(nftId) + kNFTCreated), userAddr), ScriptTransfer(uAddr, 1, nftId)]
220222 })
221223
222224
223225
224226 @Callable(i)
225227 func airdrop () = valueOrElse(isAdminCall(i), if ((size(i.payments) != 1))
226228 then throw("One payment expected")
227229 else {
228- let $t075827657 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
229- let pmtAmount = $t075827657._1
230- let pmtAssetId = $t075827657._2
230+ let $t076747749 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
231+ let pmtAmount = $t076747749._1
232+ let pmtAssetId = $t076747749._2
231233 if ((pmtAssetId != fromBase58String(tokenId)))
232234 then throw("Wrong payment asset")
233235 else {
234236 let percentForNFT = getIntegerValue(this, kPersentForNFT)
235237 let totalTokenStaked = valueOrElse(getInteger(this, kTotalTokenStaked), 0)
236238 let totalNFTStaked = valueOrElse(getInteger(this, kNFTTotalStaked), 0)
237239 let curInterest = valueOrElse(getInteger(this, kInterest), 0)
238240 let curNFTInterest = valueOrElse(getInteger(this, kNFTInterest), 0)
239- let $t080808255 = if ((totalNFTStaked == 0))
241+ let $t081728347 = if ((totalNFTStaked == 0))
240242 then $Tuple2(0, pmtAmount)
241243 else {
242244 let nftP = fraction(pmtAmount, percentForNFT, 100)
243245 $Tuple2(nftP, (pmtAmount - nftP))
244246 }
245- let pmtNFT = $t080808255._1
246- let pmtToken = $t080808255._2
247+ let pmtNFT = $t081728347._1
248+ let pmtToken = $t081728347._2
247249 let interestNew = if ((totalTokenStaked > 0))
248250 then (curInterest + fraction(pmtToken, SCALE8, totalTokenStaked))
249251 else curInterest
250252 let interestNFTNew = if ((totalNFTStaked > 0))
251253 then (curNFTInterest + fraction(pmtNFT, SCALE8, totalNFTStaked))
252254 else curNFTInterest
253255 [IntegerEntry(kInterest, interestNew), IntegerEntry(kNFTInterest, interestNFTNew)]
254256 }
255257 })
256258
257259
258260 @Verifier(tx)
259261 func verify () = {
260262 let multiSignedByAdmins = {
261263 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK))
262264 then 1
263265 else 0
264266 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK))
265267 then 1
266268 else 0
267269 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK))
268270 then 1
269271 else 0
270272 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
271273 }
272274 match tx {
273275 case inv: InvokeScriptTransaction =>
274276 let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
275277 let isRightFee = if ((inv.fee == 900000))
276278 then (inv.feeAssetId == unit)
277279 else false
278280 let isInitCall = (inv.function == "init")
279281 let isnoPayments = (size(inv.payments) == 0)
280282 if (if (if (if (isRightFee)
281283 then isInitCall
282284 else false)
283285 then isSelf
284286 else false)
285287 then isnoPayments
286288 else false)
287289 then true
288290 else multiSignedByAdmins
289291 case _ =>
290292 multiSignedByAdmins
291293 }
292294 }
293295

github/deemru/w8io/026f985 
78.56 ms