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