tx · DSgyEnkUHetH5W7MjzTL4JTHNJUK2CTJzhZTawZHjsdU 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T: -0.00500000 Waves 2024.10.14 12:06 [3326307] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves
{ "type": 13, "id": "DSgyEnkUHetH5W7MjzTL4JTHNJUK2CTJzhZTawZHjsdU", "fee": 500000, "feeAssetId": null, "timestamp": 1728896821904, "version": 2, "chainId": 84, "sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T", "senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx", "proofs": [ "oJtZjizggr1XRFGzWTsgmUWW43iA85YekkZmhMFw6uvmb3JGQVAe11gTUx8jhJtms2ugTG7xmx8J8rN6JtJgLCW" ], "script": "base64:BwJYCAISAwoBCBIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEgQKAggYEgMKAQESABEACXNlcGFyYXRvcgICX18AC3dhdmVzU3RyaW5nAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIUbWVtZV9pbV9mYWN0b3J5LnJpZGUAC2tQcmljZUFzc2V0AgxwcmljZV9fYXNzZXQACWtTaHV0ZG93bgIOc2h1dGRvd25fX2ZsYWcACHNodXRkb3duCQELdmFsdWVPckVsc2UCCQCgCAEFCWtTaHV0ZG93bgcBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwASa0NhbGN1bGF0b3JBZGRyZXNzAhNjYWxjdWxhdG9yX19hZGRyZXNzABdjYWxjdWxhdG9yQWRkcmVzc09wd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dAFpAQ5pbml0UG9vbEludm9rZQIRcG9vbEFkZHJlc3NTdHJpbmcEYXJncwMDCQEBIQEFCHNodXRkb3duCQEObXVzdENhbGN1bGF0b3IBBQFpBwQNY29udmVydGVkQXJncwkAzAgCCQCRAwIFBGFyZ3MAAAkAzAgCCQCRAwIFBGFyZ3MAAQkAzAgCCQCRAwIFBGFyZ3MAAgkAzAgCCQCRAwIFBGFyZ3MAAwkAzAgCCQENcGFyc2VJbnRWYWx1ZQEJAJEDAgUEYXJncwAEBQNuaWwJAJQKAgUDbmlsCQD8BwQJARFAZXh0ck5hdGl2ZSgxMDYyKQEFEXBvb2xBZGRyZXNzU3RyaW5nAgRpbml0BQ1jb252ZXJ0ZWRBcmdzCAUBaQhwYXltZW50cwkBCHRocm93RXJyAQILbm90IGFsbG93ZWQBaQESbm90aWZ5U3RhdHVzVXBkYXRlAQZzdGF0dXMEBnJlc3VsdAkA/QcEBRFjYWxjdWxhdG9yQWRkcmVzcwISbm90aWZ5U3RhdHVzVXBkYXRlCQDMCAIIBQFpD2NhbGxlclB1YmxpY0tleQkAzAgCCQDMCAIJAKQDAQUGc3RhdHVzBQNuaWwFA25pbAUDbmlsCQCUCgIFA25pbAUGcmVzdWx0AWkBA2ZvbwAEByRtYXRjaDAJAPEHAQUEdGhpcwMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAFiBQckbWF0Y2gwCQDMCAIJAQtCaW5hcnlFbnRyeQICA2ZvbwUBYgUDbmlsBQNuaWwAFSVlsQ==", "height": 3326307, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EHBbi2tnWfz9CBnxV6qXokJjj1s1F6VZx4XqFqiotcSu Next: 6qeDBuLwPXKSJpwaDn7amvFrzq9URgGGcFMpkjXXEeE6 Diff:
Old | New | Differences | |
---|---|---|---|
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | + | ||
217 | + | @Callable(i) | |
218 | + | func foo () = match scriptHash(this) { | |
219 | + | case b: ByteVector => | |
220 | + | [BinaryEntry("foo", b)] | |
221 | + | case _ => | |
222 | + | nil | |
223 | + | } | |
224 | + | ||
225 | + |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 7 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let separator = "__" | |
5 | 5 | ||
6 | 6 | let wavesString = "WAVES" | |
7 | 7 | ||
8 | 8 | let contractFilename = "meme_im_factory.ride" | |
9 | 9 | ||
10 | 10 | let kPriceAsset = "price__asset" | |
11 | 11 | ||
12 | 12 | let kShutdown = "shutdown__flag" | |
13 | 13 | ||
14 | 14 | let shutdown = valueOrElse(getBoolean(kShutdown), false) | |
15 | 15 | ||
16 | 16 | func wrapErr (s) = ((contractFilename + ": ") + s) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func throwErr (s) = throw(wrapErr(s)) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func validateAddress (address) = isDefined(addressFromString(address)) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | let kCalculatorAddress = "calculator__address" | |
26 | 26 | ||
27 | 27 | let calculatorAddressOption = match getString(this, kCalculatorAddress) { | |
28 | 28 | case s: String => | |
29 | 29 | addressFromString(s) | |
30 | 30 | case _: Unit => | |
31 | 31 | unit | |
32 | 32 | case _ => | |
33 | 33 | throw("Match error") | |
34 | 34 | } | |
35 | 35 | ||
36 | 36 | let calculatorAddress = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address")) | |
37 | 37 | ||
38 | 38 | func mustAddress (i,address) = if ((i.caller == address)) | |
39 | 39 | then true | |
40 | 40 | else throwErr("permission denied") | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | func mustThis (i) = mustAddress(i, this) | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func mustCalculator (i) = mustAddress(i, calculatorAddress) | |
47 | 47 | ||
48 | 48 | ||
49 | 49 | func parseAssetId (input) = if ((input == wavesString)) | |
50 | 50 | then unit | |
51 | 51 | else fromBase58String(input) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func assetIdToString (input) = if ((input == unit)) | |
55 | 55 | then wavesString | |
56 | 56 | else toBase58String(value(input)) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | @Callable(i) | |
60 | 60 | func init (calculatorAddressStr) = { | |
61 | 61 | let checkCaller = mustThis(i) | |
62 | 62 | if ((checkCaller == checkCaller)) | |
63 | 63 | then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry(kPriceAsset, wavesString)], unit) | |
64 | 64 | else throw("Strict value is not equal to itself.") | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | ||
69 | 69 | @Callable(i) | |
70 | 70 | func stringEntry (key,val) = if (if (!(shutdown)) | |
71 | 71 | then mustCalculator(i) | |
72 | 72 | else false) | |
73 | 73 | then $Tuple2([StringEntry(key, val)], key) | |
74 | 74 | else throwErr("not allowed") | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | ||
78 | 78 | @Callable(i) | |
79 | 79 | func integerEntry (key,val) = if (if (!(shutdown)) | |
80 | 80 | then mustCalculator(i) | |
81 | 81 | else false) | |
82 | 82 | then $Tuple2([IntegerEntry(key, val)], key) | |
83 | 83 | else throwErr("not allowed") | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | ||
87 | 87 | @Callable(i) | |
88 | 88 | func booleanEntry (key,val) = if (if (!(shutdown)) | |
89 | 89 | then mustCalculator(i) | |
90 | 90 | else false) | |
91 | 91 | then $Tuple2([BooleanEntry(key, val)], key) | |
92 | 92 | else throwErr("not allowed") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | ||
96 | 96 | @Callable(i) | |
97 | 97 | func binaryEntry (key,val) = if (if (!(shutdown)) | |
98 | 98 | then mustCalculator(i) | |
99 | 99 | else false) | |
100 | 100 | then $Tuple2([BinaryEntry(key, val)], key) | |
101 | 101 | else throwErr("not allowed") | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(i) | |
106 | 106 | func deleteEntry (key) = if (if (!(shutdown)) | |
107 | 107 | then mustCalculator(i) | |
108 | 108 | else false) | |
109 | 109 | then $Tuple2([DeleteEntry(key)], key) | |
110 | 110 | else throwErr("not allowed") | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | ||
114 | 114 | @Callable(i) | |
115 | 115 | func reissue (assetId,amount,reissuable) = if (if (!(shutdown)) | |
116 | 116 | then mustCalculator(i) | |
117 | 117 | else false) | |
118 | 118 | then $Tuple2([Reissue(assetId, amount, reissuable)], amount) | |
119 | 119 | else throwErr("not allowed") | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | ||
123 | 123 | @Callable(i) | |
124 | 124 | func burn (assetId,amount) = if (if (!(shutdown)) | |
125 | 125 | then mustCalculator(i) | |
126 | 126 | else false) | |
127 | 127 | then $Tuple2([Burn(assetId, amount)], amount) | |
128 | 128 | else throwErr("not allowed") | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | ||
132 | 132 | @Callable(i) | |
133 | 133 | func transferAsset (recipientBytes,amount,assetId) = if (if (!(shutdown)) | |
134 | 134 | then mustCalculator(i) | |
135 | 135 | else false) | |
136 | 136 | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount) | |
137 | 137 | else throwErr("not allowed") | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func transferAssets (recipientBytes,assetsList,amountsList) = if (if (!(shutdown)) | |
143 | 143 | then mustCalculator(i) | |
144 | 144 | else false) | |
145 | 145 | then { | |
146 | 146 | func addNewTransfer (acc,nextAssetId) = { | |
147 | 147 | let $t031863210 = acc | |
148 | 148 | let transfers = $t031863210._1 | |
149 | 149 | let j = $t031863210._2 | |
150 | 150 | let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j]) | |
151 | 151 | let updatedTransfers = (transfers :+ newTransfer) | |
152 | 152 | $Tuple2(updatedTransfers, (j + 1)) | |
153 | 153 | } | |
154 | 154 | ||
155 | 155 | let $t034363517 = { | |
156 | 156 | let $l = assetsList | |
157 | 157 | let $s = size($l) | |
158 | 158 | let $acc0 = $Tuple2(nil, 0) | |
159 | 159 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
160 | 160 | then $a | |
161 | 161 | else addNewTransfer($a, $l[$i]) | |
162 | 162 | ||
163 | 163 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
164 | 164 | then $a | |
165 | 165 | else throw("List size exceeds 10") | |
166 | 166 | ||
167 | 167 | $f0_2($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) | |
168 | 168 | } | |
169 | 169 | let assetsTransfers = $t034363517._1 | |
170 | 170 | let _lastIndex = $t034363517._2 | |
171 | 171 | $Tuple2(assetsTransfers, unit) | |
172 | 172 | } | |
173 | 173 | else throwErr("not allowed") | |
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | @Callable(i) | |
178 | 178 | func transferWaves (recipientBytes,amount) = if (if (!(shutdown)) | |
179 | 179 | then mustCalculator(i) | |
180 | 180 | else false) | |
181 | 181 | then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount) | |
182 | 182 | else throwErr("not allowed") | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | 187 | func call (function,args) = { | |
188 | 188 | let cleanPayments = if ((i.callerPublicKey == base58'11111111111111111111111111111111')) | |
189 | 189 | then nil | |
190 | 190 | else i.payments | |
191 | 191 | let result = reentrantInvoke(calculatorAddress, function, [i.callerPublicKey, args], cleanPayments) | |
192 | 192 | $Tuple2(nil, result) | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | ||
197 | 197 | @Callable(i) | |
198 | 198 | func initPoolInvoke (poolAddressString,args) = if (if (!(shutdown)) | |
199 | 199 | then mustCalculator(i) | |
200 | 200 | else false) | |
201 | 201 | then { | |
202 | 202 | let convertedArgs = [args[0], args[1], args[2], args[3], parseIntValue(args[4])] | |
203 | 203 | $Tuple2(nil, invoke(addressFromStringValue(poolAddressString), "init", convertedArgs, i.payments)) | |
204 | 204 | } | |
205 | 205 | else throwErr("not allowed") | |
206 | 206 | ||
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(i) | |
210 | 210 | func notifyStatusUpdate (status) = { | |
211 | 211 | let result = reentrantInvoke(calculatorAddress, "notifyStatusUpdate", [i.callerPublicKey, [toString(status)]], nil) | |
212 | 212 | $Tuple2(nil, result) | |
213 | 213 | } | |
214 | 214 | ||
215 | 215 | ||
216 | + | ||
217 | + | @Callable(i) | |
218 | + | func foo () = match scriptHash(this) { | |
219 | + | case b: ByteVector => | |
220 | + | [BinaryEntry("foo", b)] | |
221 | + | case _ => | |
222 | + | nil | |
223 | + | } | |
224 | + | ||
225 | + |
github/deemru/w8io/026f985 47.06 ms ◑