tx · A4fk2dJdU4AkEp7eFUNcteuBJrvLd668bPRM5v73cpsk 3NDCcfUw3NdSjTPHukj85CQZrt1WmB9aWA9: -0.01400000 Waves 2021.10.26 23:07 [1763723] smart account 3NDCcfUw3NdSjTPHukj85CQZrt1WmB9aWA9 > SELF 0.00000000 Waves
{ "type": 13, "id": "A4fk2dJdU4AkEp7eFUNcteuBJrvLd668bPRM5v73cpsk", "fee": 1400000, "feeAssetId": null, "timestamp": 1635278884861, "version": 1, "sender": "3NDCcfUw3NdSjTPHukj85CQZrt1WmB9aWA9", "senderPublicKey": "Ft1jz1c1eR7JbyAxdiSRJ1d4qkBH7DSdv89PspmNK5dq", "proofs": [ "3mFSs9QjtW8kYKj9nSSGUuHTBnhLpjytNzV56xKtYLjcmzwcFSATkGycigLS7Jm5tmny53YxE73GQJXtR4B92ETa" ], "script": "base64:AAIFAAAAAAAAACQIAhIGCgQICAgBEgQKAggEEgMKAQESBAoCCAQSABIDCgEBEgAAAAALAAAAAA5TV09QZ292ZXJuYW5jZQkABCYAAAABCQEAAAALdmFsdWVPckVsc2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAAD1NXT1BfZ292ZXJuYW5jZQIAAAAhRW1wdHkga2V5IFNXT1BfZ292ZXJuYW5jZV9hZGRyZXNzAAAAAA1XYXZlc1VzZG5Qb29sCQEAAAAFdmFsdWUAAAABCQAEJgAAAAEJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAPV0FWRVNfVVNETl9Qb29sAgAAACFFbXB0eSBrZXkgU1dPUF9nb3Zlcm5hbmNlX2FkZHJlc3MAAAAAF2RlZmloZWxwZXJNYW5hZ2VyUHViS2V5CQACWQAAAAEJAQAAAAt2YWx1ZU9yRWxzZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwIAAAAZZGVmaWhlbHBlcl9tYW5hZ2VyX1B1YktleQIAAAAjRW1wdHkga2V5IGRlZmloZWxwZXJfbWFuYWdlcl9QdW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YW5jZQAAAAEFAAAACWNhbGxlclN0cgMJAABmAAAAAgUAAAALd2l0aGRyYXdBbXQFAAAADWNhbGxlckJhbGFuY2UJAAACAAAAAQIAAAAbd2l0aGRyYXdBbXQgPiBjYWxsZXJCYWxhbmNlCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAACWNhbGxlclN0cgUAAAAKa2V5QmFsYW5jZQkAAGUAAAACBQAAAA1jYWxsZXJCYWxhbmNlBQAAAAt3aXRoZHJhd0FtdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAAC3dpdGhkcmF3QW10BQAAAAR1bml0BQAAAANuaWwAAAABaQEAAAAIc2h1dGRvd24AAAAAAwkBAAAAASEAAAABBQAAABBpc1Byb3RvY29sQWN0aXZlCQAAAgAAAAECAAAAF1Byb3RvbCBzdG9wcGVkIGJ5IGFkbWluAwkBAAAAASEAAAABCQEAAAAPY29udGFpbnNFbGVtZW50AAAAAgkABEwAAAACBQAAAAxhZG1pblB1YktleTEJAARMAAAAAgUAAAAMYWRtaW5QdWJLZXkyCQAETAAAAAIFAAAADGFkbWluUHViS2V5MwkABEwAAAACBQAAABdkZWZpaGVscGVyTWFuYWdlclB1YktleQUAAAADbmlsCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkJAAACAAAAAQIAAAAhT25seSBhZG1pbiBjYW4gY2FsbCB0aGlzIGZ1bmN0aW9uCQAETAAAAAIJAQAAAAxCb29sZWFuRW50cnkAAAACAgAAABBpc1Byb3RvY29sQWN0aXZlBwUAAAADbmlsAAAAAHD6CW4=", "chainId": 84, "height": 1763723, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EzZTHNEoHpEMXLweurdkiaRzE3UaXmwmtujmaB5S4Aqq Next: 64QrNPvzCC2d6qBMo4UWPBMNKosw3hkmo1e2JxVqauRQ Diff:
Old | New | Differences | |
---|---|---|---|
88 | 88 | let D = valueOrErrorMessage(getInteger(this, (z + g)), (("Empty key user + keyBalance: " + z) + g)) | |
89 | 89 | let E = (D - C) | |
90 | 90 | if ((0 > E)) | |
91 | - | then throw(("Insufficient balance:" + toString(E))) | |
91 | + | then throw(((("Insufficient new balance:" + toString(E)) + " for user ") + z)) | |
92 | 92 | else [IntegerEntry((z + g), E)] | |
93 | 93 | } | |
94 | 94 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = addressFromString(valueOrElse(getString(this, "SWOP_governance"), "Empty key SWOP_governance_address")) | |
5 | 5 | ||
6 | 6 | let b = value(addressFromString(valueOrElse(getString(this, "WAVES_USDN_Pool"), "Empty key SWOP_governance_address"))) | |
7 | 7 | ||
8 | 8 | let c = fromBase58String(valueOrElse(getString(this, "defihelper_manager_PubKey"), "Empty key defihelper_manager_PubKey")) | |
9 | 9 | ||
10 | 10 | let d = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv' | |
11 | 11 | ||
12 | 12 | let e = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv' | |
13 | 13 | ||
14 | 14 | let f = base58'Aqj7onZFvn779uRCiW2zCmXG1RKsGeA6k3SWXmH7s5Lv' | |
15 | 15 | ||
16 | 16 | let g = "_balance" | |
17 | 17 | ||
18 | 18 | let h = "fee_in_usdn" | |
19 | 19 | ||
20 | 20 | let i = valueOrErrorMessage(getBoolean(this, "isProtocolActive"), "Empty key isProtocolActive") | |
21 | 21 | ||
22 | 22 | func j (k) = { | |
23 | 23 | let l = { | |
24 | 24 | let m = getInteger(this, (k + g)) | |
25 | 25 | if ($isInstanceOf(m, "Int")) | |
26 | 26 | then { | |
27 | 27 | let n = m | |
28 | 28 | n | |
29 | 29 | } | |
30 | 30 | else if ($isInstanceOf(m, "Unit")) | |
31 | 31 | then { | |
32 | 32 | let o = m | |
33 | 33 | 0 | |
34 | 34 | } | |
35 | 35 | else throw("Match error") | |
36 | 36 | } | |
37 | 37 | l | |
38 | 38 | } | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | func p () = { | |
42 | 42 | let q = valueOrErrorMessage(getInteger(b, "B_asset_balance"), "Empty B_asset_balance") | |
43 | 43 | let r = valueOrErrorMessage(getInteger(b, "A_asset_balance"), "Empty A_asset_balance") | |
44 | 44 | let s = valueOrErrorMessage(getInteger(this, "protocol_fee_in_usdn"), "Empty protocol_fee_in_usdn") | |
45 | 45 | let t = fraction(s, r, q) | |
46 | 46 | t | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | @Callable(u) | |
51 | 51 | func init (c,b,v,s) = if (if (isDefined(getString(this, "WAVES_USDN_Pool"))) | |
52 | 52 | then true | |
53 | 53 | else isDefined(getString(this, "defihelper_manager_PubKey"))) | |
54 | 54 | then throw("Already initialized") | |
55 | 55 | else [StringEntry("defihelper_manager_PubKey", c), StringEntry("WAVES_USDN_Pool", b), StringEntry("SWOP_governance", v), IntegerEntry("protocol_fee_in_usdn", s), BooleanEntry("isProtocolActive", true)] | |
56 | 56 | ||
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(u) | |
60 | 60 | func updateAutomateStatus (w,x) = if (!(i)) | |
61 | 61 | then throw("Protol stopped by admin") | |
62 | 62 | else if (!(containsElement([c], u.callerPublicKey))) | |
63 | 63 | then throw("Only admin can call this function") | |
64 | 64 | else [BooleanEntry(w, x)] | |
65 | 65 | ||
66 | 66 | ||
67 | 67 | ||
68 | 68 | @Callable(u) | |
69 | 69 | func updateProtocolFee (y) = if (!(i)) | |
70 | 70 | then throw("Protol stopped by admin") | |
71 | 71 | else if (!(containsElement([c], u.callerPublicKey))) | |
72 | 72 | then throw("Only admin can call this function") | |
73 | 73 | else [IntegerEntry("protocol_fee_in_usdn", y)] | |
74 | 74 | ||
75 | 75 | ||
76 | 76 | ||
77 | 77 | @Callable(u) | |
78 | 78 | func extractFee (z,A) = if (!(i)) | |
79 | 79 | then throw("Protol stopped by admin") | |
80 | 80 | else { | |
81 | 81 | let B = valueOrErrorMessage(getBoolean(this, toString(u.caller)), ("Empty key i.caller: " + toString(u.caller))) | |
82 | 82 | if (!(B)) | |
83 | 83 | then throw("This automate is inactive") | |
84 | 84 | else { | |
85 | 85 | let C = if (A) | |
86 | 86 | then p() | |
87 | 87 | else 0 | |
88 | 88 | let D = valueOrErrorMessage(getInteger(this, (z + g)), (("Empty key user + keyBalance: " + z) + g)) | |
89 | 89 | let E = (D - C) | |
90 | 90 | if ((0 > E)) | |
91 | - | then throw(("Insufficient balance:" + toString(E))) | |
91 | + | then throw(((("Insufficient new balance:" + toString(E)) + " for user ") + z)) | |
92 | 92 | else [IntegerEntry((z + g), E)] | |
93 | 93 | } | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | ||
98 | 98 | @Callable(u) | |
99 | 99 | func replanishBalance () = if (!(i)) | |
100 | 100 | then throw("Protol stopped by admin") | |
101 | 101 | else { | |
102 | 102 | let F = $Tuple2(u.payments[0].amount, u.payments[0].assetId) | |
103 | 103 | let G = F._1 | |
104 | 104 | let H = F._2 | |
105 | 105 | if ((H != unit)) | |
106 | 106 | then throw("Only WAVES available for replanishment") | |
107 | 107 | else { | |
108 | 108 | let k = toString(u.caller) | |
109 | 109 | let l = j(k) | |
110 | 110 | [IntegerEntry((k + g), (l + G))] | |
111 | 111 | } | |
112 | 112 | } | |
113 | 113 | ||
114 | 114 | ||
115 | 115 | ||
116 | 116 | @Callable(u) | |
117 | 117 | func withdraw (I) = if (!(i)) | |
118 | 118 | then throw("Protol stopped by admin") | |
119 | 119 | else { | |
120 | 120 | let k = toString(u.caller) | |
121 | 121 | let l = j(k) | |
122 | 122 | if ((I > l)) | |
123 | 123 | then throw("withdrawAmt > callerBalance") | |
124 | 124 | else [IntegerEntry((k + g), (l - I)), ScriptTransfer(u.caller, I, unit)] | |
125 | 125 | } | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | ||
129 | 129 | @Callable(u) | |
130 | 130 | func shutdown () = if (!(i)) | |
131 | 131 | then throw("Protol stopped by admin") | |
132 | 132 | else if (!(containsElement([d, e, f, c], u.callerPublicKey))) | |
133 | 133 | then throw("Only admin can call this function") | |
134 | 134 | else [BooleanEntry("isProtocolActive", false)] | |
135 | 135 | ||
136 | 136 |
github/deemru/w8io/026f985 37.89 ms ◑