tx · 7Aq7YAn6AevxDSbPRVDsmtHgjZrFdhAb91AyJFPRiodJ 3MshLEZwkjz17HtsouWjFBXrXkPBVBHD7gm: -0.01200000 Waves 2022.07.08 14:15 [2130655] smart account 3MshLEZwkjz17HtsouWjFBXrXkPBVBHD7gm > SELF 0.00000000 Waves
{ "type": 13, "id": "7Aq7YAn6AevxDSbPRVDsmtHgjZrFdhAb91AyJFPRiodJ", "fee": 1200000, "feeAssetId": null, "timestamp": 1657279033336, "version": 2, "chainId": 84, "sender": "3MshLEZwkjz17HtsouWjFBXrXkPBVBHD7gm", "senderPublicKey": "CAYySFNuYSLU5jGWNBottZuyHbvGh2JxucGYSXF3aEi8", "proofs": [ "4kw8wLcfw4tCAb8GgSDsMc3g8NKjSNfsE8vzcPypFFoSCj7jrT9eZ2b6JTt5ked4CuU8RMjyZ8CjW6h7Tqk4q1JY" ], "script": "base64:AAIFAAAAAAAAACUIAhIDCgEIEgUKAwgIARIDCgEIEgASBAoCCAESAwoBCBIDCgEIAAAAGAAAAAAHdG9rZW5JZAEAAAAFZP9n63sAAAAACm11bHRpcGxpZXIAAAAAAAAAAAoAAAAAD2Ftb3VudEdldFRva2VucwAAAAAAAA9CQAAAAAAJc2VwYXJhdG9yAgAAAAFfAQAAAA9nZXRXaGl0ZUxpc3RLZXkAAAABAAAABGFkZHIJAAS5AAAAAgkABEwAAAACAgAAAAJ3bAkABEwAAAACBQAAAARhZGRyBQAAAANuaWwFAAAACXNlcGFyYXRvcgEAAAARZ2V0V2hpdGVMaXN0VmFsdWUAAAABAAAABGFkZHIJAQAAABFAZXh0ck5hdGl2ZSgxMDUxKQAAAAIFAAAABHRoaXMJAQAAAA9nZXRXaGl0ZUxpc3RLZXkAAAABBQAAAARhZGRyAQAAAA9nZXRCbGFja0xpc3RLZXkAAAABAAAABGFkZHIJAAS5AAAAAgkABEwAAAACAgAAAAJibAkABEwAAAACBQAAAARhZGRyBQAAAANuaWwFAAAACXNlcGFyYXRvcgEAAAARZ2V0Qmx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QAAAAIJAQAAAA5nZXRJdGVtU29sZEtleQAAAAEFAAAABml0ZW1JZAkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAA25pbAkAAAIAAAABAgAAABVXcm9uZyBwYXltZW50IGFzc2V0SWQJAAACAAAAAQIAAAAVQ2FsbGVyIGZyb20gYmxhY2tMaXN0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAADZHR4BQAAAAckbWF0Y2gwAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQkABBMAAAACCAUAAAADZHR4AAAABGRhdGECAAAABWFkbWluCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAAVhZG1pbgcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANtdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAABWFkbWluCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVtqY/c=", "height": 2130655, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9J2hPenVVshpSzUZ7Mu7edo5hzSPBmViYPZb5K5WRVxV Next: 77M4F3xd1aaD4vU7BA9neS5Cvu94uYyHSjVKwMeD3m65 Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let tokenId = base58'CPtoken' | |
5 | 5 | ||
6 | 6 | let multiplier = 10 | |
7 | 7 | ||
8 | 8 | let amountGetTokens = 1000000 | |
9 | 9 | ||
10 | 10 | let separator = "_" | |
11 | 11 | ||
12 | 12 | func getWhiteListKey (addr) = makeString(["wl", addr], separator) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func getWhiteListValue (addr) = getBooleanValue(this, getWhiteListKey(addr)) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func getBlackListKey (addr) = makeString(["bl", addr], separator) | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func getBlackListValue (addr) = valueOrElse(getBoolean(this, getBlackListKey(addr)), false) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | func getTicketKey (addr) = makeString(["ticket", addr], separator) | |
25 | 25 | ||
26 | 26 | ||
27 | 27 | func getTicketValue (addr) = getBinaryValue(this, getTicketKey(addr)) | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func getItemPriceKey (itemId) = makeString(["item", itemId], separator) | |
31 | 31 | ||
32 | 32 | ||
33 | 33 | func getItemPriceValue (itemId) = getIntegerValue(this, getItemPriceKey(itemId)) | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func getVotingDetailsKey (votingId) = makeString(["votingDetails", votingId], separator) | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | func getItemSoldKey (itemId) = makeString(["sold", "item", itemId], separator) | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getVotingEndKey (votingId) = makeString(["votingEnd", votingId], separator) | |
43 | 43 | ||
44 | 44 | ||
45 | 45 | func getVotingEndValue (votingId) = getIntegerValue(this, getVotingEndKey(votingId)) | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func getVotingVariantKey (votingId,variant) = makeString(["votingId", votingId, "variant", toString(variant)], separator) | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | func getVotingVariantValue (votingId,variant) = getIntegerValue(this, getVotingVariantKey(votingId, variant)) | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getVoterKey (votingId,voterAddr) = makeString(["votingId", votingId, voterAddr], separator) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func isAdmin (sender) = { | |
58 | 58 | let admin = getString(this, "admin") | |
59 | 59 | if (!(isDefined(admin))) | |
60 | 60 | then throw("init first") | |
61 | 61 | else (addressFromPublicKey(fromBase58String(value(admin))) == sender) | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func isEndOfVoting (votingId) = { | |
66 | 66 | let now = value(blockInfoByHeight(height)).timestamp | |
67 | 67 | let end = getVotingEndValue(votingId) | |
68 | 68 | (now >= end) | |
69 | 69 | } | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func isCorrectVoter (votingId,caller) = !(isDefined(getBoolean(this, getVoterKey(votingId, toString(caller))))) | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func isBlackListed (caller) = getBlackListValue(toString(caller)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func calcVotesAmount (votingId,caller,attachment) = { | |
79 | 79 | let ticket = getTicketValue(toString(caller)) | |
80 | 80 | let attachmentAssetId = value(attachment.assetId) | |
81 | 81 | if ((ticket == attachmentAssetId)) | |
82 | 82 | then { | |
83 | 83 | let callerBalance = (assetBalance(caller, tokenId) * multiplier) | |
84 | 84 | $Tuple4(callerBalance, Burn(value(attachment.assetId), 1), DeleteEntry(getTicketKey(toString(caller))), BooleanEntry(getVoterKey(votingId, toString(caller)), true)) | |
85 | 85 | } | |
86 | 86 | else throw("Wrong attachment asset") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | @Callable(i) | |
91 | 91 | func init (pk) = { | |
92 | 92 | let admin = getString(this, "admin") | |
93 | 93 | if (!(isDefined(admin))) | |
94 | 94 | then if ((i.caller == this)) | |
95 | 95 | then [StringEntry("admin", pk)] | |
96 | 96 | else throw("Only admin") | |
97 | 97 | else throw("Already inited") | |
98 | 98 | } | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | ||
102 | 102 | @Callable(i) | |
103 | 103 | func startVoting (votingId,votingDesc,period) = if (isAdmin(i.caller)) | |
104 | 104 | then { | |
105 | 105 | let now = value(blockInfoByHeight(height)).timestamp | |
106 | 106 | [StringEntry(getVotingDetailsKey(votingId), votingDesc), IntegerEntry(getVotingEndKey(votingId), (now + period)), IntegerEntry(getVotingVariantKey(votingId, 1), 0), IntegerEntry(getVotingVariantKey(votingId, 2), 0), IntegerEntry(getVotingVariantKey(votingId, 3), 0)] | |
107 | 107 | } | |
108 | 108 | else throw("Only admin") | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | ||
112 | 112 | @Callable(i) | |
113 | 113 | func issueNft (recipient) = if (if (isAdmin(i.caller)) | |
114 | 114 | then !(isBlackListed(addressFromStringValue(recipient))) | |
115 | 115 | else false) | |
116 | 116 | then { | |
117 | 117 | let ticketKey = getTicketKey(recipient) | |
118 | 118 | if (!(isDefined(getBinary(this, ticketKey)))) | |
119 | 119 | then { | |
120 | 120 | let issue = Issue("Ticket", "Multiplier for voting", 1, 0, false) | |
121 | 121 | let id = calculateAssetId(issue) | |
122 | 122 | [issue, ScriptTransfer(addressFromStringValue(recipient), 1, id), BinaryEntry(ticketKey, id)] | |
123 | 123 | } | |
124 | 124 | else throw("Already granted") | |
125 | 125 | } | |
126 | 126 | else throw("Only admin") | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | ||
130 | 130 | @Callable(i) | |
131 | 131 | func getTokens () = { | |
132 | 132 | let key = getWhiteListKey(toString(i.caller)) | |
133 | 133 | let granted = getWhiteListValue(toString(i.caller)) | |
134 | 134 | if (!(granted)) | |
135 | 135 | then [BooleanEntry(key, true), ScriptTransfer(i.caller, amountGetTokens, tokenId)] | |
136 | 136 | else throw("Already got") | |
137 | 137 | } | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | ||
141 | 141 | @Callable(i) | |
142 | 142 | func vote (votingId,variant) = if (!(isEndOfVoting(votingId))) | |
143 | 143 | then if (isCorrectVoter(votingId, i.caller)) | |
144 | 144 | then { | |
145 | 145 | let votingKey = getVotingVariantKey(votingId, variant) | |
146 | 146 | let counter = getVotingVariantValue(votingId, variant) | |
147 | 147 | let blackListKey = getBlackListKey(toString(i.caller)) | |
148 | 148 | if ((size(i.payments) != 1)) | |
149 | 149 | then { | |
150 | 150 | let callerBalance = assetBalance(i.caller, tokenId) | |
151 | 151 | [BooleanEntry(blackListKey, false), BooleanEntry(getVoterKey(votingId, toString(i.caller)), true), IntegerEntry(votingKey, (counter + callerBalance))] | |
152 | 152 | } | |
153 | 153 | else { | |
154 | 154 | let $t051845274 = calcVotesAmount(votingId, i.caller, i.payments[0]) | |
155 | 155 | let voteAmount = $t051845274._1 | |
156 | 156 | let burn = $t051845274._2 | |
157 | 157 | let clear = $t051845274._3 | |
158 | 158 | let record = $t051845274._4 | |
159 | 159 | [burn, clear, record, BooleanEntry(blackListKey, false), IntegerEntry(votingKey, (counter + voteAmount))] | |
160 | 160 | } | |
161 | 161 | } | |
162 | 162 | else throw("Invalid voter") | |
163 | 163 | else throw("Voting is ended") | |
164 | 164 | ||
165 | 165 | ||
166 | 166 | ||
167 | 167 | @Callable(i) | |
168 | 168 | func joinProgram (patron) = { | |
169 | 169 | let validPatron = getWhiteListValue(patron) | |
170 | 170 | if (if (validPatron) | |
171 | 171 | then !(isBlackListed(i.caller)) | |
172 | 172 | else false) | |
173 | 173 | then { | |
174 | 174 | let key = getWhiteListKey(toString(i.caller)) | |
175 | 175 | let patronKey = getWhiteListKey(patron) | |
176 | 176 | let slot = getBoolean(this, key) | |
177 | 177 | if (!(isDefined(slot))) | |
178 | 178 | then [BooleanEntry(key, true), BooleanEntry(patronKey, false), ScriptTransfer(i.caller, amountGetTokens, tokenId)] | |
179 | 179 | else throw("Already in program") | |
180 | 180 | } | |
181 | 181 | else throw("Wrong patron or caller from blackList") | |
182 | 182 | } | |
183 | 183 | ||
184 | 184 | ||
185 | 185 | ||
186 | 186 | @Callable(i) | |
187 | 187 | func buyItem (itemId) = if (!(isBlackListed(i.caller))) | |
188 | 188 | then { | |
189 | 189 | let pmt = i.payments[0] | |
190 | 190 | let amount = pmt.amount | |
191 | 191 | let price = getItemPriceValue(itemId) | |
192 | 192 | if (if ((value(pmt.assetId) == tokenId)) | |
193 | 193 | then (price == amount) | |
194 | 194 | else false) | |
195 | 195 | then [Burn(tokenId, amount), StringEntry(getItemSoldKey(itemId), toString(i.caller))] | |
196 | 196 | else throw("Wrong payment assetId") | |
197 | 197 | } | |
198 | 198 | else throw("Caller from blackList") | |
199 | 199 | ||
200 | 200 | ||
201 | 201 | @Verifier(tx) | |
202 | 202 | func verify () = match tx { | |
203 | 203 | case dtx: DataTransaction => | |
204 | 204 | if (!(isDefined(getString(dtx.data, "admin")))) | |
205 | 205 | then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getStringValue(this, "admin"))) | |
206 | 206 | else false | |
207 | 207 | case mtx: MassTransferTransaction => | |
208 | 208 | sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getStringValue(this, "admin"))) | |
209 | 209 | case _ => | |
210 | 210 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
211 | 211 | } | |
212 | 212 |
github/deemru/w8io/026f985 43.45 ms ◑