tx · D5xCmrAPMw27rec2myMbJsmp7yDyGPHu5U1MgAsdXJc3

3N7oHnMaDFKYTEgumQs9mjRESDco6KhQiXW:  -0.09000000 Waves

2023.05.09 15:27 [2570344] smart account 3N7oHnMaDFKYTEgumQs9mjRESDco6KhQiXW > SELF 0.00000000 Waves

{ "type": 13, "id": "D5xCmrAPMw27rec2myMbJsmp7yDyGPHu5U1MgAsdXJc3", "fee": 9000000, "feeAssetId": null, "timestamp": 1683635210826, "version": 2, "chainId": 84, "sender": "3N7oHnMaDFKYTEgumQs9mjRESDco6KhQiXW", "senderPublicKey": "2M6xzJiyT4ZPQhyMEQoo9GUqBsKBtgTD1BaZ8L4PfPVj", "proofs": [ "2RLyQKoN6BPKf5ZSDSoFe52z3hRSWEfWkbsCrYDwQ6R5uWoMN3N8oEqSddG5x27et3cYyS9YgprFg8w1sJsvCDph", "2mZYgNqkch6MWUKtBRr4xRzup8RU331yYkzRWhjt57SvFLU7xeUtKGN6M9TiKwXDtMuB5S7qXicCh7RoZ43V6enR" ], "script": "base64:AAIFAAAAAAAAABIIAhIHCgUBAQEICBIDCgEEEgAAAAAYAAAAAAxhZG1pblB1YktleTEBAAAAIKEEkqGlvxkeCCEjnB3f3IzbSlzW0d5bY0HtvfJWzcV3AAAAAAxhZG1pblB1YktleTIBAAAAIKEEkqGlvxkeCCEjnB3f3IzbSlzW0d5bY0HtvfJWzcV3AAAAAAxhZG1pblB1YktleTMBAAAAIKEEkqGlvxkeCCEjnB3f3IzbSlzW0d5bY0HtvfJWzcV3AAAAABRhZG1pblB1YktleVN0YXJ0U3RvcAEAAAAgoQSSoaW/GR4IISOcHd/cjNtKXNbR3ltjQe298lbNxXcAAAAACWtleUFjdGl2ZQIAAAAGYWN0aXZlAAAAAAhrZXlDYXVzZQIAAAAOc2h1dGRvd25fY2F1c2UAAAAAEWtleVVzZXJWT1RFQW1vdW50AgAAAAxfVk9URV9hbW91bnQAAAAAC2tleVVzZXJWT1RFAgAAAAVfVk9URQAAAAAM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NhbiBjYWxsIHRoaXMgZnVuY3Rpb24JAQAAAAdzdXNwZW5kAAAAAQIAAAAPUGF1c2VkIGJ5IGFkbWluAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAEmFkbWluUHViS2V5MVNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAxhZG1pblB1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAAEmFkbWluUHViS2V5MlNpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAABBQAAAAxhZG1pblB1YktleTIAAAAAAAAAAAEAAAAAAAAAAAAEAAAAEmFkbWluUHViS2V5M1NpZ25lZAMJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAACBQAAAAxhZG1pblB1YktleTMAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIFAAAAEmFkbWluUHViS2V5MVNpZ25lZAUAAAASYWRtaW5QdWJLZXkyU2lnbmVkBQAAABJhZG1pblB1YktleTNTaWduZWQAAAAAAAAAAALidmp4", "height": 2570344, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: P4AoPXKfEsuiapjRDPhin2KSopfy9p4XiQWJo9ftcAQ Next: Bf9DMGwZUbrHSHgXu7EMaormBccEpGgtwivYXnZRd8b2 Diff:
OldNewDifferences
5959 then throw("DApp is inactive at this moment")
6060 else if (!(containsElement([a, b, c, d], B.callerPublicKey)))
6161 then throw("Only admin can call this function")
62- else [IntegerEntry(j, C), IntegerEntry(((k + "_") + j), D), IntegerEntry(((l + "_") + j), E), IntegerEntry(((m + "_") + j), 0), IntegerEntry(((n + "_") + j), 0), StringEntry(((p + "_") + j), F), StringEntry(((q + "_") + j), G)]
62+ else [IntegerEntry(j, C), IntegerEntry(((k + "_") + toString(C)), D), IntegerEntry(((l + "_") + toString(C)), E), IntegerEntry((toString(C) + m), 0), IntegerEntry((toString(C) + n), 0), StringEntry(((p + "_") + toString(C)), F), StringEntry(((q + "_") + toString(C)), G)]
6363
6464
6565
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BqYgePcs4f9GkzK6gzeFRnTPBjfSNj8cZswgB4J1p7Dp'
55
66 let b = base58'BqYgePcs4f9GkzK6gzeFRnTPBjfSNj8cZswgB4J1p7Dp'
77
88 let c = base58'BqYgePcs4f9GkzK6gzeFRnTPBjfSNj8cZswgB4J1p7Dp'
99
1010 let d = base58'BqYgePcs4f9GkzK6gzeFRnTPBjfSNj8cZswgB4J1p7Dp'
1111
1212 let e = "active"
1313
1414 let f = "shutdown_cause"
1515
1616 let g = "_VOTE_amount"
1717
1818 let h = "_VOTE"
1919
2020 let i = "_total_VOTE_amount"
2121
2222 let j = "vote_session"
2323
2424 let k = "vote_start_height"
2525
2626 let l = "vote_end_height"
2727
2828 let m = "_yes_amount"
2929
3030 let n = "_no_amount"
3131
3232 let o = "_ENNO_amount"
3333
3434 let p = "vote_name"
3535
3636 let q = "vote_description"
3737
3838 let r = valueOrElse(getBoolean(this, e), true)
3939
4040 let s = addressFromPublicKey(base58'Ese6jz6mtrhgwJWdXbAxHNHg2qzae5D2xXWuVF7tLfs8')
4141
4242 func t (u) = valueOrElse(getInteger(s, (toString(u) + o)), 0)
4343
4444
4545 func v (u) = valueOrElse(getInteger(this, (toString(u) + g)), 0)
4646
4747
4848 func w (u) = valueOrElse(getBoolean(this, (toString(u) + h)), false)
4949
5050
5151 func x (y) = valueOrElse(getInteger(this, y), 0)
5252
5353
5454 func z (A) = [BooleanEntry(e, false), StringEntry(f, A)]
5555
5656
5757 @Callable(B)
5858 func initVote (C,D,E,F,G) = if (!(r))
5959 then throw("DApp is inactive at this moment")
6060 else if (!(containsElement([a, b, c, d], B.callerPublicKey)))
6161 then throw("Only admin can call this function")
62- else [IntegerEntry(j, C), IntegerEntry(((k + "_") + j), D), IntegerEntry(((l + "_") + j), E), IntegerEntry(((m + "_") + j), 0), IntegerEntry(((n + "_") + j), 0), StringEntry(((p + "_") + j), F), StringEntry(((q + "_") + j), G)]
62+ else [IntegerEntry(j, C), IntegerEntry(((k + "_") + toString(C)), D), IntegerEntry(((l + "_") + toString(C)), E), IntegerEntry((toString(C) + m), 0), IntegerEntry((toString(C) + n), 0), StringEntry(((p + "_") + toString(C)), F), StringEntry(((q + "_") + toString(C)), G)]
6363
6464
6565
6666 @Callable(B)
6767 func vote (H) = if (!(r))
6868 then throw("DApp is inactive at this moment")
6969 else if ((x(k) > height))
7070 then throw("Voting has not started yet.")
7171 else if ((height > x(l)))
7272 then throw("Voting has already ended.")
7373 else {
7474 let I = x((j + m))
7575 let J = x((j + n))
7676 let K = v(B.caller)
7777 let L = w(B.caller)
7878 let M = t(B.caller)
7979 let N = M
8080 if ((0 > N))
8181 then throw("Vote must be more than 0")
8282 else {
8383 let O = (I + (if ((H == L))
8484 then if (H)
8585 then M
8686 else 0
8787 else (-1 * M)))
8888 let P = (J + (if ((L == H))
8989 then if (!(H))
9090 then M
9191 else 0
9292 else (-1 * M)))
9393 [IntegerEntry((((toString(B.caller) + g) + "_") + j), M), BooleanEntry((((toString(B.caller) + h) + "_") + j), H), IntegerEntry((j + m), O), IntegerEntry((j + n), P), IntegerEntry((j + i), (P + O))]
9494 }
9595 }
9696
9797
9898
9999 @Callable(B)
100100 func shutdown () = if (!(r))
101101 then throw(("DApp is already suspended. Cause: " + valueOrElse(getString(this, f), "the cause wasn't specified")))
102102 else if (!(containsElement([a, b, c, d], B.callerPublicKey)))
103103 then throw("Only admin can call this function")
104104 else z("Paused by admin")
105105
106106
107107 @Verifier(Q)
108108 func R () = {
109109 let S = Q
110110 if ($isInstanceOf(S, "DataTransaction"))
111111 then {
112112 let T = S
113113 sigVerify(Q.bodyBytes, Q.proofs[0], Q.senderPublicKey)
114114 }
115115 else {
116116 let U = if (sigVerify(Q.bodyBytes, Q.proofs[0], a))
117117 then 1
118118 else 0
119119 let V = if (sigVerify(Q.bodyBytes, Q.proofs[1], b))
120120 then 1
121121 else 0
122122 let W = if (sigVerify(Q.bodyBytes, Q.proofs[2], c))
123123 then 1
124124 else 0
125125 (((U + V) + W) >= 2)
126126 }
127127 }
128128

github/deemru/w8io/169f3d6 
39.23 ms