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