tx · 6cp8saB11g67dp49fW27R4gBva5SeV4LxwBqK8kbwGM7 3N8dYK8BQhY7z1yKFRFhdw4m9b4JjsNQJVd: -0.01400000 Waves 2023.04.14 15:10 [2534191] smart account 3N8dYK8BQhY7z1yKFRFhdw4m9b4JjsNQJVd > SELF 0.00000000 Waves
{ "type": 13, "id": "6cp8saB11g67dp49fW27R4gBva5SeV4LxwBqK8kbwGM7", "fee": 1400000, "feeAssetId": null, "timestamp": 1681474247303, "version": 2, "chainId": 84, "sender": "3N8dYK8BQhY7z1yKFRFhdw4m9b4JjsNQJVd", "senderPublicKey": "AK6rRKpHobxNveEtJE5BBXbdwm9BpGL7ewP9Xb6VYuHx", "proofs": [ "5Qs1STup2jXWV4poX3FRPoeRZJwktEHXUjNKT6kEFJZreZQrRpTkTe8ug3f4c255YBMted548c36wJZSpki6Jha" ], "script": "base64:AAIEAAAAAAAAABMIAhIFCgMIAQESAwoBARIDCgEBAAAABwAAAAAOQTRBU3Rha2luZ0RBcHAJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNONm9XTHlRWTJnTTdRVWtVdkJtZTFSRW5BNmQxVjd5M0FUAAAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AQAAACA7dEXxvlA55FKxmI42AI6/6uJD1h8gECoNXRixDQRDDAAAAAASY29udHJvbGxlcl9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAxsYXVuY2hfZXJyb3ICAAAAJERhcHAgd2lsbCBzdGFydCBWb3RpbmcgYXQgVGltZXN0YW1wIAAAAAADbXNnAgAAAC48aDE+WW91ciBWb3RlIFN1Ym1pdHRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+AAAAABFBbHJlYWR5Vm90ZWRFcnJvcgIAAAA+VGhpcyBBZGRyZXNzIEFscmVhZHkgc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AAAAZwdWJrZXkCAAAAAV8JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQFAAAAGExhdGVzdFVzZXJDb3VudGZvclZvdGluZwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAADlF1b3J1bV9TdGF0dXNfCQABpAAAAAEFAAAAC1BvcnBvc2FsX0lEAgAAAARGYWlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAAB21lc3NhZ2UFAAAAA21zZwUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnPDDlD", "height": 2534191, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9GUG1i1ArZyxxWj8skFjXRX3p3dmBVQvsXUByyhPEeVd Next: E2GuSsvnQQECUi5VpB4WpnjzFGZ2sFpHMEGiXNPERBvR Diff:
Old | New | Differences | |
---|---|---|---|
97 | 97 | let m = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
98 | 98 | let p = toBase58String(h.caller.bytes) | |
99 | 99 | let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.") | |
100 | + | let x = getIntegerValue(this, ("Quorum_" + toString(u))) | |
100 | 101 | let y = { | |
101 | 102 | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
102 | 103 | if ($isInstanceOf(r, "Int")) | |
131 | 132 | then throw((d + toString(l))) | |
132 | 133 | else if ((lastBlock.timestamp > m)) | |
133 | 134 | then throw(g) | |
134 | - | else if (( | |
135 | - | then | |
136 | - | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry("message", e)] | |
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)] | |
137 | 138 | } | |
138 | 139 | ||
139 | 140 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = addressFromStringValue("3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT") | |
5 | 5 | ||
6 | 6 | let b = base58'515tSAyMUbAb8kKjcpGDpqALGfCgcwfWmWKKkcBKTcGB' | |
7 | 7 | ||
8 | 8 | let c = addressFromPublicKey(b) | |
9 | 9 | ||
10 | 10 | let d = "Dapp will start Voting at Timestamp " | |
11 | 11 | ||
12 | 12 | let e = "<h1>Your Vote Submitted Successfully!</h1><br>" | |
13 | 13 | ||
14 | 14 | let f = "This Address Already participated for Voting in this Proposal." | |
15 | 15 | ||
16 | 16 | let g = "Voting is Over for this Dapp." | |
17 | 17 | ||
18 | 18 | @Callable(h) | |
19 | 19 | func SetVotingTimeStamps (i,j,k) = { | |
20 | 20 | let l = j | |
21 | 21 | let m = k | |
22 | 22 | let n = getIntegerValue(a, "Staked_Amount") | |
23 | 23 | let o = fraction(n, 1, 3) | |
24 | 24 | let p = toBase58String(h.caller.bytes) | |
25 | 25 | let q = { | |
26 | 26 | let r = getInteger(this, "Total_Proposals") | |
27 | 27 | if ($isInstanceOf(r, "Int")) | |
28 | 28 | then { | |
29 | 29 | let s = r | |
30 | 30 | s | |
31 | 31 | } | |
32 | 32 | else 0 | |
33 | 33 | } | |
34 | 34 | let t = (q + 1) | |
35 | 35 | if ((size(i) > 5100)) | |
36 | 36 | then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.") | |
37 | 37 | else if ((h.caller != c)) | |
38 | 38 | then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it.")) | |
39 | 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)] | |
40 | 40 | } | |
41 | 41 | ||
42 | 42 | ||
43 | 43 | ||
44 | 44 | @Callable(h) | |
45 | 45 | func Yes (u) = { | |
46 | 46 | let v = "Yes" | |
47 | 47 | let l = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
48 | 48 | let m = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
49 | 49 | let p = toBase58String(h.caller.bytes) | |
50 | 50 | let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.") | |
51 | 51 | let x = getIntegerValue(this, ("Quorum_" + toString(u))) | |
52 | 52 | let y = { | |
53 | 53 | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
54 | 54 | if ($isInstanceOf(r, "Int")) | |
55 | 55 | then { | |
56 | 56 | let s = r | |
57 | 57 | s | |
58 | 58 | } | |
59 | 59 | else 0 | |
60 | 60 | } | |
61 | 61 | let z = (y + w) | |
62 | 62 | let A = { | |
63 | 63 | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
64 | 64 | if ($isInstanceOf(r, "Int")) | |
65 | 65 | then { | |
66 | 66 | let s = r | |
67 | 67 | s | |
68 | 68 | } | |
69 | 69 | else 0 | |
70 | 70 | } | |
71 | 71 | let B = (A + w) | |
72 | 72 | let C = { | |
73 | 73 | let r = getInteger(this, ((p + "_") + toString(u))) | |
74 | 74 | if ($isInstanceOf(r, "Int")) | |
75 | 75 | then { | |
76 | 76 | let s = r | |
77 | 77 | s | |
78 | 78 | } | |
79 | 79 | else 0 | |
80 | 80 | } | |
81 | 81 | let D = (C + 1) | |
82 | 82 | if ((l > lastBlock.timestamp)) | |
83 | 83 | then throw((d + toString(l))) | |
84 | 84 | else if ((lastBlock.timestamp > m)) | |
85 | 85 | then throw(g) | |
86 | 86 | else if ((x > B)) | |
87 | 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 | 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)] | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(h) | |
94 | 94 | func No (u) = { | |
95 | 95 | let v = "No" | |
96 | 96 | let l = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
97 | 97 | let m = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
98 | 98 | let p = toBase58String(h.caller.bytes) | |
99 | 99 | let w = valueOrErrorMessage(getInteger(a, ("Deposit_Amount_Of_" + p)), "Address not found in A4A Staking.") | |
100 | + | let x = getIntegerValue(this, ("Quorum_" + toString(u))) | |
100 | 101 | let y = { | |
101 | 102 | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
102 | 103 | if ($isInstanceOf(r, "Int")) | |
103 | 104 | then { | |
104 | 105 | let s = r | |
105 | 106 | s | |
106 | 107 | } | |
107 | 108 | else 0 | |
108 | 109 | } | |
109 | 110 | let z = (y + w) | |
110 | 111 | let A = { | |
111 | 112 | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
112 | 113 | if ($isInstanceOf(r, "Int")) | |
113 | 114 | then { | |
114 | 115 | let s = r | |
115 | 116 | s | |
116 | 117 | } | |
117 | 118 | else 0 | |
118 | 119 | } | |
119 | 120 | let B = (A + w) | |
120 | 121 | let C = { | |
121 | 122 | let r = getInteger(this, ((p + "_") + toString(u))) | |
122 | 123 | if ($isInstanceOf(r, "Int")) | |
123 | 124 | then { | |
124 | 125 | let s = r | |
125 | 126 | s | |
126 | 127 | } | |
127 | 128 | else 0 | |
128 | 129 | } | |
129 | 130 | let D = (C + 1) | |
130 | 131 | if ((l > lastBlock.timestamp)) | |
131 | 132 | then throw((d + toString(l))) | |
132 | 133 | else if ((lastBlock.timestamp > m)) | |
133 | 134 | then throw(g) | |
134 | - | else if (( | |
135 | - | then | |
136 | - | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), IntegerEntry(((p + "_") + toString(u)), D), StringEntry("message", e)] | |
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)] | |
137 | 138 | } | |
138 | 139 | ||
139 | 140 | ||
140 | 141 | @Verifier(E) | |
141 | 142 | func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) | |
142 | 143 |
github/deemru/w8io/169f3d6 35.22 ms ◑