tx · 2N54abUa41mC4ktzXrbmpRLi2GccJ1p5gW9b7vsUWwct

3MyBtJnMg6n7m1sDczbrijVyosLnRh4FFbc:  -0.04000000 Waves

2022.07.06 13:35 [2127710] smart account 3MyBtJnMg6n7m1sDczbrijVyosLnRh4FFbc > SELF 0.00000000 Waves

{ "type": 13, "id": "2N54abUa41mC4ktzXrbmpRLi2GccJ1p5gW9b7vsUWwct", "fee": 4000000, "feeAssetId": null, "timestamp": 1657103745041, "version": 1, "sender": "3MyBtJnMg6n7m1sDczbrijVyosLnRh4FFbc", "senderPublicKey": "H3EzJ6fSm7jHKo92xYdNTXaaQYKj9z5q2DJFovRDLJpf", "proofs": [ "5S8Foi8NKoZGNEzRecUCd33KWwAJk3bhNYVqrKKp8UxbX45rQMrzJqj9PgsoHLiqXvtprbKVjfGfcnRo8y5LS1im" ], "script": "base64:AAIFAAAAAAAAAB8IAhIECgIICBIECgIIARIDCgEIEgUKAwgBCBIDCgEIAAAACQAAAAADU0VQAgAAAAJfXwEAAAARa2V5Q29udHJvbEFkZHJlc3MAAAAAAgAAABwlcyVzX19jb25maWdfX2NvbnRyb2xBZGRyZXNzAQAAAA5rZXlSZXN0QWRkcmVzcwAAAAACAAAAGSVzJXNfX2NvbmZpZ19fcmVzdEFkZHJlc3MBAAAADGdldFN0ck9yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5CQABLAAAAAIJAAEsAAAAAgIAAAAPTWFuZGF0b3J5IHRoaXMuBQAAAANrZXkCAAAADyBpcyBub3QgZGVmaW5lZAEAAAAQZ2V0QWRkcmVzc09yRmFpbAAAAAEAAAADa2V5CQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAAAAIJAAQmAAAAAQkBAAAADGdldFN0ck9yRmFpbAAAAAEFAAAAA2tleQkAASwAAAACAgAAAB9mYWlsIHRvIHBhcnNlIGFkZHJlc3MgZm9yIHRoaXMu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AAAZyZXN1bHQFAAAAA25pbAQAAAAOaW52b2tlc1Jlc3VsdHMKAAAAAAIkbAUAAAAMZnVuY3NJbmRleGVzCgAAAAACJHMJAAGQAAAAAQUAAAACJGwKAAAAAAUkYWNjMAUAAAADbmlsCgEAAAAFJGYwXzEAAAACAAAAAiRhAAAAAiRpAwkAAGcAAAACBQAAAAIkaQUAAAACJHMFAAAAAiRhCQEAAAAQaW52b2tlc0FncmVnYXRvcgAAAAIFAAAAAiRhCQABkQAAAAIFAAAAAiRsBQAAAAIkaQoBAAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABRMaXN0IHNpemUgZXhjZWVkcyAxMAkBAAAABSRmMF8yAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgkBAAAABSRmMF8xAAAAAgUAAAAFJGFjYzAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAIAAAAAAAAAAAMAAAAAAAAAAAQAAAAAAAAAAAUAAAAAAAAAAAYAAAAAAAAAAAcAAAAAAAAAAAgAAAAAAAAAAAkAAAAAAAAAAAoJAAUUAAAAAgUAAAADbmlsCQEAAAALcHJvZHVjZUpzb24AAAABBQAAAA5pbnZva2VzUmVzdWx0cwAAAAB0muuH", "chainId": 84, "height": 2127710, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CUptLKkkBKjEJMyZYNh8yrcDhYQbp1hRD9HvzX8Lq3pD Next: FHyT84G87XCHwkuN9rtemCuVBhaFtUxgKJ3xKCDcwioG Diff:
OldNewDifferences
9090 func buySurfPageREADONLY (userAddressStrOpt,amount,assetIdStr) = {
9191 let gnsbtInfo = asString(invoke(restAcc, "gnsbtInfoREADONLY", [userAddressStrOpt, 0], nil))
9292 let neutrinoStats = asString(invoke(restAcc, "neutrinoStatsREADONLY", nil, nil))
93- let surfBuy = asString(invoke(restAcc, "buySurfREADONLY", [amount, assetIdStr], nil))
93+ let surfBuy = asString(invoke(restAcc, "buySurfREADONLY", [userAddressStrOpt, amount, assetIdStr], nil))
9494 $Tuple2(nil, produceJson(["gnsbtInfoREADONLY", gnsbtInfo, "neutrinoStatsREADONLY", neutrinoStats, "buySurfREADONLY", surfBuy]))
9595 }
9696
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 func keyControlAddress () = "%s%s__config__controlAddress"
77
88
99 func keyRestAddress () = "%s%s__config__restAddress"
1010
1111
1212 func getStrOrFail (key) = valueOrErrorMessage(getString(this, key), (("Mandatory this." + key) + " is not defined"))
1313
1414
1515 func getAddressOrFail (key) = valueOrErrorMessage(addressFromString(getStrOrFail(key)), ("fail to parse address for this." + key))
1616
1717
1818 func asString (val) = match val {
1919 case valStr: String =>
2020 valStr
2121 case _ =>
2222 throw("fail to cast into String")
2323 }
2424
2525
2626 func produceJson (strMap) = {
2727 let indexes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
2828 let length = size(strMap)
2929 if (((length % 2) != 0))
3030 then throw("only even args size is accepeted")
3131 else if ((length > size(indexes)))
3232 then throw(("strMap length is greater then " + toString(size(indexes))))
3333 else {
3434 func produceJson (jsonAccum,nextIdx) = if (if (((nextIdx % 2) == 0))
3535 then (length >= (nextIdx + 1))
3636 else false)
3737 then (((((jsonAccum + "
3838 \"") + strMap[nextIdx]) + "\": \"") + strMap[(nextIdx + 1)]) + "\",")
3939 else jsonAccum
4040
4141 let preJsonResult = {
4242 let $l = indexes
4343 let $s = size($l)
4444 let $acc0 = ""
4545 func $f0_1 ($a,$i) = if (($i >= $s))
4646 then $a
4747 else produceJson($a, $l[$i])
4848
4949 func $f0_2 ($a,$i) = if (($i >= $s))
5050 then $a
5151 else throw("List size exceeds 20")
5252
5353 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($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), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
5454 }
5555 (("{" + dropRight(preJsonResult, 1)) + "}")
5656 }
5757 }
5858
5959
6060 let controlAcc = getAddressOrFail(keyControlAddress())
6161
6262 let restAcc = getAddressOrFail(keyRestAddress())
6363
6464 @Callable(i)
6565 func constructor (controlAddress58,restAddress58) = if ((i.caller != this))
6666 then throw("not authorized")
6767 else [StringEntry(keyControlAddress(), controlAddress58), StringEntry(keyRestAddress(), restAddress58)]
6868
6969
7070
7171 @Callable(i)
7272 func stakeNsbtPageREADONLY (userAddressStrOpt,nsbtAmtDiff) = {
7373 let gnsbtInfo = asString(invoke(restAcc, "gnsbtInfoREADONLY", [userAddressStrOpt, nsbtAmtDiff], nil))
7474 let swapInfo = asString(invoke(restAcc, "swapInfoREADONLY", [userAddressStrOpt], nil))
7575 $Tuple2(nil, produceJson(["gnsbtInfoREADONLY", gnsbtInfo, "swapInfoREADONLY", swapInfo]))
7676 }
7777
7878
7979
8080 @Callable(i)
8181 func buyNsbtPageREADONLY (userAddressStrOpt) = {
8282 let gnsbtInfo = asString(invoke(restAcc, "gnsbtInfoREADONLY", [userAddressStrOpt, 0], nil))
8383 let neutrinoStats = asString(invoke(restAcc, "neutrinoStatsREADONLY", nil, nil))
8484 $Tuple2(nil, produceJson(["gnsbtInfoREADONLY", gnsbtInfo, "neutrinoStatsREADONLY", neutrinoStats]))
8585 }
8686
8787
8888
8989 @Callable(i)
9090 func buySurfPageREADONLY (userAddressStrOpt,amount,assetIdStr) = {
9191 let gnsbtInfo = asString(invoke(restAcc, "gnsbtInfoREADONLY", [userAddressStrOpt, 0], nil))
9292 let neutrinoStats = asString(invoke(restAcc, "neutrinoStatsREADONLY", nil, nil))
93- let surfBuy = asString(invoke(restAcc, "buySurfREADONLY", [amount, assetIdStr], nil))
93+ let surfBuy = asString(invoke(restAcc, "buySurfREADONLY", [userAddressStrOpt, amount, assetIdStr], nil))
9494 $Tuple2(nil, produceJson(["gnsbtInfoREADONLY", gnsbtInfo, "neutrinoStatsREADONLY", neutrinoStats, "buySurfREADONLY", surfBuy]))
9595 }
9696
9797
9898
9999 @Callable(i)
100100 func genericREADONLY (payload) = {
101101 let funcsIndexes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
102102 let paramIndexes = [1, 3, 5, 7, 9, 11]
103103 let payloadArr = split(payload, SEP)
104104 let payloadSize = size(payloadArr)
105105 func invokesAgregator (accum,funcIdx) = if ((funcIdx >= payloadSize))
106106 then accum
107107 else {
108108 let call = payloadArr[funcIdx]
109109 let callArr = split(call, "+")
110110 let address = addressFromStringValue(callArr[0])
111111 let funcName = callArr[1]
112112 let paramsArr = split(callArr[2], ":")
113113 let paramsSize = size(paramsArr)
114114 func paramsAgregator (paramsAcc,paramIdx) = if ((paramIdx >= paramsSize))
115115 then paramsAcc
116116 else {
117117 let p = if ((paramsArr[(paramIdx - 1)] == "s"))
118118 then paramsArr[paramIdx]
119119 else parseIntValue(paramsArr[paramIdx])
120120 (paramsAcc :+ p)
121121 }
122122
123123 let params = {
124124 let $l = paramIndexes
125125 let $s = size($l)
126126 let $acc0 = nil
127127 func $f0_1 ($a,$i) = if (($i >= $s))
128128 then $a
129129 else paramsAgregator($a, $l[$i])
130130
131131 func $f0_2 ($a,$i) = if (($i >= $s))
132132 then $a
133133 else throw("List size exceeds 6")
134134
135135 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
136136 }
137137 let result = asString(invoke(address, funcName, params, nil))
138138 (accum ++ [funcName, result])
139139 }
140140
141141 let invokesResults = {
142142 let $l = funcsIndexes
143143 let $s = size($l)
144144 let $acc0 = nil
145145 func $f0_1 ($a,$i) = if (($i >= $s))
146146 then $a
147147 else invokesAgregator($a, $l[$i])
148148
149149 func $f0_2 ($a,$i) = if (($i >= $s))
150150 then $a
151151 else throw("List size exceeds 10")
152152
153153 $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)
154154 }
155155 $Tuple2(nil, produceJson(invokesResults))
156156 }
157157
158158

github/deemru/w8io/169f3d6 
37.00 ms