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:AAIFAAAAAAAAACUIAhIDCgEIEgUKAwgIARIDCgEIEgASBAoCCAESAwoBCBIDCgEIAAAAGAAAAAAHdG9rZW5JZAEAAAAFZP9n63sAAAAACm11bHRpcGxpZXIAAAAAAAAAAAoAAAAAD2Ftb3VudEdldFRva2VucwAAAAAAAA9CQAAAAAAJc2VwYXJhdG9yAgAAAAFfAQAAAA9nZXRXaGl0ZUxpc3RLZXkAAAABAAAABGFkZHIJAAS5AAAAAgkABEwAAAACAgAAAAJ3bAkABEwAAAACBQAAAARhZGRyBQAAAANuaWwFAAAACXNlcGFyYXRvcgEAAAARZ2V0V2hpdGVMaXN0VmFsdWUAAAABAAAABGFkZHIJAQAAABFAZXh0ck5hdGl2ZSgxMDUxKQAAAAIFAAAABHRoaXMJAQAAAA9nZXRXaGl0ZUxpc3RLZXkAAAABBQAAAARhZGRyAQAAAA9nZXRCbGFja0xpc3RLZXkAAAABAAAABGFkZHIJAAS5AAAAAgkABEwAAAACAgAAAAJibAkABEwAAAACBQAAAARhZGRyBQAAAANuaWwFAAAACXNlcGFyYXRvcgEAAAARZ2V0Qm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eQAAAAIJAQAAAA5nZXRJdGVtU29sZEtleQAAAAEFAAAABml0ZW1JZAkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIFAAAAA25pbAkAAAIAAAABAgAAABVXcm9uZyBwYXltZW50IGFzc2V0SWQJAAACAAAAAQIAAAAVQ2FsbGVyIGZyb20gYmxhY2tMaXN0AAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAADZHR4BQAAAAckbWF0Y2gwAwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQkABBMAAAACCAUAAAADZHR4AAAABGRhdGECAAAABWFkbWluCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAkAAlkAAAABCQEAAAARQGV4dHJOYXRpdmUoMTA1MykAAAACBQAAAAR0aGlzAgAAAAVhZG1pbgcDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAANtdHgFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACQACWQAAAAEJAQAAABFAZXh0ck5hdGl2ZSgxMDUzKQAAAAIFAAAABHRoaXMCAAAABWFkbWluCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleVtqY/c=", "height": 2130655, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9J2hPenVVshpSzUZ7Mu7edo5hzSPBmViYPZb5K5WRVxV Next: 77M4F3xd1aaD4vU7BA9neS5Cvu94uYyHSjVKwMeD3m65 Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let tokenId = base58'CPtoken'
55
66 let multiplier = 10
77
88 let amountGetTokens = 1000000
99
1010 let separator = "_"
1111
1212 func getWhiteListKey (addr) = makeString(["wl", addr], separator)
1313
1414
1515 func getWhiteListValue (addr) = getBooleanValue(this, getWhiteListKey(addr))
1616
1717
1818 func getBlackListKey (addr) = makeString(["bl", addr], separator)
1919
2020
2121 func getBlackListValue (addr) = valueOrElse(getBoolean(this, getBlackListKey(addr)), false)
2222
2323
2424 func getTicketKey (addr) = makeString(["ticket", addr], separator)
2525
2626
2727 func getTicketValue (addr) = getBinaryValue(this, getTicketKey(addr))
2828
2929
3030 func getItemPriceKey (itemId) = makeString(["item", itemId], separator)
3131
3232
3333 func getItemPriceValue (itemId) = getIntegerValue(this, getItemPriceKey(itemId))
3434
3535
3636 func getVotingDetailsKey (votingId) = makeString(["votingDetails", votingId], separator)
3737
3838
3939 func getItemSoldKey (itemId) = makeString(["sold", "item", itemId], separator)
4040
4141
4242 func getVotingEndKey (votingId) = makeString(["votingEnd", votingId], separator)
4343
4444
4545 func getVotingEndValue (votingId) = getIntegerValue(this, getVotingEndKey(votingId))
4646
4747
4848 func getVotingVariantKey (votingId,variant) = makeString(["votingId", votingId, "variant", toString(variant)], separator)
4949
5050
5151 func getVotingVariantValue (votingId,variant) = getIntegerValue(this, getVotingVariantKey(votingId, variant))
5252
5353
5454 func getVoterKey (votingId,voterAddr) = makeString(["votingId", votingId, voterAddr], separator)
5555
5656
5757 func isAdmin (sender) = {
5858 let admin = getString(this, "admin")
5959 if (!(isDefined(admin)))
6060 then throw("init first")
6161 else (addressFromPublicKey(fromBase58String(value(admin))) == sender)
6262 }
6363
6464
6565 func isEndOfVoting (votingId) = {
6666 let now = value(blockInfoByHeight(height)).timestamp
6767 let end = getVotingEndValue(votingId)
6868 (now >= end)
6969 }
7070
7171
7272 func isCorrectVoter (votingId,caller) = !(isDefined(getBoolean(this, getVoterKey(votingId, toString(caller)))))
7373
7474
7575 func isBlackListed (caller) = getBlackListValue(toString(caller))
7676
7777
7878 func calcVotesAmount (votingId,caller,attachment) = {
7979 let ticket = getTicketValue(toString(caller))
8080 let attachmentAssetId = value(attachment.assetId)
8181 if ((ticket == attachmentAssetId))
8282 then {
8383 let callerBalance = (assetBalance(caller, tokenId) * multiplier)
8484 $Tuple4(callerBalance, Burn(value(attachment.assetId), 1), DeleteEntry(getTicketKey(toString(caller))), BooleanEntry(getVoterKey(votingId, toString(caller)), true))
8585 }
8686 else throw("Wrong attachment asset")
8787 }
8888
8989
9090 @Callable(i)
9191 func init (pk) = {
9292 let admin = getString(this, "admin")
9393 if (!(isDefined(admin)))
9494 then if ((i.caller == this))
9595 then [StringEntry("admin", pk)]
9696 else throw("Only admin")
9797 else throw("Already inited")
9898 }
9999
100100
101101
102102 @Callable(i)
103103 func startVoting (votingId,votingDesc,period) = if (isAdmin(i.caller))
104104 then {
105105 let now = value(blockInfoByHeight(height)).timestamp
106106 [StringEntry(getVotingDetailsKey(votingId), votingDesc), IntegerEntry(getVotingEndKey(votingId), (now + period)), IntegerEntry(getVotingVariantKey(votingId, 1), 0), IntegerEntry(getVotingVariantKey(votingId, 2), 0), IntegerEntry(getVotingVariantKey(votingId, 3), 0)]
107107 }
108108 else throw("Only admin")
109109
110110
111111
112112 @Callable(i)
113113 func issueNft (recipient) = if (if (isAdmin(i.caller))
114114 then !(isBlackListed(addressFromStringValue(recipient)))
115115 else false)
116116 then {
117117 let ticketKey = getTicketKey(recipient)
118118 if (!(isDefined(getBinary(this, ticketKey))))
119119 then {
120120 let issue = Issue("Ticket", "Multiplier for voting", 1, 0, false)
121121 let id = calculateAssetId(issue)
122122 [issue, ScriptTransfer(addressFromStringValue(recipient), 1, id), BinaryEntry(ticketKey, id)]
123123 }
124124 else throw("Already granted")
125125 }
126126 else throw("Only admin")
127127
128128
129129
130130 @Callable(i)
131131 func getTokens () = {
132132 let key = getWhiteListKey(toString(i.caller))
133133 let granted = getWhiteListValue(toString(i.caller))
134134 if (!(granted))
135135 then [BooleanEntry(key, true), ScriptTransfer(i.caller, amountGetTokens, tokenId)]
136136 else throw("Already got")
137137 }
138138
139139
140140
141141 @Callable(i)
142142 func vote (votingId,variant) = if (!(isEndOfVoting(votingId)))
143143 then if (isCorrectVoter(votingId, i.caller))
144144 then {
145145 let votingKey = getVotingVariantKey(votingId, variant)
146146 let counter = getVotingVariantValue(votingId, variant)
147147 let blackListKey = getBlackListKey(toString(i.caller))
148148 if ((size(i.payments) != 1))
149149 then {
150150 let callerBalance = assetBalance(i.caller, tokenId)
151151 [BooleanEntry(blackListKey, false), BooleanEntry(getVoterKey(votingId, toString(i.caller)), true), IntegerEntry(votingKey, (counter + callerBalance))]
152152 }
153153 else {
154154 let $t051845274 = calcVotesAmount(votingId, i.caller, i.payments[0])
155155 let voteAmount = $t051845274._1
156156 let burn = $t051845274._2
157157 let clear = $t051845274._3
158158 let record = $t051845274._4
159159 [burn, clear, record, BooleanEntry(blackListKey, false), IntegerEntry(votingKey, (counter + voteAmount))]
160160 }
161161 }
162162 else throw("Invalid voter")
163163 else throw("Voting is ended")
164164
165165
166166
167167 @Callable(i)
168168 func joinProgram (patron) = {
169169 let validPatron = getWhiteListValue(patron)
170170 if (if (validPatron)
171171 then !(isBlackListed(i.caller))
172172 else false)
173173 then {
174174 let key = getWhiteListKey(toString(i.caller))
175175 let patronKey = getWhiteListKey(patron)
176176 let slot = getBoolean(this, key)
177177 if (!(isDefined(slot)))
178178 then [BooleanEntry(key, true), BooleanEntry(patronKey, false), ScriptTransfer(i.caller, amountGetTokens, tokenId)]
179179 else throw("Already in program")
180180 }
181181 else throw("Wrong patron or caller from blackList")
182182 }
183183
184184
185185
186186 @Callable(i)
187187 func buyItem (itemId) = if (!(isBlackListed(i.caller)))
188188 then {
189189 let pmt = i.payments[0]
190190 let amount = pmt.amount
191191 let price = getItemPriceValue(itemId)
192192 if (if ((value(pmt.assetId) == tokenId))
193193 then (price == amount)
194194 else false)
195195 then [Burn(tokenId, amount), StringEntry(getItemSoldKey(itemId), toString(i.caller))]
196196 else throw("Wrong payment assetId")
197197 }
198198 else throw("Caller from blackList")
199199
200200
201201 @Verifier(tx)
202202 func verify () = match tx {
203203 case dtx: DataTransaction =>
204204 if (!(isDefined(getString(dtx.data, "admin"))))
205205 then sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getStringValue(this, "admin")))
206206 else false
207207 case mtx: MassTransferTransaction =>
208208 sigVerify(tx.bodyBytes, tx.proofs[0], fromBase58String(getStringValue(this, "admin")))
209209 case _ =>
210210 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
211211 }
212212

github/deemru/w8io/026f985 
43.45 ms