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