tx · HTkCbmirmEdbrF8eKCy8Dt3nDyyXp7grrCir5zx6SfRP

3N3HtdnBkqSSc16DaydiwtrMBUv3DfqKjSW:  -0.01400000 Waves

2021.11.22 19:53 [1802499] smart account 3N3HtdnBkqSSc16DaydiwtrMBUv3DfqKjSW > SELF 0.00000000 Waves

{ "type": 13, "id": "HTkCbmirmEdbrF8eKCy8Dt3nDyyXp7grrCir5zx6SfRP", "fee": 1400000, "feeAssetId": null, "timestamp": 1637600013390, "version": 2, "chainId": 84, "sender": "3N3HtdnBkqSSc16DaydiwtrMBUv3DfqKjSW", "senderPublicKey": "Aw1UftaEn1LLmCdG6VwWAuVtaSpcmPw18uZ4x2mvd9Wr", "proofs": [ "5anvucQtRYGfbBfzKQmLce5AXR1EYteJoXXU8ArnhfyJ4ggf3WNBVakuTtx6DNf93mBXXD9PAyxxTV3A7dmX52Bc", "5hbtcUvYrcqwrjgyL9kVkX6FqGniPb8cQpLQCLMvBX5VEdYqbR1hP8AWjX87evKnqtxyAyVxhGYjhFhv46MkiKr8" ], "script": "base64:AAIFAAAAAAAAAA4IAhIECgIIARIECgIRGAAAAA0AAAAAEGtleUFjaGlldmVtZW50SWQCAAAAA2lkXwAAAAAGb3JhY2xlCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFU6UWqHpAvOq7xug7mLpqSXxqYhOHzYrMIAAAAAA9rZXlBZG1pblB1YktleTECAAAAC2FkbWluX3B1Yl8xAAAAAA9rZXlBZG1pblB1YktleTICAAAAC2FkbWluX3B1Yl8yAAAAAA9rZXlBZG1pblB1YktleTMCAAAAC2FkbWluX3B1Yl8zAQAAAAtnZXRBZG1pblB1YgAAAAEAAAALa2V5QWRtaW5QdWIEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAGb3JhY2xlBQAAAAtrZXlBZG1pblB1YgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAZzdHJpbmcFAAAAByRtYXRjaDAJAAJZAAAAAQUAAAAGc3Rya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AAZwcm9vZnMAAAAAAAAAAAAFAAAAEmFkbWluUHViS2V5U3Rha2luZwQAAAAHJG1hdGNoMAUAAAACdHgFAAAAE211bHRpU2lnbmVkQnlBZG1pbnM2+Cnj", "height": 1802499, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HdzT1Ntx7ce7hPVkHmBgwcpm4yZBL1kt6NzmdNC2HXWk Next: none Diff:
OldNewDifferences
4747
4848
4949 @Callable(v)
50-func add (x,y) = {
51- let z = (a + x)
52- if (!(containsElement(p, toString(this))))
53- then throw("Only achievment writer can call this function")
54- else if (!(isDefined(getString(this, z))))
55- then throw("Unknown achievement id")
56- else {
57- let A = toString(v.originCaller)
58- let B = valueOrElse(getInteger(this, ((A + "_") + x)), 0)
59-[IntegerEntry(((A + "_") + x), (B + y))]
60- }
61- }
50+func add (x,y) = if (!(containsElement(p, toString(v.caller))))
51+ then throw("Only achievment writer can call this function")
52+ else if (!(isDefined(getString(this, (a + x)))))
53+ then throw("Unknown achievement id")
54+ else {
55+ let z = toString(v.originCaller)
56+ let A = valueOrElse(getInteger(this, ((z + "_") + x)), 0)
57+[IntegerEntry(((z + "_") + x), (A + y))]
58+ }
6259
6360
6461
6562 @Callable(v)
66-func addAchievements (C,D) = if (!(containsElement([k, l, m], v.callerPublicKey)))
63+func addAchievements (B,C) = if (!(containsElement([k, l, m], v.callerPublicKey)))
6764 then throw("Only admin can call this function")
6865 else {
69- let E = {
70- let F = D
71- let G = size(F)
72- let H = $Tuple3(C, 0, nil)
73- func I (J,K) = if ((K >= G))
74- then J
75- else q(J, F[K])
66+ let D = {
67+ let E = C
68+ let F = size(E)
69+ let G = $Tuple3(B, 0, nil)
70+ func H (I,J) = if ((J >= F))
71+ then I
72+ else q(I, E[J])
7673
77- func L (J,K) = if ((K >= G))
78- then J
74+ func K (I,J) = if ((J >= F))
75+ then I
7976 else throw("List size exceeds 20")
8077
81- L(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(H, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
78+ K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
8279 }
83- E._3
80+ D._3
8481 }
8582
8683
87-@Verifier(M)
88-func N () = {
89- let O = {
90- let P = if (sigVerify(M.bodyBytes, M.proofs[0], k))
84+@Verifier(L)
85+func M () = {
86+ let N = {
87+ let O = if (sigVerify(L.bodyBytes, L.proofs[0], k))
9188 then 1
9289 else 0
93- let Q = if (sigVerify(M.bodyBytes, M.proofs[1], l))
90+ let P = if (sigVerify(L.bodyBytes, L.proofs[1], l))
9491 then 1
9592 else 0
96- let R = if (sigVerify(M.bodyBytes, M.proofs[2], m))
93+ let Q = if (sigVerify(L.bodyBytes, L.proofs[2], m))
9794 then 1
9895 else 0
99- (((P + Q) + R) >= 2)
96+ (((O + P) + Q) >= 2)
10097 }
101- let S = if (if (if (sigVerify(M.bodyBytes, M.proofs[0], k))
98+ let R = if (if (if (sigVerify(L.bodyBytes, L.proofs[0], k))
10299 then true
103- else sigVerify(M.bodyBytes, M.proofs[0], l))
100+ else sigVerify(L.bodyBytes, L.proofs[0], l))
104101 then true
105- else sigVerify(M.bodyBytes, M.proofs[0], m))
102+ else sigVerify(L.bodyBytes, L.proofs[0], m))
106103 then true
107- else sigVerify(M.bodyBytes, M.proofs[0], n)
108- let h = M
109- O
104+ else sigVerify(L.bodyBytes, L.proofs[0], n)
105+ let h = L
106+ N
110107 }
111108
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "id_"
55
66 let b = Address(base58'3NBBWfzZtZtszaXbitTKnrB2xXwv26Bn7H9')
77
88 let c = "admin_pub_1"
99
1010 let d = "admin_pub_2"
1111
1212 let e = "admin_pub_3"
1313
1414 func f (g) = {
1515 let h = getString(b, g)
1616 if ($isInstanceOf(h, "String"))
1717 then {
1818 let i = h
1919 fromBase58String(i)
2020 }
2121 else {
2222 let j = h
2323 throw("Admin public key is empty")
2424 }
2525 }
2626
2727
2828 let k = f(c)
2929
3030 let l = f(d)
3131
3232 let m = f(e)
3333
3434 let n = base58'Kn7NpzaG12dLZgcHf2ipUftU6hbJygmrhFqQYE4B7ZK'
3535
3636 let o = "achievements_writers"
3737
3838 let p = split(valueOrElse(getString(b, o), ""), ",")
3939
4040 func q (r,s) = {
4141 let t = r
4242 let u = t._1
4343 let v = t._2
4444 let w = t._3
4545 $Tuple3(u, (v + 1), (w :+ StringEntry((a + toString(u[v])), s)))
4646 }
4747
4848
4949 @Callable(v)
50-func add (x,y) = {
51- let z = (a + x)
52- if (!(containsElement(p, toString(this))))
53- then throw("Only achievment writer can call this function")
54- else if (!(isDefined(getString(this, z))))
55- then throw("Unknown achievement id")
56- else {
57- let A = toString(v.originCaller)
58- let B = valueOrElse(getInteger(this, ((A + "_") + x)), 0)
59-[IntegerEntry(((A + "_") + x), (B + y))]
60- }
61- }
50+func add (x,y) = if (!(containsElement(p, toString(v.caller))))
51+ then throw("Only achievment writer can call this function")
52+ else if (!(isDefined(getString(this, (a + x)))))
53+ then throw("Unknown achievement id")
54+ else {
55+ let z = toString(v.originCaller)
56+ let A = valueOrElse(getInteger(this, ((z + "_") + x)), 0)
57+[IntegerEntry(((z + "_") + x), (A + y))]
58+ }
6259
6360
6461
6562 @Callable(v)
66-func addAchievements (C,D) = if (!(containsElement([k, l, m], v.callerPublicKey)))
63+func addAchievements (B,C) = if (!(containsElement([k, l, m], v.callerPublicKey)))
6764 then throw("Only admin can call this function")
6865 else {
69- let E = {
70- let F = D
71- let G = size(F)
72- let H = $Tuple3(C, 0, nil)
73- func I (J,K) = if ((K >= G))
74- then J
75- else q(J, F[K])
66+ let D = {
67+ let E = C
68+ let F = size(E)
69+ let G = $Tuple3(B, 0, nil)
70+ func H (I,J) = if ((J >= F))
71+ then I
72+ else q(I, E[J])
7673
77- func L (J,K) = if ((K >= G))
78- then J
74+ func K (I,J) = if ((J >= F))
75+ then I
7976 else throw("List size exceeds 20")
8077
81- L(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(I(H, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
78+ K(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(H(G, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20)
8279 }
83- E._3
80+ D._3
8481 }
8582
8683
87-@Verifier(M)
88-func N () = {
89- let O = {
90- let P = if (sigVerify(M.bodyBytes, M.proofs[0], k))
84+@Verifier(L)
85+func M () = {
86+ let N = {
87+ let O = if (sigVerify(L.bodyBytes, L.proofs[0], k))
9188 then 1
9289 else 0
93- let Q = if (sigVerify(M.bodyBytes, M.proofs[1], l))
90+ let P = if (sigVerify(L.bodyBytes, L.proofs[1], l))
9491 then 1
9592 else 0
96- let R = if (sigVerify(M.bodyBytes, M.proofs[2], m))
93+ let Q = if (sigVerify(L.bodyBytes, L.proofs[2], m))
9794 then 1
9895 else 0
99- (((P + Q) + R) >= 2)
96+ (((O + P) + Q) >= 2)
10097 }
101- let S = if (if (if (sigVerify(M.bodyBytes, M.proofs[0], k))
98+ let R = if (if (if (sigVerify(L.bodyBytes, L.proofs[0], k))
10299 then true
103- else sigVerify(M.bodyBytes, M.proofs[0], l))
100+ else sigVerify(L.bodyBytes, L.proofs[0], l))
104101 then true
105- else sigVerify(M.bodyBytes, M.proofs[0], m))
102+ else sigVerify(L.bodyBytes, L.proofs[0], m))
106103 then true
107- else sigVerify(M.bodyBytes, M.proofs[0], n)
108- let h = M
109- O
104+ else sigVerify(L.bodyBytes, L.proofs[0], n)
105+ let h = L
106+ N
110107 }
111108

github/deemru/w8io/169f3d6 
68.86 ms