tx · J2g4r8P2ktuHtY8WCZ2xfna7GryeU2TLnW86edvbZmRa

3MqJAScB6GGDcFxwV79KYp6Ub17DBexCDYR:  -0.01200000 Waves

2023.03.17 17:08 [2494094] smart account 3MqJAScB6GGDcFxwV79KYp6Ub17DBexCDYR > SELF 0.00000000 Waves

{ "type": 13, "id": "J2g4r8P2ktuHtY8WCZ2xfna7GryeU2TLnW86edvbZmRa", "fee": 1200000, "feeAssetId": null, "timestamp": 1679062170780, "version": 2, "chainId": 84, "sender": "3MqJAScB6GGDcFxwV79KYp6Ub17DBexCDYR", "senderPublicKey": "7vAsM1uosf2qCT6sCBdJwhPkkfhBXbJ2Be6DZtdq6Tej", "proofs": [ "2cib1oAjnRw86b5Pz8XirzwFBGneTZwSdkC4QKERZwpsdq9mfPNuRAeJo2EowR4jaYdpXsUoBv5Pus3SPq5G4ZK7", "5hbHYxu1aQUjNCbz7ZyqCYLx6F58bEH5JM3LXPshGQw3WiC6xjE5yymrYQj2yGbPfbTUjhMDnavYw6WXyeuoQHaF" ], "script": "base64:BgIUCAISABIFCgMICAESAwoBCBIAEgAlAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAWa0xhc3RQb29sVG9rZW5JbnRlcmVzdAITX3Bvb2xfbGFzdF9pbnRlcmVzdAARa1VzZXJMYXN0SW50ZXJlc3QCE191c2VyX2xhc3RfaW50ZXJlc3QAE2tVc2VyQ2xhaW1BdmFpbGFibGUCGF91c2VyX2F2YWlsYWJsZV90b19jbGFpbQAWa1VzZXJTaGFyZVRva2Vuc0xvY2tlZAIUX3NoYXJlX3Rva2Vuc19sb2NrZWQAEmtTaGFyZVRva2Vuc0xvY2tlZAIaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAC2tPcmFjbGVQb29sAgVwb29sXwANa1Bvb2xBc3NldElkcwIJYXNzZXRfaWRzAA1r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ZQMJAQEhAQkBD2NvbnRhaW5zRWxlbWVudAIJAMwIAgUMYWRtaW5QdWJLZXkxCQDMCAIFDGFkbWluUHViS2V5MgkAzAgCBQxhZG1pblB1YktleTMFA25pbAgFAWkPY2FsbGVyUHVibGljS2V5CQACAQIhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQDMCAIJAQxCb29sZWFuRW50cnkCBQdrQWN0aXZlBgkAzAgCCQELRGVsZXRlRW50cnkBBQZrQ2F1c2UFA25pbAECdHgBBnZlcmlmeQAEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAm2dC9o=", "height": 2494094, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Cpnc2cQ3aAorb56ek5iY4gJ3tA4ARbra1nUiRd1JTesp Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kActive = "active"
55
66 let kActiveGlob = "active_all_contracts"
77
88 let kCause = "shutdown_cause"
99
1010 let kLastPoolTokenInterest = "_pool_last_interest"
1111
1212 let kUserLastInterest = "_user_last_interest"
1313
1414 let kUserClaimAvailable = "_user_available_to_claim"
1515
1616 let kUserShareTokensLocked = "_share_tokens_locked"
1717
1818 let kShareTokensLocked = "_total_share_tokens_locked"
1919
2020 let kOraclePool = "pool_"
2121
2222 let kPoolAssetIds = "asset_ids"
2323
2424 let kAdminPubKey1 = "admin_pub_1"
2525
2626 let kAdminPubKey2 = "admin_pub_2"
2727
2828 let kAdminPubKey3 = "admin_pub_3"
2929
3030 let kFarmingAddr = "farming_address"
3131
3232 let kMoneyBoxAddress = "money_box_address"
3333
3434 let scaleValue = 100000000
3535
3636 let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
3737
3838 func getBase58FromOracle (key) = match getString(oracle, key) {
3939 case string: String =>
4040 fromBase58String(string)
4141 case nothing =>
4242 throw((key + "is empty"))
4343 }
4444
4545
4646 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
4747
4848 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
4949
5050 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
5151
5252 let farmingAddr = Address(getBase58FromOracle(kFarmingAddr))
5353
5454 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
5555
5656 let active = valueOrElse(getBoolean(this, kActive), true)
5757
5858 let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
5959
6060 func isActive () = if (if (active)
6161 then activeGlob
6262 else false)
6363 then unit
6464 else throw("DApp is inactive at this moment")
6565
6666
6767 func isPoolCall (caller) = if (isDefined(getString(oracle, (kOraclePool + toString(caller)))))
6868 then unit
6969 else throw("Only pool can call this function")
7070
7171
7272 func isFarmingCall (caller) = if ((caller == farmingAddr))
7373 then unit
7474 else throw("Only farming can call this function")
7575
7676
7777 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
7878
7979
8080 func getUserShareTokensLocked (pool,userAddress) = valueOrElse(getInteger(farmingAddr, (((pool + "_") + userAddress) + kUserShareTokensLocked)), 0)
8181
8282
8383 func getTotalShareTokensLocked (pool) = valueOrElse(getInteger(farmingAddr, (pool + kShareTokensLocked)), 0)
8484
8585
8686 func getUserLastInterest (user,pool,assetId) = valueOrElse(getInteger(this, (((((user + "_") + pool) + "_") + assetId) + kUserLastInterest)), 0)
8787
8888
8989 func getPoolTokenLastInterest (pool,assetId) = valueOrElse(getInteger(this, (((pool + "_") + assetId) + kLastPoolTokenInterest)), 0)
9090
9191
9292 func getUserClaimAvailable (user,pool,assetId) = valueOrElse(getInteger(this, (((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable)), 0)
9393
9494
9595 func getStrAssetId (assetId) = match assetId {
9696 case id: ByteVector =>
9797 toBase58String(id)
9898 case waves: Unit =>
9999 "WAVES"
100100 case _ =>
101101 throw("Match error")
102102 }
103103
104104
105105 func calcClaimAmount (pool,assetId,user) = {
106106 let lastInterest = getPoolTokenLastInterest(pool, assetId)
107107 let userLastInterest = getUserLastInterest(user, pool, assetId)
108108 let userShareTokensLocked = getUserShareTokensLocked(pool, user)
109109 let userClaimAvailable = getUserClaimAvailable(user, pool, assetId)
110110 let newUserClaimAvailable = fraction(userShareTokensLocked, (lastInterest - userLastInterest), scaleValue)
111111 $Tuple2((userClaimAvailable + newUserClaimAvailable), lastInterest)
112112 }
113113
114114
115115 func calcClaimAmountEvaluate (pool,user) = {
116116 let poolAddr = Address(fromBase58String(pool))
117117 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
118118 func calcClaimAmounts (acc,assetId) = {
119119 let $t035663636 = calcClaimAmount(pool, assetId, user)
120120 let claimAmount = $t035663636._1
121121 let lastInterest = $t035663636._2
122122 (acc :+ [claimAmount])
123123 }
124124
125125 let claimAmounts = {
126126 let $l = assetIds
127127 let $s = size($l)
128128 let $acc0 = nil
129129 func $f0_1 ($a,$i) = if (($i >= $s))
130130 then $a
131131 else calcClaimAmounts($a, $l[$i])
132132
133133 func $f0_2 ($a,$i) = if (($i >= $s))
134134 then $a
135135 else throw("List size exceeds 15")
136136
137137 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
138138 }
139139 $Tuple2(assetIds, claimAmounts)
140140 }
141141
142142
143143 @Callable(i)
144144 func airDrop () = valueOrElse(isActive(), valueOrElse(isPoolCall(i.caller), {
145145 let $t038493924 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
146146 let pmtAmount = $t038493924._1
147147 let pmtAssetId = $t038493924._2
148148 let pool = toString(i.caller)
149149 let totalShareTokensLocked = getTotalShareTokensLocked(pool)
150150 if ((totalShareTokensLocked == 0))
151151 then [ScriptTransfer(moneyBoxAddress, pmtAmount, pmtAssetId)]
152152 else {
153153 let lastInterest = getPoolTokenLastInterest(pool, getStrAssetId(pmtAssetId))
154154 let interestNew = (lastInterest + (if ((pmtAmount > 0))
155155 then fraction(pmtAmount, scaleValue, totalShareTokensLocked)
156156 else 0))
157157 [IntegerEntry((((pool + "_") + getStrAssetId(pmtAssetId)) + kLastPoolTokenInterest), interestNew)]
158158 }
159159 }))
160160
161161
162162
163163 @Callable(i)
164164 func updateUserInterest (user,pool,newUserShareTokensLocked) = valueOrElse(isActive(), valueOrElse(isFarmingCall(i.caller), {
165165 let poolAddr = Address(fromBase58String(pool))
166166 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
167167 func calcNewUserInterestAndClaimAmountEtries (acc,assetId) = {
168168 let $t048734943 = calcClaimAmount(pool, assetId, user)
169169 let claimAmount = $t048734943._1
170170 let lastInterest = $t048734943._2
171171 (acc ++ [IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable), claimAmount), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserLastInterest), lastInterest)])
172172 }
173173
174174 let $l = assetIds
175175 let $s = size($l)
176176 let $acc0 = nil
177177 func $f0_1 ($a,$i) = if (($i >= $s))
178178 then $a
179179 else calcNewUserInterestAndClaimAmountEtries($a, $l[$i])
180180
181181 func $f0_2 ($a,$i) = if (($i >= $s))
182182 then $a
183183 else throw("List size exceeds 15")
184184
185185 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
186186 }))
187187
188188
189189
190190 @Callable(i)
191191 func claim (pool) = valueOrElse(isActive(), {
192192 let poolAddr = Address(fromBase58String(pool))
193193 let user = toString(i.caller)
194194 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
195195 func calcClaimAmountEntries (acc,assetId) = {
196196 let $t055975621 = acc
197197 let entries = $t055975621._1
198198 let sum = $t055975621._2
199199 let $t056285698 = calcClaimAmount(pool, assetId, user)
200200 let claimAmount = $t056285698._1
201201 let lastInterest = $t056285698._2
202202 $Tuple2((entries ++ [ScriptTransfer(i.caller, claimAmount, fromBase58String(assetId)), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable), 0), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserLastInterest), lastInterest)]), (sum + claimAmount))
203203 }
204204
205205 let $t060046087 = {
206206 let $l = assetIds
207207 let $s = size($l)
208208 let $acc0 = $Tuple2(nil, 0)
209209 func $f0_1 ($a,$i) = if (($i >= $s))
210210 then $a
211211 else calcClaimAmountEntries($a, $l[$i])
212212
213213 func $f0_2 ($a,$i) = if (($i >= $s))
214214 then $a
215215 else throw("List size exceeds 15")
216216
217217 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15)
218218 }
219219 let claimEntries = $t060046087._1
220220 let sumTokens = $t060046087._2
221221 if ((sumTokens == 0))
222222 then throw("You have no tokens for claim")
223223 else claimEntries
224224 })
225225
226226
227227
228228 @Callable(i)
229229 func shutdown () = if (!(active))
230230 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
231231 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
232232 then throw("Only admin can call this function")
233233 else suspend("Paused by admin")
234234
235235
236236
237237 @Callable(i)
238238 func activate () = if (active)
239239 then throw("DApp is already active")
240240 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
241241 then throw("Only admin can call this function")
242242 else [BooleanEntry(kActive, true), DeleteEntry(kCause)]
243243
244244
245245 @Verifier(tx)
246246 func verify () = {
247247 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
248248 then 1
249249 else 0
250250 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
251251 then 1
252252 else 0
253253 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
254254 then 1
255255 else 0
256256 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
257257 }
258258

github/deemru/w8io/026f985 
33.43 ms