#0
nonstandard
0.00004000 BSV
Q!.ß.üZ-é¡z£Ú¨8ɾԡ>ä`À:iuQ®M{"__cls":"class Vote {\n constructor(to, distributor, name, numberOfVotes, can1name, can1PK, can2name, can2PK, can3name, can3PK) {\n this.votes = numberOfVotes\n this._owners = [to]\n this.name = name\n this.can1name = can1name\n this.can2name = can2name\n this.can3name = can3name\n this.cand1PK = can1PK\n this.cand2PK = can2PK \n this.cand3PK = can3PK\n this.distributor = distributor\n }\n \n distribute(to) {\n if (this.votes < 1){ throw new Error(\"There are not enough votes to distribute\")}\n if (this._owners[0].toString() !== this.distributor.toString()){\n throw new Error('You cannot send your vote to another person.')\n }\n this.votes -= 1\n return new Vote(to,\n this.distributor, \n this.name, \n 1,\n this.can1name,\n this.cand1PK,\n this.can2name,\n this.cand2PK,\n this.can3name,\n this.cand3PK)\n }\n \n voteA(publicKey) {\n this._owners = [this.cand1PK]\n }\n \n voteB(publicKey) {\n this._owners = [this.cand2PK]\n }\n \n voteC(publicKey) {\n this._owners = [this.cand3PK]\n }\n }","__index":{"obj":0},"__args":["022edf2efc1a155a2de9a17a88a31c1cdaa8389bc9bed4a13ee41260c03a690275","022edf2efc1a155a2de9a17a88a31c1cdaa8389bc9bed4a13ee41260c03a690275","Elección regional de Barcelona",100000,"Gonzalo Conde","02c11eee47a2792bb3c3207c1bfe24d806c56306b0bbf51088b44976eeea889334","Mauro Regueiro","02c586fc6cefd5d3950b9093fa87b2e478f042a206c1461f891e3e4e136120e15c","Messi","0213ca658f606dc36ba9e0b1f7287fcc515abf209a075ad6d245714eacf3f7bfb3"],"__func":"constructor"}u
https://whatsonchain.com/tx/f0eeb30fe8cf67948171bc6630bd19b2f0e90901e2b654acdce2db1673ab2d4e