tx · 2LULERT82JxbzAQWMgwmPPeP9p61SJe4f88sMZ5oqksS

3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T:  -0.00400000 Waves

2024.09.25 09:35 [3298779] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves

{ "type": 13, "id": "2LULERT82JxbzAQWMgwmPPeP9p61SJe4f88sMZ5oqksS", "fee": 400000, "feeAssetId": null, "timestamp": 1727246165705, "version": 2, "chainId": 84, "sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T", "senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx", "proofs": [ "4N2xAwRVpP3oYYTUYjVjRPfGju2sk1okjSAj23Wo4hTseBTDHsVLrjvAhWFFmbW4Xe6bUABRoRC19mcsEr8uf7bf" ], "script": "base64:BwJLCAISAwoBCBIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEAAJc2VwYXJhdG9yAgJfXwALd2F2ZXNTdHJpbmcCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhRtZW1lX2ltX2ZhY3RvcnkucmlkZQAJa1NodXRkb3duAgwlc19fc2h1dGRvd24ACHNodXRkb3duCQELdmFsdWVPckVsc2UCCQCgCAEFCWtTaHV0ZG93bgcBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwASa0NhbGN1bGF0b3JBZGRyZXNzAhNjYWxjdWxhdG9yX19hZGRyZXNzABdjYWxjdWxhdG9yQWRkcmVzc09wdGlvbgQHJG1hdGNoMAkAnQgCBQR0aGlzBRJrQ2FsY3VsYXRvckFk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icationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4nNS2LtTdcXrMoXYLqX8SsB26bY77pWpXQgxdA4tuW7p Next: kRCDW286NqnJjmQ3Nt1MuK4xUYDmTFjP7f5jmcPvEED Diff:
OldNewDifferences
5858 func init (calculatorAddressStr) = {
5959 let checkCaller = mustThis(i)
6060 if ((checkCaller == checkCaller))
61- then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr)], unit)
61+ then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry("price__asset", wavesString)], unit)
6262 else throw("Strict value is not equal to itself.")
6363 }
6464
142142 else false)
143143 then {
144144 func addNewTransfer (acc,nextAssetId) = {
145- let $t031043128 = acc
146- let transfers = $t031043128._1
147- let j = $t031043128._2
145+ let $t031543178 = acc
146+ let transfers = $t031543178._1
147+ let j = $t031543178._2
148148 let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
149149 let updatedTransfers = (transfers :+ newTransfer)
150150 $Tuple2(updatedTransfers, (j + 1))
151151 }
152152
153- let $t033543435 = {
153+ let $t034043485 = {
154154 let $l = assetsList
155155 let $s = size($l)
156156 let $acc0 = $Tuple2(nil, 0)
164164
165165 $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)
166166 }
167- let assetsTransfers = $t033543435._1
168- let _lastIndex = $t033543435._2
167+ let assetsTransfers = $t034043485._1
168+ let _lastIndex = $t034043485._2
169169 $Tuple2(assetsTransfers, unit)
170170 }
171171 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"
99
1010 let kShutdown = "%s__shutdown"
1111
1212 let shutdown = valueOrElse(getBoolean(kShutdown), false)
1313
1414 func wrapErr (s) = ((contractFilename + ": ") + s)
1515
1616
1717 func throwErr (s) = throw(wrapErr(s))
1818
1919
2020 func validateAddress (address) = isDefined(addressFromString(address))
2121
2222
2323 let kCalculatorAddress = "calculator__address"
2424
2525 let calculatorAddressOption = match getString(this, kCalculatorAddress) {
2626 case s: String =>
2727 addressFromString(s)
2828 case _: Unit =>
2929 unit
3030 case _ =>
3131 throw("Match error")
3232 }
3333
3434 let calculatorAddress = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
3535
3636 func mustAddress (i,address) = if ((i.caller == address))
3737 then true
3838 else throwErr("permission denied")
3939
4040
4141 func mustThis (i) = mustAddress(i, this)
4242
4343
4444 func mustCalculator (i) = mustAddress(i, calculatorAddress)
4545
4646
4747 func parseAssetId (input) = if ((input == wavesString))
4848 then unit
4949 else fromBase58String(input)
5050
5151
5252 func assetIdToString (input) = if ((input == unit))
5353 then wavesString
5454 else toBase58String(value(input))
5555
5656
5757 @Callable(i)
5858 func init (calculatorAddressStr) = {
5959 let checkCaller = mustThis(i)
6060 if ((checkCaller == checkCaller))
61- then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr)], unit)
61+ then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr), StringEntry("price__asset", wavesString)], unit)
6262 else throw("Strict value is not equal to itself.")
6363 }
6464
6565
6666
6767 @Callable(i)
6868 func stringEntry (key,val) = if (if (!(shutdown))
6969 then mustCalculator(i)
7070 else false)
7171 then $Tuple2([StringEntry(key, val)], key)
7272 else throwErr("not allowed")
7373
7474
7575
7676 @Callable(i)
7777 func integerEntry (key,val) = if (if (!(shutdown))
7878 then mustCalculator(i)
7979 else false)
8080 then $Tuple2([IntegerEntry(key, val)], key)
8181 else throwErr("not allowed")
8282
8383
8484
8585 @Callable(i)
8686 func booleanEntry (key,val) = if (if (!(shutdown))
8787 then mustCalculator(i)
8888 else false)
8989 then $Tuple2([BooleanEntry(key, val)], key)
9090 else throwErr("not allowed")
9191
9292
9393
9494 @Callable(i)
9595 func binaryEntry (key,val) = if (if (!(shutdown))
9696 then mustCalculator(i)
9797 else false)
9898 then $Tuple2([BinaryEntry(key, val)], key)
9999 else throwErr("not allowed")
100100
101101
102102
103103 @Callable(i)
104104 func deleteEntry (key) = if (if (!(shutdown))
105105 then mustCalculator(i)
106106 else false)
107107 then $Tuple2([DeleteEntry(key)], key)
108108 else throwErr("not allowed")
109109
110110
111111
112112 @Callable(i)
113113 func reissue (assetId,amount,reissuable) = if (if (!(shutdown))
114114 then mustCalculator(i)
115115 else false)
116116 then $Tuple2([Reissue(assetId, amount, reissuable)], amount)
117117 else throwErr("not allowed")
118118
119119
120120
121121 @Callable(i)
122122 func burn (assetId,amount) = if (if (!(shutdown))
123123 then mustCalculator(i)
124124 else false)
125125 then $Tuple2([Burn(assetId, amount)], amount)
126126 else throwErr("not allowed")
127127
128128
129129
130130 @Callable(i)
131131 func transferAsset (recipientBytes,amount,assetId) = if (if (!(shutdown))
132132 then mustCalculator(i)
133133 else false)
134134 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
135135 else throwErr("not allowed")
136136
137137
138138
139139 @Callable(i)
140140 func transferAssets (recipientBytes,assetsList,amountsList) = if (if (!(shutdown))
141141 then mustCalculator(i)
142142 else false)
143143 then {
144144 func addNewTransfer (acc,nextAssetId) = {
145- let $t031043128 = acc
146- let transfers = $t031043128._1
147- let j = $t031043128._2
145+ let $t031543178 = acc
146+ let transfers = $t031543178._1
147+ let j = $t031543178._2
148148 let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
149149 let updatedTransfers = (transfers :+ newTransfer)
150150 $Tuple2(updatedTransfers, (j + 1))
151151 }
152152
153- let $t033543435 = {
153+ let $t034043485 = {
154154 let $l = assetsList
155155 let $s = size($l)
156156 let $acc0 = $Tuple2(nil, 0)
157157 func $f0_1 ($a,$i) = if (($i >= $s))
158158 then $a
159159 else addNewTransfer($a, $l[$i])
160160
161161 func $f0_2 ($a,$i) = if (($i >= $s))
162162 then $a
163163 else throw("List size exceeds 10")
164164
165165 $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)
166166 }
167- let assetsTransfers = $t033543435._1
168- let _lastIndex = $t033543435._2
167+ let assetsTransfers = $t034043485._1
168+ let _lastIndex = $t034043485._2
169169 $Tuple2(assetsTransfers, unit)
170170 }
171171 else throwErr("not allowed")
172172
173173
174174
175175 @Callable(i)
176176 func transferWaves (recipientBytes,amount) = if (if (!(shutdown))
177177 then mustCalculator(i)
178178 else false)
179179 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
180180 else throwErr("not allowed")
181181
182182
183183
184184 @Callable(i)
185185 func call (function,args) = {
186186 let cleanPayments = if ((i.callerPublicKey == base58'11111111111111111111111111111111'))
187187 then nil
188188 else i.payments
189189 let result = reentrantInvoke(calculatorAddress, function, [i.callerPublicKey, args], cleanPayments)
190190 $Tuple2(nil, result)
191191 }
192192
193193

github/deemru/w8io/026f985 
27.88 ms