tx · VwoaJahGxRFgd7qJgR6tMGD8d1NvARuLWcEhZpqaMdw 3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR: -0.01300000 Waves 2023.09.07 10:50 [2744682] smart account 3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR > SELF 0.00000000 Waves
{ "type": 13, "id": "VwoaJahGxRFgd7qJgR6tMGD8d1NvARuLWcEhZpqaMdw", "fee": 1300000, "feeAssetId": null, "timestamp": 1694073087944, "version": 2, "chainId": 84, "sender": "3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR", "senderPublicKey": "B2SJ1BXVdLQeEg3kiwBCznf5t6GjLEz81mEWEV3fs2vF", "proofs": [ "5snQFGNyfAfbk4cnJFdqjGSvDAXjorANriLeeupPBB2WbvHJMfANXU4tXv1ZqwHtNPzUzdsGVzmvHtY4Ab6aD2NE" ], "script": "base64:BgIgCAISBgoECAgBARIECgIBBBIDCgEBEgQKAgEEEgMKAQETAANTRVACAl9fARBibG9ja0hlaWdodEVycm9yAAkAAgECL1RoZSBibG9jaydzIGhlaWdodCBpcyB0b28gYmlnIGZvciB0aGlzIHByb3Bvc2FsARBhbHJlYWR5Vm90ZUVycm9yAAkAAgECFllvdSBoYXZlIGFscmVhZHkgdm90ZWQBC25vVm90ZUVycm9yAAkAAgECGllvdSBoYXZlIG5vdCBhbHJlYWR5IHZvdGVkARJnd3hDb250cmFjdEFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgISZ3d4Q29udHJhY3RBZGRyZXNzBQNuaWwFA1NFUAEPa2V5Q3VycmVudEluZGV4AAkAuQkCCQDMCAICAiVzCQDMCAICDGN1cnJlbnRJbmRleAUDbmlsBQNTRVABD2tleVByb3Bvc2FsSW5mbwEGbnVtYmVyCQC5CQIJAMwIAgIEJXMlZAkAzAgCAgxwcm9wb3NhbEluZm8JAMwIAgkApAMBBQZudW1iZXIFA25pbAUDU0VQARZrZXlQcm9wb3NhbERlc2NyaXB0aW9uAQZudW1iZXIJ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"spentComplexity": 0 } View: original | compacted Prev: Gqh8hArjrKASenSz5eyTKEuv4fXkEf3yWjSEcfCAv8Aq Next: BHU3ZmXnHA4rWxAojSG7hbLfn6gzpRbtrt93MFWxVB6t Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | - | ||
6 | - | let contractFilename = "proposal.ride" | |
7 | - | ||
8 | - | func wrapErr (msg) = makeString([contractFilename, ": ", msg], "") | |
9 | - | ||
10 | - | ||
11 | - | func throwErr (msg) = throw(wrapErr(msg)) | |
12 | - | ||
13 | 5 | ||
14 | 6 | func blockHeightError () = throw("The block's height is too big for this proposal") | |
15 | 7 | ||
52 | 44 | } | |
53 | 45 | ||
54 | 46 | ||
55 | - | let idxProposalInfoName = 1 | |
56 | - | ||
57 | - | let idxProposalInfoEnd = 2 | |
58 | - | ||
59 | - | let idxProposalInfoQuorumNumber = 3 | |
60 | - | ||
61 | - | let idxProposalInfoPositiveVotes = 4 | |
62 | - | ||
63 | - | let idxProposalInfoNegativeVotes = 5 | |
64 | - | ||
65 | 47 | func formatProposalInfo (name,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d", name, end, quorumNumber, positiveVotes, negativeVotes], SEP) | |
66 | 48 | ||
67 | - | ||
68 | - | let idxUserVoteOnProposalVote = 1 | |
69 | - | ||
70 | - | let idxUserVoteOnProposalGwxNumber = 2 | |
71 | 49 | ||
72 | 50 | func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP) | |
73 | 51 | ||
137 | 115 | if ((checks == checks)) | |
138 | 116 | then { | |
139 | 117 | let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[2]))], nil)) | |
140 | - | let $ | |
118 | + | let $t035104546 = if (choice) | |
141 | 119 | then { | |
142 | 120 | let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5])) | |
143 | 121 | let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber))) | |
148 | 126 | let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber))) | |
149 | 127 | $Tuple2(action1, action2) | |
150 | 128 | } | |
151 | - | let action1 = $ | |
152 | - | let action2 = $ | |
129 | + | let action1 = $t035104546._1 | |
130 | + | let action2 = $t035104546._2 | |
153 | 131 | [action1, action2] | |
154 | 132 | } | |
155 | 133 | else throw("Strict value is not equal to itself.") | |
200 | 178 | if ((checks == checks)) | |
201 | 179 | then { | |
202 | 180 | let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil)) | |
203 | - | let $ | |
181 | + | let $t067147053 = if (choice) | |
204 | 182 | then { | |
205 | 183 | let forNumber = gwxNumber | |
206 | 184 | let againstNumber = 0 | |
213 | 191 | let choiceInteger = 0 | |
214 | 192 | $Tuple3(forNumber, againstNumber, choiceInteger) | |
215 | 193 | } | |
216 | - | let userPowerFor = $ | |
217 | - | let userPowerAgainst = $ | |
218 | - | let choiceInt = $ | |
194 | + | let userPowerFor = $t067147053._1 | |
195 | + | let userPowerAgainst = $t067147053._2 | |
196 | + | let choiceInt = $t067147053._3 | |
219 | 197 | let action = if ((userVoteInfoArray[1] == "1")) | |
220 | 198 | then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString(((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[2]))) + userPowerFor)), toString((value(parseInt(voteInfoArray[5])) + userPowerAgainst)))) | |
221 | 199 | else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + userPowerFor)), toString(((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[2]))) + userPowerAgainst)))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | - | ||
6 | - | let contractFilename = "proposal.ride" | |
7 | - | ||
8 | - | func wrapErr (msg) = makeString([contractFilename, ": ", msg], "") | |
9 | - | ||
10 | - | ||
11 | - | func throwErr (msg) = throw(wrapErr(msg)) | |
12 | - | ||
13 | 5 | ||
14 | 6 | func blockHeightError () = throw("The block's height is too big for this proposal") | |
15 | 7 | ||
16 | 8 | ||
17 | 9 | func alreadyVoteError () = throw("You have already voted") | |
18 | 10 | ||
19 | 11 | ||
20 | 12 | func noVoteError () = throw("You have not already voted") | |
21 | 13 | ||
22 | 14 | ||
23 | 15 | func gwxContractAddress () = makeString(["%s", "gwxContractAddress"], SEP) | |
24 | 16 | ||
25 | 17 | ||
26 | 18 | func keyCurrentIndex () = makeString(["%s", "currentIndex"], SEP) | |
27 | 19 | ||
28 | 20 | ||
29 | 21 | func keyProposalInfo (number) = makeString(["%s%d", "proposalInfo", toString(number)], SEP) | |
30 | 22 | ||
31 | 23 | ||
32 | 24 | func keyProposalDescription (number) = makeString(["%s%d", "proposalDescription", toString(number)], SEP) | |
33 | 25 | ||
34 | 26 | ||
35 | 27 | func keyUserVoteOnProposal (number,user) = makeString(["%s%d%s", "userVoteOnProposal", toString(number), user], SEP) | |
36 | 28 | ||
37 | 29 | ||
38 | 30 | func keyManagerPublicKey () = "%s__managerPublicKey" | |
39 | 31 | ||
40 | 32 | ||
41 | 33 | func keyManagerVaultAddress () = "%s__managerVaultAddress" | |
42 | 34 | ||
43 | 35 | ||
44 | 36 | func getCurrentIndex () = getIntegerValue(this, keyCurrentIndex()) | |
45 | 37 | ||
46 | 38 | ||
47 | 39 | func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) { | |
48 | 40 | case s: String => | |
49 | 41 | addressFromStringValue(s) | |
50 | 42 | case _ => | |
51 | 43 | this | |
52 | 44 | } | |
53 | 45 | ||
54 | 46 | ||
55 | - | let idxProposalInfoName = 1 | |
56 | - | ||
57 | - | let idxProposalInfoEnd = 2 | |
58 | - | ||
59 | - | let idxProposalInfoQuorumNumber = 3 | |
60 | - | ||
61 | - | let idxProposalInfoPositiveVotes = 4 | |
62 | - | ||
63 | - | let idxProposalInfoNegativeVotes = 5 | |
64 | - | ||
65 | 47 | func formatProposalInfo (name,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d", name, end, quorumNumber, positiveVotes, negativeVotes], SEP) | |
66 | 48 | ||
67 | - | ||
68 | - | let idxUserVoteOnProposalVote = 1 | |
69 | - | ||
70 | - | let idxUserVoteOnProposalGwxNumber = 2 | |
71 | 49 | ||
72 | 50 | func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP) | |
73 | 51 | ||
74 | 52 | ||
75 | 53 | func asInt (val) = match val { | |
76 | 54 | case valInt: Int => | |
77 | 55 | valInt | |
78 | 56 | case _ => | |
79 | 57 | throw("fail to cast into Int") | |
80 | 58 | } | |
81 | 59 | ||
82 | 60 | ||
83 | 61 | func managerPublicKeyOrUnit () = { | |
84 | 62 | let managerVaultAddress = getManagerVaultAddressOrThis() | |
85 | 63 | match getString(managerVaultAddress, keyManagerPublicKey()) { | |
86 | 64 | case s: String => | |
87 | 65 | fromBase58String(s) | |
88 | 66 | case _: Unit => | |
89 | 67 | unit | |
90 | 68 | case _ => | |
91 | 69 | throw("Match error") | |
92 | 70 | } | |
93 | 71 | } | |
94 | 72 | ||
95 | 73 | ||
96 | 74 | func isManager (i) = match managerPublicKeyOrUnit() { | |
97 | 75 | case pk: ByteVector => | |
98 | 76 | (i.callerPublicKey == pk) | |
99 | 77 | case _: Unit => | |
100 | 78 | (i.caller == this) | |
101 | 79 | case _ => | |
102 | 80 | throw("Match error") | |
103 | 81 | } | |
104 | 82 | ||
105 | 83 | ||
106 | 84 | func mustManager (i) = if (isManager(i)) | |
107 | 85 | then true | |
108 | 86 | else throw("permission denied") | |
109 | 87 | ||
110 | 88 | ||
111 | 89 | @Callable(i) | |
112 | 90 | func startNewVote (name,description,expirationHeight,quorumNumber) = { | |
113 | 91 | let checks = [mustManager(i)] | |
114 | 92 | if ((checks == checks)) | |
115 | 93 | then { | |
116 | 94 | let theIndex = getCurrentIndex() | |
117 | 95 | [IntegerEntry(keyCurrentIndex(), (theIndex + 1)), StringEntry(keyProposalInfo(theIndex), formatProposalInfo(name, toString((lastBlock.height + expirationHeight)), toString(quorumNumber), "0", "0")), StringEntry(keyProposalDescription(theIndex), description)] | |
118 | 96 | } | |
119 | 97 | else throw("Strict value is not equal to itself.") | |
120 | 98 | } | |
121 | 99 | ||
122 | 100 | ||
123 | 101 | ||
124 | 102 | @Callable(i) | |
125 | 103 | func voteFor (proposalIndex,choice) = { | |
126 | 104 | let EMPTY = "EMPTY" | |
127 | 105 | let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY) | |
128 | 106 | let voteInfoArray = split(voteInfo, SEP) | |
129 | 107 | let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY) | |
130 | 108 | let checks = [if ((voteInfo != EMPTY)) | |
131 | 109 | then true | |
132 | 110 | else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height)) | |
133 | 111 | then true | |
134 | 112 | else blockHeightError(), if ((userVoteInfo == EMPTY)) | |
135 | 113 | then true | |
136 | 114 | else alreadyVoteError()] | |
137 | 115 | if ((checks == checks)) | |
138 | 116 | then { | |
139 | 117 | let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[2]))], nil)) | |
140 | - | let $ | |
118 | + | let $t035104546 = if (choice) | |
141 | 119 | then { | |
142 | 120 | let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5])) | |
143 | 121 | let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber))) | |
144 | 122 | $Tuple2(action1, action2) | |
145 | 123 | } | |
146 | 124 | else { | |
147 | 125 | let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber)))) | |
148 | 126 | let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber))) | |
149 | 127 | $Tuple2(action1, action2) | |
150 | 128 | } | |
151 | - | let action1 = $ | |
152 | - | let action2 = $ | |
129 | + | let action1 = $t035104546._1 | |
130 | + | let action2 = $t035104546._2 | |
153 | 131 | [action1, action2] | |
154 | 132 | } | |
155 | 133 | else throw("Strict value is not equal to itself.") | |
156 | 134 | } | |
157 | 135 | ||
158 | 136 | ||
159 | 137 | ||
160 | 138 | @Callable(i) | |
161 | 139 | func deleteVote (proposalIndex) = { | |
162 | 140 | let EMPTY = "EMPTY" | |
163 | 141 | let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY) | |
164 | 142 | let voteInfoArray = split(voteInfo, SEP) | |
165 | 143 | let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY) | |
166 | 144 | let userVoteInfoArray = split(userVoteInfo, SEP) | |
167 | 145 | let checks = [if ((voteInfo != EMPTY)) | |
168 | 146 | then true | |
169 | 147 | else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height)) | |
170 | 148 | then true | |
171 | 149 | else blockHeightError(), if ((userVoteInfo != EMPTY)) | |
172 | 150 | then true | |
173 | 151 | else noVoteError()] | |
174 | 152 | if ((checks == checks)) | |
175 | 153 | then { | |
176 | 154 | let action = if ((userVoteInfoArray[1] == "1")) | |
177 | 155 | then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[2])))), voteInfoArray[5])) | |
178 | 156 | else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[2])))))) | |
179 | 157 | [action, DeleteEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)))] | |
180 | 158 | } | |
181 | 159 | else throw("Strict value is not equal to itself.") | |
182 | 160 | } | |
183 | 161 | ||
184 | 162 | ||
185 | 163 | ||
186 | 164 | @Callable(i) | |
187 | 165 | func changeVote (proposalIndex,choice) = { | |
188 | 166 | let EMPTY = "EMPTY" | |
189 | 167 | let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY) | |
190 | 168 | let voteInfoArray = split(voteInfo, SEP) | |
191 | 169 | let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY) | |
192 | 170 | let userVoteInfoArray = split(userVoteInfo, SEP) | |
193 | 171 | let checks = [if ((voteInfo != EMPTY)) | |
194 | 172 | then true | |
195 | 173 | else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height)) | |
196 | 174 | then true | |
197 | 175 | else blockHeightError(), if ((userVoteInfo != EMPTY)) | |
198 | 176 | then true | |
199 | 177 | else noVoteError()] | |
200 | 178 | if ((checks == checks)) | |
201 | 179 | then { | |
202 | 180 | let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil)) | |
203 | - | let $ | |
181 | + | let $t067147053 = if (choice) | |
204 | 182 | then { | |
205 | 183 | let forNumber = gwxNumber | |
206 | 184 | let againstNumber = 0 | |
207 | 185 | let choiceInteger = 1 | |
208 | 186 | $Tuple3(forNumber, againstNumber, choiceInteger) | |
209 | 187 | } | |
210 | 188 | else { | |
211 | 189 | let forNumber = 0 | |
212 | 190 | let againstNumber = gwxNumber | |
213 | 191 | let choiceInteger = 0 | |
214 | 192 | $Tuple3(forNumber, againstNumber, choiceInteger) | |
215 | 193 | } | |
216 | - | let userPowerFor = $ | |
217 | - | let userPowerAgainst = $ | |
218 | - | let choiceInt = $ | |
194 | + | let userPowerFor = $t067147053._1 | |
195 | + | let userPowerAgainst = $t067147053._2 | |
196 | + | let choiceInt = $t067147053._3 | |
219 | 197 | let action = if ((userVoteInfoArray[1] == "1")) | |
220 | 198 | then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString(((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[2]))) + userPowerFor)), toString((value(parseInt(voteInfoArray[5])) + userPowerAgainst)))) | |
221 | 199 | else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + userPowerFor)), toString(((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[2]))) + userPowerAgainst)))) | |
222 | 200 | [action, StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal(toString(choiceInt), toString(gwxNumber)))] | |
223 | 201 | } | |
224 | 202 | else throw("Strict value is not equal to itself.") | |
225 | 203 | } | |
226 | 204 | ||
227 | 205 | ||
228 | 206 | ||
229 | 207 | @Callable(i) | |
230 | 208 | func getResultREADONLY (proposalIndex) = { | |
231 | 209 | let EMPTY = "EMPTY" | |
232 | 210 | let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY) | |
233 | 211 | let voteInfoArray = split(voteInfo, SEP) | |
234 | 212 | let checks = [if ((voteInfo != EMPTY)) | |
235 | 213 | then true | |
236 | 214 | else throw("No such vote")] | |
237 | 215 | if ((checks == checks)) | |
238 | 216 | then { | |
239 | 217 | let quorumNumber = voteInfoArray[3] | |
240 | 218 | let positiveVotes = voteInfoArray[4] | |
241 | 219 | let negativeVotes = voteInfoArray[5] | |
242 | 220 | $Tuple2(nil, [positiveVotes, negativeVotes, quorumNumber]) | |
243 | 221 | } | |
244 | 222 | else throw("Strict value is not equal to itself.") | |
245 | 223 | } | |
246 | 224 | ||
247 | 225 | ||
248 | 226 | @Verifier(tx) | |
249 | 227 | func verify () = { | |
250 | 228 | let targetPublicKey = match managerPublicKeyOrUnit() { | |
251 | 229 | case pk: ByteVector => | |
252 | 230 | pk | |
253 | 231 | case _: Unit => | |
254 | 232 | tx.senderPublicKey | |
255 | 233 | case _ => | |
256 | 234 | throw("Match error") | |
257 | 235 | } | |
258 | 236 | sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey) | |
259 | 237 | } | |
260 | 238 |
github/deemru/w8io/169f3d6 99.10 ms ◑