tx · E2GuSsvnQQECUi5VpB4WpnjzFGZ2sFpHMEGiXNPERBvR

3N8dYK8BQhY7z1yKFRFhdw4m9b4JjsNQJVd:  -0.01400000 Waves

2023.04.14 16:44 [2534280] smart account 3N8dYK8BQhY7z1yKFRFhdw4m9b4JjsNQJVd > SELF 0.00000000 Waves

{ "type": 13, "id": "E2GuSsvnQQECUi5VpB4WpnjzFGZ2sFpHMEGiXNPERBvR", "fee": 1400000, "feeAssetId": null, "timestamp": 1681479867937, "version": 2, "chainId": 84, "sender": "3N8dYK8BQhY7z1yKFRFhdw4m9b4JjsNQJVd", "senderPublicKey": "AK6rRKpHobxNveEtJE5BBXbdwm9BpGL7ewP9Xb6VYuHx", "proofs": [ "DeenKhe8C522YEQvLM1fTNPE2MsukEBxtTjvDtM861ZxEfWm1wcwUDija2dBhg8ZgRDiUtGMz9sf8DTrBvVCkV6" ], "script": "base64:AAIEAAAAAAAAAA4IAhIFCgMIAQESAwoBAQAAAAcAAAAADkE0QVN0YWtpbmdEQXBwCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTjZvV0x5UVkyZ003UVVrVXZCbWUxUkVuQTZkMVY3eTNBVAAAAAAidm90aW5nX3RpbWVzdGFtcF9jb250cm9sbGVyX3B1YmtleQEAAAAgO3RF8b5QOeRSsZiONgCOv+riQ9YfIBAqDV0YsQ0EQwwAAAAAEmNvbnRyb2xsZXJfYWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAidm90aW5nX3RpbWVzdGFtcF9jb250cm9sbGVyX3B1YmtleQAAAAAMbGF1bmNoX2Vycm9yAgAAACREYXBwIHdpbGwgc3RhcnQgVm90aW5nIGF0IFRpbWVzdGFtcCAAAAAAA21zZwIAAAAuPGgxPllvdXIgVm90ZSBTdWJtaXR0ZWQgU3VjY2Vzc2Z1bGx5ITwvaDE+PGJyPgAAAAARQWxyZWFkeVZvdGVkRXJyb3ICAAAAPlRoaXMgQWRkcmVzc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Wx1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxUb3RhbF9Wb3Rlc18JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQFAAAACnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABlRvdGFsXwUAAAAHVm90ZUFzdAIAAAABXwkAAaQAAAABBQAAAAtQb3Jwb3NhbF9JRAUAAAAEQVRWTwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIFAAAABnB1YmtleQIAAAABXwkAAaQAAAABBQAAAAtQb3Jwb3NhbF9JRAUAAAAYTGF0ZXN0VXNlckNvdW50Zm9yVm90aW5nCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAAOUXVvcnVtX1N0YXR1c18JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQCAAAABFBhc3MJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgIAAAAHbWVzc2FnZQUAAAADbXNnBQAAAANuaWwFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5olhAzw==", "height": 2534280, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6cp8saB11g67dp49fW27R4gBva5SeV4LxwBqK8kbwGM7 Next: 2yWDvu2q89GZkxDJoydYDbAucwZ2uuCBLscrP3Lte5YY Diff:
OldNewDifferences
3636 then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
3737 else if ((h.caller != c))
3838 then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it."))
39- else [StringEntry(("Proposal_Text_" + toString(t)), i), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), l), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), m), IntegerEntry(("Quorum_" + toString(t)), o), IntegerEntry(("Total_Votes_" + toString(t)), 0), IntegerEntry(("Total_No_" + toString(t)), 0), IntegerEntry(("Total_Yes_" + toString(t)), 0)]
39+ else [StringEntry(("Proposal_Text_" + toString(t)), i), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), l), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), m), IntegerEntry(("Quorum_" + toString(t)), o), IntegerEntry(("Total_Votes_" + toString(t)), 0), IntegerEntry(("Total_No_" + toString(t)), 0), IntegerEntry(("Total_Yes_" + toString(t)), 0), StringEntry(("Quorum_Status_" + toString(t)), "Fail")]
4040 }
4141
4242
4949 let p = toBase58String(h.caller.bytes)
5050 let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.")
5151 let x = getIntegerValue(this, ("Quorum_" + toString(u)))
52- let y = {
52+ let y = getIntegerValue(this, ("Total_No_" + toString(u)))
53+ let z = {
5354 let r = getInteger(this, ("Total_Votes_" + toString(u)))
5455 if ($isInstanceOf(r, "Int"))
5556 then {
5859 }
5960 else 0
6061 }
61- let z = (y + w)
62- let A = {
62+ let A = (z + w)
63+ let B = {
6364 let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
6465 if ($isInstanceOf(r, "Int"))
6566 then {
6869 }
6970 else 0
7071 }
71- let B = (A + w)
72- let C = {
72+ let C = (B + w)
73+ let D = {
7374 let r = getInteger(this, ((p + "_") + toString(u)))
7475 if ($isInstanceOf(r, "Int"))
7576 then {
7879 }
7980 else 0
8081 }
81- let D = (C + 1)
82+ let E = (D + 1)
8283 if ((l > lastBlock.timestamp))
8384 then throw((d + toString(l)))
8485 else if ((lastBlock.timestamp > m))
8586 then throw(g)
86- else if ((x > B))
87- then [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
88- else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Pass"), StringEntry("message", e)]
87+ else if ((x > A))
88+ then [IntegerEntry(("Total_Votes_" + toString(u)), A), IntegerEntry(((("Total_" + v) + "_") + toString(u)), C), IntegerEntry(((p + "_") + toString(u)), E), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
89+ else if ((A > x))
90+ then [IntegerEntry(("Total_Votes_" + toString(u)), A), IntegerEntry(((("Total_" + v) + "_") + toString(u)), C), IntegerEntry(((p + "_") + toString(u)), E), StringEntry(("Quorum_Status_" + toString(u)), "Pass"), StringEntry("message", e)]
91+ else nil
8992 }
9093
9194
92-
93-@Callable(h)
94-func No (u) = {
95- let v = "No"
96- let l = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
97- let m = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
98- let p = toBase58String(h.caller.bytes)
99- let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.")
100- let x = getIntegerValue(this, ("Quorum_" + toString(u)))
101- let y = {
102- let r = getInteger(this, ("Total_Votes_" + toString(u)))
103- if ($isInstanceOf(r, "Int"))
104- then {
105- let s = r
106- s
107- }
108- else 0
109- }
110- let z = (y + w)
111- let A = {
112- let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
113- if ($isInstanceOf(r, "Int"))
114- then {
115- let s = r
116- s
117- }
118- else 0
119- }
120- let B = (A + w)
121- let C = {
122- let r = getInteger(this, ((p + "_") + toString(u)))
123- if ($isInstanceOf(r, "Int"))
124- then {
125- let s = r
126- s
127- }
128- else 0
129- }
130- let D = (C + 1)
131- if ((l > lastBlock.timestamp))
132- then throw((d + toString(l)))
133- else if ((lastBlock.timestamp > m))
134- then throw(g)
135- else if ((x > B))
136- then [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
137- else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
138- }
139-
140-
141-@Verifier(E)
142-func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey)
95+@Verifier(F)
96+func G () = sigVerify(F.bodyBytes, F.proofs[0], F.senderPublicKey)
14397
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = addressFromStringValue("3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT")
55
66 let b = base58'515tSAyMUbAb8kKjcpGDpqALGfCgcwfWmWKKkcBKTcGB'
77
88 let c = addressFromPublicKey(b)
99
1010 let d = "Dapp will start Voting at Timestamp "
1111
1212 let e = "<h1>Your Vote Submitted Successfully!</h1><br>"
1313
1414 let f = "This Address Already participated for Voting in this Proposal."
1515
1616 let g = "Voting is Over for this Dapp."
1717
1818 @Callable(h)
1919 func SetVotingTimeStamps (i,j,k) = {
2020 let l = j
2121 let m = k
2222 let n = getIntegerValue(a, "Staked_Amount")
2323 let o = fraction(n, 1, 3)
2424 let p = toBase58String(h.caller.bytes)
2525 let q = {
2626 let r = getInteger(this, "Total_Proposals")
2727 if ($isInstanceOf(r, "Int"))
2828 then {
2929 let s = r
3030 s
3131 }
3232 else 0
3333 }
3434 let t = (q + 1)
3535 if ((size(i) > 5100))
3636 then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
3737 else if ((h.caller != c))
3838 then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it."))
39- else [StringEntry(("Proposal_Text_" + toString(t)), i), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), l), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), m), IntegerEntry(("Quorum_" + toString(t)), o), IntegerEntry(("Total_Votes_" + toString(t)), 0), IntegerEntry(("Total_No_" + toString(t)), 0), IntegerEntry(("Total_Yes_" + toString(t)), 0)]
39+ else [StringEntry(("Proposal_Text_" + toString(t)), i), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), l), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), m), IntegerEntry(("Quorum_" + toString(t)), o), IntegerEntry(("Total_Votes_" + toString(t)), 0), IntegerEntry(("Total_No_" + toString(t)), 0), IntegerEntry(("Total_Yes_" + toString(t)), 0), StringEntry(("Quorum_Status_" + toString(t)), "Fail")]
4040 }
4141
4242
4343
4444 @Callable(h)
4545 func Yes (u) = {
4646 let v = "Yes"
4747 let l = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
4848 let m = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
4949 let p = toBase58String(h.caller.bytes)
5050 let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.")
5151 let x = getIntegerValue(this, ("Quorum_" + toString(u)))
52- let y = {
52+ let y = getIntegerValue(this, ("Total_No_" + toString(u)))
53+ let z = {
5354 let r = getInteger(this, ("Total_Votes_" + toString(u)))
5455 if ($isInstanceOf(r, "Int"))
5556 then {
5657 let s = r
5758 s
5859 }
5960 else 0
6061 }
61- let z = (y + w)
62- let A = {
62+ let A = (z + w)
63+ let B = {
6364 let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
6465 if ($isInstanceOf(r, "Int"))
6566 then {
6667 let s = r
6768 s
6869 }
6970 else 0
7071 }
71- let B = (A + w)
72- let C = {
72+ let C = (B + w)
73+ let D = {
7374 let r = getInteger(this, ((p + "_") + toString(u)))
7475 if ($isInstanceOf(r, "Int"))
7576 then {
7677 let s = r
7778 s
7879 }
7980 else 0
8081 }
81- let D = (C + 1)
82+ let E = (D + 1)
8283 if ((l > lastBlock.timestamp))
8384 then throw((d + toString(l)))
8485 else if ((lastBlock.timestamp > m))
8586 then throw(g)
86- else if ((x > B))
87- then [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
88- else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Pass"), StringEntry("message", e)]
87+ else if ((x > A))
88+ then [IntegerEntry(("Total_Votes_" + toString(u)), A), IntegerEntry(((("Total_" + v) + "_") + toString(u)), C), IntegerEntry(((p + "_") + toString(u)), E), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
89+ else if ((A > x))
90+ then [IntegerEntry(("Total_Votes_" + toString(u)), A), IntegerEntry(((("Total_" + v) + "_") + toString(u)), C), IntegerEntry(((p + "_") + toString(u)), E), StringEntry(("Quorum_Status_" + toString(u)), "Pass"), StringEntry("message", e)]
91+ else nil
8992 }
9093
9194
92-
93-@Callable(h)
94-func No (u) = {
95- let v = "No"
96- let l = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u)))
97- let m = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u)))
98- let p = toBase58String(h.caller.bytes)
99- let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.")
100- let x = getIntegerValue(this, ("Quorum_" + toString(u)))
101- let y = {
102- let r = getInteger(this, ("Total_Votes_" + toString(u)))
103- if ($isInstanceOf(r, "Int"))
104- then {
105- let s = r
106- s
107- }
108- else 0
109- }
110- let z = (y + w)
111- let A = {
112- let r = getInteger(this, ((("Total_" + v) + "_") + toString(u)))
113- if ($isInstanceOf(r, "Int"))
114- then {
115- let s = r
116- s
117- }
118- else 0
119- }
120- let B = (A + w)
121- let C = {
122- let r = getInteger(this, ((p + "_") + toString(u)))
123- if ($isInstanceOf(r, "Int"))
124- then {
125- let s = r
126- s
127- }
128- else 0
129- }
130- let D = (C + 1)
131- if ((l > lastBlock.timestamp))
132- then throw((d + toString(l)))
133- else if ((lastBlock.timestamp > m))
134- then throw(g)
135- else if ((x > B))
136- then [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
137- else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry(("Quorum_Status_" + toString(u)), "Fail"), StringEntry("message", e)]
138- }
139-
140-
141-@Verifier(E)
142-func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey)
95+@Verifier(F)
96+func G () = sigVerify(F.bodyBytes, F.proofs[0], F.senderPublicKey)
14397

github/deemru/w8io/169f3d6 
47.38 ms