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:BgIgCAISBgoECAgBARIECgIBBBIDCgEBEgQKAgEEEgMKAQETAANTRVACAl9fARBibG9ja0hlaWdodEVycm9yAAkAAgECL1RoZSBibG9jaydzIGhlaWdodCBpcyB0b28gYmlnIGZvciB0aGlzIHByb3Bvc2FsARBhbHJlYWR5Vm90ZUVycm9yAAkAAgECFllvdSBoYXZlIGFscmVhZHkgdm90ZWQBC25vVm90ZUVycm9yAAkAAgECGllvdSBoYXZlIG5vdCBhbHJlYWR5IHZvdGVkARJnd3hDb250cmFjdEFkZHJlc3MACQC5CQIJAMwIAgICJXMJAMwIAgISZ3d4Q29udHJhY3RBZGRyZXNzBQNuaWwFA1NFUAEPa2V5Q3VycmVudEluZGV4AAkAuQkCCQDMCAICAiVzCQDMCAICDGN1cnJlbnRJbmRleAUDbmlsBQNTRVABD2tleVByb3Bvc2FsSW5mbwEGbnVtYmVyCQC5CQIJAMwIAgIEJXMlZAkAzAgCAgxwcm9wb3NhbEluZm8JAMwIAgkApAMBBQZudW1iZXIFA25pbAUDU0VQARZrZXlQcm9wb3NhbERlc2NyaXB0aW9uAQZudW1iZXI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", "spentComplexity": 0 } View: original | compacted Prev: Gqh8hArjrKASenSz5eyTKEuv4fXkEf3yWjSEcfCAv8Aq Next: BHU3ZmXnHA4rWxAojSG7hbLfn6gzpRbtrt93MFWxVB6t 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-
135
146 func blockHeightError () = throw("The block's height is too big for this proposal")
157
5244 }
5345
5446
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-
6547 func formatProposalInfo (name,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d", name, end, quorumNumber, positiveVotes, negativeVotes], SEP)
6648
67-
68-let idxUserVoteOnProposalVote = 1
69-
70-let idxUserVoteOnProposalGwxNumber = 2
7149
7250 func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP)
7351
137115 if ((checks == checks))
138116 then {
139117 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[2]))], nil))
140- let $t039154951 = if (choice)
118+ let $t035104546 = if (choice)
141119 then {
142120 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5]))
143121 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
148126 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
149127 $Tuple2(action1, action2)
150128 }
151- let action1 = $t039154951._1
152- let action2 = $t039154951._2
129+ let action1 = $t035104546._1
130+ let action2 = $t035104546._2
153131 [action1, action2]
154132 }
155133 else throw("Strict value is not equal to itself.")
200178 if ((checks == checks))
201179 then {
202180 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
203- let $t071197458 = if (choice)
181+ let $t067147053 = if (choice)
204182 then {
205183 let forNumber = gwxNumber
206184 let againstNumber = 0
213191 let choiceInteger = 0
214192 $Tuple3(forNumber, againstNumber, choiceInteger)
215193 }
216- let userPowerFor = $t071197458._1
217- let userPowerAgainst = $t071197458._2
218- let choiceInt = $t071197458._3
194+ let userPowerFor = $t067147053._1
195+ let userPowerAgainst = $t067147053._2
196+ let choiceInt = $t067147053._3
219197 let action = if ((userVoteInfoArray[1] == "1"))
220198 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))))
221199 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-
135
146 func blockHeightError () = throw("The block's height is too big for this proposal")
157
168
179 func alreadyVoteError () = throw("You have already voted")
1810
1911
2012 func noVoteError () = throw("You have not already voted")
2113
2214
2315 func gwxContractAddress () = makeString(["%s", "gwxContractAddress"], SEP)
2416
2517
2618 func keyCurrentIndex () = makeString(["%s", "currentIndex"], SEP)
2719
2820
2921 func keyProposalInfo (number) = makeString(["%s%d", "proposalInfo", toString(number)], SEP)
3022
3123
3224 func keyProposalDescription (number) = makeString(["%s%d", "proposalDescription", toString(number)], SEP)
3325
3426
3527 func keyUserVoteOnProposal (number,user) = makeString(["%s%d%s", "userVoteOnProposal", toString(number), user], SEP)
3628
3729
3830 func keyManagerPublicKey () = "%s__managerPublicKey"
3931
4032
4133 func keyManagerVaultAddress () = "%s__managerVaultAddress"
4234
4335
4436 func getCurrentIndex () = getIntegerValue(this, keyCurrentIndex())
4537
4638
4739 func getManagerVaultAddressOrThis () = match getString(keyManagerVaultAddress()) {
4840 case s: String =>
4941 addressFromStringValue(s)
5042 case _ =>
5143 this
5244 }
5345
5446
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-
6547 func formatProposalInfo (name,end,quorumNumber,positiveVotes,negativeVotes) = makeString(["%d%d%d%d%d", name, end, quorumNumber, positiveVotes, negativeVotes], SEP)
6648
67-
68-let idxUserVoteOnProposalVote = 1
69-
70-let idxUserVoteOnProposalGwxNumber = 2
7149
7250 func formatUserVoteOnProposal (vote,gwxNumber) = makeString(["%d%d", vote, gwxNumber], SEP)
7351
7452
7553 func asInt (val) = match val {
7654 case valInt: Int =>
7755 valInt
7856 case _ =>
7957 throw("fail to cast into Int")
8058 }
8159
8260
8361 func managerPublicKeyOrUnit () = {
8462 let managerVaultAddress = getManagerVaultAddressOrThis()
8563 match getString(managerVaultAddress, keyManagerPublicKey()) {
8664 case s: String =>
8765 fromBase58String(s)
8866 case _: Unit =>
8967 unit
9068 case _ =>
9169 throw("Match error")
9270 }
9371 }
9472
9573
9674 func isManager (i) = match managerPublicKeyOrUnit() {
9775 case pk: ByteVector =>
9876 (i.callerPublicKey == pk)
9977 case _: Unit =>
10078 (i.caller == this)
10179 case _ =>
10280 throw("Match error")
10381 }
10482
10583
10684 func mustManager (i) = if (isManager(i))
10785 then true
10886 else throw("permission denied")
10987
11088
11189 @Callable(i)
11290 func startNewVote (name,description,expirationHeight,quorumNumber) = {
11391 let checks = [mustManager(i)]
11492 if ((checks == checks))
11593 then {
11694 let theIndex = getCurrentIndex()
11795 [IntegerEntry(keyCurrentIndex(), (theIndex + 1)), StringEntry(keyProposalInfo(theIndex), formatProposalInfo(name, toString((lastBlock.height + expirationHeight)), toString(quorumNumber), "0", "0")), StringEntry(keyProposalDescription(theIndex), description)]
11896 }
11997 else throw("Strict value is not equal to itself.")
12098 }
12199
122100
123101
124102 @Callable(i)
125103 func voteFor (proposalIndex,choice) = {
126104 let EMPTY = "EMPTY"
127105 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
128106 let voteInfoArray = split(voteInfo, SEP)
129107 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
130108 let checks = [if ((voteInfo != EMPTY))
131109 then true
132110 else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
133111 then true
134112 else blockHeightError(), if ((userVoteInfo == EMPTY))
135113 then true
136114 else alreadyVoteError()]
137115 if ((checks == checks))
138116 then {
139117 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[2]))], nil))
140- let $t039154951 = if (choice)
118+ let $t035104546 = if (choice)
141119 then {
142120 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) + gwxNumber)), voteInfoArray[5]))
143121 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("1", toString(gwxNumber)))
144122 $Tuple2(action1, action2)
145123 }
146124 else {
147125 let action1 = StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) + gwxNumber))))
148126 let action2 = StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal("0", toString(gwxNumber)))
149127 $Tuple2(action1, action2)
150128 }
151- let action1 = $t039154951._1
152- let action2 = $t039154951._2
129+ let action1 = $t035104546._1
130+ let action2 = $t035104546._2
153131 [action1, action2]
154132 }
155133 else throw("Strict value is not equal to itself.")
156134 }
157135
158136
159137
160138 @Callable(i)
161139 func deleteVote (proposalIndex) = {
162140 let EMPTY = "EMPTY"
163141 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
164142 let voteInfoArray = split(voteInfo, SEP)
165143 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
166144 let userVoteInfoArray = split(userVoteInfo, SEP)
167145 let checks = [if ((voteInfo != EMPTY))
168146 then true
169147 else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
170148 then true
171149 else blockHeightError(), if ((userVoteInfo != EMPTY))
172150 then true
173151 else noVoteError()]
174152 if ((checks == checks))
175153 then {
176154 let action = if ((userVoteInfoArray[1] == "1"))
177155 then StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], toString((value(parseInt(voteInfoArray[4])) - value(parseInt(userVoteInfoArray[2])))), voteInfoArray[5]))
178156 else StringEntry(keyProposalInfo(proposalIndex), formatProposalInfo(voteInfoArray[1], voteInfoArray[2], voteInfoArray[3], voteInfoArray[4], toString((value(parseInt(voteInfoArray[5])) - value(parseInt(userVoteInfoArray[2]))))))
179157 [action, DeleteEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)))]
180158 }
181159 else throw("Strict value is not equal to itself.")
182160 }
183161
184162
185163
186164 @Callable(i)
187165 func changeVote (proposalIndex,choice) = {
188166 let EMPTY = "EMPTY"
189167 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
190168 let voteInfoArray = split(voteInfo, SEP)
191169 let userVoteInfo = valueOrElse(getString(this, keyUserVoteOnProposal(proposalIndex, toString(i.caller))), EMPTY)
192170 let userVoteInfoArray = split(userVoteInfo, SEP)
193171 let checks = [if ((voteInfo != EMPTY))
194172 then true
195173 else throw("No such vote"), if ((value(parseInt(voteInfoArray[2])) > lastBlock.height))
196174 then true
197175 else blockHeightError(), if ((userVoteInfo != EMPTY))
198176 then true
199177 else noVoteError()]
200178 if ((checks == checks))
201179 then {
202180 let gwxNumber = asInt(invoke(addressFromStringValue(getStringValue(gwxContractAddress())), "getUserGwxAmountAtHeightREADONLY", [toString(i.caller), value(parseInt(voteInfoArray[3]))], nil))
203- let $t071197458 = if (choice)
181+ let $t067147053 = if (choice)
204182 then {
205183 let forNumber = gwxNumber
206184 let againstNumber = 0
207185 let choiceInteger = 1
208186 $Tuple3(forNumber, againstNumber, choiceInteger)
209187 }
210188 else {
211189 let forNumber = 0
212190 let againstNumber = gwxNumber
213191 let choiceInteger = 0
214192 $Tuple3(forNumber, againstNumber, choiceInteger)
215193 }
216- let userPowerFor = $t071197458._1
217- let userPowerAgainst = $t071197458._2
218- let choiceInt = $t071197458._3
194+ let userPowerFor = $t067147053._1
195+ let userPowerAgainst = $t067147053._2
196+ let choiceInt = $t067147053._3
219197 let action = if ((userVoteInfoArray[1] == "1"))
220198 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))))
221199 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))))
222200 [action, StringEntry(keyUserVoteOnProposal(proposalIndex, toString(i.caller)), formatUserVoteOnProposal(toString(choiceInt), toString(gwxNumber)))]
223201 }
224202 else throw("Strict value is not equal to itself.")
225203 }
226204
227205
228206
229207 @Callable(i)
230208 func getResultREADONLY (proposalIndex) = {
231209 let EMPTY = "EMPTY"
232210 let voteInfo = valueOrElse(getString(this, keyProposalInfo(proposalIndex)), EMPTY)
233211 let voteInfoArray = split(voteInfo, SEP)
234212 let checks = [if ((voteInfo != EMPTY))
235213 then true
236214 else throw("No such vote")]
237215 if ((checks == checks))
238216 then {
239217 let quorumNumber = voteInfoArray[3]
240218 let positiveVotes = voteInfoArray[4]
241219 let negativeVotes = voteInfoArray[5]
242220 $Tuple2(nil, [positiveVotes, negativeVotes, quorumNumber])
243221 }
244222 else throw("Strict value is not equal to itself.")
245223 }
246224
247225
248226 @Verifier(tx)
249227 func verify () = {
250228 let targetPublicKey = match managerPublicKeyOrUnit() {
251229 case pk: ByteVector =>
252230 pk
253231 case _: Unit =>
254232 tx.senderPublicKey
255233 case _ =>
256234 throw("Match error")
257235 }
258236 sigVerify(tx.bodyBytes, tx.proofs[0], targetPublicKey)
259237 }
260238

github/deemru/w8io/026f985 
42.73 ms