tx · 64QrNPvzCC2d6qBMo4UWPBMNKosw3hkmo1e2JxVqauRQ

3NDCcfUw3NdSjTPHukj85CQZrt1WmB9aWA9:  -0.01400000 Waves

2021.10.26 23:13 [1763730] smart account 3NDCcfUw3NdSjTPHukj85CQZrt1WmB9aWA9 > SELF 0.00000000 Waves

{ "type": 13, "id": "64QrNPvzCC2d6qBMo4UWPBMNKosw3hkmo1e2JxVqauRQ", "fee": 1400000, "feeAssetId": null, "timestamp": 1635279257668, "version": 1, "sender": "3NDCcfUw3NdSjTPHukj85CQZrt1WmB9aWA9", "senderPublicKey": "Ft1jz1c1eR7JbyAxdiSRJ1d4qkBH7DSdv89PspmNK5dq", "proofs": [ "46aShzbkGYjzDFiQY7GFC7AcbFjpU4YYnsx5xPp3b8ZRSikULRYTw8uMYKmWPpF951S82DQRp1iVGajGpauFqnCN" ], "script": "base64:AAIFAAAAAAAAACQIAhIGCgQICAgBEgQKAggEEgMKAQESBAoCCAQSABIDCgEBEgAAAAALAAAAAA5TV09QZ292ZXJuYW5jZQkABCYAAAABCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAAD1NXT1BfZ292ZXJuYW5jZQIAAAAhRW1wdHkga2V5IFNXT1BfZ292ZXJuYW5jZV9hZGRyZXNzAAAAAA1XYXZlc1VzZG5Qb29sCQEAAAAFdmFsdWUAAAABCQAEJgAAAAEJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAPV0FWRVNfVVNETl9Qb29sAgAAACFFbXB0eSBrZXkgU1dPUF9nb3Zlcm5hbmNlX2FkZHJlc3MAAAAAF2RlZmloZWxwZXJNYW5hZ2VyUHViS2V5CQACWQAAAAEJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAZZGVmaWhlbHBlcl9tYW5hZ2VyX1B1YktleQIAAAAjRW1wdHkga2V5IGRlZmloZWxwZXJfbWFuYWdl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A1jYWxsZXJCYWxhbmNlCQEAAAAQZ2V0Q2FsbGVyQmFsYW5jZQAAAAEFAAAACWNhbGxlclN0cgMJAABmAAAAAgUAAAALd2l0aGRyYXdBbXQFAAAADWNhbGxlckJhbGFuY2UJAAACAAAAAQIAAAAbd2l0aGRyYXdBbXQgPiBjYWxsZXJCYWxhbmNlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAACWNhbGxlclN0cgUAAAAKa2V5QmFsYW5jZQkAAGUAAAACBQAAAA1jYWxsZXJCYWxhbmNlBQAAAAt3aXRoZHJhd0FtdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAC3dpdGhkcmF3QW10BQAAAAR1bml0BQAAAANuaWwAAAABaQEAAAAIc2h1dGRvd24AAAAAAwkBAAAAASEAAAABBQAAABBpc1Byb3RvY29sQWN0aXZlCQAAAgAAAAECAAAAF1Byb3RvbCBzdG9wcGVkIGJ5IGFkbWluAwkBAAAAASEAAAABCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgkABEwAAAACBQAAAAxhZG1pblB1YktleTEJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkyCQAETAAAAAIFAAAADGFkbWluUHViS2V5MwkABEwAAAACBQAAABdkZWZpaGVscGVyTWFuYWdlclB1YktleQUAAAADbmlsCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAAhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACAgAAABBpc1Byb3RvY29sQWN0aXZlBwUAAAADbmlsAAAAAOS5HUw=", "chainId": 84, "height": 1763730, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: A4fk2dJdU4AkEp7eFUNcteuBJrvLd668bPRM5v73cpsk Next: none Diff:
OldNewDifferences
3636 let balanceUSDN = valueOrErrorMessage(getInteger(WavesUsdnPool, "B_asset_balance"), "Empty B_asset_balance")
3737 let balanceWAVES = valueOrErrorMessage(getInteger(WavesUsdnPool, "A_asset_balance"), "Empty A_asset_balance")
3838 let feeInUSDN = valueOrErrorMessage(getInteger(this, "protocol_fee_in_usdn"), "Empty protocol_fee_in_usdn")
39- let priceWAVES = fraction(feeInUSDN, balanceWAVES, balanceUSDN)
40- priceWAVES
39+ let feeInWAVES = fraction(feeInUSDN, balanceWAVES, balanceUSDN)
40+ if (true)
41+ then throw(toString(feeInWAVES))
42+ else feeInWAVES
4143 }
4244
4345
9395 func replanishBalance () = if (!(isProtocolActive))
9496 then throw("Protol stopped by admin")
9597 else {
96- let $t037503825 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
97- let pmtAmount = $t037503825._1
98- let pmtAssetId = $t037503825._2
98+ let $t038013876 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
99+ let pmtAmount = $t038013876._1
100+ let pmtAssetId = $t038013876._2
99101 if ((pmtAssetId != unit))
100102 then throw("Only WAVES available for replanishment")
101103 else {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SWOPgovernance = addressFromString(valueOrElse(getString(this, "SWOP_governance"), "Empty key SWOP_governance_address"))
55
66 let WavesUsdnPool = value(addressFromString(valueOrElse(getString(this, "WAVES_USDN_Pool"), "Empty key SWOP_governance_address")))
77
88 let defihelperManagerPubKey = fromBase58String(valueOrElse(getString(this, "defihelper_manager_PubKey"), "Empty key defihelper_manager_PubKey"))
99
1010 let adminPubKey1 = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv'
1111
1212 let adminPubKey2 = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv'
1313
1414 let adminPubKey3 = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv'
1515
1616 let keyBalance = "_balance"
1717
1818 let keyFeeInUSDN = "fee_in_usdn"
1919
2020 let isProtocolActive = valueOrErrorMessage(getBoolean(this, "isProtocolActive"), "Empty key isProtocolActive")
2121
2222 func getCallerBalance (callerStr) = {
2323 let callerBalance = match getInteger(this, (callerStr + keyBalance)) {
2424 case cb: Int =>
2525 cb
2626 case empty: Unit =>
2727 0
2828 case _ =>
2929 throw("Match error")
3030 }
3131 callerBalance
3232 }
3333
3434
3535 func calcWavesProtocolFee () = {
3636 let balanceUSDN = valueOrErrorMessage(getInteger(WavesUsdnPool, "B_asset_balance"), "Empty B_asset_balance")
3737 let balanceWAVES = valueOrErrorMessage(getInteger(WavesUsdnPool, "A_asset_balance"), "Empty A_asset_balance")
3838 let feeInUSDN = valueOrErrorMessage(getInteger(this, "protocol_fee_in_usdn"), "Empty protocol_fee_in_usdn")
39- let priceWAVES = fraction(feeInUSDN, balanceWAVES, balanceUSDN)
40- priceWAVES
39+ let feeInWAVES = fraction(feeInUSDN, balanceWAVES, balanceUSDN)
40+ if (true)
41+ then throw(toString(feeInWAVES))
42+ else feeInWAVES
4143 }
4244
4345
4446 @Callable(i)
4547 func init (defihelperManagerPubKey,WavesUsdnPool,SWOPgovernanceAdr,feeInUSDN) = if (if (isDefined(getString(this, "WAVES_USDN_Pool")))
4648 then true
4749 else isDefined(getString(this, "defihelper_manager_PubKey")))
4850 then throw("Already initialized")
4951 else [StringEntry("defihelper_manager_PubKey", defihelperManagerPubKey), StringEntry("WAVES_USDN_Pool", WavesUsdnPool), StringEntry("SWOP_governance", SWOPgovernanceAdr), IntegerEntry("protocol_fee_in_usdn", feeInUSDN), BooleanEntry("isProtocolActive", true)]
5052
5153
5254
5355 @Callable(i)
5456 func updateAutomateStatus (automate,status) = if (!(isProtocolActive))
5557 then throw("Protol stopped by admin")
5658 else if (!(containsElement([defihelperManagerPubKey], i.callerPublicKey)))
5759 then throw("Only admin can call this function")
5860 else [BooleanEntry(automate, status)]
5961
6062
6163
6264 @Callable(i)
6365 func updateProtocolFee (newFeeInUSDN) = if (!(isProtocolActive))
6466 then throw("Protol stopped by admin")
6567 else if (!(containsElement([defihelperManagerPubKey], i.callerPublicKey)))
6668 then throw("Only admin can call this function")
6769 else [IntegerEntry("protocol_fee_in_usdn", newFeeInUSDN)]
6870
6971
7072
7173 @Callable(i)
7274 func extractFee (user,isFeeExtract) = if (!(isProtocolActive))
7375 then throw("Protol stopped by admin")
7476 else {
7577 let isAutomateActive = valueOrErrorMessage(getBoolean(this, toString(i.caller)), ("Empty key i.caller: " + toString(i.caller)))
7678 if (!(isAutomateActive))
7779 then throw("This automate is inactive")
7880 else {
7981 let protocolFee = if (isFeeExtract)
8082 then calcWavesProtocolFee()
8183 else 0
8284 let automateBalance = valueOrErrorMessage(getInteger(this, (user + keyBalance)), (("Empty key user + keyBalance: " + user) + keyBalance))
8385 let newBalance = (automateBalance - protocolFee)
8486 if ((0 > newBalance))
8587 then throw(((("Insufficient new balance:" + toString(newBalance)) + " for user ") + user))
8688 else [IntegerEntry((user + keyBalance), newBalance)]
8789 }
8890 }
8991
9092
9193
9294 @Callable(i)
9395 func replanishBalance () = if (!(isProtocolActive))
9496 then throw("Protol stopped by admin")
9597 else {
96- let $t037503825 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
97- let pmtAmount = $t037503825._1
98- let pmtAssetId = $t037503825._2
98+ let $t038013876 = $Tuple2(i.payments[0].amount, i.payments[0].assetId)
99+ let pmtAmount = $t038013876._1
100+ let pmtAssetId = $t038013876._2
99101 if ((pmtAssetId != unit))
100102 then throw("Only WAVES available for replanishment")
101103 else {
102104 let callerStr = toString(i.caller)
103105 let callerBalance = getCallerBalance(callerStr)
104106 [IntegerEntry((callerStr + keyBalance), (callerBalance + pmtAmount))]
105107 }
106108 }
107109
108110
109111
110112 @Callable(i)
111113 func withdraw (withdrawAmt) = if (!(isProtocolActive))
112114 then throw("Protol stopped by admin")
113115 else {
114116 let callerStr = toString(i.caller)
115117 let callerBalance = getCallerBalance(callerStr)
116118 if ((withdrawAmt > callerBalance))
117119 then throw("withdrawAmt > callerBalance")
118120 else [IntegerEntry((callerStr + keyBalance), (callerBalance - withdrawAmt)), ScriptTransfer(i.caller, withdrawAmt, unit)]
119121 }
120122
121123
122124
123125 @Callable(i)
124126 func shutdown () = if (!(isProtocolActive))
125127 then throw("Protol stopped by admin")
126128 else if (!(containsElement([adminPubKey1, adminPubKey2, adminPubKey3, defihelperManagerPubKey], i.callerPublicKey)))
127129 then throw("Only admin can call this function")
128130 else [BooleanEntry("isProtocolActive", false)]
129131
130132

github/deemru/w8io/026f985 
55.45 ms