tx · En95CHJCtSGsfW6AxB3Ku1SyxD2iQPLrw4BaqnCzFavk

3MrxLwKyT9TFqGxsGfsnVqijZFb7hRtBqgp:  -0.01400000 Waves

2024.02.16 10:30 [2978461] smart account 3MrxLwKyT9TFqGxsGfsnVqijZFb7hRtBqgp > SELF 0.00000000 Waves

{ "type": 13, "id": "En95CHJCtSGsfW6AxB3Ku1SyxD2iQPLrw4BaqnCzFavk", "fee": 1400000, "feeAssetId": null, "timestamp": 1708068646320, "version": 2, "chainId": 84, "sender": "3MrxLwKyT9TFqGxsGfsnVqijZFb7hRtBqgp", "senderPublicKey": "jqG5iLDVsyrR44uMDTGYuDQdJmMDcUXeiedXT98KMRJ", "proofs": [ "4ame24WmcP23hcvUMEbo3vBjLgemSZN8RRAB2MJADDwhqZ2fRj9xa28XTTrTqSSGXf98PzSimasf1URDxbtJ4dtA" ], "script": "base64:BwJACAISBAoCCAgSBAoCCAESBAoCCAQSBAoCCAISAwoBCBIFCgMCAQQSBAoCAgESBQoDAgECEgUKAwISERIECgICARcAB2NoYWluSWQJAMkBAgkAygECCAUEdGhpcwVieXRlcwABAAEACGNoYWluSWRUAQFUAAhjaGFpbklkVwEBVwELbXVzdEFkZHJlc3MCAWkHYWRkcmVzcwMJAAACCAUBaQZjYWxsZXIFB2FkZHJlc3MGCQACAQIRcGVybWlzc2lvbiBkZW5pZWQAA1NFUAICX18ABVdBVkVTAgVXQVZFUwAQY29udHJhY3RGaWxlbmFtZQIPd3hkYW9fbG9jay5yaWRlAQd3cmFwRXJyAQFzCQCsAgIJAKwCAgUQY29udHJhY3RGaWxlbmFtZQICOiAFAXMBCHRocm93RXJyAQFzCQACAQkBB3dyYXBFcnIBBQFzAQ9zdHJpbmdUb0Fzc2V0SWQBAXMDCQAAAgUBcwUFV0FWRVMFBHVuaXQJANkEAQUBcwEUa2V5Q2FsY3VsYXRvckFkZHJlc3MAAhUlc19fY2FsY3VsYXRvckFkZHJlc3MBEWtleUZhY3RvcnlBZGRyZXNzAAIS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phc3NldHNMaXN0CgACJHMJAJADAQUCJGwKAAUkYWNjMAkAlAoCBQNuaWwAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQEOYWRkTmV3VHJhbnNmZXICBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECFExpc3Qgc2l6ZSBleGNlZWRzIDEwCQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoED2Fzc2V0c1RyYW5zZmVycwgFCyR0MDM0ODUzNTY2Al8xBApfbGFzdEluZGV4CAULJHQwMzQ4NTM1NjYCXzIJAJQKAgUPYXNzZXRzVHJhbnNmZXJzBQR1bml0CQCUCgIFA25pbAUEdW5pdAFpAQ10cmFuc2ZlcldhdmVzAg5yZWNpcGllbnRCeXRlcwZhbW91bnQDCQEOb25seUNhbGN1bGF0b3IBBQFpCQCUCgIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBBQ5yZWNpcGllbnRCeXRlcwUGYW1vdW50BQR1bml0BQNuaWwFBmFtb3VudAkAlAoCBQNuaWwFBHVuaXQBAnR4AQZ2ZXJpZnkACQAAAgUHY2hhaW5JZAUIY2hhaW5JZFQoh9NW", "height": 2978461, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Hz26it8kpWBd6B4QRT8qmAN44tmRRWjkxLrQtp8yAMY Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 7 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let chainId = take(drop(this.bytes, 1), 1)
55
66 let chainIdT = base58'2T'
77
88 let chainIdW = base58'2W'
99
1010 func mustAddress (i,address) = if ((i.caller == address))
1111 then true
1212 else throw("permission denied")
1313
1414
1515 let SEP = "__"
1616
1717 let WAVES = "WAVES"
1818
1919 let contractFilename = "wxdao_lock.ride"
2020
2121 func wrapErr (s) = ((contractFilename + ": ") + s)
2222
2323
2424 func throwErr (s) = throw(wrapErr(s))
2525
2626
2727 func stringToAssetId (s) = if ((s == WAVES))
2828 then unit
2929 else fromBase58String(s)
3030
3131
3232 func keyCalculatorAddress () = "%s__calculatorAddress"
3333
3434
3535 func keyFactoryAddress () = "%s__factoryAddress"
3636
3737
3838 func keyCurrentPeriod () = makeString(["%s", "currentPeriod"], SEP)
3939
4040
4141 func keyStartHeightByPeriod (period) = makeString(["%s%d", "startHeight", toString(period)], SEP)
4242
4343
4444 func keyPeriodLength () = makeString(["%s", "periodLength"], SEP)
4545
4646
4747 func keyTreasuryValueByPeriod (period) = makeString(["%s%d", "treasuryValue", toString(period)], SEP)
4848
4949
5050 let factoryAddressOption = match getString(this, keyFactoryAddress()) {
5151 case s: String =>
5252 addressFromString(s)
5353 case _: Unit =>
5454 unit
5555 case _ =>
5656 throw("Match error")
5757 }
5858
5959 let factoryAddressOrFail = valueOrErrorMessage(factoryAddressOption, wrapErr("invalid factory address"))
6060
6161 let calculatorAddressOption = match getString(factoryAddressOrFail, keyCalculatorAddress()) {
6262 case s: String =>
6363 addressFromString(s)
6464 case _: Unit =>
6565 unit
6666 case _ =>
6767 throw("Match error")
6868 }
6969
7070 let calculatorAddressOrFail = valueOrErrorMessage(calculatorAddressOption, wrapErr("invalid calculator address"))
7171
7272 func onlyAddress (i,address) = if ((i.caller == address))
7373 then true
7474 else throwErr("permission denied")
7575
7676
7777 func onlyThis (i) = onlyAddress(i, this)
7878
7979
8080 func onlyCalculator (i) = onlyAddress(i, calculatorAddressOrFail)
8181
8282
8383 @Callable(i)
8484 func stringEntry (key,val) = if (onlyCalculator(i))
8585 then $Tuple2([StringEntry(key, val)], key)
8686 else $Tuple2(nil, unit)
8787
8888
8989
9090 @Callable(i)
9191 func integerEntry (key,val) = if (onlyCalculator(i))
9292 then $Tuple2([IntegerEntry(key, val)], key)
9393 else $Tuple2(nil, unit)
9494
9595
9696
9797 @Callable(i)
9898 func booleanEntry (key,val) = if (onlyCalculator(i))
9999 then $Tuple2([BooleanEntry(key, val)], key)
100100 else $Tuple2(nil, unit)
101101
102102
103103
104104 @Callable(i)
105105 func binaryEntry (key,val) = if (onlyCalculator(i))
106106 then $Tuple2([BinaryEntry(key, val)], key)
107107 else $Tuple2(nil, unit)
108108
109109
110110
111111 @Callable(i)
112112 func deleteEntry (key) = if (onlyCalculator(i))
113113 then $Tuple2([DeleteEntry(key)], key)
114114 else $Tuple2(nil, unit)
115115
116116
117117
118118 @Callable(i)
119119 func reissue (assetId,amount,reissuable) = if (onlyCalculator(i))
120120 then $Tuple2([Reissue(assetId, amount, reissuable)], amount)
121121 else $Tuple2(nil, unit)
122122
123123
124124
125125 @Callable(i)
126126 func burn (assetId,amount) = if (onlyCalculator(i))
127127 then $Tuple2([Burn(assetId, amount)], amount)
128128 else $Tuple2(nil, unit)
129129
130130
131131
132132 @Callable(i)
133133 func transferAsset (recipientBytes,amount,assetId) = if (onlyCalculator(i))
134134 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, assetId)], amount)
135135 else $Tuple2(nil, unit)
136136
137137
138138
139139 @Callable(i)
140140 func transferAssets (recipientBytes,assetsList,amountsList) = if (onlyCalculator(i))
141141 then {
142142 func addNewTransfer (acc,nextAssetId) = {
143143 let $t032353259 = acc
144144 let transfers = $t032353259._1
145145 let j = $t032353259._2
146146 let newTransfer = ScriptTransfer(Address(recipientBytes), amountsList[j], assetsList[j])
147147 let updatedTransfers = (transfers :+ newTransfer)
148148 $Tuple2(updatedTransfers, (j + 1))
149149 }
150150
151151 let $t034853566 = {
152152 let $l = assetsList
153153 let $s = size($l)
154154 let $acc0 = $Tuple2(nil, 0)
155155 func $f0_1 ($a,$i) = if (($i >= $s))
156156 then $a
157157 else addNewTransfer($a, $l[$i])
158158
159159 func $f0_2 ($a,$i) = if (($i >= $s))
160160 then $a
161161 else throw("List size exceeds 10")
162162
163163 $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)
164164 }
165165 let assetsTransfers = $t034853566._1
166166 let _lastIndex = $t034853566._2
167167 $Tuple2(assetsTransfers, unit)
168168 }
169169 else $Tuple2(nil, unit)
170170
171171
172172
173173 @Callable(i)
174174 func transferWaves (recipientBytes,amount) = if (onlyCalculator(i))
175175 then $Tuple2([ScriptTransfer(Address(recipientBytes), amount, unit)], amount)
176176 else $Tuple2(nil, unit)
177177
178178
179179 @Verifier(tx)
180180 func verify () = (chainId == chainIdT)
181181

github/deemru/w8io/026f985 
46.03 ms