tx · DufuYD9u5wXSXHa6inCHyfBFAYfTmZsR85hHpi7s7Agq

3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T:  -0.00400000 Waves

2024.09.26 09:05 [3300196] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves

{ "type": 13, "id": "DufuYD9u5wXSXHa6inCHyfBFAYfTmZsR85hHpi7s7Agq", "fee": 400000, "feeAssetId": null, "timestamp": 1727330762875, "version": 2, "chainId": 84, "sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T", "senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx", "proofs": [ "fSpY3Tc9buWJfBA5HjL8JovFRc51XuXrPAUryiwZBjFxJL4zid3Foejkb7KWqgDuyva8fnysoAKZJS48FwayBmX" ], "script": "base64:BwJLCAISAwoBCBIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEQAJc2VwYXJhdG9yAgJfXwALd2F2ZXNTdHJpbmcCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhRtZW1lX2ltX2ZhY3RvcnkucmlkZQALa1ByaWNlQXNzZXQCDHByaWNlX19hc3NldAAJa1NodXRkb3duAg5zaHV0ZG93bl9fZmxhZwAIc2h1dGRvd24JAQt2YWx1ZU9yRWxzZQIJAKAIAQUJa1NodXRkb3duBwEHd3JhcEVycgEBcwkArAICCQCsAgIFEGNvbnRyYWN0RmlsZW5hbWUCAjogBQFzAQh0aHJvd0VycgEBcwkAAgEJAQd3cmFwRXJyAQUBcwEPdmFsaWRhdGVBZGRyZXNzAQdhZGRyZXNzCQEJaXNEZWZpbmVkAQkApggBBQdhZGRyZXNzABJrQ2FsY3VsYXRvckFkZHJlc3MCE2NhbGN1bGF0b3JfX2FkZHJlc3MAF2NhbGN1bGF0b3JBZGRyZXNzT3B0aW9uBAckbWF0Y2g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bAUGcmVzdWx0AJ7SxsM=", "height": 3300196, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: kRCDW286NqnJjmQ3Nt1MuK4xUYDmTFjP7f5jmcPvEED Next: 9qU7EAnwWLH1QGDQ1rLaqUkncccAESQxL1TLBzpDcTNG Diff:
OldNewDifferences
66 let wavesString = "WAVES"
77
88 let contractFilename = "meme_im_factory.ride"
9+
10+let kPriceAsset = "price__asset"
911
1012 let kShutdown = "shutdown__flag"
1113
5860 func init (calculatorAddressStr) = {
5961 let checkCaller = mustThis(i)
6062 if ((checkCaller == checkCaller))
61- then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry("price__asset", wavesString)], unit)
63+ then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry(kPriceAsset, wavesString)], unit)
6264 else throw("Strict value is not equal to itself.")
6365 }
6466
142144 else false)
143145 then {
144146 func addNewTransfer (acc,nextAssetId) = {
145- let $t031563180 = acc
146- let transfers = $t031563180._1
147- let j = $t031563180._2
147+ let $t031863210 = acc
148+ let transfers = $t031863210._1
149+ let j = $t031863210._2
148150 let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
149151 let updatedTransfers = (transfers :+ newTransfer)
150152 $Tuple2(updatedTransfers, (j + 1))
151153 }
152154
153- let $t034063487 = {
155+ let $t034363517 = {
154156 let $l = assetsList
155157 let $s = size($l)
156158 let $acc0 = $Tuple2(nil, 0)
164166
165167 $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)
166168 }
167- let assetsTransfers = $t034063487._1
168- let _lastIndex = $t034063487._2
169+ let assetsTransfers = $t034363517._1
170+ let _lastIndex = $t034363517._2
169171 $Tuple2(assetsTransfers, unit)
170172 }
171173 else throwErr("not allowed")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let separator = "__"
55
66 let wavesString = "WAVES"
77
88 let contractFilename = "meme_im_factory.ride"
9+
10+let kPriceAsset = "price__asset"
911
1012 let kShutdown = "shutdown__flag"
1113
1214 let shutdown = valueOrElse(getBoolean(kShutdown), false)
1315
1416 func wrapErr (s) = ((contractFilename + ": ") + s)
1517
1618
1719 func throwErr (s) = throw(wrapErr(s))
1820
1921
2022 func validateAddress (address) = isDefined(addressFromString(address))
2123
2224
2325 let kCalculatorAddress = "calculator__address"
2426
2527 let calculatorAddressOption = match getString(this, kCalculatorAddress) {
2628 case s: String =>
2729 addressFromString(s)
2830 case _: Unit =>
2931 unit
3032 case _ =>
3133 throw("Match error")
3234 }
3335
3436 let calculatorAddress = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
3537
3638 func mustAddress (i,address) = if ((i.caller == address))
3739 then true
3840 else throwErr("permission denied")
3941
4042
4143 func mustThis (i) = mustAddress(i, this)
4244
4345
4446 func mustCalculator (i) = mustAddress(i, calculatorAddress)
4547
4648
4749 func parseAssetId (input) = if ((input == wavesString))
4850 then unit
4951 else fromBase58String(input)
5052
5153
5254 func assetIdToString (input) = if ((input == unit))
5355 then wavesString
5456 else toBase58String(value(input))
5557
5658
5759 @Callable(i)
5860 func init (calculatorAddressStr) = {
5961 let checkCaller = mustThis(i)
6062 if ((checkCaller == checkCaller))
61- then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry("price__asset", wavesString)], unit)
63+ then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry(kPriceAsset, wavesString)], unit)
6264 else throw("Strict value is not equal to itself.")
6365 }
6466
6567
6668
6769 @Callable(i)
6870 func stringEntry (key,val) = if (if (!(shutdown))
6971 then mustCalculator(i)
7072 else false)
7173 then $Tuple2([StringEntry(key, val)], key)
7274 else throwErr("not allowed")
7375
7476
7577
7678 @Callable(i)
7779 func integerEntry (key,val) = if (if (!(shutdown))
7880 then mustCalculator(i)
7981 else false)
8082 then $Tuple2([IntegerEntry(key, val)], key)
8183 else throwErr("not allowed")
8284
8385
8486
8587 @Callable(i)
8688 func booleanEntry (key,val) = if (if (!(shutdown))
8789 then mustCalculator(i)
8890 else false)
8991 then $Tuple2([BooleanEntry(key, val)], key)
9092 else throwErr("not allowed")
9193
9294
9395
9496 @Callable(i)
9597 func binaryEntry (key,val) = if (if (!(shutdown))
9698 then mustCalculator(i)
9799 else false)
98100 then $Tuple2([BinaryEntry(key, val)], key)
99101 else throwErr("not allowed")
100102
101103
102104
103105 @Callable(i)
104106 func deleteEntry (key) = if (if (!(shutdown))
105107 then mustCalculator(i)
106108 else false)
107109 then $Tuple2([DeleteEntry(key)], key)
108110 else throwErr("not allowed")
109111
110112
111113
112114 @Callable(i)
113115 func reissue (assetId,amount,reissuable) = if (if (!(shutdown))
114116 then mustCalculator(i)
115117 else false)
116118 then $Tuple2([Reissue(assetId, amount, reissuable)], amount)
117119 else throwErr("not allowed")
118120
119121
120122
121123 @Callable(i)
122124 func burn (assetId,amount) = if (if (!(shutdown))
123125 then mustCalculator(i)
124126 else false)
125127 then $Tuple2([Burn(assetId, amount)], amount)
126128 else throwErr("not allowed")
127129
128130
129131
130132 @Callable(i)
131133 func transferAsset (recipientBytes,amount,assetId) = if (if (!(shutdown))
132134 then mustCalculator(i)
133135 else false)
134136 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
135137 else throwErr("not allowed")
136138
137139
138140
139141 @Callable(i)
140142 func transferAssets (recipientBytes,assetsList,amountsList) = if (if (!(shutdown))
141143 then mustCalculator(i)
142144 else false)
143145 then {
144146 func addNewTransfer (acc,nextAssetId) = {
145- let $t031563180 = acc
146- let transfers = $t031563180._1
147- let j = $t031563180._2
147+ let $t031863210 = acc
148+ let transfers = $t031863210._1
149+ let j = $t031863210._2
148150 let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
149151 let updatedTransfers = (transfers :+ newTransfer)
150152 $Tuple2(updatedTransfers, (j + 1))
151153 }
152154
153- let $t034063487 = {
155+ let $t034363517 = {
154156 let $l = assetsList
155157 let $s = size($l)
156158 let $acc0 = $Tuple2(nil, 0)
157159 func $f0_1 ($a,$i) = if (($i >= $s))
158160 then $a
159161 else addNewTransfer($a, $l[$i])
160162
161163 func $f0_2 ($a,$i) = if (($i >= $s))
162164 then $a
163165 else throw("List size exceeds 10")
164166
165167 $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)
166168 }
167- let assetsTransfers = $t034063487._1
168- let _lastIndex = $t034063487._2
169+ let assetsTransfers = $t034363517._1
170+ let _lastIndex = $t034363517._2
169171 $Tuple2(assetsTransfers, unit)
170172 }
171173 else throwErr("not allowed")
172174
173175
174176
175177 @Callable(i)
176178 func transferWaves (recipientBytes,amount) = if (if (!(shutdown))
177179 then mustCalculator(i)
178180 else false)
179181 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
180182 else throwErr("not allowed")
181183
182184
183185
184186 @Callable(i)
185187 func call (function,args) = {
186188 let cleanPayments = if ((i.callerPublicKey == base58'11111111111111111111111111111111'))
187189 then nil
188190 else i.payments
189191 let result = reentrantInvoke(calculatorAddress, function, [i.callerPublicKey, args], cleanPayments)
190192 $Tuple2(nil, result)
191193 }
192194
193195

github/deemru/w8io/026f985 
28.86 ms