tx · H5rxLjrNfF82eXjrv4FpSaT5EnMa5XBhLnWfLQArFCNn 3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ: -0.01400000 Waves 2021.09.29 08:31 [1723814] smart account 3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ > SELF 0.00000000 Waves
{ "type": 13, "id": "H5rxLjrNfF82eXjrv4FpSaT5EnMa5XBhLnWfLQArFCNn", "fee": 1400000, "feeAssetId": null, "timestamp": 1632893485218, "version": 2, "chainId": 84, "sender": "3N17JMn4WESkhCSrcEwdADBZFAe8uiuvCGQ", "senderPublicKey": "BMLuSYJ8rvQD55waCoKpzCBhJAbY8s9pp4V5ZgxuzCBD", "proofs": [ "2CawMDRx7a931fFgdj6wqQAZVpuF4KNMdHW2uCUpiKjfHgLcFUDRcPhv7J2rnTgemxTL3CCKi8XH4Wf38up2RzHm" ], "script": "base64:AAIEAAAAAAAAAAoIAhIAEgASABIAAAAABQAAAAAKQTRBQXNzZXRJRAEAAAAg/sQa4d7v52kifRLo73ftXd9xD7wgh9JaaHT98W4IWDcAAAAADldlZWswVGltZXN0YW1wAAAAAXsihc/AAAAAAAhlYWNod2VlawAAAAAAJAyEAAAAAAAIZWFjaGhvdXIAAAAAAAA27oAAAAAACXBhdXNldGltZQAAAAAAANu6AAAAAAQAAAABaQEAAAAJQ2hhaW5saW5rAAAAAAQAAAAORmF2b3VyaXRlQXNzZXQCAAAACUNoYWlubGluawQAAAADcG10AwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAOVdlZWtseSBWb3RlIE5lZWQgMC4wMDAxIEE0QSBUb2tlbiBhcyBBdHRhY2hlZCBwYXltZW50WzFdLgQAAAAKY3VycmVudEtleQkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAABJjdXJyZW50cnVubmluZ3dl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pbnV0ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAICAAAAClRvdGFsX1R4bnMFAAAACXRvdGFsdHhucwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgIAAAATQ3VycmVudF9Wb3RpbmdfV2VlawUAAAASY3VycmVudHJ1bm5pbmd3ZWVrCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAADFRvdGFsX1ZvdGVzXwUAAAAORmF2b3VyaXRlQXNzZXQFAAAAD2Fzc2V0dG90YWx2b3RlcwkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAABFVc2VyX1RvdGFsX1ZvdGVzXwUAAAAKY3VycmVudEtleQUAAAAOdXNlcnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAF1VzZXJfVG90YWxfQXNzZXRfVm90ZXNfBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAA5GYXZvdXJpdGVBc3NldAUAAAAWdXNlcnRvdGFsdm90ZXNmb3Jhc3NldAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlAgAAACQ8aDE+WW91IFZvdGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4FAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5on+6xQ==", "height": 1723814, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2XdjN8S44VgohMiTrzCCXvFSko9em7zG6gCrbGDpyaAb Next: 4ecZtEY6aeuPUg4XHW88rvwc7C6cdYnCzAtcYQR9xQDk Diff:
Old | New | Differences | |
---|---|---|---|
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | let usertotalweeklyvotes = (fetchuserweeklyvotes + 1) | |
39 | + | let fetchuserweeklyvotesforasset = match getInteger(this, ((((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey) + "_") + FavouriteAsset)) { | |
40 | + | case a: Int => | |
41 | + | a | |
42 | + | case _ => | |
43 | + | 0 | |
44 | + | } | |
45 | + | let usertotalweeklyvotesforasset = (fetchuserweeklyvotesforasset + 1) | |
39 | 46 | let fetchuservotes = match getInteger(this, ("User_Total_Votes_" + currentKey)) { | |
40 | 47 | case a: Int => | |
41 | 48 | a | |
65 | 72 | then throw("Please Attach Exact 0.0001 A4A To Vote.") | |
66 | 73 | else if ((votingpausetime > lastBlock.timestamp)) | |
67 | 74 | then throw((("Voting is paused for Next " + toString(((votingpausetime - lastBlock.timestamp) / 60000))) + " Minutes")) | |
68 | - | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey), usertotalweeklyvotes), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
75 | + | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey), usertotalweeklyvotes), IntegerEntry(((((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey) + "_") + FavouriteAsset), usertotalweeklyvotesforasset), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
69 | 76 | } | |
70 | 77 | ||
71 | 78 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let A4AAssetID = base58'J9VzWPfRSQyCbEv5oWpxLSihigbpbJsGBHJZV9Ct8ook' | |
5 | 5 | ||
6 | 6 | let Week0Timestamp = 1628371800000 | |
7 | 7 | ||
8 | 8 | let eachweek = 604800000 | |
9 | 9 | ||
10 | 10 | let eachhour = 3600000 | |
11 | 11 | ||
12 | 12 | let pausetime = 14400000 | |
13 | 13 | ||
14 | 14 | @Callable(i) | |
15 | 15 | func Chainlink () = { | |
16 | 16 | let FavouriteAsset = "Chainlink" | |
17 | 17 | let pmt = if ((size(i.payments) == 1)) | |
18 | 18 | then i.payments[0] | |
19 | 19 | else throw("Weekly Vote Need 0.0001 A4A Token as Attached payment[1].") | |
20 | 20 | let currentKey = toBase58String(i.caller.bytes) | |
21 | 21 | let currentrunningweek = (((lastBlock.timestamp - Week0Timestamp) / eachweek) + 1) | |
22 | 22 | let TSUptoPastWeek = (Week0Timestamp + ((currentrunningweek - 1) * eachweek)) | |
23 | 23 | let votingpausetime = (TSUptoPastWeek + pausetime) | |
24 | 24 | let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID) | |
25 | 25 | let fetchtotaltxns = match getInteger(this, "Total_Txns") { | |
26 | 26 | case a: Int => | |
27 | 27 | a | |
28 | 28 | case _ => | |
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | let totaltxns = (fetchtotaltxns + 1) | |
32 | 32 | let fetchuserweeklyvotes = match getInteger(this, ((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey)) { | |
33 | 33 | case a: Int => | |
34 | 34 | a | |
35 | 35 | case _ => | |
36 | 36 | 0 | |
37 | 37 | } | |
38 | 38 | let usertotalweeklyvotes = (fetchuserweeklyvotes + 1) | |
39 | + | let fetchuserweeklyvotesforasset = match getInteger(this, ((((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey) + "_") + FavouriteAsset)) { | |
40 | + | case a: Int => | |
41 | + | a | |
42 | + | case _ => | |
43 | + | 0 | |
44 | + | } | |
45 | + | let usertotalweeklyvotesforasset = (fetchuserweeklyvotesforasset + 1) | |
39 | 46 | let fetchuservotes = match getInteger(this, ("User_Total_Votes_" + currentKey)) { | |
40 | 47 | case a: Int => | |
41 | 48 | a | |
42 | 49 | case _ => | |
43 | 50 | 0 | |
44 | 51 | } | |
45 | 52 | let usertotalvotes = (fetchuservotes + 1) | |
46 | 53 | let fetchuservotesforasset = match getInteger(this, ((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset)) { | |
47 | 54 | case a: Int => | |
48 | 55 | a | |
49 | 56 | case _ => | |
50 | 57 | 0 | |
51 | 58 | } | |
52 | 59 | let usertotalvotesforasset = (fetchuservotesforasset + 1) | |
53 | 60 | let fetchtotalvotes = match getInteger(this, ("Total_Votes_" + FavouriteAsset)) { | |
54 | 61 | case a: Int => | |
55 | 62 | a | |
56 | 63 | case _ => | |
57 | 64 | 0 | |
58 | 65 | } | |
59 | 66 | let assettotalvotes = (fetchtotalvotes + 1) | |
60 | 67 | if ((100000000 > checkassetbal)) | |
61 | 68 | then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.") | |
62 | 69 | else if ((pmt.assetId != A4AAssetID)) | |
63 | 70 | then throw((("Incorrect asset attached, please attach " + toBase58String(A4AAssetID)) + " AssetID Only.")) | |
64 | 71 | else if ((pmt.amount != 10000)) | |
65 | 72 | then throw("Please Attach Exact 0.0001 A4A To Vote.") | |
66 | 73 | else if ((votingpausetime > lastBlock.timestamp)) | |
67 | 74 | then throw((("Voting is paused for Next " + toString(((votingpausetime - lastBlock.timestamp) / 60000))) + " Minutes")) | |
68 | - | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey), usertotalweeklyvotes), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
75 | + | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey), usertotalweeklyvotes), IntegerEntry(((((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey) + "_") + FavouriteAsset), usertotalweeklyvotesforasset), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
69 | 76 | } | |
70 | 77 | ||
71 | 78 | ||
72 | 79 | ||
73 | 80 | @Callable(i) | |
74 | 81 | func Dent () = { | |
75 | 82 | let FavouriteAsset = "Dent" | |
76 | 83 | let pmt = if ((size(i.payments) == 1)) | |
77 | 84 | then i.payments[0] | |
78 | 85 | else throw("Weekly Vote Need 0.0001 A4A Token as Attached payment[1].") | |
79 | 86 | let currentKey = toBase58String(i.caller.bytes) | |
80 | 87 | let currentrunningweek = (((lastBlock.timestamp - Week0Timestamp) / eachweek) + 1) | |
81 | 88 | let TSUptoPastWeek = (Week0Timestamp + ((currentrunningweek - 1) * eachweek)) | |
82 | 89 | let votingpausetime = (TSUptoPastWeek + pausetime) | |
83 | 90 | let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID) | |
84 | 91 | let fetchtotaltxns = match getInteger(this, "Total_Txns") { | |
85 | 92 | case a: Int => | |
86 | 93 | a | |
87 | 94 | case _ => | |
88 | 95 | 0 | |
89 | 96 | } | |
90 | 97 | let totaltxns = (fetchtotaltxns + 1) | |
91 | 98 | let fetchuserweeklyvotes = match getInteger(this, ((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey)) { | |
92 | 99 | case a: Int => | |
93 | 100 | a | |
94 | 101 | case _ => | |
95 | 102 | 0 | |
96 | 103 | } | |
97 | 104 | let usertotalweeklyvotes = (fetchuserweeklyvotes + 1) | |
98 | 105 | let fetchuservotes = match getInteger(this, ("User_Total_Votes_" + currentKey)) { | |
99 | 106 | case a: Int => | |
100 | 107 | a | |
101 | 108 | case _ => | |
102 | 109 | 0 | |
103 | 110 | } | |
104 | 111 | let usertotalvotes = (fetchuservotes + 1) | |
105 | 112 | let fetchuservotesforasset = match getInteger(this, ((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset)) { | |
106 | 113 | case a: Int => | |
107 | 114 | a | |
108 | 115 | case _ => | |
109 | 116 | 0 | |
110 | 117 | } | |
111 | 118 | let usertotalvotesforasset = (fetchuservotesforasset + 1) | |
112 | 119 | let fetchtotalvotes = match getInteger(this, ("Total_Votes_" + FavouriteAsset)) { | |
113 | 120 | case a: Int => | |
114 | 121 | a | |
115 | 122 | case _ => | |
116 | 123 | 0 | |
117 | 124 | } | |
118 | 125 | let assettotalvotes = (fetchtotalvotes + 1) | |
119 | 126 | if ((100000000 > checkassetbal)) | |
120 | 127 | then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.") | |
121 | 128 | else if ((pmt.assetId != A4AAssetID)) | |
122 | 129 | then throw((("Incorrect asset attached, please attach " + toBase58String(A4AAssetID)) + " AssetID Only.")) | |
123 | 130 | else if ((pmt.amount != 10000)) | |
124 | 131 | then throw("Please Attach Exact 0.0001 A4A To Vote.") | |
125 | 132 | else if ((votingpausetime > lastBlock.timestamp)) | |
126 | 133 | then throw((("Voting is paused for Next " + toString(((votingpausetime - lastBlock.timestamp) / 60000))) + " Minutes")) | |
127 | 134 | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((toString(currentrunningweek) + "_User_Total_Votes_") + currentKey), usertotalweeklyvotes), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
128 | 135 | } | |
129 | 136 | ||
130 | 137 | ||
131 | 138 | ||
132 | 139 | @Callable(i) | |
133 | 140 | func Sushi () = { | |
134 | 141 | let FavouriteAsset = "Sushi" | |
135 | 142 | let pmt = if ((size(i.payments) == 1)) | |
136 | 143 | then i.payments[0] | |
137 | 144 | else throw("Weekly Vote Need 0.0001 A4A Token as Attached payment[1].") | |
138 | 145 | let currentKey = toBase58String(i.caller.bytes) | |
139 | 146 | let currentrunningweek = (((lastBlock.timestamp - Week0Timestamp) / eachweek) + 1) | |
140 | 147 | let TSUptoPastWeek = (Week0Timestamp + ((currentrunningweek - 1) * eachweek)) | |
141 | 148 | let votingpausetime = (TSUptoPastWeek + pausetime) | |
142 | 149 | let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID) | |
143 | 150 | let fetchtotaltxns = match getInteger(this, "Total_Txns") { | |
144 | 151 | case a: Int => | |
145 | 152 | a | |
146 | 153 | case _ => | |
147 | 154 | 0 | |
148 | 155 | } | |
149 | 156 | let totaltxns = (fetchtotaltxns + 1) | |
150 | 157 | let fetchuservotes = match getInteger(this, ("User_Total_Votes_" + currentKey)) { | |
151 | 158 | case a: Int => | |
152 | 159 | a | |
153 | 160 | case _ => | |
154 | 161 | 0 | |
155 | 162 | } | |
156 | 163 | let usertotalvotes = (fetchuservotes + 1) | |
157 | 164 | let fetchuservotesforasset = match getInteger(this, ((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset)) { | |
158 | 165 | case a: Int => | |
159 | 166 | a | |
160 | 167 | case _ => | |
161 | 168 | 0 | |
162 | 169 | } | |
163 | 170 | let usertotalvotesforasset = (fetchuservotesforasset + 1) | |
164 | 171 | let fetchtotalvotes = match getInteger(this, ("Total_Votes_" + FavouriteAsset)) { | |
165 | 172 | case a: Int => | |
166 | 173 | a | |
167 | 174 | case _ => | |
168 | 175 | 0 | |
169 | 176 | } | |
170 | 177 | let assettotalvotes = (fetchtotalvotes + 1) | |
171 | 178 | if ((100000000 > checkassetbal)) | |
172 | 179 | then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.") | |
173 | 180 | else if ((pmt.assetId != A4AAssetID)) | |
174 | 181 | then throw((("Incorrect asset attached, please attach " + toBase58String(A4AAssetID)) + " AssetID Only.")) | |
175 | 182 | else if ((pmt.amount != 10000)) | |
176 | 183 | then throw("Please Attach Exact 0.0001 A4A To Vote.") | |
177 | 184 | else if ((votingpausetime > lastBlock.timestamp)) | |
178 | 185 | then throw((("Voting is paused for Next " + toString(((votingpausetime - lastBlock.timestamp) / 60000))) + " Minutes")) | |
179 | 186 | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
180 | 187 | } | |
181 | 188 | ||
182 | 189 | ||
183 | 190 | ||
184 | 191 | @Callable(i) | |
185 | 192 | func Compound () = { | |
186 | 193 | let FavouriteAsset = "Compound" | |
187 | 194 | let pmt = if ((size(i.payments) == 1)) | |
188 | 195 | then i.payments[0] | |
189 | 196 | else throw("Weekly Vote Need 0.0001 A4A Token as Attached payment[1].") | |
190 | 197 | let currentKey = toBase58String(i.caller.bytes) | |
191 | 198 | let currentrunningweek = (((lastBlock.timestamp - Week0Timestamp) / eachweek) + 1) | |
192 | 199 | let TSUptoPastWeek = (Week0Timestamp + ((currentrunningweek - 1) * eachweek)) | |
193 | 200 | let votingpausetime = (TSUptoPastWeek + pausetime) | |
194 | 201 | let checkassetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), A4AAssetID) | |
195 | 202 | let fetchtotaltxns = match getInteger(this, "Total_Txns") { | |
196 | 203 | case a: Int => | |
197 | 204 | a | |
198 | 205 | case _ => | |
199 | 206 | 0 | |
200 | 207 | } | |
201 | 208 | let totaltxns = (fetchtotaltxns + 1) | |
202 | 209 | let fetchuservotes = match getInteger(this, ("User_Total_Votes_" + currentKey)) { | |
203 | 210 | case a: Int => | |
204 | 211 | a | |
205 | 212 | case _ => | |
206 | 213 | 0 | |
207 | 214 | } | |
208 | 215 | let usertotalvotes = (fetchuservotes + 1) | |
209 | 216 | let fetchuservotesforasset = match getInteger(this, ((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset)) { | |
210 | 217 | case a: Int => | |
211 | 218 | a | |
212 | 219 | case _ => | |
213 | 220 | 0 | |
214 | 221 | } | |
215 | 222 | let usertotalvotesforasset = (fetchuservotesforasset + 1) | |
216 | 223 | let fetchtotalvotes = match getInteger(this, ("Total_Votes_" + FavouriteAsset)) { | |
217 | 224 | case a: Int => | |
218 | 225 | a | |
219 | 226 | case _ => | |
220 | 227 | 0 | |
221 | 228 | } | |
222 | 229 | let assettotalvotes = (fetchtotalvotes + 1) | |
223 | 230 | if ((100000000 > checkassetbal)) | |
224 | 231 | then throw("Minimum 1 A4A is required on Your Address to Vote. Please Mint or hold minimum 1 A4A on this Address.") | |
225 | 232 | else if ((pmt.assetId != A4AAssetID)) | |
226 | 233 | then throw((("Incorrect asset attached, please attach " + toBase58String(A4AAssetID)) + " AssetID Only.")) | |
227 | 234 | else if ((pmt.amount != 10000)) | |
228 | 235 | then throw("Please Attach Exact 0.0001 A4A To Vote.") | |
229 | 236 | else if ((votingpausetime > lastBlock.timestamp)) | |
230 | 237 | then throw((("Voting is paused for Next " + toString(((votingpausetime - lastBlock.timestamp) / 60000))) + " Minutes")) | |
231 | 238 | else [IntegerEntry("Total_Txns", totaltxns), IntegerEntry("Current_Voting_Week", currentrunningweek), IntegerEntry(("Total_Votes_" + FavouriteAsset), assettotalvotes), IntegerEntry(("User_Total_Votes_" + currentKey), usertotalvotes), IntegerEntry(((("User_Total_Asset_Votes_" + currentKey) + "_") + FavouriteAsset), usertotalvotesforasset), StringEntry("message", "<h1>You Voted Successfully!</h1><br>")] | |
232 | 239 | } | |
233 | 240 | ||
234 | 241 | ||
235 | 242 | @Verifier(tx) | |
236 | 243 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
237 | 244 |
github/deemru/w8io/026f985 51.03 ms ◑