tx · 2X9nmjTMtSMHrKJ7MYWetJn6NXHp5JMzdeUBcoZYq5Cz

3NBLecFWuYaQuc56Nt6nZm8jdPt9f8vfyFr:  -0.01400000 Waves

2023.03.13 12:44 [2488090] smart account 3NBLecFWuYaQuc56Nt6nZm8jdPt9f8vfyFr > SELF 0.00000000 Waves

{ "type": 13, "id": "2X9nmjTMtSMHrKJ7MYWetJn6NXHp5JMzdeUBcoZYq5Cz", "fee": 1400000, "feeAssetId": null, "timestamp": 1678700696284, "version": 2, "chainId": 84, "sender": "3NBLecFWuYaQuc56Nt6nZm8jdPt9f8vfyFr", "senderPublicKey": "GV3FbBXZru1WpaCa9x1zhwSWrXSDrxKMVEV7BML6EzY1", "proofs": [ "4PfUet7QkfnGw1DNHRWCcwfJB5XbF8v3te9dXajohKzTMkqFCsFKe3Y46JUDp3fhjtgS4ZpEBLL5DSCMzhgPhNvN" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAADQAAAAAEVk9URQEAAAAgCGWEtw/wimoa8+Jo6C4IkCTD0ydYA80s9i5eC9/aFaQAAAAAB1N0YXJ0VFMAAAABhvxQ0AAAAAAABUVuZFRTAAAAAYdJkDQAAAAAAAxsYXVuY2hfZXJyb3IJAAEsAAAAAgIAAAAkRGFwcCB3aWxsIHN0YXJ0IFZvdGluZyBhdCBUaW1lc3RhbXAgCQABpAAAAAEFAAAAB1N0YXJ0VFMAAAAAA21zZwIAAAAtPGgxPllvdSBWb3RlIFN1Ym1pdHRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+AAAAAAlweW10ZXJyb3ICAAAALERBcHAgTmVlZCAxIFZPVEUgVG9rZW4gYXMgQXR0YWNoIHBheW1lbnRbMV0uAAAAAAttaW5iYWxlcnJvcgIAAABeTWluLiAxIFZPVEUgcmVxdWlyZWQgb24gWW91ciBBZGRyZXNzIHRvIFZvdGUuIFBsZWFzZSBNaW50IG9yIGhvbGQgbWluLiAxIFZPVEUgb24gdGhpcyBBZGRyZXNzLgAAAAA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AAAAGcHVia2V5AgAAAAFfBQAAAAdWb3RlQXN0BQAAAAVVVFZGQQkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlBQAAAANtc2cFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V52wG8WA==", "height": 2488090, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 8Z8WHoZXjWQ7338p2LtYh8DNKJrfo34TQAqfsgcRB3Ve Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let VOTE = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
5+
6+let StartTS = 1679270400000
7+
8+let EndTS = 1680566400000
9+
10+let launch_error = ("Dapp will start Voting at Timestamp " + toString(StartTS))
11+
12+let msg = "<h1>You Vote Submitted Successfully!</h1><br>"
13+
14+let pymterror = "DApp Need 1 VOTE Token as Attach payment[1]."
15+
16+let minbalerror = "Min. 1 VOTE required on Your Address to Vote. Please Mint or hold min. 1 VOTE on this Address."
17+
18+let asseterr = (("Incorrect asset attach, please attach " + toBase58String(VOTE)) + " AssetID Only.")
19+
20+let minamterr = "Please Attach Exact 1 VOTE To Vote."
21+
22+let voteErr = "Voting is Over for this Dapp."
23+
24+let AlreadyVotedErr = "You have Already Voted from this address."
25+
26+let Previoustotalvotes = match getInteger(this, "Total_Votes") {
27+ case a: Int =>
28+ a
29+ case _ =>
30+ 0
31+}
32+
33+let totalvotes = (Previoustotalvotes + 1)
34+
35+@Callable(i)
36+func Option1 () = {
37+ let VoteAst = "OPTION_1"
38+ let pmt = if ((size(i.payments) == 1))
39+ then i.payments[0]
40+ else throw(pymterror)
41+ let pubkey = toBase58String(i.caller.bytes)
42+ let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
43+ let Previous_User_total_Votes = match getInteger(this, ("User_Total_Votes_" + pubkey)) {
44+ case a: Int =>
45+ a
46+ case _ =>
47+ 0
48+ }
49+ let User_total_Votes = (Previous_User_total_Votes + 1)
50+ let UWVFA = match getInteger(this, ((("User_Total_Votes_" + pubkey) + "-") + VoteAst)) {
51+ case a: Int =>
52+ a
53+ case _ =>
54+ 0
55+ }
56+ let UTWVFA = (UWVFA + 1)
57+ let FUVFA = match getInteger(this, ((("User_Total_Asset_Votes_" + pubkey) + "_") + VoteAst)) {
58+ case a: Int =>
59+ a
60+ case _ =>
61+ 0
62+ }
63+ let UTVFA = (FUVFA + 1)
64+ let FTVO = match getInteger(this, ("Total_Votes_" + VoteAst)) {
65+ case a: Int =>
66+ a
67+ case _ =>
68+ 0
69+ }
70+ let ATVO = (FTVO + 1)
71+ if ((StartTS > lastBlock.timestamp))
72+ then throw(launch_error)
73+ else if ((1 > assetbal))
74+ then throw(minbalerror)
75+ else if ((pmt.assetId != VOTE))
76+ then throw(asseterr)
77+ else if ((pmt.amount != 1))
78+ then throw(minamterr)
79+ else if ((User_total_Votes > 1))
80+ then throw(AlreadyVotedErr)
81+ else if ((EndTS > lastBlock.timestamp))
82+ then throw(voteErr)
83+ else [IntegerEntry("Total_Votes", totalvotes), IntegerEntry(("Total_Votes_" + VoteAst), ATVO), IntegerEntry(("User_Total_Votes_" + pubkey), User_total_Votes), IntegerEntry(((("User_Total_Votes_" + pubkey) + "-") + VoteAst), UTWVFA), IntegerEntry(((("User_Total_Asset_Votes_" + pubkey) + "_") + VoteAst), UTVFA), StringEntry("message", msg)]
84+ }
85+
86+
87+@Verifier(tx)
88+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
89+

github/deemru/w8io/169f3d6 
18.24 ms