tx · D8WRDwhjJkzCy86rnzSUG2EKdf2RVzhQNqdzEaB5LzQb

3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT:  -0.01400000 Waves

2023.04.06 12:57 [2522553] smart account 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT > SELF 0.00000000 Waves

{ "type": 13, "id": "D8WRDwhjJkzCy86rnzSUG2EKdf2RVzhQNqdzEaB5LzQb", "fee": 1400000, "feeAssetId": null, "timestamp": 1680775089311, "version": 2, "chainId": 84, "sender": "3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT", "senderPublicKey": "86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb", "proofs": [ "542WaDXj1EXpoZHatpt11bSZpA15kHAsLxaAkmB2sDe5q42nucNZxyfaQ2DDtERSh51QpEG97M6DDvWrhPVo3ZNP" ], "script": "base64:AAIEAAAAAAAAABMIAhIFCgMIAQESAwoBARIDCgEIAAAACQAAAAAEVk9URQEAAAAgCGWEtw/wimoa8+Jo6C4IkCTD0ydYA80s9i5eC9/aFaQAAAAAInZvdGluZ190aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkBAAAAIGl6zIeiOlMGHeqkOihniSsWqxS66z2RjuIqrEqU/hxoAAAAABJjb250cm9sbGVyX2FkZHJlc3MJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAAInZvdGluZ190aW1lc3RhbXBfY29udHJvbGxlcl9wdWJrZXkAAAAADGxhdW5jaF9lcnJvcgIAAAAkRGFwcCB3aWxsIHN0YXJ0IFZvdGluZyBhdCBUaW1lc3RhbXAgAAAAAANtc2cCAAAALjxoMT5Zb3VyIFZvdGUgU3VibWl0dGVkIFN1Y2Nlc3NmdWxseSE8L2gxPjxicj4AAAAACXB5bXRlcnJvcgIAAAA1REFwcCBOZWVkIDAuMDAwMDAwMDEgVk9URSBUb2tlbiBhcyBBdHRhY2ggcGF5bWVudFsxXS4AAAAAC21pbmJhbGVycm9yA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AAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleeOmBRY=", "height": 2522553, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 9iz5brSsZsp6rLBWzsT5Svc3wTGuqHPQgdpqywWbEJBj 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 voting_timestamp_controller_pubkey = base58'86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb'
7+
8+let controller_address = addressFromPublicKey(voting_timestamp_controller_pubkey)
9+
10+let launch_error = "Dapp will start Voting at Timestamp "
11+
12+let msg = "<h1>Your Vote Submitted Successfully!</h1><br>"
13+
14+let pymterror = "DApp Need 0.00000001 VOTE Token as Attach payment[1]."
15+
16+let minbalerror = "Min. 0.00000001 VOTE required on Your Address to Vote. Please Mint or hold min. 0.00000001 VOTE on this Address."
17+
18+let asseterr = (("Incorrect asset attach, please attach " + toBase58String(VOTE)) + " AssetID Only.")
19+
20+let voteErr = "Voting is Over for this Dapp."
21+
22+@Callable(i)
23+func SetVotingTimeStamps (Proposal,Voting_Start_TimeStamp,Voting_End_TimeStamp) = {
24+ let StartTS = Voting_Start_TimeStamp
25+ let EndTS = Voting_End_TimeStamp
26+ let pubkey = toBase58String(i.caller.bytes)
27+ let Previoustotalproposals = match getInteger(this, "Total_Proposals") {
28+ case a: Int =>
29+ a
30+ case _ =>
31+ 0
32+ }
33+ let totalproposals = (Previoustotalproposals + 1)
34+ if ((size(Proposal) > 5100))
35+ then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
36+ else if ((i.caller != controller_address))
37+ then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it."))
38+ else [StringEntry(("Proposal_Data_" + toString(totalproposals)), Proposal), IntegerEntry("Total_Proposals", totalproposals), StringEntry(("Proposer_" + toString(totalproposals)), pubkey), IntegerEntry(("Voting_Start_TimeStamp_" + toString(totalproposals)), StartTS), IntegerEntry(("Voting_End_TimeStamp_" + toString(totalproposals)), EndTS)]
39+ }
40+
41+
42+
43+@Callable(i)
44+func Yes (Porposal_ID) = {
45+ let VoteAst = "Yes"
46+ let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID)))
47+ let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID)))
48+ let pubkey = toBase58String(i.caller.bytes)
49+ let pmt = if ((size(i.payments) == 1))
50+ then i.payments[0]
51+ else throw(pymterror)
52+ let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
53+ let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) {
54+ case a: Int =>
55+ a
56+ case _ =>
57+ 0
58+ }
59+ let totalvotes = (Previoustotalvotes + pmt.amount)
60+ let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) {
61+ case a: Int =>
62+ a
63+ case _ =>
64+ 0
65+ }
66+ let ATVO = (FTVO + pmt.amount)
67+ if ((StartTS > lastBlock.timestamp))
68+ then throw((launch_error + toString(StartTS)))
69+ else if ((1 > assetbal))
70+ then throw(minbalerror)
71+ else if ((pmt.assetId != VOTE))
72+ then throw(asseterr)
73+ else if ((lastBlock.timestamp > EndTS))
74+ then throw(voteErr)
75+ else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_Votes_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)]
76+ }
77+
78+
79+
80+@Callable(i)
81+func DeleteKey (Key) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(Key)]
82+
83+
84+@Verifier(tx)
85+func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
86+

github/deemru/w8io/026f985 
20.32 ms