tx · ENWfVtLcvKw3k8owJSfBHbompimA1ahk4dewWK6SwinL

3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR:  -0.01300000 Waves

2023.09.07 12:27 [2744786] smart account 3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR > SELF 0.00000000 Waves

{ "type": 13, "id": "ENWfVtLcvKw3k8owJSfBHbompimA1ahk4dewWK6SwinL", "fee": 1300000, "feeAssetId": null, "timestamp": 1694078848758, "version": 2, "chainId": 84, "sender": "3N3vjjwCXWsTfu2w6biwcPhZe3v17HGY3tR", "senderPublicKey": "B2SJ1BXVdLQeEg3kiwBCznf5t6GjLEz81mEWEV3fs2vF", "proofs": [ "zDq1xmbqsp9KEn527NoYfJortnkZQhfQ1xvp7NDshBr3x76r4b3NRtorJQw3jqSuMoFkyYYMQ8dd6Ux5DZs9AZd" ], "script": "base64:BgIgCAISBgoECAgBARIECgIBBBIDCgEBEgQKAgEEEgMKAQEdAANTRVACAl9fABBjb250cmFjdEZpbGVuYW1lAg1wcm9wb3NhbC5yaWRlAQd3cmFwRXJyAQNtc2cJALkJAgkAzAgCBRBjb250cmFjdEZpbGVuYW1lCQDMCAICAjogCQDMCAIFA21zZwUDbmlsAgABCHRocm93RXJyAQNtc2cJAAIBCQEHd3JhcEVycgEFA21zZwEQYmxvY2tIZWlnaHRFcnJvcgAJAAIBAi9UaGUgYmxvY2sncyBoZWlnaHQgaXMgdG9vIGJpZyBmb3IgdGhpcyBwcm9wb3NhbAEQYWxyZWFkeVZvdGVFcnJvcgAJAAIBAhZZb3UgaGF2ZSBhbHJlYWR5IHZvdGVkAQtub1ZvdGVFcnJvcgAJAAIBAhpZb3UgaGF2ZSBub3QgYWxyZWFkeSB2b3RlZAESZ3d4Q29udHJhY3RBZGRyZXNzAAkAuQkCCQDMCAICAiVzCQDMCAICEmd3eENvbnRyYWN0QWRkcmVzcwUDbmlsBQNTRVABD2tleUN1cnJlbnRJbmRleAAJALkJAgkAzAgCAgIlcwkAzAgCA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AgCBQ1wb3NpdGl2ZVZvdGVzCQDMCAIFDW5lZ2F0aXZlVm90ZXMJAMwIAgUMcXVvcnVtTnVtYmVyBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BAnR4AQZ2ZXJpZnkABA90YXJnZXRQdWJsaWNLZXkEByRtYXRjaDAJARZtYW5hZ2VyUHVibGljS2V5T3JVbml0AAMJAAECBQckbWF0Y2gwAgpCeXRlVmVjdG9yBAJwawUHJG1hdGNoMAUCcGsDCQABAgUHJG1hdGNoMAIEVW5pdAgFAnR4D3NlbmRlclB1YmxpY0tleQkAAgECC01hdGNoIGVycm9yCQD0AwMIBQJ0eAlib2R5Qnl0ZXMJAJEDAggFAnR4BnByb29mcwAABQ90YXJnZXRQdWJsaWNLZXkj/RTq", "height": 2744786, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8TAMyD7rTEkkLweEahHSSW9ZWuVBR5TQQ6v1YVtoLcVW Next: 3MHCbzwDDBfB2cvFz6vCZNadi35nK7XwwMJj9Usd2MhK Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 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+
513
614 func blockHeightError () = throw("The block's height is too big for this proposal")
715
4452 }
4553
4654
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+
4765 func formatProposalInfo (name,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d", name, end, quorumNumber, positiveVotes, negativeVotes], SEP)
4866
67+
68+let idxUserVoteOnProposalVote = 1
69+
70+let idxUserVoteOnProposalGwxNumber = 2
4971
5072 func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP)
5173
115137 if ((checks == checks))
116138 then {
117139 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[2]))], nil))
118- let $t035104546 = if (choice)
140+ let $t039154951 = if (choice)
119141 then {
120142 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5]))
121143 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
126148 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
127149 $Tuple2(action1, action2)
128150 }
129- let action1 = $t035104546._1
130- let action2 = $t035104546._2
151+ let action1 = $t039154951._1
152+ let action2 = $t039154951._2
131153 [action1, action2]
132154 }
133155 else throw("Strict value is not equal to itself.")
178200 if ((checks == checks))
179201 then {
180202 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
181- let $t067147053 = if (choice)
203+ let $t071197458 = if (choice)
182204 then {
183205 let forNumber = gwxNumber
184206 let againstNumber = 0
191213 let choiceInteger = 0
192214 $Tuple3(forNumber, againstNumber, choiceInteger)
193215 }
194- let userPowerFor = $t067147053._1
195- let userPowerAgainst = $t067147053._2
196- let choiceInt = $t067147053._3
216+ let userPowerFor = $t071197458._1
217+ let userPowerAgainst = $t071197458._2
218+ let choiceInt = $t071197458._3
197219 let action = if ((userVoteInfoArray[1] == "1"))
198220 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))))
199221 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))))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 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+
513
614 func blockHeightError () = throw("The block's height is too big for this proposal")
715
816
917 func alreadyVoteError () = throw("You have already voted")
1018
1119
1220 func noVoteError () = throw("You have not already voted")
1321
1422
1523 func gwxContractAddress () = makeString(["%s", "gwxContractAddress"], SEP)
1624
1725
1826 func keyCurrentIndex () = makeString(["%s", "currentIndex"], SEP)
1927
2028
2129 func keyProposalInfo (number) = makeString(["%s%d", "proposalInfo", toString(number)], SEP)
2230
2331
2432 func keyProposalDescription (number) = makeString(["%s%d", "proposalDescription", toString(number)], SEP)
2533
2634
2735 func keyUserVoteOnProposal (number,user) = makeString(["%s%d%s", "userVoteOnProposal", toString(number), user], SEP)
2836
2937
3038 func keyManagerPublicKey () = "%s__managerPublicKey"
3139
3240
3341 func keyManagerVaultAddress () = "%s__managerVaultAddress"
3442
3543
3644 func getCurrentIndex () = getIntegerValue(this, keyCurrentIndex())
3745
3846
3947 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
4048 case s: String =>
4149 addressFromStringValue(s)
4250 case _ =>
4351 this
4452 }
4553
4654
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+
4765 func formatProposalInfo (name,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d", name, end, quorumNumber, positiveVotes, negativeVotes], SEP)
4866
67+
68+let idxUserVoteOnProposalVote = 1
69+
70+let idxUserVoteOnProposalGwxNumber = 2
4971
5072 func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP)
5173
5274
5375 func asInt (val) = match val {
5476 case valInt: Int =>
5577 valInt
5678 case _ =>
5779 throw("fail to cast into Int")
5880 }
5981
6082
6183 func managerPublicKeyOrUnit () = {
6284 let managerVaultAddress = getManagerVaultAddressOrThis()
6385 match getString(managerVaultAddress, keyManagerPublicKey()) {
6486 case s: String =>
6587 fromBase58String(s)
6688 case _: Unit =>
6789 unit
6890 case _ =>
6991 throw("Match error")
7092 }
7193 }
7294
7395
7496 func isManager (i) = match managerPublicKeyOrUnit() {
7597 case pk: ByteVector =>
7698 (i.callerPublicKey == pk)
7799 case _: Unit =>
78100 (i.caller == this)
79101 case _ =>
80102 throw("Match error")
81103 }
82104
83105
84106 func mustManager (i) = if (isManager(i))
85107 then true
86108 else throw("permission denied")
87109
88110
89111 @Callable(i)
90112 func startNewVote (name,description,expirationHeight,quorumNumber) = {
91113 let checks = [mustManager(i)]
92114 if ((checks == checks))
93115 then {
94116 let theIndex = getCurrentIndex()
95117 [IntegerEntry(keyCurrentIndex(), (theIndex + 1)), StringEntry(keyProposalInfo(theIndex), formatProposalInfo(name, toString((lastBlock.height + expirationHeight)), toString(quorumNumber), "0", "0")), StringEntry(keyProposalDescription(theIndex), description)]
96118 }
97119 else throw("Strict value is not equal to itself.")
98120 }
99121
100122
101123
102124 @Callable(i)
103125 func voteFor (proposalIndex,choice) = {
104126 let EMPTY = "EMPTY"
105127 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
106128 let voteInfoArray = split(voteInfo, SEP)
107129 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
108130 let checks = [if ((voteInfo != EMPTY))
109131 then true
110132 else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
111133 then true
112134 else blockHeightError(), if ((userVoteInfo == EMPTY))
113135 then true
114136 else alreadyVoteError()]
115137 if ((checks == checks))
116138 then {
117139 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[2]))], nil))
118- let $t035104546 = if (choice)
140+ let $t039154951 = if (choice)
119141 then {
120142 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5]))
121143 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
122144 $Tuple2(action1, action2)
123145 }
124146 else {
125147 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber))))
126148 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
127149 $Tuple2(action1, action2)
128150 }
129- let action1 = $t035104546._1
130- let action2 = $t035104546._2
151+ let action1 = $t039154951._1
152+ let action2 = $t039154951._2
131153 [action1, action2]
132154 }
133155 else throw("Strict value is not equal to itself.")
134156 }
135157
136158
137159
138160 @Callable(i)
139161 func deleteVote (proposalIndex) = {
140162 let EMPTY = "EMPTY"
141163 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
142164 let voteInfoArray = split(voteInfo, SEP)
143165 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
144166 let userVoteInfoArray = split(userVoteInfo, SEP)
145167 let checks = [if ((voteInfo != EMPTY))
146168 then true
147169 else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
148170 then true
149171 else blockHeightError(), if ((userVoteInfo != EMPTY))
150172 then true
151173 else noVoteError()]
152174 if ((checks == checks))
153175 then {
154176 let action = if ((userVoteInfoArray[1] == "1"))
155177 then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[2])))), voteInfoArray[5]))
156178 else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[2]))))))
157179 [action, DeleteEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)))]
158180 }
159181 else throw("Strict value is not equal to itself.")
160182 }
161183
162184
163185
164186 @Callable(i)
165187 func changeVote (proposalIndex,choice) = {
166188 let EMPTY = "EMPTY"
167189 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
168190 let voteInfoArray = split(voteInfo, SEP)
169191 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
170192 let userVoteInfoArray = split(userVoteInfo, SEP)
171193 let checks = [if ((voteInfo != EMPTY))
172194 then true
173195 else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
174196 then true
175197 else blockHeightError(), if ((userVoteInfo != EMPTY))
176198 then true
177199 else noVoteError()]
178200 if ((checks == checks))
179201 then {
180202 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
181- let $t067147053 = if (choice)
203+ let $t071197458 = if (choice)
182204 then {
183205 let forNumber = gwxNumber
184206 let againstNumber = 0
185207 let choiceInteger = 1
186208 $Tuple3(forNumber, againstNumber, choiceInteger)
187209 }
188210 else {
189211 let forNumber = 0
190212 let againstNumber = gwxNumber
191213 let choiceInteger = 0
192214 $Tuple3(forNumber, againstNumber, choiceInteger)
193215 }
194- let userPowerFor = $t067147053._1
195- let userPowerAgainst = $t067147053._2
196- let choiceInt = $t067147053._3
216+ let userPowerFor = $t071197458._1
217+ let userPowerAgainst = $t071197458._2
218+ let choiceInt = $t071197458._3
197219 let action = if ((userVoteInfoArray[1] == "1"))
198220 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))))
199221 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))))
200222 [action, StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal(toString(choiceInt), toString(gwxNumber)))]
201223 }
202224 else throw("Strict value is not equal to itself.")
203225 }
204226
205227
206228
207229 @Callable(i)
208230 func getResultREADONLY (proposalIndex) = {
209231 let EMPTY = "EMPTY"
210232 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
211233 let voteInfoArray = split(voteInfo, SEP)
212234 let checks = [if ((voteInfo != EMPTY))
213235 then true
214236 else throw("No such vote")]
215237 if ((checks == checks))
216238 then {
217239 let quorumNumber = voteInfoArray[3]
218240 let positiveVotes = voteInfoArray[4]
219241 let negativeVotes = voteInfoArray[5]
220242 $Tuple2(nil, [positiveVotes, negativeVotes, quorumNumber])
221243 }
222244 else throw("Strict value is not equal to itself.")
223245 }
224246
225247
226248 @Verifier(tx)
227249 func verify () = {
228250 let targetPublicKey = match managerPublicKeyOrUnit() {
229251 case pk: ByteVector =>
230252 pk
231253 case _: Unit =>
232254 tx.senderPublicKey
233255 case _ =>
234256 throw("Match error")
235257 }
236258 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
237259 }
238260

github/deemru/w8io/026f985 
43.42 ms