tx · DXU1Wep861RcHzPLEFFrxaLi2q8fmXH4sEZCByogS1cg 3Muw1aRbeKgLqAS264AakECyQAvDsnweHLu: -0.01300000 Waves 2022.06.08 17:21 [2087507] smart account 3Muw1aRbeKgLqAS264AakECyQAvDsnweHLu > SELF 0.00000000 Waves
{ "type": 13, "id": "DXU1Wep861RcHzPLEFFrxaLi2q8fmXH4sEZCByogS1cg", "fee": 1300000, "feeAssetId": null, "timestamp": 1654698106868, "version": 1, "sender": "3Muw1aRbeKgLqAS264AakECyQAvDsnweHLu", "senderPublicKey": "668WwQVaWxezbvLEK3FccCSTbjst4zYAJDPrfLFRj9b9", "proofs": [ "4m2txKqPH2mcsn1QDKNBpUYrTdY9VVLWN6R4eji7RfG2TTApgvJkzMExAaYAWuqaauiZQkjknNntzQWagRANnLuQ" ], "script": "base64:AAIFAAAAAAAAACsIAhIDCgEIEgASABIFCgMICAgSCAoGCAgICAEIEgASBAoCCAESAwoBCBIAAAAAFAAAAAADU0VQAgAAAAJfXwAAAAAFRU1QVFkCAAAAAAAAAAAIY29udHJhY3QCAAAAD2xwX3N0YWtpbmdfdjI6IAEAAAATa2V5TWFuYWdlclB1YmxpY0tleQAAAAAJAAS5AAAAAgkABEwAAAACAgAAAAIlcwkABEwAAAACAgAAABBtYW5hZ2VyUHVibGljS2V5BQAAAANuaWwFAAAAA1NFUAEAAAAaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAAAACQAEuQAAAAIJAARMAAAAAgIAAAACJXMJAARMAAAAAgIAAAAXcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkFAAAAA25pbAUAAAADU0VQAQAAAAZrZXlUVkwAAAABAAAAB2Fzc2V0SWQJAAS5AAAAAgkABEwAAAACAgAAAAQlcyVzCQAETAAAAAICAAAAA3R2bAkABEwAAAACBQAAAAdhc3NldElkBQAAAANuaWwFAAAAA1NFUAEAAAANa2V5VFZMSGlzdG9yeQAAAAIAAAAHYXNzZXRJZAAAAAZoZWlnaHQJAAS5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2NoZWNrUE0DCQAAAAAAAAIIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQkBAAAABXZhbHVlAAAAAQUAAAACcG0GCQEAAAAIdGhyb3dFcnIAAAABAgAAABt5b3UgYXJlIG5vdCBwZW5kaW5nIG1hbmFnZXIDCQAAAAAAAAIFAAAAB2NoZWNrUE0FAAAAB2NoZWNrUE0JAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkBAAAAE2tleU1hbmFnZXJQdWJsaWNLZXkAAAAACQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEFAAAAAnBtCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEJAQAAABprZXlQZW5kaW5nTWFuYWdlclB1YmxpY0tleQAAAAAFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAACAAAAAQIAAAAkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAPdGFyZ2V0UHVibGljS2V5BAAAAAckbWF0Y2gwCQEAAAAWbWFuYWdlclB1YmxpY0tleU9yVW5pdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAnBrBQAAAAckbWF0Y2gwBQAAAAJwawMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQkAAAIAAAABAgAAAAtNYXRjaCBlcnJvcgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAD3RhcmdldFB1YmxpY0tlebVEQMU=", "chainId": 84, "height": 2087507, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CReS8PrayB5DJtBTePWPVWXVgwZxtVK8CZ6fL64YbBt1 Next: 9LA7qr8ZwkVPtVgErL9XCej1ZuCqeWCi6btZbdQZHBVY Diff:
Old | New | Differences | |
---|---|---|---|
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | + | func throwErr (msg) = throw((contract + msg)) | |
64 | + | ||
65 | + | ||
63 | 66 | func mustManager (i) = { | |
64 | - | let pd = | |
67 | + | let pd = throwErr("permission denied") | |
65 | 68 | match managerPublicKeyOrUnit() { | |
66 | 69 | case pk: ByteVector => | |
67 | 70 | if ((i.callerPublicKey == pk)) | |
75 | 78 | throw("Match error") | |
76 | 79 | } | |
77 | 80 | } | |
78 | - | ||
79 | - | ||
80 | - | func throwErr (msg) = throw((contract + msg)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func assetsStoreContract () = addressFromStringValue(value(getString(keyAssetsStoreContract()))) | |
103 | 103 | then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)] | |
104 | 104 | else throw("Strict value is not equal to itself.") | |
105 | 105 | } | |
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | @Callable(i) | |
110 | + | func put () = nil | |
106 | 111 | ||
107 | 112 | ||
108 | 113 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let EMPTY = "" | |
7 | 7 | ||
8 | 8 | let contract = "lp_staking_v2: " | |
9 | 9 | ||
10 | 10 | func keyManagerPublicKey () = makeString(["%s", "managerPublicKey"], SEP) | |
11 | 11 | ||
12 | 12 | ||
13 | 13 | func keyPendingManagerPublicKey () = makeString(["%s", "pendingManagerPublicKey"], SEP) | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func keyTVL (assetId) = makeString(["%s%s", "tvl", assetId], SEP) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func keyTVLHistory (assetId,height) = makeString(["%s%s%d", "tvlHistory", assetId, toString(height)], SEP) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func keyPendingWithdrawals (assetId) = makeString(["%s%s", "pendingWithdrawals", assetId], SEP) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func keyDelayInBlocks (assetId) = makeString(["%s%s", "delayInBlocks", assetId], SEP) | |
26 | 26 | ||
27 | 27 | ||
28 | 28 | func keyCreated (assetId) = makeString(["%s%s", "created", assetId], SEP) | |
29 | 29 | ||
30 | 30 | ||
31 | 31 | func keyAssetIdToLPId (assetId) = makeString(["%s%s", "assetIdToLPId", assetId], SEP) | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func keyLPIdToAssetId (lpId) = makeString(["%s%s", "lpIdToAssetId", lpId], SEP) | |
35 | 35 | ||
36 | 36 | ||
37 | 37 | func keyProxyAddress (assetId) = makeString(["%s%s", "proxyAddress", assetId], SEP) | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | func keyAssetsStoreContract () = makeString(["%s", "assetsStoreContract"], SEP) | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) { | |
44 | 44 | case s: String => | |
45 | 45 | fromBase58String(s) | |
46 | 46 | case _: Unit => | |
47 | 47 | unit | |
48 | 48 | case _ => | |
49 | 49 | throw("Match error") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) { | |
54 | 54 | case s: String => | |
55 | 55 | fromBase58String(s) | |
56 | 56 | case _: Unit => | |
57 | 57 | unit | |
58 | 58 | case _ => | |
59 | 59 | throw("Match error") | |
60 | 60 | } | |
61 | 61 | ||
62 | 62 | ||
63 | + | func throwErr (msg) = throw((contract + msg)) | |
64 | + | ||
65 | + | ||
63 | 66 | func mustManager (i) = { | |
64 | - | let pd = | |
67 | + | let pd = throwErr("permission denied") | |
65 | 68 | match managerPublicKeyOrUnit() { | |
66 | 69 | case pk: ByteVector => | |
67 | 70 | if ((i.callerPublicKey == pk)) | |
68 | 71 | then true | |
69 | 72 | else pd | |
70 | 73 | case _: Unit => | |
71 | 74 | if ((i.caller == this)) | |
72 | 75 | then true | |
73 | 76 | else pd | |
74 | 77 | case _ => | |
75 | 78 | throw("Match error") | |
76 | 79 | } | |
77 | 80 | } | |
78 | - | ||
79 | - | ||
80 | - | func throwErr (msg) = throw((contract + msg)) | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func assetsStoreContract () = addressFromStringValue(value(getString(keyAssetsStoreContract()))) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func mustProxyAddress (i,assetId) = { | |
87 | 87 | let isProxy = (toString(i.caller) == valueOrElse(getString(keyProxyAddress(assetId)), EMPTY)) | |
88 | 88 | if (isProxy) | |
89 | 89 | then true | |
90 | 90 | else { | |
91 | 91 | let checkCaller = mustManager(i) | |
92 | 92 | if ((checkCaller == checkCaller)) | |
93 | 93 | then true | |
94 | 94 | else throw("Strict value is not equal to itself.") | |
95 | 95 | } | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | @Callable(i) | |
100 | 100 | func constructor (assetsStoreContract) = { | |
101 | 101 | let checkCaller = mustManager(i) | |
102 | 102 | if ((checkCaller == checkCaller)) | |
103 | 103 | then [StringEntry(keyAssetsStoreContract(), assetsStoreContract)] | |
104 | 104 | else throw("Strict value is not equal to itself.") | |
105 | 105 | } | |
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | @Callable(i) | |
110 | + | func put () = nil | |
106 | 111 | ||
107 | 112 | ||
108 | 113 | ||
109 | 114 | @Callable(i) | |
110 | 115 | func submitGetRequest () = nil | |
111 | 116 | ||
112 | 117 | ||
113 | 118 | ||
114 | 119 | @Callable(i) | |
115 | 120 | func executeGetRequest (assetId,userAddress,submitTxId) = nil | |
116 | 121 | ||
117 | 122 | ||
118 | 123 | ||
119 | 124 | @Callable(i) | |
120 | 125 | func registerAsset (assetId,lpName,lpDescription,lpLogo,delayInBlocks,proxyAddress) = { | |
121 | 126 | let checks = [mustManager(i), if ((delayInBlocks >= 0)) | |
122 | 127 | then true | |
123 | 128 | else throwErr("invalid delayInBlocks"), if ((addressFromString(proxyAddress) != unit)) | |
124 | 129 | then true | |
125 | 130 | else throwErr("invalid proxyAddress"), if ((valueOrElse(getBoolean(keyCreated(assetId)), false) == false)) | |
126 | 131 | then true | |
127 | 132 | else throwErr("asset already registered")] | |
128 | 133 | if ((checks == checks)) | |
129 | 134 | then { | |
130 | 135 | let decimals = value(assetInfo(fromBase58String(assetId))).decimals | |
131 | 136 | let lpIssue = Issue(lpName, lpDescription, 1, decimals, true) | |
132 | 137 | let lp = calculateAssetId(lpIssue) | |
133 | 138 | let lpId = toBase58String(lp) | |
134 | 139 | let createOrUpdate = invoke(assetsStoreContract(), "createOrUpdate", [lpId, lpLogo, false], nil) | |
135 | 140 | if ((createOrUpdate == createOrUpdate)) | |
136 | 141 | then { | |
137 | 142 | let addLabel = invoke(assetsStoreContract(), "addLabel", [lpId, "DEFI"], nil) | |
138 | 143 | if ((addLabel == addLabel)) | |
139 | 144 | then [BooleanEntry(keyCreated(assetId), true), IntegerEntry(keyTVL(assetId), 0), IntegerEntry(keyTVLHistory(assetId, height), 0), IntegerEntry(keyDelayInBlocks(assetId), delayInBlocks), StringEntry(keyLPIdToAssetId(lpId), assetId), StringEntry(keyAssetIdToLPId(assetId), lpId), StringEntry(keyProxyAddress(assetId), proxyAddress), lpIssue, Burn(lp, 1)] | |
140 | 145 | else throw("Strict value is not equal to itself.") | |
141 | 146 | } | |
142 | 147 | else throw("Strict value is not equal to itself.") | |
143 | 148 | } | |
144 | 149 | else throw("Strict value is not equal to itself.") | |
145 | 150 | } | |
146 | 151 | ||
147 | 152 | ||
148 | 153 | ||
149 | 154 | @Callable(i) | |
150 | 155 | func topUpBalance () = { | |
151 | 156 | let pmt = valueOrErrorMessage(i.payments[0], (contract + "payment must be attached")) | |
152 | 157 | let assetId = toBase58String(value(pmt.assetId)) | |
153 | 158 | let amount = pmt.amount | |
154 | 159 | let pendingWithdrawals = valueOrElse(getInteger(keyPendingWithdrawals(assetId)), 0) | |
155 | 160 | let checks = [mustProxyAddress(i, assetId), if ((size(i.payments) == 1)) | |
156 | 161 | then true | |
157 | 162 | else throwErr("only one payment must be attached"), if (valueOrElse(getBoolean(keyCreated(assetId)), false)) | |
158 | 163 | then true | |
159 | 164 | else throwErr("attached payment asset must be registered in the contract"), if ((pendingWithdrawals != 0)) | |
160 | 165 | then true | |
161 | 166 | else throwErr("zero pendingWithdrawals, nothing to top up"), if ((pendingWithdrawals >= amount)) | |
162 | 167 | then true | |
163 | 168 | else "amount to top up must be less or equal than pendingWithdrawals"] | |
164 | 169 | if ((checks == checks)) | |
165 | 170 | then [IntegerEntry(keyPendingWithdrawals(assetId), (pendingWithdrawals - amount))] | |
166 | 171 | else throw("Strict value is not equal to itself.") | |
167 | 172 | } | |
168 | 173 | ||
169 | 174 | ||
170 | 175 | ||
171 | 176 | @Callable(i) | |
172 | 177 | func setTVL (assetId,newTVL) = { | |
173 | 178 | let checkCaller = mustProxyAddress(i, assetId) | |
174 | 179 | if ((checkCaller == checkCaller)) | |
175 | 180 | then [IntegerEntry(keyTVL(assetId), newTVL), IntegerEntry(keyTVLHistory(assetId, height), newTVL)] | |
176 | 181 | else throw("Strict value is not equal to itself.") | |
177 | 182 | } | |
178 | 183 | ||
179 | 184 | ||
180 | 185 | ||
181 | 186 | @Callable(i) | |
182 | 187 | func setManager (pendingManagerPublicKey) = { | |
183 | 188 | let checkCaller = mustManager(i) | |
184 | 189 | if ((checkCaller == checkCaller)) | |
185 | 190 | then { | |
186 | 191 | let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey) | |
187 | 192 | if ((checkManagerPublicKey == checkManagerPublicKey)) | |
188 | 193 | then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)] | |
189 | 194 | else throw("Strict value is not equal to itself.") | |
190 | 195 | } | |
191 | 196 | else throw("Strict value is not equal to itself.") | |
192 | 197 | } | |
193 | 198 | ||
194 | 199 | ||
195 | 200 | ||
196 | 201 | @Callable(i) | |
197 | 202 | func confirmManager () = { | |
198 | 203 | let pm = pendingManagerPublicKeyOrUnit() | |
199 | 204 | let hasPM = if (isDefined(pm)) | |
200 | 205 | then true | |
201 | 206 | else throwErr("no pending manager") | |
202 | 207 | if ((hasPM == hasPM)) | |
203 | 208 | then { | |
204 | 209 | let checkPM = if ((i.callerPublicKey == value(pm))) | |
205 | 210 | then true | |
206 | 211 | else throwErr("you are not pending manager") | |
207 | 212 | if ((checkPM == checkPM)) | |
208 | 213 | then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())] | |
209 | 214 | else throw("Strict value is not equal to itself.") | |
210 | 215 | } | |
211 | 216 | else throw("Strict value is not equal to itself.") | |
212 | 217 | } | |
213 | 218 | ||
214 | 219 | ||
215 | 220 | @Verifier(tx) | |
216 | 221 | func verify () = { | |
217 | 222 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
218 | 223 | case pk: ByteVector => | |
219 | 224 | pk | |
220 | 225 | case _: Unit => | |
221 | 226 | tx.senderPublicKey | |
222 | 227 | case _ => | |
223 | 228 | throw("Match error") | |
224 | 229 | } | |
225 | 230 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
226 | 231 | } | |
227 | 232 |
github/deemru/w8io/169f3d6 33.68 ms ◑