tx · 4j9ZJFaRvwQuJWwK5ZPG66uCAgdExnk5aNDgitknDCWq

3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T:  -0.00500000 Waves

2024.09.24 09:17 [3297291] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves

{ "type": 13, "id": "4j9ZJFaRvwQuJWwK5ZPG66uCAgdExnk5aNDgitknDCWq", "fee": 500000, "feeAssetId": null, "timestamp": 1727158659175, "version": 2, "chainId": 84, "sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T", "senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx", "proofs": [ "44oxC6JeB6XK9J9Wz7PZkGE8r82iM6xqvB7Wkfk4nZ4J8jSwJTxgmZmzkZ1DUsNLQHA46PfUoVeETdGFaNMddxF2" ], "script": null, "height": 3297291, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AquSqmK3DiQhCFkTgTWgvLWUBeQMzZqje9cQXYq226vs Next: ExcBPwFTm6PjPPURQhH71LWHhM1U8semkRQPehswUhwU Full:
OldNewDifferences
1-{-# STDLIB_VERSION 7 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let separator = "__"
5-
6-let wavesString = "WAVES"
7-
8-let contractFilename = "meme_im_factory.ride"
9-
10-let kShutdown = "%s__shutdown"
11-
12-let shutdown = valueOrElse(getBoolean(kShutdown), false)
13-
14-func wrapErr (s) = ((contractFilename + ": ") + s)
15-
16-
17-func throwErr (s) = throw(wrapErr(s))
18-
19-
20-func validateAddress (address) = isDefined(addressFromString(address))
21-
22-
23-let kCalculatorAddress = "calculator__address"
24-
25-let calculatorAddressOption = match getString(this, kCalculatorAddress) {
26- case s: String =>
27- addressFromString(s)
28- case _: Unit =>
29- unit
30- case _ =>
31- throw("Match error")
32-}
33-
34-let calculatorAddress = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
35-
36-func mustAddress (i,address) = if ((i.caller == address))
37- then true
38- else throwErr("permission denied")
39-
40-
41-func mustThis (i) = mustAddress(i, this)
42-
43-
44-func mustCalculator (i) = mustAddress(i, calculatorAddress)
45-
46-
47-func parseAssetId (input) = if ((input == wavesString))
48- then unit
49- else fromBase58String(input)
50-
51-
52-func assetIdToString (input) = if ((input == unit))
53- then wavesString
54- else toBase58String(value(input))
55-
56-
57-@Callable(i)
58-func init (calculatorAddressStr) = {
59- let checkCaller = mustThis(i)
60- if ((checkCaller == checkCaller))
61- then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr)], unit)
62- else throw("Strict value is not equal to itself.")
63- }
64-
65-
66-
67-@Callable(i)
68-func stringEntry (key,val) = if (if (!(shutdown))
69- then mustCalculator(i)
70- else false)
71- then $Tuple2([StringEntry(key, val)], key)
72- else throwErr("not allowed")
73-
74-
75-
76-@Callable(i)
77-func integerEntry (key,val) = if (if (!(shutdown))
78- then mustCalculator(i)
79- else false)
80- then $Tuple2([IntegerEntry(key, val)], key)
81- else throwErr("not allowed")
82-
83-
84-
85-@Callable(i)
86-func booleanEntry (key,val) = if (if (!(shutdown))
87- then mustCalculator(i)
88- else false)
89- then $Tuple2([BooleanEntry(key, val)], key)
90- else throwErr("not allowed")
91-
92-
93-
94-@Callable(i)
95-func binaryEntry (key,val) = if (if (!(shutdown))
96- then mustCalculator(i)
97- else false)
98- then $Tuple2([BinaryEntry(key, val)], key)
99- else throwErr("not allowed")
100-
101-
102-
103-@Callable(i)
104-func deleteEntry (key) = if (if (!(shutdown))
105- then mustCalculator(i)
106- else false)
107- then $Tuple2([DeleteEntry(key)], key)
108- else throwErr("not allowed")
109-
110-
111-
112-@Callable(i)
113-func reissue (assetId,amount,reissuable) = if (if (!(shutdown))
114- then mustCalculator(i)
115- else false)
116- then $Tuple2([Reissue(assetId, amount, reissuable)], amount)
117- else throwErr("not allowed")
118-
119-
120-
121-@Callable(i)
122-func burn (assetId,amount) = if (if (!(shutdown))
123- then mustCalculator(i)
124- else false)
125- then $Tuple2([Burn(assetId, amount)], amount)
126- else throwErr("not allowed")
127-
128-
129-
130-@Callable(i)
131-func transferAsset (recipientBytes,amount,assetId) = if (if (!(shutdown))
132- then mustCalculator(i)
133- else false)
134- then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
135- else throwErr("not allowed")
136-
137-
138-
139-@Callable(i)
140-func transferAssets (recipientBytes,assetsList,amountsList) = if (if (!(shutdown))
141- then mustCalculator(i)
142- else false)
143- then {
144- func addNewTransfer (acc,nextAssetId) = {
145- let $t031043128 = acc
146- let transfers = $t031043128._1
147- let j = $t031043128._2
148- let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
149- let updatedTransfers = (transfers :+ newTransfer)
150- $Tuple2(updatedTransfers, (j + 1))
151- }
152-
153- let $t033543435 = {
154- let $l = assetsList
155- let $s = size($l)
156- let $acc0 = $Tuple2(nil, 0)
157- func $f0_1 ($a,$i) = if (($i >= $s))
158- then $a
159- else addNewTransfer($a, $l[$i])
160-
161- func $f0_2 ($a,$i) = if (($i >= $s))
162- then $a
163- else throw("List size exceeds 10")
164-
165- $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)
166- }
167- let assetsTransfers = $t033543435._1
168- let _lastIndex = $t033543435._2
169- $Tuple2(assetsTransfers, unit)
170- }
171- else throwErr("not allowed")
172-
173-
174-
175-@Callable(i)
176-func transferWaves (recipientBytes,amount) = if (if (!(shutdown))
177- then mustCalculator(i)
178- else false)
179- then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
180- else throwErr("not allowed")
181-
182-
183-
184-@Callable(i)
185-func call (function,args) = {
186- let cleanPayments = if ((i.callerPublicKey == base58'11111111111111111111111111111111'))
187- then nil
188- else i.payments
189- let result = reentrantInvoke(calculatorAddress, function, [i.callerPublicKey, args], cleanPayments)
190- $Tuple2(nil, result)
191- }
192-
193-
1+# no script

github/deemru/w8io/c3f4982 
14.24 ms