tx · HVorMwhDZHkQKKnP24ugFM6dngYt6SUmmnYn2YjTFLYq 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT: -0.01400000 Waves 2023.04.09 20:21 [2527327] smart account 3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT > SELF 0.00000000 Waves
{ "type": 13, "id": "HVorMwhDZHkQKKnP24ugFM6dngYt6SUmmnYn2YjTFLYq", "fee": 1400000, "feeAssetId": null, "timestamp": 1681060900179, "version": 2, "chainId": 84, "sender": "3N6oWLyQY2gM7QUkUvBme1REnA6d1V7y3AT", "senderPublicKey": "86kQutchNhkrbHTdTXbAFXcJ8bPWQC8G4RGzAYcspLvb", "proofs": [ "43ETe4R2vZqMxftZQ2WANS1RixpiTqmeFk6q8WorZMUiCcoaXhkvg5dyndVKv3Ptv3i8YpS6u1EWWvcctyJUHYbZ" ], "script": "base64:AAIEAAAAAAAAAB0IAhIFCgMIAQESAwoBARIDCgEBEgMKAQESAwoBCAAAAAkAAAAABFZPVEUBAAAAIAhlhLcP8IpqGvPiaOguCJAkw9MnWAPNLPYuXgvf2hWkAAAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AQAAACDcKCmq97Q85azVhInAnEo5B90oOZE/K9d91mIRW9+6VQAAAAASY29udHJvbGxlcl9hZGRyZXNzCQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAACJ2b3RpbmdfdGltZXN0YW1wX2NvbnRyb2xsZXJfcHVia2V5AAAAAAxsYXVuY2hfZXJyb3ICAAAAJERhcHAgd2lsbCBzdGFydCBWb3RpbmcgYXQgVGltZXN0YW1wIAAAAAADbXNnAgAAAC48aDE+WW91ciBWb3RlIFN1Ym1pdHRlZCBTdWNjZXNzZnVsbHkhPC9oMT48YnI+AAAAAAlweW10ZXJyb3ICAAAANURBcHAgTmVlZCAwLjAwMDAwMDAxIFZPVEUgVG9rZW4gYXMgQXR0YWNoIHBheW1lbnRbMV0uAAAAAA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c3NldElkBQAAAARWT1RFCQAAAgAAAAEFAAAACGFzc2V0ZXJyAwkAAGYAAAACCAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAUAAAAFRW5kVFMJAAACAAAAAQUAAAAHdm90ZUVycgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAxUb3RhbF9Wb3Rlc18JAAGkAAAAAQUAAAALUG9ycG9zYWxfSUQFAAAACnRvdGFsdm90ZXMJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAABlRvdGFsXwUAAAAHVm90ZUFzdAIAAAABXwkAAaQAAAABBQAAAAtQb3Jwb3NhbF9JRAUAAAAEQVRWTwkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACAgAAAAdtZXNzYWdlBQAAAANtc2cFAAAAA25pbAAAAAFpAQAAAAlEZWxldGVLZXkAAAABAAAAA0tleQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANLZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5GjDQhw==", "height": 2527327, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6XLZV65AbZAtLjPGmgFXadNZyw3wKLtDBde5kyVjFsBb Next: GGzAuvHnfpMgBNmRK73AonzjT7H8eU8wVqiGmZAkXEga Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VOTE = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
5 | 5 | ||
6 | - | let voting_timestamp_controller_pubkey = base58' | |
6 | + | let voting_timestamp_controller_pubkey = base58'FpQDPkicMwf8q2FJRfT3wfh4RxXy5C8pgqMSQRZdfW3W' | |
7 | 7 | ||
8 | 8 | let controller_address = addressFromPublicKey(voting_timestamp_controller_pubkey) | |
9 | 9 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let VOTE = base58'Zn3cLHW7aAVPm5aACcTjvg7e7iEy2cKDtbowok5qa9H' | |
5 | 5 | ||
6 | - | let voting_timestamp_controller_pubkey = base58' | |
6 | + | let voting_timestamp_controller_pubkey = base58'FpQDPkicMwf8q2FJRfT3wfh4RxXy5C8pgqMSQRZdfW3W' | |
7 | 7 | ||
8 | 8 | let controller_address = addressFromPublicKey(voting_timestamp_controller_pubkey) | |
9 | 9 | ||
10 | 10 | let launch_error = "Dapp will start Voting at Timestamp " | |
11 | 11 | ||
12 | 12 | let msg = "<h1>Your Vote Submitted Successfully!</h1><br>" | |
13 | 13 | ||
14 | 14 | let pymterror = "DApp Need 0.00000001 VOTE Token as Attach payment[1]." | |
15 | 15 | ||
16 | 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 | 17 | ||
18 | 18 | let asseterr = (("Incorrect asset attach, please attach " + toBase58String(VOTE)) + " AssetID Only.") | |
19 | 19 | ||
20 | 20 | let voteErr = "Voting is Over for this Dapp." | |
21 | 21 | ||
22 | 22 | @Callable(i) | |
23 | 23 | func SetVotingTimeStamps (Proposal,Voting_Start_TimeStamp,Voting_End_TimeStamp) = { | |
24 | 24 | let StartTS = Voting_Start_TimeStamp | |
25 | 25 | let EndTS = Voting_End_TimeStamp | |
26 | 26 | let pubkey = toBase58String(i.caller.bytes) | |
27 | 27 | let Previoustotalproposals = match getInteger(this, "Total_Proposals") { | |
28 | 28 | case a: Int => | |
29 | 29 | a | |
30 | 30 | case _ => | |
31 | 31 | 0 | |
32 | 32 | } | |
33 | 33 | let totalproposals = (Previoustotalproposals + 1) | |
34 | 34 | if ((size(Proposal) > 5100)) | |
35 | 35 | then throw("Subject Char Limits are Over. Reduce length less than 5100 Char.") | |
36 | 36 | else if ((i.caller != controller_address)) | |
37 | 37 | then throw((("This Address is not Authorized. Only " + toString(controller_address)) + " is Authorized Address to Sign it.")) | |
38 | 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)] | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | ||
43 | 43 | @Callable(i) | |
44 | 44 | func Yes (Porposal_ID) = { | |
45 | 45 | let VoteAst = "Yes" | |
46 | 46 | let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID))) | |
47 | 47 | let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID))) | |
48 | 48 | let pubkey = toBase58String(i.caller.bytes) | |
49 | 49 | let pmt = if ((size(i.payments) == 1)) | |
50 | 50 | then i.payments[0] | |
51 | 51 | else throw(pymterror) | |
52 | 52 | let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE) | |
53 | 53 | let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) { | |
54 | 54 | case a: Int => | |
55 | 55 | a | |
56 | 56 | case _ => | |
57 | 57 | 0 | |
58 | 58 | } | |
59 | 59 | let totalvotes = (Previoustotalvotes + pmt.amount) | |
60 | 60 | let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) { | |
61 | 61 | case a: Int => | |
62 | 62 | a | |
63 | 63 | case _ => | |
64 | 64 | 0 | |
65 | 65 | } | |
66 | 66 | let ATVO = (FTVO + pmt.amount) | |
67 | 67 | if ((StartTS > lastBlock.timestamp)) | |
68 | 68 | then throw((launch_error + toString(StartTS))) | |
69 | 69 | else if ((1 > assetbal)) | |
70 | 70 | then throw(minbalerror) | |
71 | 71 | else if ((pmt.assetId != VOTE)) | |
72 | 72 | then throw(asseterr) | |
73 | 73 | else if ((lastBlock.timestamp > EndTS)) | |
74 | 74 | then throw(voteErr) | |
75 | 75 | else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)] | |
76 | 76 | } | |
77 | 77 | ||
78 | 78 | ||
79 | 79 | ||
80 | 80 | @Callable(i) | |
81 | 81 | func No (Porposal_ID) = { | |
82 | 82 | let VoteAst = "No" | |
83 | 83 | let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID))) | |
84 | 84 | let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID))) | |
85 | 85 | let pubkey = toBase58String(i.caller.bytes) | |
86 | 86 | let pmt = if ((size(i.payments) == 1)) | |
87 | 87 | then i.payments[0] | |
88 | 88 | else throw(pymterror) | |
89 | 89 | let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE) | |
90 | 90 | let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) { | |
91 | 91 | case a: Int => | |
92 | 92 | a | |
93 | 93 | case _ => | |
94 | 94 | 0 | |
95 | 95 | } | |
96 | 96 | let totalvotes = (Previoustotalvotes + pmt.amount) | |
97 | 97 | let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) { | |
98 | 98 | case a: Int => | |
99 | 99 | a | |
100 | 100 | case _ => | |
101 | 101 | 0 | |
102 | 102 | } | |
103 | 103 | let ATVO = (FTVO + pmt.amount) | |
104 | 104 | if ((StartTS > lastBlock.timestamp)) | |
105 | 105 | then throw((launch_error + toString(StartTS))) | |
106 | 106 | else if ((1 > assetbal)) | |
107 | 107 | then throw(minbalerror) | |
108 | 108 | else if ((pmt.assetId != VOTE)) | |
109 | 109 | then throw(asseterr) | |
110 | 110 | else if ((lastBlock.timestamp > EndTS)) | |
111 | 111 | then throw(voteErr) | |
112 | 112 | else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)] | |
113 | 113 | } | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | ||
117 | 117 | @Callable(i) | |
118 | 118 | func Abstain (Porposal_ID) = { | |
119 | 119 | let VoteAst = "Abstain" | |
120 | 120 | let StartTS = getIntegerValue(this, ("Voting_Start_TimeStamp_" + toString(Porposal_ID))) | |
121 | 121 | let EndTS = getIntegerValue(this, ("Voting_End_TimeStamp_" + toString(Porposal_ID))) | |
122 | 122 | let pubkey = toBase58String(i.caller.bytes) | |
123 | 123 | let pmt = if ((size(i.payments) == 1)) | |
124 | 124 | then i.payments[0] | |
125 | 125 | else throw(pymterror) | |
126 | 126 | let assetbal = assetBalance(addressFromPublicKey(i.callerPublicKey), VOTE) | |
127 | 127 | let Previoustotalvotes = match getInteger(this, ("Total_Votes_" + toString(Porposal_ID))) { | |
128 | 128 | case a: Int => | |
129 | 129 | a | |
130 | 130 | case _ => | |
131 | 131 | 0 | |
132 | 132 | } | |
133 | 133 | let totalvotes = (Previoustotalvotes + pmt.amount) | |
134 | 134 | let FTVO = match getInteger(this, ((("Total_" + VoteAst) + "_") + toString(Porposal_ID))) { | |
135 | 135 | case a: Int => | |
136 | 136 | a | |
137 | 137 | case _ => | |
138 | 138 | 0 | |
139 | 139 | } | |
140 | 140 | let ATVO = (FTVO + pmt.amount) | |
141 | 141 | if ((StartTS > lastBlock.timestamp)) | |
142 | 142 | then throw((launch_error + toString(StartTS))) | |
143 | 143 | else if ((1 > assetbal)) | |
144 | 144 | then throw(minbalerror) | |
145 | 145 | else if ((pmt.assetId != VOTE)) | |
146 | 146 | then throw(asseterr) | |
147 | 147 | else if ((lastBlock.timestamp > EndTS)) | |
148 | 148 | then throw(voteErr) | |
149 | 149 | else [IntegerEntry(("Total_Votes_" + toString(Porposal_ID)), totalvotes), IntegerEntry(((("Total_" + VoteAst) + "_") + toString(Porposal_ID)), ATVO), StringEntry("message", msg)] | |
150 | 150 | } | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | ||
154 | 154 | @Callable(i) | |
155 | 155 | func DeleteKey (Key) = [DeleteEntry(Key)] | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | @Verifier(tx) | |
159 | 159 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
160 | 160 |
github/deemru/w8io/169f3d6 64.40 ms ◑