Q!OlÈÃ"fß¡ý¢v6eÜ%èì4aâÞ³3VmQ®M3{"__cls":"class Vote {\n constructor(to, distributor, name, numberOfVotes, can1name, can1PK, can2name, can2PK) {\n this.votes = numberOfVotes;\n this._owners = [to]; // name of the election\n\n this.name = name;\n this.can1name = can1name;\n this.can2name = can2name;\n this.cand1PK = can1PK;\n this.cand2PK = can2PK;\n this.distributor = distributor;\n }\n\n distribute(to) {\n if (this.votes < 1) {\n throw new Error(\"There are not enough votes to distribute\");\n }\n\n if (this._owners[0].toString() !== this.distributor.toString()) {\n throw new Error('You cannot send your vote to another person.');\n }\n\n this.votes -= 1;\n return new Vote(to, this.distributor, this.name, 1, this.can1name, this.cand1PK, this.can2name, this.cand2PK);\n }\n\n voteA() {\n console.log(this.cand1PK);\n this._owners = [this.cand1PK];\n }\n\n voteB() {\n this._owners = [this.cand2PK];\n }\n\n}","__index":{"obj":0},"__args":["024f6cc8c32266dfa101fda27636651fdc259ee81bec340f61e28edeb333566d95","024f6cc8c32266dfa101fda27636651fdc259ee81bec340f61e28edeb333566d95","Test Election",1,"Candidate 1","02d9bba10e77ec879948c834694232b194b3e503d093a04cb39bfc52097d50acfa","Candidate 2","03c24c822e2be4d53bbb42819a3d7393a8f2d0c3ff3b3c20927dde0742b0c4501c"],"__func":"constructor"}u
https://whatsonchain.com/tx/undefined