tx · 6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb

3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT:  -0.01400000 Waves

2023.04.06 13:40 [2522594] smart account 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT > SELF 0.00000000 Waves

{ "type": 13, "id": "6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb", "fee": 1400000, "feeAssetId": null, "timestamp": 1680777674636, "version": 2, "chainId": 84, "sender": "3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT", "senderPublicKey": "86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb", "proofs": [ "2XAhzkhYGW34wVsUboJ1faQWYDhWUDPYmbzVxb4CK7pmgicgAdAFP2Cu2QZBJKBaMVkSkjED6NB3R7a1tqLNozRs" ], "script": "base64:AAIEAAAAAAAAAB0IAhIFCgMIAQESAwoBARIDCgEBEgMKAQESAwoBCAAAAAkAAAAABFZPVEUBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkAAAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AQAAACAbvUu+h+2As3kugOhMQC3bvgebie3kDmlbUlrvLFQPbQAAAAASY29udHJvbGxlcl9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAxsYXVuY2hfZXJyb3ICAAAAJERhcHAgd2lsbCBzdGFydCBWb3RpbmcgYXQgVGltZXN0YW1wIAAAAAADbXNnAgAAAC48aDE+WW91ciBWb3RlIFN1Ym1pdHRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+AAAAAAlweW10ZXJyb3ICAAAANURBcHAgTmVlZCAwLjAwMDAwMDAxIFZPVEUgVG9rZW4gYXMgQXR0YWNoIHBheW1lbnRbMV0uAAA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Adhc3NldElkBQAAAARWT1RFCQAAAgAAAAEFAAAACGFzc2V0ZXJyAwkAAGYAAAACCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAUAAAAFRW5kVFMJAAACAAAAAQUAAAAHdm90ZUVycgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxUb3RhbF9Wb3Rlc18JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQFAAAACnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABlRvdGFsXwUAAAAHVm90ZUFzdAIAAAABXwkAAaQAAAABBQAAAAtQb3Jwb3NhbF9JRAUAAAAEQVRWTwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlBQAAAANtc2cFAAAAA25pbAAAAAFpAQAAAAlEZWxldGVLZXkAAAABAAAAA0tleQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANLZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5wJ3I3g==", "height": 2522594, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: wD2p5ZBm8gnseXiTBiGBtcPvVg2qN6WWqcXMzhYqPZV Next: HVorMwhDZHkQKKnP24ugFM6dngYt6SUmmnYn2YjTFLYq Diff:
OldNewDifferences
3535 then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
3636 else if ((i.caller != controller_address))
3737 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)]
38+ else [StringEntry(("Proposal_Text_" + 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)]
3939 }
4040
4141
7878
7979
8080 @Callable(i)
81-func DeleteKey (Key) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(Key)]
81+func No (Porposal_ID) = {
82+ let VoteAst = "No"
83+ let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID)))
84+ let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID)))
85+ let pubkey = toBase58String(i.caller.bytes)
86+ let pmt = if ((size(i.payments) == 1))
87+ then i.payments[0]
88+ else throw(pymterror)
89+ let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
90+ let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) {
91+ case a: Int =>
92+ a
93+ case _ =>
94+ 0
95+ }
96+ let totalvotes = (Previoustotalvotes + pmt.amount)
97+ let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) {
98+ case a: Int =>
99+ a
100+ case _ =>
101+ 0
102+ }
103+ let ATVO = (FTVO + pmt.amount)
104+ if ((StartTS > lastBlock.timestamp))
105+ then throw((launch_error + toString(StartTS)))
106+ else if ((1 > assetbal))
107+ then throw(minbalerror)
108+ else if ((pmt.assetId != VOTE))
109+ then throw(asseterr)
110+ else if ((lastBlock.timestamp > EndTS))
111+ then throw(voteErr)
112+ else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)]
113+ }
114+
115+
116+
117+@Callable(i)
118+func Abstain (Porposal_ID) = {
119+ let VoteAst = "Abstain"
120+ let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID)))
121+ let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID)))
122+ let pubkey = toBase58String(i.caller.bytes)
123+ let pmt = if ((size(i.payments) == 1))
124+ then i.payments[0]
125+ else throw(pymterror)
126+ let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
127+ let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) {
128+ case a: Int =>
129+ a
130+ case _ =>
131+ 0
132+ }
133+ let totalvotes = (Previoustotalvotes + pmt.amount)
134+ let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) {
135+ case a: Int =>
136+ a
137+ case _ =>
138+ 0
139+ }
140+ let ATVO = (FTVO + pmt.amount)
141+ if ((StartTS > lastBlock.timestamp))
142+ then throw((launch_error + toString(StartTS)))
143+ else if ((1 > assetbal))
144+ then throw(minbalerror)
145+ else if ((pmt.assetId != VOTE))
146+ then throw(asseterr)
147+ else if ((lastBlock.timestamp > EndTS))
148+ then throw(voteErr)
149+ else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)]
150+ }
151+
152+
153+
154+@Callable(i)
155+func DeleteKey (Key) = [DeleteEntry(Key)]
82156
83157
84158 @Verifier(tx)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let VOTE = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H'
55
66 let voting_timestamp_controller_pubkey = base58'2sHRUrJCMpDhAQEcN7Zhk3LqnD9zizebpxeQXpPoscQU'
77
88 let controller_address = addressFromPublicKey(voting_timestamp_controller_pubkey)
99
1010 let launch_error = "Dapp will start Voting at Timestamp "
1111
1212 let msg = "<h1>Your Vote Submitted Successfully!</h1><br>"
1313
1414 let pymterror = "DApp Need 0.00000001 VOTE Token as Attach payment[1]."
1515
1616 let minbalerror = "Min. 0.00000001 VOTE required on Your Address to Vote. Please Mint or hold min. 0.00000001 VOTE on this Address."
1717
1818 let asseterr = (("Incorrect asset attach, please attach " + toBase58String(VOTE)) + " AssetID Only.")
1919
2020 let voteErr = "Voting is Over for this Dapp."
2121
2222 @Callable(i)
2323 func SetVotingTimeStamps (Proposal,Voting_Start_TimeStamp,Voting_End_TimeStamp) = {
2424 let StartTS = Voting_Start_TimeStamp
2525 let EndTS = Voting_End_TimeStamp
2626 let pubkey = toBase58String(i.caller.bytes)
2727 let Previoustotalproposals = match getInteger(this, "Total_Proposals") {
2828 case a: Int =>
2929 a
3030 case _ =>
3131 0
3232 }
3333 let totalproposals = (Previoustotalproposals + 1)
3434 if ((size(Proposal) > 5100))
3535 then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.")
3636 else if ((i.caller != controller_address))
3737 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)]
38+ else [StringEntry(("Proposal_Text_" + 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)]
3939 }
4040
4141
4242
4343 @Callable(i)
4444 func Yes (Porposal_ID) = {
4545 let VoteAst = "Yes"
4646 let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID)))
4747 let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID)))
4848 let pubkey = toBase58String(i.caller.bytes)
4949 let pmt = if ((size(i.payments) == 1))
5050 then i.payments[0]
5151 else throw(pymterror)
5252 let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
5353 let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) {
5454 case a: Int =>
5555 a
5656 case _ =>
5757 0
5858 }
5959 let totalvotes = (Previoustotalvotes + pmt.amount)
6060 let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) {
6161 case a: Int =>
6262 a
6363 case _ =>
6464 0
6565 }
6666 let ATVO = (FTVO + pmt.amount)
6767 if ((StartTS > lastBlock.timestamp))
6868 then throw((launch_error + toString(StartTS)))
6969 else if ((1 > assetbal))
7070 then throw(minbalerror)
7171 else if ((pmt.assetId != VOTE))
7272 then throw(asseterr)
7373 else if ((lastBlock.timestamp > EndTS))
7474 then throw(voteErr)
7575 else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)]
7676 }
7777
7878
7979
8080 @Callable(i)
81-func DeleteKey (Key) = [DeleteEntry("Proposal Data_1"), DeleteEntry("Proposal Data_2"), DeleteEntry("Proposal_Data_3"), DeleteEntry(Key)]
81+func No (Porposal_ID) = {
82+ let VoteAst = "No"
83+ let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID)))
84+ let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID)))
85+ let pubkey = toBase58String(i.caller.bytes)
86+ let pmt = if ((size(i.payments) == 1))
87+ then i.payments[0]
88+ else throw(pymterror)
89+ let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
90+ let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) {
91+ case a: Int =>
92+ a
93+ case _ =>
94+ 0
95+ }
96+ let totalvotes = (Previoustotalvotes + pmt.amount)
97+ let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) {
98+ case a: Int =>
99+ a
100+ case _ =>
101+ 0
102+ }
103+ let ATVO = (FTVO + pmt.amount)
104+ if ((StartTS > lastBlock.timestamp))
105+ then throw((launch_error + toString(StartTS)))
106+ else if ((1 > assetbal))
107+ then throw(minbalerror)
108+ else if ((pmt.assetId != VOTE))
109+ then throw(asseterr)
110+ else if ((lastBlock.timestamp > EndTS))
111+ then throw(voteErr)
112+ else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)]
113+ }
114+
115+
116+
117+@Callable(i)
118+func Abstain (Porposal_ID) = {
119+ let VoteAst = "Abstain"
120+ let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID)))
121+ let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID)))
122+ let pubkey = toBase58String(i.caller.bytes)
123+ let pmt = if ((size(i.payments) == 1))
124+ then i.payments[0]
125+ else throw(pymterror)
126+ let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE)
127+ let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) {
128+ case a: Int =>
129+ a
130+ case _ =>
131+ 0
132+ }
133+ let totalvotes = (Previoustotalvotes + pmt.amount)
134+ let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) {
135+ case a: Int =>
136+ a
137+ case _ =>
138+ 0
139+ }
140+ let ATVO = (FTVO + pmt.amount)
141+ if ((StartTS > lastBlock.timestamp))
142+ then throw((launch_error + toString(StartTS)))
143+ else if ((1 > assetbal))
144+ then throw(minbalerror)
145+ else if ((pmt.assetId != VOTE))
146+ then throw(asseterr)
147+ else if ((lastBlock.timestamp > EndTS))
148+ then throw(voteErr)
149+ else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)]
150+ }
151+
152+
153+
154+@Callable(i)
155+func DeleteKey (Key) = [DeleteEntry(Key)]
82156
83157
84158 @Verifier(tx)
85159 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
86160

github/deemru/w8io/169f3d6 
35.17 ms