tx · CUfFg3v2P6qxZV3wDnEFkHs9RWQoQcKJU6exmqQun7B4

3N85L4q2CSfY88d3xArVHd1SSwhQHD5CsKk:  -0.01300000 Waves

2023.03.16 12:13 [2492379] smart account 3N85L4q2CSfY88d3xArVHd1SSwhQHD5CsKk > SELF 0.00000000 Waves

{ "type": 13, "id": "CUfFg3v2P6qxZV3wDnEFkHs9RWQoQcKJU6exmqQun7B4", "fee": 1300000, "feeAssetId": null, "timestamp": 1678957999312, "version": 2, "chainId": 84, "sender": "3N85L4q2CSfY88d3xArVHd1SSwhQHD5CsKk", "senderPublicKey": "EfQnrofVeCxCeK3g9SfX4jnSB6XgqKyq8XupMFCSVPfP", "proofs": [ "2zv5QX5PqpHbpwypE6yWj14aqiqK7rvkgfPjCyVtqTFhyNJwc2jXKugML8MrCw41bU3286XUchFig39XVyocmah7" ], "script": "base64:BgInCAISBgoECAgBARIECgIBBBIDCgEBEgQKAgEEEgMKAQESAwoBCBIAEgADU0VQAgJfXwETa2V5TWFuYWdlclB1YmxpY0tleQACFSVzX19tYW5hZ2VyUHVibGljcEtleQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAhslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBEGJsb2NrSGVpZ2h0RXJyb3IACQACAQIvVGhlIGJsb2NrJ3MgaGVpZ2h0IGlzIHRvbyBiaWcgZm9yIHRoaXMgcHJvcG9zYWwBEGFscmVhZHlWb3RlRXJyb3IACQACAQIWWW91IGhhdmUgYWxyZWFkeSB2b3RlZAELbm9Wb3RlRXJyb3IACQACAQIaWW91IGhhdmUgbm90IGFscmVhZHkgdm90ZWQBEmd3eENvbnRyYWN0QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAhJnd3hDb250cmFjdEFkZHJlc3MFA25pbAUDU0VQAQ9rZXlDdXJyZW50SW5kZXgACQC5CQIJAMwIAgICJXMJAMwIAgIMY3VycmVudEluZGV4BQNuaWwFA1NFUAEPa2V5UHJvcG9z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ted Prev: 39Tb3oL1G9wcJbaoazxCVy458RAqVSC3H8aTkBrYwXWs Next: 3joWnx1DF8ETfi56rhHwCuXH42RWytHCkCcgTvzj9VZY Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let SEP = "__"
55
66 func keyManagerPublicKey () = "%s__managerPublicpKey"
77
88
99 func keyPendingManagerPublicKey () = "%s__pendingManagerPublicKey"
1010
1111
1212 func blockHeightError () = throw("The block's height is too big for this proposal")
1313
1414
1515 func alreadyVoteError () = throw("You have already voted")
1616
1717
1818 func noVoteError () = throw("You have not already voted")
1919
2020
2121 func gwxContractAddress () = makeString(["%s", "gwxContractAddress"], SEP)
2222
2323
2424 func keyCurrentIndex () = makeString(["%s", "currentIndex"], SEP)
2525
2626
2727 func keyProposalInfo (number) = makeString(["%s%d", "proposalInfo", toString(number)], SEP)
2828
2929
3030 func keyUserVoteOnProposal (number,user) = makeString(["%s%d%s", "userVoteOnProposal", toString(number), user], SEP)
3131
3232
3333 func getCurrentIndex () = getIntegerValue(this, keyCurrentIndex())
3434
3535
3636 func formatProposalInfo (name,description,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d%d", name, description, end, quorumNumber, positiveVotes, negativeVotes], SEP)
3737
3838
3939 func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP)
4040
4141
4242 func asInt (val) = match val {
4343 case valInt: Int =>
4444 valInt
4545 case _ =>
4646 throw("fail to cast into Int")
4747 }
4848
4949
5050 func managerPublicKeyOrUnit () = match getString(keyManagerPublicKey()) {
5151 case s: String =>
5252 fromBase58String(s)
5353 case _: Unit =>
5454 unit
5555 case _ =>
5656 throw("Match error")
5757 }
5858
5959
6060 func pendingManagerPublicKeyOrUnit () = match getString(keyPendingManagerPublicKey()) {
6161 case s: String =>
6262 fromBase58String(s)
6363 case _: Unit =>
6464 unit
6565 case _ =>
6666 throw("Match error")
6767 }
6868
6969
7070 func isManager (i) = match managerPublicKeyOrUnit() {
7171 case pk: ByteVector =>
7272 (i.callerPublicKey == pk)
7373 case _: Unit =>
7474 (i.caller == this)
7575 case _ =>
7676 throw("Match error")
7777 }
7878
7979
8080 func mustManager (i) = if (isManager(i))
8181 then true
8282 else throw("permission denied")
8383
8484
8585 @Callable(i)
8686 func startNewVote (name,description,expirationHeight,quorumNumber) = {
8787 let checks = [mustManager(i)]
8888 if ((checks == checks))
8989 then {
9090 let theIndex = getCurrentIndex()
9191 [IntegerEntry(keyCurrentIndex(), (theIndex + 1)), StringEntry(keyProposalInfo(theIndex), formatProposalInfo(name, description, toString((lastBlock.height + expirationHeight)), toString(quorumNumber), "0", "0"))]
9292 }
9393 else throw("Strict value is not equal to itself.")
9494 }
9595
9696
9797
9898 @Callable(i)
9999 func voteFor (proposalIndex,choice) = {
100100 let EMPTY = "EMPTY"
101101 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
102102 let voteInfoArray = split(voteInfo, SEP)
103103 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
104104 let checks = [if ((voteInfo != EMPTY))
105105 then true
106106 else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
107107 then true
108108 else blockHeightError(), if ((userVoteInfo == EMPTY))
109109 then true
110110 else alreadyVoteError()]
111111 if ((checks == checks))
112112 then {
113113 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
114114 let $t034674595 = if (choice)
115115 then {
116116 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber)), voteInfoArray[6]))
117117 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
118118 $Tuple2(action1, action2)
119119 }
120120 else {
121121 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], voteInfoArray[5], toString((value(parseInt(voteInfoArray[6])) + gwxNumber))))
122122 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
123123 $Tuple2(action1, action2)
124124 }
125125 let action1 = $t034674595._1
126126 let action2 = $t034674595._2
127127 [action1, action2]
128128 }
129129 else throw("Strict value is not equal to itself.")
130130 }
131131
132132
133133
134134 @Callable(i)
135135 func deleteVote (proposalIndex) = {
136136 let EMPTY = "EMPTY"
137137 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
138138 let voteInfoArray = split(voteInfo, SEP)
139139 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
140140 let userVoteInfoArray = split(userVoteInfo, SEP)
141141 let checks = [if ((voteInfo != EMPTY))
142142 then true
143143 else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
144144 then true
145145 else blockHeightError(), if ((userVoteInfo != EMPTY))
146146 then true
147147 else noVoteError()]
148148 if ((checks == checks))
149149 then {
150150 let action = if ((userVoteInfoArray[1] == "1"))
151151 then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[2])))), voteInfoArray[6]))
152152 else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], voteInfoArray[5], toString((value(parseInt(voteInfoArray[6])) - value(parseInt(userVoteInfoArray[2]))))))
153153 [action, DeleteEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)))]
154154 }
155155 else throw("Strict value is not equal to itself.")
156156 }
157157
158158
159159
160160 @Callable(i)
161161 func changeVote (proposalIndex,choice) = {
162162 let EMPTY = "EMPTY"
163163 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
164164 let voteInfoArray = split(voteInfo, SEP)
165165 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
166166 let userVoteInfoArray = split(userVoteInfo, SEP)
167167 let checks = [if ((voteInfo != EMPTY))
168168 then true
169169 else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
170170 then true
171171 else blockHeightError(), if ((userVoteInfo != EMPTY))
172172 then true
173173 else noVoteError()]
174174 if ((checks == checks))
175175 then {
176176 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
177177 let $t068867235 = if (choice)
178178 then {
179179 let forNumber = gwxNumber
180180 let againstNumber = 0
181181 let choiceInteger = 1
182182 $Tuple3(forNumber, againstNumber, choiceInteger)
183183 }
184184 else {
185185 let forNumber = 0
186186 let againstNumber = gwxNumber
187187 let choiceInteger = 0
188188 $Tuple3(forNumber, againstNumber, choiceInteger)
189189 }
190190 let userPowerFor = $t068867235._1
191191 let userPowerAgainst = $t068867235._2
192192 let choiceInt = $t068867235._3
193193 let action = if ((userVoteInfoArray[1] == "1"))
194194 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))))
195195 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))))
196196 [action, StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal(toString(choiceInt), toString(gwxNumber)))]
197197 }
198198 else throw("Strict value is not equal to itself.")
199199 }
200200
201201
202202
203203 @Callable(i)
204204 func getResultREADONLY (proposalIndex) = {
205205 let EMPTY = "EMPTY"
206206 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
207207 let voteInfoArray = split(voteInfo, SEP)
208208 let checks = [if ((voteInfo != EMPTY))
209209 then true
210210 else throw("No such vote")]
211211 if ((checks == checks))
212212 then {
213213 let positiveVotes = voteInfoArray[5]
214214 let negativeVotes = voteInfoArray[6]
215215 let quorumNumber = voteInfoArray[4]
216216 $Tuple2(nil, [positiveVotes, negativeVotes, quorumNumber])
217217 }
218218 else throw("Strict value is not equal to itself.")
219219 }
220220
221221
222222
223223 @Callable(i)
224224 func setManager (pendingManagerPublicKey) = {
225225 let checkCaller = mustManager(i)
226226 if ((checkCaller == checkCaller))
227227 then {
228228 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
229229 if ((checkManagerPublicKey == checkManagerPublicKey))
230230 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
231231 else throw("Strict value is not equal to itself.")
232232 }
233233 else throw("Strict value is not equal to itself.")
234234 }
235235
236236
237237
238238 @Callable(i)
239239 func confirmManager () = {
240240 let pm = pendingManagerPublicKeyOrUnit()
241241 let hasPM = if (isDefined(pm))
242242 then true
243243 else throw("no pending manager")
244244 if ((hasPM == hasPM))
245245 then {
246246 let checkPM = if ((i.callerPublicKey == value(pm)))
247247 then true
248248 else throw("you are not pending manager")
249249 if ((checkPM == checkPM))
250250 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
251251 else throw("Strict value is not equal to itself.")
252252 }
253253 else throw("Strict value is not equal to itself.")
254254 }
255255
256256
257257 @Verifier(tx)
258258 func verify () = {
259259 let targetPublicKey = match managerPublicKeyOrUnit() {
260260 case pk: ByteVector =>
261261 pk
262262 case _: Unit =>
263263 tx.senderPublicKey
264264 case _ =>
265265 throw("Match error")
266266 }
267267 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
268268 }
269269

github/deemru/w8io/fabc49c 
39.71 ms