tx · 6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT: -0.01400000 Waves 2023.04.06 13:40 [2522594] smart account 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT > SELF 0.00000000 Waves
{ "type": 13, "id": "6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb", "fee": 1400000, "feeAssetId": null, "timestamp": 1680777674636, "version": 2, "chainId": 84, "sender": "3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT", "senderPublicKey": "86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb", "proofs": [ "2XAhzkhYGW34wVsUboJ1faQWYDhWUDPYmbzVxb4CK7pmgicgAdAFP2Cu2QZBJKBaMVkSkjED6NB3R7a1tqLNozRs" ], "script": "base64:AAIEAAAAAAAAAB0IAhIFCgMIAQESAwoBARIDCgEBEgMKAQESAwoBCAAAAAkAAAAABFZPVEUBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkAAAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AQAAACAbvUu+h+2As3kugOhMQC3bvgebie3kDmlbUlrvLFQPbQAAAAASY29udHJvbGxlcl9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAxsYXVuY2hfZXJyb3ICAAAAJERhcHAgd2lsbCBzdGFydCBWb3RpbmcgYXQgVGltZXN0YW1wIAAAAAADbXNnAgAAAC48aDE+WW91ciBWb3RlIFN1Ym1pdHRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+AAAAAAlweW10ZXJyb3ICAAAANURBcHAgTmVlZCAwLjAwMDAwMDAxIFZPVEUgVG9rZW4gYXMgQXR0YWNoIHBheW1lbnRbMV0uAAAA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dhc3NldElkBQAAAARWT1RFCQAAAgAAAAEFAAAACGFzc2V0ZXJyAwkAAGYAAAACCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAUAAAAFRW5kVFMJAAACAAAAAQUAAAAHdm90ZUVycgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxUb3RhbF9Wb3Rlc18JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQFAAAACnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABlRvdGFsXwUAAAAHVm90ZUFzdAIAAAABXwkAAaQAAAABBQAAAAtQb3Jwb3NhbF9JRAUAAAAEQVRWTwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlBQAAAANtc2cFAAAAA25pbAAAAAFpAQAAAAlEZWxldGVLZXkAAAABAAAAA0tleQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANLZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5wJ3I3g==", "height": 2522594, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: wD2p5ZBm8gnseXiTBiGBtcPvVg2qN6WWqcXMzhYqPZV Next: HVorMwhDZHkQKKnP24ugFM6dngYt6SUmmnYn2YjTFLYq Diff:
Old | New | Differences | |
---|---|---|---|
38 | 38 | then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.") | |
39 | 39 | else if ((j.caller != c)) | |
40 | 40 | then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it.")) | |
41 | - | else [StringEntry(("Proposal_ | |
41 | + | else [StringEntry(("Proposal_Text_" + toString(t)), k), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), n), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), o)] | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(j) | |
90 | - | func DeleteKey (C) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(C)] | |
90 | + | func No (u) = { | |
91 | + | let v = "No" | |
92 | + | let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
93 | + | let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
94 | + | let p = toBase58String(j.caller.bytes) | |
95 | + | let w = if ((size(j.payments) == 1)) | |
96 | + | then j.payments[0] | |
97 | + | else throw(f) | |
98 | + | let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a) | |
99 | + | let y = { | |
100 | + | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
101 | + | if ($isInstanceOf(r, "Int")) | |
102 | + | then { | |
103 | + | let s = r | |
104 | + | s | |
105 | + | } | |
106 | + | else 0 | |
107 | + | } | |
108 | + | let z = (y + w.amount) | |
109 | + | let A = { | |
110 | + | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
111 | + | if ($isInstanceOf(r, "Int")) | |
112 | + | then { | |
113 | + | let s = r | |
114 | + | s | |
115 | + | } | |
116 | + | else 0 | |
117 | + | } | |
118 | + | let B = (A + w.amount) | |
119 | + | if ((n > lastBlock.timestamp)) | |
120 | + | then throw((d + toString(n))) | |
121 | + | else if ((1 > x)) | |
122 | + | then throw(g) | |
123 | + | else if ((w.assetId != a)) | |
124 | + | then throw(h) | |
125 | + | else if ((lastBlock.timestamp > o)) | |
126 | + | then throw(i) | |
127 | + | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)] | |
128 | + | } | |
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | @Callable(j) | |
133 | + | func Abstain (u) = { | |
134 | + | let v = "Abstain" | |
135 | + | let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
136 | + | let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
137 | + | let p = toBase58String(j.caller.bytes) | |
138 | + | let w = if ((size(j.payments) == 1)) | |
139 | + | then j.payments[0] | |
140 | + | else throw(f) | |
141 | + | let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a) | |
142 | + | let y = { | |
143 | + | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
144 | + | if ($isInstanceOf(r, "Int")) | |
145 | + | then { | |
146 | + | let s = r | |
147 | + | s | |
148 | + | } | |
149 | + | else 0 | |
150 | + | } | |
151 | + | let z = (y + w.amount) | |
152 | + | let A = { | |
153 | + | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
154 | + | if ($isInstanceOf(r, "Int")) | |
155 | + | then { | |
156 | + | let s = r | |
157 | + | s | |
158 | + | } | |
159 | + | else 0 | |
160 | + | } | |
161 | + | let B = (A + w.amount) | |
162 | + | if ((n > lastBlock.timestamp)) | |
163 | + | then throw((d + toString(n))) | |
164 | + | else if ((1 > x)) | |
165 | + | then throw(g) | |
166 | + | else if ((w.assetId != a)) | |
167 | + | then throw(h) | |
168 | + | else if ((lastBlock.timestamp > o)) | |
169 | + | then throw(i) | |
170 | + | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)] | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | ||
175 | + | @Callable(j) | |
176 | + | func DeleteKey (C) = [DeleteEntry(C)] | |
91 | 177 | ||
92 | 178 | ||
93 | 179 | @Verifier(D) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
5 | 5 | ||
6 | 6 | let b = base58'2sHRUrJCMpDhAQEcN7Zhk3LqnD9zizebpxeQXpPoscQU' | |
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 = "DApp Need 0.00000001 VOTE Token as Attach payment[1]." | |
15 | 15 | ||
16 | 16 | let g = "Min. 0.00000001 VOTE required on Your Address to Vote. Please Mint or hold min. 0.00000001 VOTE on this Address." | |
17 | 17 | ||
18 | 18 | let h = (("Incorrect asset attach, please attach " + toBase58String(a)) + " AssetID Only.") | |
19 | 19 | ||
20 | 20 | let i = "Voting is Over for this Dapp." | |
21 | 21 | ||
22 | 22 | @Callable(j) | |
23 | 23 | func SetVotingTimeStamps (k,l,m) = { | |
24 | 24 | let n = l | |
25 | 25 | let o = m | |
26 | 26 | let p = toBase58String(j.caller.bytes) | |
27 | 27 | let q = { | |
28 | 28 | let r = getInteger(this, "Total_Proposals") | |
29 | 29 | if ($isInstanceOf(r, "Int")) | |
30 | 30 | then { | |
31 | 31 | let s = r | |
32 | 32 | s | |
33 | 33 | } | |
34 | 34 | else 0 | |
35 | 35 | } | |
36 | 36 | let t = (q + 1) | |
37 | 37 | if ((size(k) > 5100)) | |
38 | 38 | then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.") | |
39 | 39 | else if ((j.caller != c)) | |
40 | 40 | then throw((("This Address is not Authorized. Only " + toString(c)) + " is Authorized Address to Sign it.")) | |
41 | - | else [StringEntry(("Proposal_ | |
41 | + | else [StringEntry(("Proposal_Text_" + toString(t)), k), IntegerEntry("Total_Proposals", t), StringEntry(("Proposer_" + toString(t)), p), IntegerEntry(("Voting_Start_TimeStamp_" + toString(t)), n), IntegerEntry(("Voting_End_TimeStamp_" + toString(t)), o)] | |
42 | 42 | } | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | ||
46 | 46 | @Callable(j) | |
47 | 47 | func Yes (u) = { | |
48 | 48 | let v = "Yes" | |
49 | 49 | let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
50 | 50 | let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
51 | 51 | let p = toBase58String(j.caller.bytes) | |
52 | 52 | let w = if ((size(j.payments) == 1)) | |
53 | 53 | then j.payments[0] | |
54 | 54 | else throw(f) | |
55 | 55 | let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a) | |
56 | 56 | let y = { | |
57 | 57 | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
58 | 58 | if ($isInstanceOf(r, "Int")) | |
59 | 59 | then { | |
60 | 60 | let s = r | |
61 | 61 | s | |
62 | 62 | } | |
63 | 63 | else 0 | |
64 | 64 | } | |
65 | 65 | let z = (y + w.amount) | |
66 | 66 | let A = { | |
67 | 67 | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
68 | 68 | if ($isInstanceOf(r, "Int")) | |
69 | 69 | then { | |
70 | 70 | let s = r | |
71 | 71 | s | |
72 | 72 | } | |
73 | 73 | else 0 | |
74 | 74 | } | |
75 | 75 | let B = (A + w.amount) | |
76 | 76 | if ((n > lastBlock.timestamp)) | |
77 | 77 | then throw((d + toString(n))) | |
78 | 78 | else if ((1 > x)) | |
79 | 79 | then throw(g) | |
80 | 80 | else if ((w.assetId != a)) | |
81 | 81 | then throw(h) | |
82 | 82 | else if ((lastBlock.timestamp > o)) | |
83 | 83 | then throw(i) | |
84 | 84 | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)] | |
85 | 85 | } | |
86 | 86 | ||
87 | 87 | ||
88 | 88 | ||
89 | 89 | @Callable(j) | |
90 | - | func DeleteKey (C) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(C)] | |
90 | + | func No (u) = { | |
91 | + | let v = "No" | |
92 | + | let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
93 | + | let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
94 | + | let p = toBase58String(j.caller.bytes) | |
95 | + | let w = if ((size(j.payments) == 1)) | |
96 | + | then j.payments[0] | |
97 | + | else throw(f) | |
98 | + | let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a) | |
99 | + | let y = { | |
100 | + | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
101 | + | if ($isInstanceOf(r, "Int")) | |
102 | + | then { | |
103 | + | let s = r | |
104 | + | s | |
105 | + | } | |
106 | + | else 0 | |
107 | + | } | |
108 | + | let z = (y + w.amount) | |
109 | + | let A = { | |
110 | + | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
111 | + | if ($isInstanceOf(r, "Int")) | |
112 | + | then { | |
113 | + | let s = r | |
114 | + | s | |
115 | + | } | |
116 | + | else 0 | |
117 | + | } | |
118 | + | let B = (A + w.amount) | |
119 | + | if ((n > lastBlock.timestamp)) | |
120 | + | then throw((d + toString(n))) | |
121 | + | else if ((1 > x)) | |
122 | + | then throw(g) | |
123 | + | else if ((w.assetId != a)) | |
124 | + | then throw(h) | |
125 | + | else if ((lastBlock.timestamp > o)) | |
126 | + | then throw(i) | |
127 | + | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)] | |
128 | + | } | |
129 | + | ||
130 | + | ||
131 | + | ||
132 | + | @Callable(j) | |
133 | + | func Abstain (u) = { | |
134 | + | let v = "Abstain" | |
135 | + | let n = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(u))) | |
136 | + | let o = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(u))) | |
137 | + | let p = toBase58String(j.caller.bytes) | |
138 | + | let w = if ((size(j.payments) == 1)) | |
139 | + | then j.payments[0] | |
140 | + | else throw(f) | |
141 | + | let x = assetBalance(addressFromPublicKey(j.callerPublicKey), a) | |
142 | + | let y = { | |
143 | + | let r = getInteger(this, ("Total_Votes_" + toString(u))) | |
144 | + | if ($isInstanceOf(r, "Int")) | |
145 | + | then { | |
146 | + | let s = r | |
147 | + | s | |
148 | + | } | |
149 | + | else 0 | |
150 | + | } | |
151 | + | let z = (y + w.amount) | |
152 | + | let A = { | |
153 | + | let r = getInteger(this, ((("Total_" + v) + "_") + toString(u))) | |
154 | + | if ($isInstanceOf(r, "Int")) | |
155 | + | then { | |
156 | + | let s = r | |
157 | + | s | |
158 | + | } | |
159 | + | else 0 | |
160 | + | } | |
161 | + | let B = (A + w.amount) | |
162 | + | if ((n > lastBlock.timestamp)) | |
163 | + | then throw((d + toString(n))) | |
164 | + | else if ((1 > x)) | |
165 | + | then throw(g) | |
166 | + | else if ((w.assetId != a)) | |
167 | + | then throw(h) | |
168 | + | else if ((lastBlock.timestamp > o)) | |
169 | + | then throw(i) | |
170 | + | else [IntegerEntry(("Total_Votes_" + toString(u)), z), IntegerEntry(((("Total_" + v) + "_") + toString(u)), B), StringEntry("message", e)] | |
171 | + | } | |
172 | + | ||
173 | + | ||
174 | + | ||
175 | + | @Callable(j) | |
176 | + | func DeleteKey (C) = [DeleteEntry(C)] | |
91 | 177 | ||
92 | 178 | ||
93 | 179 | @Verifier(D) | |
94 | 180 | func E () = sigVerify(D.bodyBytes, D.proofs[0], D.senderPublicKey) | |
95 | 181 |
github/deemru/w8io/169f3d6 34.94 ms ◑