tx · kcqmwuotNHvUpxk9yU8BN1JzRvJm7qgaTiEAUmGiMHf

3MrqFfv385KAzAqqdQyprR7FMLSapeifggB:  -0.01300000 Waves

2023.01.19 15:21 [2411806] smart account 3MrqFfv385KAzAqqdQyprR7FMLSapeifggB > SELF 0.00000000 Waves

{ "type": 13, "id": "kcqmwuotNHvUpxk9yU8BN1JzRvJm7qgaTiEAUmGiMHf", "fee": 1300000, "feeAssetId": null, "timestamp": 1674130918311, "version": 1, "sender": "3MrqFfv385KAzAqqdQyprR7FMLSapeifggB", "senderPublicKey": "8Tqc64F7G2nACr6yk8egBWCVAp9ZLxjTeWYdXoyQvMAN", "proofs": [ "aT4jugt2qi942F5sMXjH4wMwEvcKqKhKHpa6751A89HHpLe7QAwNGAUUUXKNaTiXoVtJs3WZwDDsxcEp5vRpkcF" ], "script": "base64:BgInCAISBgoECAgBARIECgIBBBIDCgEBEgQKAgEEEgMKAQESAwoBCBIAEgADU0VQAgJfXwETa2V5TWFuYWdlclB1YmxpY0tleQACFSVzX19tYW5hZ2VyUHVibGljcEtleQEaa2V5UGVuZGluZ01hbmFnZXJQdWJsaWNLZXkAAhslc19fcGVuZGluZ01hbmFnZXJQdWJsaWNLZXkBEGJsb2NrSGVpZ2h0RXJyb3IACQACAQIvVGhlIGJsb2NrJ3MgaGVpZ2h0IGlzIHRvbyBiaWcgZm9yIHRoaXMgcHJvcG9zYWwBEGFscmVhZHlWb3RlRXJyb3IACQACAQIWWW91IGhhdmUgYWxyZWFkeSB2b3RlZAELbm9Wb3RlRXJyb3IACQACAQIaWW91IGhhdmUgbm90IGFscmVhZHkgdm90ZWQBEmd3eENvbnRyYWN0QWRkcmVzcwAJALkJAgkAzAgCAgIlcwkAzAgCAhJnd3hDb250cmFjdEFkZHJlc3MFA25pbAUDU0VQAQ9rZXlDdXJyZW50SW5kZXgACQC5CQIJAMwIAgICJXMJAMwIAgIMY3VycmVudEluZGV4BQNuaWwFA1NFUAEPa2V5UHJvcG9zYWxJbmZvAQZ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: DERQVDjE8R1vyHnmaJVykjTeQz4xvmwSAadY2eoicC2M Next: 5Pe8ULrrAtZJzcNbgMb61V3WsVUoB9icGCM1GULWDXgB Diff:
OldNewDifferences
2727 func keyProposalInfo (number) = makeString(["%s%d", "proposalInfo", toString(number)], SEP)
2828
2929
30-func keyUserVoteOnProposal (number,user) = makeString(["%s%d%d", "userVoteOnProposal", toString(number), user], SEP)
30+func keyUserVoteOnProposal (number,user) = makeString(["%s%d%s", "userVoteOnProposal", toString(number), user], SEP)
3131
3232
3333 func getCurrentIndex () = getIntegerValue(this, keyCurrentIndex())
8383
8484
8585 @Callable(i)
86-func constructor (gwxContractAddress) = {
87- let check = mustManager(i)
88- if ((check == check))
89- then [StringEntry(gwxContractAddress(), gwxContractAddress), IntegerEntry(keyCurrentIndex(), 0)]
90- else throw("Strict value is not equal to itself.")
91- }
92-
93-
94-
95-@Callable(i)
9686 func startNewVote (name,description,expirationHeight,quorumNumber) = {
9787 let checks = [mustManager(i)]
9888 if ((checks == checks))
113103 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
114104 let checks = [if ((voteInfo != EMPTY))
115105 then true
116- else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
106+ else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
117107 then true
118108 else blockHeightError(), if ((userVoteInfo == EMPTY))
119109 then true
120110 else alreadyVoteError()]
121111 if ((checks == checks))
122112 then {
123- let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), parseInt(voteInfoArray[2])], nil))
124- let $t035494637 = if (choice)
113+ let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
114+ let $t033524440 = if (choice)
125115 then {
126- let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5]))
116+ let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber)), voteInfoArray[6]))
127117 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
128118 $Tuple2(action1, action2)
129119 }
130120 else {
131- let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber))))
121+ let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], voteInfoArray[5], toString((value(parseInt(voteInfoArray[6])) + gwxNumber))))
132122 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
133123 $Tuple2(action1, action2)
134124 }
135- let action1 = $t035494637._1
136- let action2 = $t035494637._2
125+ let action1 = $t033524440._1
126+ let action2 = $t033524440._2
137127 [action1, action2]
138128 }
139129 else throw("Strict value is not equal to itself.")
147137 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
148138 let voteInfoArray = split(voteInfo, SEP)
149139 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
150- let userVoteInfoArray = split(voteInfo, SEP)
140+ let userVoteInfoArray = split(userVoteInfo, SEP)
151141 let checks = [if ((voteInfo != EMPTY))
152142 then true
153- else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
143+ else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
154144 then true
155145 else blockHeightError(), if ((userVoteInfo != EMPTY))
156146 then true
157147 else noVoteError()]
158148 if ((checks == checks))
159149 then {
160- let action = if ((userVoteInfoArray[0] == "1"))
161- then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[1])))), voteInfoArray[5]))
162- else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[1]))))))
150+ let action = if ((userVoteInfoArray[1] == "1"))
151+ 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+ else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], voteInfoArray[5], toString((value(parseInt(voteInfoArray[6])) - value(parseInt(userVoteInfoArray[2]))))))
163153 [action, DeleteEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)))]
164154 }
165155 else throw("Strict value is not equal to itself.")
173163 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
174164 let voteInfoArray = split(voteInfo, SEP)
175165 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
176- let userVoteInfoArray = split(voteInfo, SEP)
166+ let userVoteInfoArray = split(userVoteInfo, SEP)
177167 let checks = [if ((voteInfo != EMPTY))
178168 then true
179- else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
169+ else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
180170 then true
181171 else blockHeightError(), if ((userVoteInfo != EMPTY))
182172 then true
183173 else noVoteError()]
184174 if ((checks == checks))
185175 then {
186- let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), parseInt(voteInfoArray[2])], nil))
187- let $t068417180 = if (choice)
176+ let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
177+ let $t066606999 = if (choice)
188178 then {
189179 let forNumber = gwxNumber
190180 let againstNumber = 0
197187 let choiceInteger = 0
198188 $Tuple3(forNumber, againstNumber, choiceInteger)
199189 }
200- let userPowerFor = $t068417180._1
201- let userPowerAgainst = $t068417180._2
202- let choiceInt = $t068417180._3
203- let action = if ((userVoteInfoArray[0] == "1"))
204- then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString(((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[1]))) + userPowerFor)), toString((value(parseInt(voteInfoArray[5])) + userPowerAgainst))))
205- else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + userPowerFor)), toString(((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[1]))) + userPowerAgainst))))
190+ let userPowerFor = $t066606999._1
191+ let userPowerAgainst = $t066606999._2
192+ let choiceInt = $t066606999._3
193+ let action = if ((userVoteInfoArray[1] == "1"))
194+ 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+ 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))))
206196 [action, StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal(toString(choiceInt), toString(gwxNumber)))]
207197 }
208198 else throw("Strict value is not equal to itself.")
220210 else throw("No such vote")]
221211 if ((checks == checks))
222212 then {
223- let positiveVotes = voteInfoArray[4]
224- let negativeVotes = voteInfoArray[5]
225- let quorumNumber = voteInfoArray[3]
213+ let positiveVotes = voteInfoArray[5]
214+ let negativeVotes = voteInfoArray[6]
215+ let quorumNumber = voteInfoArray[4]
226216 $Tuple2(nil, [positiveVotes, negativeVotes, quorumNumber])
227217 }
228218 else throw("Strict value is not equal to itself.")
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
30-func keyUserVoteOnProposal (number,user) = makeString(["%s%d%d", "userVoteOnProposal", toString(number), user], SEP)
30+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)
86-func constructor (gwxContractAddress) = {
87- let check = mustManager(i)
88- if ((check == check))
89- then [StringEntry(gwxContractAddress(), gwxContractAddress), IntegerEntry(keyCurrentIndex(), 0)]
90- else throw("Strict value is not equal to itself.")
91- }
92-
93-
94-
95-@Callable(i)
9686 func startNewVote (name,description,expirationHeight,quorumNumber) = {
9787 let checks = [mustManager(i)]
9888 if ((checks == checks))
9989 then {
10090 let theIndex = getCurrentIndex()
10191 [IntegerEntry(keyCurrentIndex(), (theIndex + 1)), StringEntry(keyProposalInfo(theIndex), formatProposalInfo(name, description, toString((lastBlock.height + expirationHeight)), toString(quorumNumber), "0", "0"))]
10292 }
10393 else throw("Strict value is not equal to itself.")
10494 }
10595
10696
10797
10898 @Callable(i)
10999 func voteFor (proposalIndex,choice) = {
110100 let EMPTY = "EMPTY"
111101 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
112102 let voteInfoArray = split(voteInfo, SEP)
113103 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
114104 let checks = [if ((voteInfo != EMPTY))
115105 then true
116- else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
106+ else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
117107 then true
118108 else blockHeightError(), if ((userVoteInfo == EMPTY))
119109 then true
120110 else alreadyVoteError()]
121111 if ((checks == checks))
122112 then {
123- let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), parseInt(voteInfoArray[2])], nil))
124- let $t035494637 = if (choice)
113+ let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
114+ let $t033524440 = if (choice)
125115 then {
126- let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5]))
116+ let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber)), voteInfoArray[6]))
127117 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
128118 $Tuple2(action1, action2)
129119 }
130120 else {
131- let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber))))
121+ let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], voteInfoArray[5], toString((value(parseInt(voteInfoArray[6])) + gwxNumber))))
132122 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
133123 $Tuple2(action1, action2)
134124 }
135- let action1 = $t035494637._1
136- let action2 = $t035494637._2
125+ let action1 = $t033524440._1
126+ let action2 = $t033524440._2
137127 [action1, action2]
138128 }
139129 else throw("Strict value is not equal to itself.")
140130 }
141131
142132
143133
144134 @Callable(i)
145135 func deleteVote (proposalIndex) = {
146136 let EMPTY = "EMPTY"
147137 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
148138 let voteInfoArray = split(voteInfo, SEP)
149139 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
150- let userVoteInfoArray = split(voteInfo, SEP)
140+ let userVoteInfoArray = split(userVoteInfo, SEP)
151141 let checks = [if ((voteInfo != EMPTY))
152142 then true
153- else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
143+ else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
154144 then true
155145 else blockHeightError(), if ((userVoteInfo != EMPTY))
156146 then true
157147 else noVoteError()]
158148 if ((checks == checks))
159149 then {
160- let action = if ((userVoteInfoArray[0] == "1"))
161- then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[1])))), voteInfoArray[5]))
162- else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[1]))))))
150+ let action = if ((userVoteInfoArray[1] == "1"))
151+ 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+ else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], voteInfoArray[5], toString((value(parseInt(voteInfoArray[6])) - value(parseInt(userVoteInfoArray[2]))))))
163153 [action, DeleteEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)))]
164154 }
165155 else throw("Strict value is not equal to itself.")
166156 }
167157
168158
169159
170160 @Callable(i)
171161 func changeVote (proposalIndex,choice) = {
172162 let EMPTY = "EMPTY"
173163 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
174164 let voteInfoArray = split(voteInfo, SEP)
175165 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
176- let userVoteInfoArray = split(voteInfo, SEP)
166+ let userVoteInfoArray = split(userVoteInfo, SEP)
177167 let checks = [if ((voteInfo != EMPTY))
178168 then true
179- else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
169+ else throw("No such vote"), if ((value(parseInt(voteInfoArray[3])) > lastBlock.height))
180170 then true
181171 else blockHeightError(), if ((userVoteInfo != EMPTY))
182172 then true
183173 else noVoteError()]
184174 if ((checks == checks))
185175 then {
186- let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), parseInt(voteInfoArray[2])], nil))
187- let $t068417180 = if (choice)
176+ let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
177+ let $t066606999 = if (choice)
188178 then {
189179 let forNumber = gwxNumber
190180 let againstNumber = 0
191181 let choiceInteger = 1
192182 $Tuple3(forNumber, againstNumber, choiceInteger)
193183 }
194184 else {
195185 let forNumber = 0
196186 let againstNumber = gwxNumber
197187 let choiceInteger = 0
198188 $Tuple3(forNumber, againstNumber, choiceInteger)
199189 }
200- let userPowerFor = $t068417180._1
201- let userPowerAgainst = $t068417180._2
202- let choiceInt = $t068417180._3
203- let action = if ((userVoteInfoArray[0] == "1"))
204- then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString(((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[1]))) + userPowerFor)), toString((value(parseInt(voteInfoArray[5])) + userPowerAgainst))))
205- else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[0], voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + userPowerFor)), toString(((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[1]))) + userPowerAgainst))))
190+ let userPowerFor = $t066606999._1
191+ let userPowerAgainst = $t066606999._2
192+ let choiceInt = $t066606999._3
193+ let action = if ((userVoteInfoArray[1] == "1"))
194+ 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+ 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))))
206196 [action, StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal(toString(choiceInt), toString(gwxNumber)))]
207197 }
208198 else throw("Strict value is not equal to itself.")
209199 }
210200
211201
212202
213203 @Callable(i)
214204 func getResultREADONLY (proposalIndex) = {
215205 let EMPTY = "EMPTY"
216206 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
217207 let voteInfoArray = split(voteInfo, SEP)
218208 let checks = [if ((voteInfo != EMPTY))
219209 then true
220210 else throw("No such vote")]
221211 if ((checks == checks))
222212 then {
223- let positiveVotes = voteInfoArray[4]
224- let negativeVotes = voteInfoArray[5]
225- let quorumNumber = voteInfoArray[3]
213+ let positiveVotes = voteInfoArray[5]
214+ let negativeVotes = voteInfoArray[6]
215+ let quorumNumber = voteInfoArray[4]
226216 $Tuple2(nil, [positiveVotes, negativeVotes, quorumNumber])
227217 }
228218 else throw("Strict value is not equal to itself.")
229219 }
230220
231221
232222
233223 @Callable(i)
234224 func setManager (pendingManagerPublicKey) = {
235225 let checkCaller = mustManager(i)
236226 if ((checkCaller == checkCaller))
237227 then {
238228 let checkManagerPublicKey = fromBase58String(pendingManagerPublicKey)
239229 if ((checkManagerPublicKey == checkManagerPublicKey))
240230 then [StringEntry(keyPendingManagerPublicKey(), pendingManagerPublicKey)]
241231 else throw("Strict value is not equal to itself.")
242232 }
243233 else throw("Strict value is not equal to itself.")
244234 }
245235
246236
247237
248238 @Callable(i)
249239 func confirmManager () = {
250240 let pm = pendingManagerPublicKeyOrUnit()
251241 let hasPM = if (isDefined(pm))
252242 then true
253243 else throw("no pending manager")
254244 if ((hasPM == hasPM))
255245 then {
256246 let checkPM = if ((i.callerPublicKey == value(pm)))
257247 then true
258248 else throw("you are not pending manager")
259249 if ((checkPM == checkPM))
260250 then [StringEntry(keyManagerPublicKey(), toBase58String(value(pm))), DeleteEntry(keyPendingManagerPublicKey())]
261251 else throw("Strict value is not equal to itself.")
262252 }
263253 else throw("Strict value is not equal to itself.")
264254 }
265255
266256
267257 @Verifier(tx)
268258 func verify () = {
269259 let targetPublicKey = match managerPublicKeyOrUnit() {
270260 case pk: ByteVector =>
271261 pk
272262 case _: Unit =>
273263 tx.senderPublicKey
274264 case _ =>
275265 throw("Match error")
276266 }
277267 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
278268 }
279269

github/deemru/w8io/026f985 
71.95 ms