tx · 55sNeuNEZttPuSXm3PjEEJR3xoVkXSyQbpbMgmtKRNxk

3MswZg1fApcC9ASPGWTzXVF1e36xrWrj73n:  -0.01000000 Waves

2022.06.21 18:26 [2106336] smart account 3MswZg1fApcC9ASPGWTzXVF1e36xrWrj73n > SELF 0.00000000 Waves

{ "type": 13, "id": "55sNeuNEZttPuSXm3PjEEJR3xoVkXSyQbpbMgmtKRNxk", "fee": 1000000, "feeAssetId": null, "timestamp": 1655825162560, "version": 2, "chainId": 84, "sender": "3MswZg1fApcC9ASPGWTzXVF1e36xrWrj73n", "senderPublicKey": "44j2xzKGrREbsdWj2Rqjw9nddZuT8ShaBrK67Q6rJZvC", "proofs": [ "4RRFtGa7RJ9x5iTnFAKp7S1GwsNKVBqxXKJdhaqAB4fgcQXwBnbWy9WVeRStFS9JcnZyft5MCHybeuELVMqgLAHz" ], "script": "base64:AAIFAAAAAAAAABgIAhIECgIICBIECgIIARIDCgEIEgMKAQgAAAAJAAAAAANTRVACAAAAAl9fAQAAABFrZXlDb250cm9sQWRkcmVzcwAAAAACAAAAHCVzJXNfX2NvbmZpZ19fY29udHJvbEFkZHJlc3MBAAAADmtleVJlc3RBZGRyZXNzAAAAAAIAAAAZJXMlc19fY29uZmlnX19yZXN0QWRkcmVzcwEAAAAMZ2V0U3RyT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkJAAEsAAAAAgkAASwAAAACAgAAAA9NYW5kYXRvcnkgdGhpcy4FAAAAA2tleQIAAAAPIGlzIG5vdCBkZWZpbmVkAQAAABBnZXRBZGRyZXNzT3JGYWlsAAAAAQAAAANrZXkJAQAAABN2YWx1ZU9yRXJyb3JNZXNzYWdlAAAAAgkABCYAAAABCQEAAAAMZ2V0U3RyT3JGYWlsAAAAAQUAAAADa2V5CQABLAAAAAICAAAAH2ZhaWwgdG8gcGFyc2UgYWRkcmVzcyBmb3IgdG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VsdHMAAAAAJWDLyA==", "height": 2106336, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4gXEvChp3mrge7wS26tjG74SN1rPCqUtfQD2wFSFU4eh Next: none Diff:
OldNewDifferences
9191 let funcsIndexes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
9292 let paramIndexes = [1, 3, 5, 7, 9, 11]
9393 let payloadArr = split(payload, SEP)
94- func invokesAgregator (accum,funcIdx) = {
95- let call = payloadArr[funcIdx]
96- let callArr = split(call, "+")
97- let address = addressFromStringValue(callArr[0])
98- let funcName = callArr[1]
99- let paramsArr = split(callArr[2], "+")
100- func paramsAgregator (paramsAcc,paramIdx) = {
101- let p = if ((paramsArr[(paramIdx - 1)] == "s"))
102- then paramsArr[paramIdx]
103- else parseIntValue(paramsArr[paramIdx])
104- (paramsAcc :+ p)
94+ let payloadSize = size(payloadArr)
95+ func invokesAgregator (accum,funcIdx) = if ((funcIdx >= payloadSize))
96+ then accum
97+ else {
98+ let call = payloadArr[funcIdx]
99+ let callArr = split(call, "+")
100+ let address = addressFromStringValue(callArr[0])
101+ let funcName = callArr[1]
102+ let paramsArr = split(callArr[2], ":")
103+ let paramsSize = size(paramsArr)
104+ func paramsAgregator (paramsAcc,paramIdx) = if ((paramIdx >= paramsSize))
105+ then paramsAcc
106+ else {
107+ let p = if ((paramsArr[(paramIdx - 1)] == "s"))
108+ then paramsArr[paramIdx]
109+ else parseIntValue(paramsArr[paramIdx])
110+ (paramsAcc :+ p)
111+ }
112+
113+ let params = {
114+ let $l = paramIndexes
115+ let $s = size($l)
116+ let $acc0 = nil
117+ func $f0_1 ($a,$i) = if (($i >= $s))
118+ then $a
119+ else paramsAgregator($a, $l[$i])
120+
121+ func $f0_2 ($a,$i) = if (($i >= $s))
122+ then $a
123+ else throw("List size exceeds 6")
124+
125+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
126+ }
127+ let result = asString(invoke(address, funcName, params, nil))
128+ (accum ++ [funcName, result])
105129 }
106-
107- let params = {
108- let $l = paramIndexes
109- let $s = size($l)
110- let $acc0 = nil
111- func $f0_1 ($a,$i) = if (($i >= $s))
112- then $a
113- else paramsAgregator($a, $l[$i])
114-
115- func $f0_2 ($a,$i) = if (($i >= $s))
116- then $a
117- else throw("List size exceeds 6")
118-
119- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
120- }
121- let result = asString(invoke(address, funcName, params, nil))
122- (accum ++ [funcName, result])
123- }
124130
125131 let invokesResults = {
126132 let $l = funcsIndexes
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 genericREADONLY (payload) = {
9191 let funcsIndexes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
9292 let paramIndexes = [1, 3, 5, 7, 9, 11]
9393 let payloadArr = split(payload, SEP)
94- func invokesAgregator (accum,funcIdx) = {
95- let call = payloadArr[funcIdx]
96- let callArr = split(call, "+")
97- let address = addressFromStringValue(callArr[0])
98- let funcName = callArr[1]
99- let paramsArr = split(callArr[2], "+")
100- func paramsAgregator (paramsAcc,paramIdx) = {
101- let p = if ((paramsArr[(paramIdx - 1)] == "s"))
102- then paramsArr[paramIdx]
103- else parseIntValue(paramsArr[paramIdx])
104- (paramsAcc :+ p)
94+ let payloadSize = size(payloadArr)
95+ func invokesAgregator (accum,funcIdx) = if ((funcIdx >= payloadSize))
96+ then accum
97+ else {
98+ let call = payloadArr[funcIdx]
99+ let callArr = split(call, "+")
100+ let address = addressFromStringValue(callArr[0])
101+ let funcName = callArr[1]
102+ let paramsArr = split(callArr[2], ":")
103+ let paramsSize = size(paramsArr)
104+ func paramsAgregator (paramsAcc,paramIdx) = if ((paramIdx >= paramsSize))
105+ then paramsAcc
106+ else {
107+ let p = if ((paramsArr[(paramIdx - 1)] == "s"))
108+ then paramsArr[paramIdx]
109+ else parseIntValue(paramsArr[paramIdx])
110+ (paramsAcc :+ p)
111+ }
112+
113+ let params = {
114+ let $l = paramIndexes
115+ let $s = size($l)
116+ let $acc0 = nil
117+ func $f0_1 ($a,$i) = if (($i >= $s))
118+ then $a
119+ else paramsAgregator($a, $l[$i])
120+
121+ func $f0_2 ($a,$i) = if (($i >= $s))
122+ then $a
123+ else throw("List size exceeds 6")
124+
125+ $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
126+ }
127+ let result = asString(invoke(address, funcName, params, nil))
128+ (accum ++ [funcName, result])
105129 }
106-
107- let params = {
108- let $l = paramIndexes
109- let $s = size($l)
110- let $acc0 = nil
111- func $f0_1 ($a,$i) = if (($i >= $s))
112- then $a
113- else paramsAgregator($a, $l[$i])
114-
115- func $f0_2 ($a,$i) = if (($i >= $s))
116- then $a
117- else throw("List size exceeds 6")
118-
119- $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6)
120- }
121- let result = asString(invoke(address, funcName, params, nil))
122- (accum ++ [funcName, result])
123- }
124130
125131 let invokesResults = {
126132 let $l = funcsIndexes
127133 let $s = size($l)
128134 let $acc0 = nil
129135 func $f0_1 ($a,$i) = if (($i >= $s))
130136 then $a
131137 else invokesAgregator($a, $l[$i])
132138
133139 func $f0_2 ($a,$i) = if (($i >= $s))
134140 then $a
135141 else throw("List size exceeds 10")
136142
137143 $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)
138144 }
139145 $Tuple2(nil, produceJson(invokesResults))
140146 }
141147
142148

github/deemru/w8io/026f985 
38.10 ms