tx · 4nNS2LtTdcXrMoXYLqX8SsB26bY77pWpXQgxdA4tuW7p

3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T:  -0.00400000 Waves

2024.09.24 20:51 [3298003] smart account 3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T > SELF 0.00000000 Waves

{ "type": 13, "id": "4nNS2LtTdcXrMoXYLqX8SsB26bY77pWpXQgxdA4tuW7p", "fee": 400000, "feeAssetId": null, "timestamp": 1727200287610, "version": 2, "chainId": 84, "sender": "3MsgzbtRg8NEkbTcHBywtwTdCe9BRxMQo5T", "senderPublicKey": "iTiQR3Kvxn7i8PFgEbZn36n5iFLxFwkTA6M3wi846Vx", "proofs": [ "4UecEBdjS2XGWEsqmgoCYe5Py7QiTpYXWRmQzN1BRApbuFJKHgGWCAmCeAyZg13fYgsS1yiuh36hALGZzfyAttBG" ], "script": "base64:BwJLCAISAwoBCBIECgIICBIECgIIARIECgIIBBIECgIIAhIDCgEIEgUKAwIBBBIECgICARIFCgMCAQISBQoDAhIREgQKAgIBEgQKAggYEAAJc2VwYXJhdG9yAgJfXwALd2F2ZXNTdHJpbmcCBVdBVkVTABBjb250cmFjdEZpbGVuYW1lAhRtZW1lX2ltX2ZhY3RvcnkucmlkZQAJa1NodXRkb3duAgwlc19fc2h1dGRvd24ACHNodXRkb3duCQELdmFsdWVPckVsc2UCCQCgCAEFCWtTaHV0ZG93bgcBB3dyYXBFcnIBAXMJAKwCAgkArAICBRBjb250cmFjdEZpbGVuYW1lAgI6IAUBcwEIdGhyb3dFcnIBAXMJAAIBCQEHd3JhcEVycgEFAXMBD3ZhbGlkYXRlQWRkcmVzcwEHYWRkcmVzcwkBCWlzRGVmaW5lZAEJAKYIAQUHYWRkcmVzcwASa0NhbGN1bGF0b3JBZGRyZXNzAhNjYWxjdWxhdG9yX19hZGRyZXNzABdjYWxjdWxhdG9yQWRkcmVzc09wdGlvbgQHJG1hdGNoMAkAnQgCBQR0aGlzBRJrQ2FsY3VsYXR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ihrCeJbJDRRaMErQkXSZHZrF163HfBrMhP7n2 Next: 2LULERT82JxbzAQWMgwmPPeP9p61SJe4f88sMZ5oqksS 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))
6161 then $Tuple2([StringEntry(kCalculatorAddress, calculatorAddressStr)], 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) = {
145145 let $t031043128 = acc
146146 let transfers = $t031043128._1
147147 let j = $t031043128._2
148148 let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
149149 let updatedTransfers = (transfers :+ newTransfer)
150150 $Tuple2(updatedTransfers, (j + 1))
151151 }
152152
153153 let $t033543435 = {
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 }
167167 let assetsTransfers = $t033543435._1
168168 let _lastIndex = $t033543435._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 
37.17 ms