tx · J5SDjSBRijMgCTmtGHGSL1xvahTHYiUBVjDSDLS1kHLB 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4: -0.05000000 Waves 2023.08.27 13:16 [2728944] smart account 3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4 > SELF 0.00000000 Waves
{ "type": 13, "id": "J5SDjSBRijMgCTmtGHGSL1xvahTHYiUBVjDSDLS1kHLB", "fee": 5000000, "feeAssetId": null, "timestamp": 1693131397048, "version": 2, "chainId": 84, "sender": "3N2PjXqef29HexCE7PeGZa9eRjS2jVeaFe4", "senderPublicKey": "DU1U4j8FqHUMRr9WgfF3yo67ULEFkjp7dtMWMpjBK1ar", "proofs": [ "5WQu6iqZsiLwgkaossvHWfCPGeEos3GZQS2F8iXrLPGunSNQnWFb2bEorXqHMGm2UMbUaw3NVMaGaJau4GGWtN68", "4biv5oJ7vD4rq7dP5Li5DZWsnsP9T9a7i2An1TkuQh5qzcZ3puv1NzHsAqqY3nDa4uMuVoyaLgNvXV5q4s9zLWJN" ], "script": "base64:BgImCAISBwoFCAgICAESABIDCgEBEgASABIDCgEIEgASBQoDCAgIEgAbAAZTQ0FMRTgAgMLXLwAJa0ludGVyZXN0AghpbnRlcmVzdAANa1VzZXJJbnRlcmVzdAINX3VzZXJJbnRlcmVzdAAOa1VzZXJBdmFpbGFibGUCE191c2VyQXZhaWxhYmxlQ2xhaW0AEGtVc2VyVG9rZW5TdGFrZWQCEF91c2VyVG9rZW5TdGFrZWQAEWtUb3RhbFRva2VuU3Rha2VkAhB0b3RhbFRva2VuU3Rha2VkAAxrTkZUSW50ZXJlc3QCC05GVEludGVyZXN0ABBrTkZUVXNlckludGVyZXN0AhBfTkZUVXNlckludGVyZXN0ABZrTkZUVXNlckF2YWlsYWJsZUNsYWltAhZfTkZUVXNlckF2YWlsYWJsZUNsYWltAA9rTkZUVG90YWxTdGFrZWQCDk5GVFRvdGFsU3Rha2VkAA5rdXNlck5GVFN0YWtlZAIOX3VzZXJORlRTd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nbmVkAwkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAgUIYWRtaW4zUEsAAQAACQBnAgkAZAIJAGQCBRJhZG1pblB1YktleTFTaWduZWQFEmFkbWluUHViS2V5MlNpZ25lZAUSYWRtaW5QdWJLZXkzU2lnbmVkAAIEByRtYXRjaDAFAnR4AwkAAQIFByRtYXRjaDACF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBANpbnYFByRtYXRjaDAEBmlzU2VsZgkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQQKaXNSaWdodEZlZQMJAAACCAUDaW52A2ZlZQCg9zYJAAACCAUDaW52CmZlZUFzc2V0SWQFBHVuaXQHBAppc0luaXRDYWxsCQAAAggFA2ludghmdW5jdGlvbgIEaW5pdAQMaXNub1BheW1lbnRzCQAAAgkAkAMBCAUDaW52CHBheW1lbnRzAAADAwMDBQppc1JpZ2h0RmVlBQppc0luaXRDYWxsBwUGaXNTZWxmBwUMaXNub1BheW1lbnRzBwYFE211bHRpU2lnbmVkQnlBZG1pbnMFE211bHRpU2lnbmVkQnlBZG1pbnM47SR6", "height": 2728944, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AytsdXjvX7jJq5fbhP6ffSuXeWLg81f4B37mQFf1RoJn Next: 8T6vEMJpsX79mNPztRcnRGziBV7db3ebeAQgRM93bTb9 Diff:
Old | New | Differences | |
---|---|---|---|
247 | 247 | let interestNew = if ((totalTokenStaked > 0)) | |
248 | 248 | then (curInterest + fraction(pmtToken, SCALE8, totalTokenStaked)) | |
249 | 249 | else curInterest | |
250 | - | let interestNFTNew = if (( | |
250 | + | let interestNFTNew = if ((totalNFTStaked > 0)) | |
251 | 251 | then (curNFTInterest + fraction(pmtNFT, SCALE8, totalNFTStaked)) | |
252 | 252 | else curNFTInterest | |
253 | 253 | [IntegerEntry(kInterest, interestNew), IntegerEntry(kNFTInterest, interestNFTNew)] |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SCALE8 = 100000000 | |
5 | 5 | ||
6 | 6 | let kInterest = "interest" | |
7 | 7 | ||
8 | 8 | let kUserInterest = "_userInterest" | |
9 | 9 | ||
10 | 10 | let kUserAvailable = "_userAvailableClaim" | |
11 | 11 | ||
12 | 12 | let kUserTokenStaked = "_userTokenStaked" | |
13 | 13 | ||
14 | 14 | let kTotalTokenStaked = "totalTokenStaked" | |
15 | 15 | ||
16 | 16 | let kNFTInterest = "NFTInterest" | |
17 | 17 | ||
18 | 18 | let kNFTUserInterest = "_NFTUserInterest" | |
19 | 19 | ||
20 | 20 | let kNFTUserAvailableClaim = "_NFTUserAvailableClaim" | |
21 | 21 | ||
22 | 22 | let kNFTTotalStaked = "NFTTotalStaked" | |
23 | 23 | ||
24 | 24 | let kuserNFTStaked = "_userNFTStaked" | |
25 | 25 | ||
26 | 26 | let kuserNFTStakedId = "_userNFTStakedId" | |
27 | 27 | ||
28 | 28 | let kNFTCreated = "_NFTCreated" | |
29 | 29 | ||
30 | 30 | let kTokenid = "tokenId" | |
31 | 31 | ||
32 | 32 | let kPersentForNFT = "percentForNFT" | |
33 | 33 | ||
34 | 34 | let kAdmin1PK = "admin_pub_1" | |
35 | 35 | ||
36 | 36 | let kAdmin2PK = "admin_pub_2" | |
37 | 37 | ||
38 | 38 | let kAdmin3PK = "admin_pub_3" | |
39 | 39 | ||
40 | 40 | let admin1PK = fromBase58String(valueOrErrorMessage(getString(this, kAdmin1PK), "Can't get admin1PK")) | |
41 | 41 | ||
42 | 42 | let admin2PK = fromBase58String(valueOrErrorMessage(getString(this, kAdmin2PK), "Can't get admin2PK")) | |
43 | 43 | ||
44 | 44 | let admin3PK = fromBase58String(valueOrErrorMessage(getString(this, kAdmin3PK), "Can't get operatorPK")) | |
45 | 45 | ||
46 | 46 | let tokenId = valueOrErrorMessage(getString(this, kTokenid), "Can't get staking token") | |
47 | 47 | ||
48 | 48 | func isAdminCall (i) = if (containsElement([admin1PK, admin2PK, admin3PK], i.callerPublicKey)) | |
49 | 49 | then unit | |
50 | 50 | else throw("Only admin can call this function") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func isSelfCall (i) = if ((i.caller == this)) | |
54 | 54 | then unit | |
55 | 55 | else throw("Only contract itself can call this function") | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | func assetIdToStr (assetId) = match assetId { | |
59 | 59 | case id: ByteVector => | |
60 | 60 | toBase58String(id) | |
61 | 61 | case waves: Unit => | |
62 | 62 | "WAVES" | |
63 | 63 | case _ => | |
64 | 64 | throw("Not Asset id") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func claimCalc (user) = { | |
69 | 69 | let totalTokenStaked = valueOrElse(getInteger(this, kTotalTokenStaked), 0) | |
70 | 70 | let curInterest = valueOrElse(getInteger(this, kInterest), 0) | |
71 | 71 | let availableForClaim = valueOrElse(getInteger(this, (user + kUserAvailable)), 0) | |
72 | 72 | let userInterest = valueOrElse(getInteger(this, (user + kUserInterest)), curInterest) | |
73 | 73 | let userTokenStaked = valueOrElse(getInteger(this, (user + kUserTokenStaked)), 0) | |
74 | 74 | let claimAmount = fraction(userTokenStaked, (curInterest - userInterest), SCALE8) | |
75 | 75 | $Tuple4(curInterest, (claimAmount + availableForClaim), userTokenStaked, totalTokenStaked) | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | func claimCalcNft (user) = { | |
80 | 80 | let totalNftStaked = valueOrElse(getInteger(this, kNFTTotalStaked), 0) | |
81 | 81 | let curInterest = valueOrElse(getInteger(this, kNFTInterest), 0) | |
82 | 82 | let availableForClaim = valueOrElse(getInteger(this, (user + kNFTUserAvailableClaim)), 0) | |
83 | 83 | let userInterest = valueOrElse(getInteger(this, (user + kNFTUserInterest)), curInterest) | |
84 | 84 | let userNftStaked = valueOrElse(getInteger(this, (user + kuserNFTStaked)), 0) | |
85 | 85 | let claimAmount = fraction(userNftStaked, (curInterest - userInterest), SCALE8) | |
86 | 86 | $Tuple4(curInterest, (claimAmount + availableForClaim), userNftStaked, totalNftStaked) | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func init (tokenId,adm1Pub,adm2Pub,adm3Pub,toNFTPercent) = valueOrElse(isSelfCall(i), if (!(isDefined(assetInfo(fromBase58String(tokenId))))) | |
92 | 92 | then throw("asset id is not correct asset id") | |
93 | 93 | else if ((size(fromBase58String(adm1Pub)) != 32)) | |
94 | 94 | then throw("group1Admin1PubKey is not correct") | |
95 | 95 | else if ((size(fromBase58String(adm2Pub)) != 32)) | |
96 | 96 | then throw("group1Admin1PubKey is not correct") | |
97 | 97 | else if ((size(fromBase58String(adm3Pub)) != 32)) | |
98 | 98 | then throw("group1Admin1PubKey is not correct") | |
99 | 99 | else [StringEntry(kTokenid, tokenId), StringEntry(kAdmin1PK, adm1Pub), StringEntry(kAdmin2PK, adm2Pub), StringEntry(kAdmin3PK, adm3Pub), IntegerEntry(kPersentForNFT, toNFTPercent)]) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | ||
103 | 103 | @Callable(i) | |
104 | 104 | func stake () = if ((size(i.payments) != 1)) | |
105 | 105 | then throw("One payment expected") | |
106 | 106 | else { | |
107 | 107 | let $t036143689 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
108 | 108 | let pmtAmount = $t036143689._1 | |
109 | 109 | let pmtAssetId = $t036143689._2 | |
110 | 110 | if ((pmtAssetId != fromBase58String(tokenId))) | |
111 | 111 | then throw("Wrong payment asset") | |
112 | 112 | else { | |
113 | 113 | let user = toString(i.caller) | |
114 | 114 | let $t038103906 = claimCalc(user) | |
115 | 115 | let userNewInterest = $t038103906._1 | |
116 | 116 | let claimAmountAvailable = $t038103906._2 | |
117 | 117 | let userTokenStaked = $t038103906._3 | |
118 | 118 | let totalTokenStaked = $t038103906._4 | |
119 | 119 | [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked + pmtAmount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked + pmtAmount))] | |
120 | 120 | } | |
121 | 121 | } | |
122 | 122 | ||
123 | 123 | ||
124 | 124 | ||
125 | 125 | @Callable(i) | |
126 | 126 | func unstake (amount) = { | |
127 | 127 | let user = toString(i.caller) | |
128 | 128 | if ((0 >= amount)) | |
129 | 129 | then throw("Amount must be greater than 0") | |
130 | 130 | else { | |
131 | 131 | let $t043204416 = claimCalc(user) | |
132 | 132 | let userNewInterest = $t043204416._1 | |
133 | 133 | let claimAmountAvailable = $t043204416._2 | |
134 | 134 | let userTokenStaked = $t043204416._3 | |
135 | 135 | let totalTokenStaked = $t043204416._4 | |
136 | 136 | if ((amount > userTokenStaked)) | |
137 | 137 | then throw("You can't unstake more than staked") | |
138 | 138 | else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), claimAmountAvailable), IntegerEntry((user + kUserTokenStaked), (userTokenStaked - amount)), IntegerEntry(kTotalTokenStaked, (totalTokenStaked - amount))] | |
139 | 139 | } | |
140 | 140 | } | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | ||
144 | 144 | @Callable(i) | |
145 | 145 | func claim () = { | |
146 | 146 | let user = toString(i.caller) | |
147 | 147 | let $t048324928 = claimCalc(user) | |
148 | 148 | let userNewInterest = $t048324928._1 | |
149 | 149 | let claimAmountAvailable = $t048324928._2 | |
150 | 150 | let userTokenStaked = $t048324928._3 | |
151 | 151 | let totalTokenStaked = $t048324928._4 | |
152 | 152 | if ((claimAmountAvailable == 0)) | |
153 | 153 | then throw("Nothing to claim") | |
154 | 154 | else [IntegerEntry((user + kUserInterest), userNewInterest), IntegerEntry((user + kUserAvailable), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))] | |
155 | 155 | } | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | ||
159 | 159 | @Callable(i) | |
160 | 160 | func stakeNFT () = if ((size(i.payments) != 0)) | |
161 | 161 | then throw("One payment expected") | |
162 | 162 | else { | |
163 | 163 | let $t052935368 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
164 | 164 | let pmtAmount = $t052935368._1 | |
165 | 165 | let pmtAssetId = $t052935368._2 | |
166 | 166 | let pmtAssetIdStr = assetIdToStr(pmtAssetId) | |
167 | 167 | if (!(isDefined(getString(this, (pmtAssetIdStr + kNFTCreated))))) | |
168 | 168 | then throw("Wrong nft asset") | |
169 | 169 | else { | |
170 | 170 | let user = toString(i.caller) | |
171 | 171 | let $t055495644 = claimCalcNft(user) | |
172 | 172 | let userNewInterest = $t055495644._1 | |
173 | 173 | let claimAmountAvailable = $t055495644._2 | |
174 | 174 | let userNFTStaked = $t055495644._3 | |
175 | 175 | let totalNFTStaked = $t055495644._4 | |
176 | 176 | [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), claimAmountAvailable), IntegerEntry((user + kuserNFTStaked), (userNFTStaked + pmtAmount)), IntegerEntry(kNFTTotalStaked, (totalNFTStaked + pmtAmount)), IntegerEntry((((user + "_") + pmtAssetIdStr) + kuserNFTStakedId), 1)] | |
177 | 177 | } | |
178 | 178 | } | |
179 | 179 | ||
180 | 180 | ||
181 | 181 | ||
182 | 182 | @Callable(i) | |
183 | 183 | func unstakeNFT (id) = { | |
184 | 184 | let user = toString(i.caller) | |
185 | 185 | if (isDefined(getString(this, (((user + id) + "_") + kuserNFTStakedId)))) | |
186 | 186 | then throw("You didn't staked") | |
187 | 187 | else { | |
188 | 188 | let $t061696264 = claimCalcNft(user) | |
189 | 189 | let userNewInterest = $t061696264._1 | |
190 | 190 | let claimAmountAvailable = $t061696264._2 | |
191 | 191 | let userNFTStaked = $t061696264._3 | |
192 | 192 | let totalNFTStaked = $t061696264._4 | |
193 | 193 | [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))] | |
194 | 194 | } | |
195 | 195 | } | |
196 | 196 | ||
197 | 197 | ||
198 | 198 | ||
199 | 199 | @Callable(i) | |
200 | 200 | func claimNFT () = { | |
201 | 201 | let user = toString(i.caller) | |
202 | 202 | let $t066986793 = claimCalcNft(user) | |
203 | 203 | let userNewInterest = $t066986793._1 | |
204 | 204 | let claimAmountAvailable = $t066986793._2 | |
205 | 205 | let userNFTStaked = $t066986793._3 | |
206 | 206 | let totalNFTStaked = $t066986793._4 | |
207 | 207 | if ((claimAmountAvailable == 0)) | |
208 | 208 | then throw("Nothing to claim") | |
209 | 209 | else [IntegerEntry((user + kNFTUserInterest), userNewInterest), IntegerEntry((user + kNFTUserAvailableClaim), 0), ScriptTransfer(i.caller, claimAmountAvailable, fromBase58String(tokenId))] | |
210 | 210 | } | |
211 | 211 | ||
212 | 212 | ||
213 | 213 | ||
214 | 214 | @Callable(i) | |
215 | 215 | func issueNFT (userAddr,name,descr) = valueOrElse(isAdminCall(i), { | |
216 | 216 | let uAddr = valueOrErrorMessage(addressFromString(userAddr), "Wrong user address") | |
217 | 217 | let issue = Issue(name, descr, 1, 1, false) | |
218 | 218 | let nftId = calculateAssetId(issue) | |
219 | 219 | [StringEntry((toBase58String(nftId) + kNFTCreated), userAddr), ScriptTransfer(uAddr, 1, nftId)] | |
220 | 220 | }) | |
221 | 221 | ||
222 | 222 | ||
223 | 223 | ||
224 | 224 | @Callable(i) | |
225 | 225 | func airdrop () = valueOrElse(isAdminCall(i), if ((size(i.payments) != 1)) | |
226 | 226 | then throw("One payment expected") | |
227 | 227 | else { | |
228 | 228 | let $t075827657 = $Tuple2(i.payments[0].amount, i.payments[0].assetId) | |
229 | 229 | let pmtAmount = $t075827657._1 | |
230 | 230 | let pmtAssetId = $t075827657._2 | |
231 | 231 | if ((pmtAssetId != fromBase58String(tokenId))) | |
232 | 232 | then throw("Wrong payment asset") | |
233 | 233 | else { | |
234 | 234 | let percentForNFT = getIntegerValue(this, kPersentForNFT) | |
235 | 235 | let totalTokenStaked = valueOrElse(getInteger(this, kTotalTokenStaked), 0) | |
236 | 236 | let totalNFTStaked = valueOrElse(getInteger(this, kNFTTotalStaked), 0) | |
237 | 237 | let curInterest = valueOrElse(getInteger(this, kInterest), 0) | |
238 | 238 | let curNFTInterest = valueOrElse(getInteger(this, kNFTInterest), 0) | |
239 | 239 | let $t080808255 = if ((totalNFTStaked == 0)) | |
240 | 240 | then $Tuple2(0, pmtAmount) | |
241 | 241 | else { | |
242 | 242 | let nftP = fraction(pmtAmount, percentForNFT, 100) | |
243 | 243 | $Tuple2(nftP, (pmtAmount - nftP)) | |
244 | 244 | } | |
245 | 245 | let pmtNFT = $t080808255._1 | |
246 | 246 | let pmtToken = $t080808255._2 | |
247 | 247 | let interestNew = if ((totalTokenStaked > 0)) | |
248 | 248 | then (curInterest + fraction(pmtToken, SCALE8, totalTokenStaked)) | |
249 | 249 | else curInterest | |
250 | - | let interestNFTNew = if (( | |
250 | + | let interestNFTNew = if ((totalNFTStaked > 0)) | |
251 | 251 | then (curNFTInterest + fraction(pmtNFT, SCALE8, totalNFTStaked)) | |
252 | 252 | else curNFTInterest | |
253 | 253 | [IntegerEntry(kInterest, interestNew), IntegerEntry(kNFTInterest, interestNFTNew)] | |
254 | 254 | } | |
255 | 255 | }) | |
256 | 256 | ||
257 | 257 | ||
258 | 258 | @Verifier(tx) | |
259 | 259 | func verify () = { | |
260 | 260 | let multiSignedByAdmins = { | |
261 | 261 | let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], admin1PK)) | |
262 | 262 | then 1 | |
263 | 263 | else 0 | |
264 | 264 | let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], admin2PK)) | |
265 | 265 | then 1 | |
266 | 266 | else 0 | |
267 | 267 | let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], admin3PK)) | |
268 | 268 | then 1 | |
269 | 269 | else 0 | |
270 | 270 | (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2) | |
271 | 271 | } | |
272 | 272 | match tx { | |
273 | 273 | case inv: InvokeScriptTransaction => | |
274 | 274 | let isSelf = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
275 | 275 | let isRightFee = if ((inv.fee == 900000)) | |
276 | 276 | then (inv.feeAssetId == unit) | |
277 | 277 | else false | |
278 | 278 | let isInitCall = (inv.function == "init") | |
279 | 279 | let isnoPayments = (size(inv.payments) == 0) | |
280 | 280 | if (if (if (if (isRightFee) | |
281 | 281 | then isInitCall | |
282 | 282 | else false) | |
283 | 283 | then isSelf | |
284 | 284 | else false) | |
285 | 285 | then isnoPayments | |
286 | 286 | else false) | |
287 | 287 | then true | |
288 | 288 | else multiSignedByAdmins | |
289 | 289 | case _ => | |
290 | 290 | multiSignedByAdmins | |
291 | 291 | } | |
292 | 292 | } | |
293 | 293 |
github/deemru/w8io/026f985 39.10 ms ◑