tx · EUfM9xnia693bWzpnmj7fsc3ixbrvvV2pQDC8GTUpeYW

3MqJAScB6GGDcFxwV79KYp6Ub17DBexCDYR:  -0.14000000 Waves

2022.11.14 16:07 [2316841] smart account 3MqJAScB6GGDcFxwV79KYp6Ub17DBexCDYR > SELF 0.00000000 Waves

{ "type": 13, "id": "EUfM9xnia693bWzpnmj7fsc3ixbrvvV2pQDC8GTUpeYW", "fee": 14000000, "feeAssetId": null, "timestamp": 1668431245575, "version": 2, "chainId": 84, "sender": "3MqJAScB6GGDcFxwV79KYp6Ub17DBexCDYR", "senderPublicKey": "7vAsM1uosf2qCT6sCBdJwhPkkfhBXbJ2Be6DZtdq6Tej", "proofs": [ "4SXhwnD2otrHpBvV7kHTEyViLhshNHrbtBSeSh2ws4A2cqG46vynGLhdWtwbuVErSFudpMVtHRNdTNd31SXVJcKa", "55PD8mdUZNw3GbwCSGxxKKX64sG7MKmgQvW8B5QDKvLagxTQfFMSF8jLVT9PP1iCvdGn8X8WmeP2tC9kk4xFVYDS" ], "script": "base64:BgIUCAISABIFCgMICAESAwoBCBIAEgAlAAdrQWN0aXZlAgZhY3RpdmUAC2tBY3RpdmVHbG9iAhRhY3RpdmVfYWxsX2NvbnRyYWN0cwAGa0NhdXNlAg5zaHV0ZG93bl9jYXVzZQAWa0xhc3RQb29sVG9rZW5JbnRlcmVzdAITX3Bvb2xfbGFzdF9pbnRlcmVzdAARa1VzZXJMYXN0SW50ZXJlc3QCE191c2VyX2xhc3RfaW50ZXJlc3QAE2tVc2VyQ2xhaW1BdmFpbGFibGUCGF91c2VyX2F2YWlsYWJsZV90b19jbGFpbQAWa1VzZXJTaGFyZVRva2Vuc0xvY2tlZAIUX3NoYXJlX3Rva2Vuc19sb2NrZWQAEmtTaGFyZVRva2Vuc0xvY2tlZAIaX3RvdGFsX3NoYXJlX3Rva2Vuc19sb2NrZWQAC2tPcmFjbGVQb29sAgVwb29sXwANa1Bvb2xBc3NldElkcwIJYXNzZXRfaWRzAA1rQWRt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JAQEhAQkBD2NvbnRhaW5zRWxlbWVudAIJAMwIAgUMYWRtaW5QdWJLZXkxCQDMCAIFDGFkbWluUHViS2V5MgkAzAgCBQxhZG1pblB1YktleTMFA25pbAgFAWkPY2FsbGVyUHVibGljS2V5CQACAQIhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQDMCAIJAQxCb29sZWFuRW50cnkCBQdrQWN0aXZlBgkAzAgCCQELRGVsZXRlRW50cnkBBQZrQ2F1c2UFA25pbAECdHgBBnZlcmlmeQAEEmFkbWluUHViS2V5MVNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAFDGFkbWluUHViS2V5MQABAAAEEmFkbWluUHViS2V5MlNpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAEFDGFkbWluUHViS2V5MgABAAAEEmFkbWluUHViS2V5M1NpZ25lZAMJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAIFDGFkbWluUHViS2V5MwABAAAJAGcCCQBkAgkAZAIFEmFkbWluUHViS2V5MVNpZ25lZAUSYWRtaW5QdWJLZXkyU2lnbmVkBRJhZG1pblB1YktleTNTaWduZWQAAm2dC9o=", "height": 2316841, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3cJBzfaXUM4BCBpXYK1qETBFabxPMZzwT7XffYscwqoZ Next: DdAvYjxgGwyUCMT9AD3PiBYumsvYru3dm68eExucfsgz Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kActive = "active"
5+
6+let kActiveGlob = "active_all_contracts"
57
68 let kCause = "shutdown_cause"
79
5355
5456 let active = valueOrElse(getBoolean(this, kActive), true)
5557
56-func isActive () = if (active)
58+let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
59+
60+func isActive () = if (if (active)
61+ then activeGlob
62+ else false)
5763 then unit
5864 else throw("DApp is inactive at this moment")
5965
110116 let poolAddr = Address(fromBase58String(pool))
111117 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
112118 func calcClaimAmounts (acc,assetId) = {
113- let $t034453515 = calcClaimAmount(pool, assetId, user)
114- let claimAmount = $t034453515._1
115- let lastInterest = $t034453515._2
119+ let $t035663636 = calcClaimAmount(pool, assetId, user)
120+ let claimAmount = $t035663636._1
121+ let lastInterest = $t035663636._2
116122 (acc :+ [claimAmount])
117123 }
118124
136142
137143 @Callable(i)
138144 func airDrop () = valueOrElse(isActive(), valueOrElse(isPoolCall(i.caller), {
139- let $t037283803 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
140- let pmtAmount = $t037283803._1
141- let pmtAssetId = $t037283803._2
145+ let $t038493924 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
146+ let pmtAmount = $t038493924._1
147+ let pmtAssetId = $t038493924._2
142148 let pool = toString(i.caller)
143149 let totalShareTokensLocked = getTotalShareTokensLocked(pool)
144150 if ((totalShareTokensLocked == 0))
155161
156162
157163 @Callable(i)
158-func updateUserInterest (pool,newUserShareTokensLocked) = valueOrElse(isActive(), valueOrElse(isFarmingCall(i.caller), {
164+func updateUserInterest (user,pool,newUserShareTokensLocked) = valueOrElse(isActive(), valueOrElse(isFarmingCall(i.caller), {
159165 let poolAddr = Address(fromBase58String(pool))
160- let user = toString(i.originCaller)
161166 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
162167 func calcNewUserInterestAndClaimAmountEtries (acc,assetId) = {
163- let $t047804850 = calcClaimAmount(pool, assetId, user)
164- let claimAmount = $t047804850._1
165- let lastInterest = $t047804850._2
168+ let $t048734943 = calcClaimAmount(pool, assetId, user)
169+ let claimAmount = $t048734943._1
170+ let lastInterest = $t048734943._2
166171 (acc ++ [IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable), claimAmount), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserLastInterest), lastInterest)])
167172 }
168173
188193 let user = toString(i.caller)
189194 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
190195 func calcClaimAmountEntries (acc,assetId) = {
191- let $t055045528 = acc
192- let entries = $t055045528._1
193- let sum = $t055045528._2
194- let $t055355605 = calcClaimAmount(pool, assetId, user)
195- let claimAmount = $t055355605._1
196- let lastInterest = $t055355605._2
196+ let $t055975621 = acc
197+ let entries = $t055975621._1
198+ let sum = $t055975621._2
199+ let $t056285698 = calcClaimAmount(pool, assetId, user)
200+ let claimAmount = $t056285698._1
201+ let lastInterest = $t056285698._2
197202 $Tuple2((entries ++ [ScriptTransfer(i.caller, claimAmount, fromBase58String(assetId)), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable), 0), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserLastInterest), lastInterest)]), (sum + claimAmount))
198203 }
199204
200- let $t059115994 = {
205+ let $t060046087 = {
201206 let $l = assetIds
202207 let $s = size($l)
203208 let $acc0 = $Tuple2(nil, 0)
211216
212217 $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)
213218 }
214- let claimEntries = $t059115994._1
215- let sumTokens = $t059115994._2
219+ let claimEntries = $t060046087._1
220+ let sumTokens = $t060046087._2
216221 if ((sumTokens == 0))
217222 then throw("You have no tokens for claim")
218223 else claimEntries
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let kActive = "active"
5+
6+let kActiveGlob = "active_all_contracts"
57
68 let kCause = "shutdown_cause"
79
810 let kLastPoolTokenInterest = "_pool_last_interest"
911
1012 let kUserLastInterest = "_user_last_interest"
1113
1214 let kUserClaimAvailable = "_user_available_to_claim"
1315
1416 let kUserShareTokensLocked = "_share_tokens_locked"
1517
1618 let kShareTokensLocked = "_total_share_tokens_locked"
1719
1820 let kOraclePool = "pool_"
1921
2022 let kPoolAssetIds = "asset_ids"
2123
2224 let kAdminPubKey1 = "admin_pub_1"
2325
2426 let kAdminPubKey2 = "admin_pub_2"
2527
2628 let kAdminPubKey3 = "admin_pub_3"
2729
2830 let kFarmingAddr = "farming_address"
2931
3032 let kMoneyBoxAddress = "money_box_address"
3133
3234 let scaleValue = 100000000
3335
3436 let oracle = Address(base58'3MvVBtsXroQpy1tsPw21TU2ET9A8WfmrNjz')
3537
3638 func getBase58FromOracle (key) = match getString(oracle, key) {
3739 case string: String =>
3840 fromBase58String(string)
3941 case nothing =>
4042 throw((key + "is empty"))
4143 }
4244
4345
4446 let adminPubKey1 = getBase58FromOracle(kAdminPubKey1)
4547
4648 let adminPubKey2 = getBase58FromOracle(kAdminPubKey2)
4749
4850 let adminPubKey3 = getBase58FromOracle(kAdminPubKey3)
4951
5052 let farmingAddr = Address(getBase58FromOracle(kFarmingAddr))
5153
5254 let moneyBoxAddress = Address(getBase58FromOracle(kMoneyBoxAddress))
5355
5456 let active = valueOrElse(getBoolean(this, kActive), true)
5557
56-func isActive () = if (active)
58+let activeGlob = valueOrElse(getBoolean(oracle, kActiveGlob), true)
59+
60+func isActive () = if (if (active)
61+ then activeGlob
62+ else false)
5763 then unit
5864 else throw("DApp is inactive at this moment")
5965
6066
6167 func isPoolCall (caller) = if (isDefined(getString(oracle, (kOraclePool + toString(caller)))))
6268 then unit
6369 else throw("Only pool can call this function")
6470
6571
6672 func isFarmingCall (caller) = if ((caller == farmingAddr))
6773 then unit
6874 else throw("Only farming can call this function")
6975
7076
7177 func suspend (cause) = [BooleanEntry(kActive, false), StringEntry(kCause, cause)]
7278
7379
7480 func getUserShareTokensLocked (pool,userAddress) = valueOrElse(getInteger(farmingAddr, (((pool + "_") + userAddress) + kUserShareTokensLocked)), 0)
7581
7682
7783 func getTotalShareTokensLocked (pool) = valueOrElse(getInteger(farmingAddr, (pool + kShareTokensLocked)), 0)
7884
7985
8086 func getUserLastInterest (user,pool,assetId) = valueOrElse(getInteger(this, (((((user + "_") + pool) + "_") + assetId) + kUserLastInterest)), 0)
8187
8288
8389 func getPoolTokenLastInterest (pool,assetId) = valueOrElse(getInteger(this, (((pool + "_") + assetId) + kLastPoolTokenInterest)), 0)
8490
8591
8692 func getUserClaimAvailable (user,pool,assetId) = valueOrElse(getInteger(this, (((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable)), 0)
8793
8894
8995 func getStrAssetId (assetId) = match assetId {
9096 case id: ByteVector =>
9197 toBase58String(id)
9298 case waves: Unit =>
9399 "WAVES"
94100 case _ =>
95101 throw("Match error")
96102 }
97103
98104
99105 func calcClaimAmount (pool,assetId,user) = {
100106 let lastInterest = getPoolTokenLastInterest(pool, assetId)
101107 let userLastInterest = getUserLastInterest(user, pool, assetId)
102108 let userShareTokensLocked = getUserShareTokensLocked(pool, user)
103109 let userClaimAvailable = getUserClaimAvailable(user, pool, assetId)
104110 let newUserClaimAvailable = fraction(userShareTokensLocked, (lastInterest - userLastInterest), scaleValue)
105111 $Tuple2((userClaimAvailable + newUserClaimAvailable), lastInterest)
106112 }
107113
108114
109115 func calcClaimAmountEvaluate (pool,user) = {
110116 let poolAddr = Address(fromBase58String(pool))
111117 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
112118 func calcClaimAmounts (acc,assetId) = {
113- let $t034453515 = calcClaimAmount(pool, assetId, user)
114- let claimAmount = $t034453515._1
115- let lastInterest = $t034453515._2
119+ let $t035663636 = calcClaimAmount(pool, assetId, user)
120+ let claimAmount = $t035663636._1
121+ let lastInterest = $t035663636._2
116122 (acc :+ [claimAmount])
117123 }
118124
119125 let claimAmounts = {
120126 let $l = assetIds
121127 let $s = size($l)
122128 let $acc0 = nil
123129 func $f0_1 ($a,$i) = if (($i >= $s))
124130 then $a
125131 else calcClaimAmounts($a, $l[$i])
126132
127133 func $f0_2 ($a,$i) = if (($i >= $s))
128134 then $a
129135 else throw("List size exceeds 15")
130136
131137 $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)
132138 }
133139 $Tuple2(assetIds, claimAmounts)
134140 }
135141
136142
137143 @Callable(i)
138144 func airDrop () = valueOrElse(isActive(), valueOrElse(isPoolCall(i.caller), {
139- let $t037283803 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
140- let pmtAmount = $t037283803._1
141- let pmtAssetId = $t037283803._2
145+ let $t038493924 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
146+ let pmtAmount = $t038493924._1
147+ let pmtAssetId = $t038493924._2
142148 let pool = toString(i.caller)
143149 let totalShareTokensLocked = getTotalShareTokensLocked(pool)
144150 if ((totalShareTokensLocked == 0))
145151 then [ScriptTransfer(moneyBoxAddress, pmtAmount, pmtAssetId)]
146152 else {
147153 let lastInterest = getPoolTokenLastInterest(pool, getStrAssetId(pmtAssetId))
148154 let interestNew = (lastInterest + (if ((pmtAmount > 0))
149155 then fraction(pmtAmount, scaleValue, totalShareTokensLocked)
150156 else 0))
151157 [IntegerEntry((((pool + "_") + getStrAssetId(pmtAssetId)) + kLastPoolTokenInterest), interestNew)]
152158 }
153159 }))
154160
155161
156162
157163 @Callable(i)
158-func updateUserInterest (pool,newUserShareTokensLocked) = valueOrElse(isActive(), valueOrElse(isFarmingCall(i.caller), {
164+func updateUserInterest (user,pool,newUserShareTokensLocked) = valueOrElse(isActive(), valueOrElse(isFarmingCall(i.caller), {
159165 let poolAddr = Address(fromBase58String(pool))
160- let user = toString(i.originCaller)
161166 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
162167 func calcNewUserInterestAndClaimAmountEtries (acc,assetId) = {
163- let $t047804850 = calcClaimAmount(pool, assetId, user)
164- let claimAmount = $t047804850._1
165- let lastInterest = $t047804850._2
168+ let $t048734943 = calcClaimAmount(pool, assetId, user)
169+ let claimAmount = $t048734943._1
170+ let lastInterest = $t048734943._2
166171 (acc ++ [IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable), claimAmount), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserLastInterest), lastInterest)])
167172 }
168173
169174 let $l = assetIds
170175 let $s = size($l)
171176 let $acc0 = nil
172177 func $f0_1 ($a,$i) = if (($i >= $s))
173178 then $a
174179 else calcNewUserInterestAndClaimAmountEtries($a, $l[$i])
175180
176181 func $f0_2 ($a,$i) = if (($i >= $s))
177182 then $a
178183 else throw("List size exceeds 15")
179184
180185 $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)
181186 }))
182187
183188
184189
185190 @Callable(i)
186191 func claim (pool) = valueOrElse(isActive(), {
187192 let poolAddr = Address(fromBase58String(pool))
188193 let user = toString(i.caller)
189194 let assetIds = split(valueOrErrorMessage(getString(poolAddr, kPoolAssetIds), "Can't find pool assets"), ",")
190195 func calcClaimAmountEntries (acc,assetId) = {
191- let $t055045528 = acc
192- let entries = $t055045528._1
193- let sum = $t055045528._2
194- let $t055355605 = calcClaimAmount(pool, assetId, user)
195- let claimAmount = $t055355605._1
196- let lastInterest = $t055355605._2
196+ let $t055975621 = acc
197+ let entries = $t055975621._1
198+ let sum = $t055975621._2
199+ let $t056285698 = calcClaimAmount(pool, assetId, user)
200+ let claimAmount = $t056285698._1
201+ let lastInterest = $t056285698._2
197202 $Tuple2((entries ++ [ScriptTransfer(i.caller, claimAmount, fromBase58String(assetId)), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserClaimAvailable), 0), IntegerEntry((((((user + "_") + pool) + "_") + assetId) + kUserLastInterest), lastInterest)]), (sum + claimAmount))
198203 }
199204
200- let $t059115994 = {
205+ let $t060046087 = {
201206 let $l = assetIds
202207 let $s = size($l)
203208 let $acc0 = $Tuple2(nil, 0)
204209 func $f0_1 ($a,$i) = if (($i >= $s))
205210 then $a
206211 else calcClaimAmountEntries($a, $l[$i])
207212
208213 func $f0_2 ($a,$i) = if (($i >= $s))
209214 then $a
210215 else throw("List size exceeds 15")
211216
212217 $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)
213218 }
214- let claimEntries = $t059115994._1
215- let sumTokens = $t059115994._2
219+ let claimEntries = $t060046087._1
220+ let sumTokens = $t060046087._2
216221 if ((sumTokens == 0))
217222 then throw("You have no tokens for claim")
218223 else claimEntries
219224 })
220225
221226
222227
223228 @Callable(i)
224229 func shutdown () = if (!(active))
225230 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, kCause), "the cause wasn't specified")))
226231 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
227232 then throw("Only admin can call this function")
228233 else suspend("Paused by admin")
229234
230235
231236
232237 @Callable(i)
233238 func activate () = if (active)
234239 then throw("DApp is already active")
235240 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3], i.callerPublicKey)))
236241 then throw("Only admin can call this function")
237242 else [BooleanEntry(kActive, true), DeleteEntry(kCause)]
238243
239244
240245 @Verifier(tx)
241246 func verify () = {
242247 let adminPubKey1Signed = if (sigVerify(tx.bodyBytes, tx.proofs[0], adminPubKey1))
243248 then 1
244249 else 0
245250 let adminPubKey2Signed = if (sigVerify(tx.bodyBytes, tx.proofs[1], adminPubKey2))
246251 then 1
247252 else 0
248253 let adminPubKey3Signed = if (sigVerify(tx.bodyBytes, tx.proofs[2], adminPubKey3))
249254 then 1
250255 else 0
251256 (((adminPubKey1Signed + adminPubKey2Signed) + adminPubKey3Signed) >= 2)
252257 }
253258

github/deemru/w8io/026f985 
61.65 ms