tx · 39Tb3oL1G9wcJbaoazxCVy458RAqVSC3H8aTkBrYwXWs

3N85L4q2CSfY88d3xArVHd1SSwhQHD5CsKk:  -0.01300000 Waves

2023.03.16 11:49 [2492358] smart account 3N85L4q2CSfY88d3xArVHd1SSwhQHD5CsKk > SELF 0.00000000 Waves

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

github/deemru/w8io/026f985 
29.27 ms