#0
nonstandard
0.00004000 BSV
Q!ñAkVù3ï@
Þ¢^Zåú¼A#ÔîCgÛ:Q®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":["03f1416b56f93380ef4085020ddea21e0e5e5ae5fa91bc412304d4ee164367db3a","03f1416b56f93380ef4085020ddea21e0e5e5ae5fa91bc412304d4ee164367db3a","Still Works?",1000000,"Candy1 ","0273380233122eb004930958ddf520e10a1f30fe4951ab706a1154d0453e43531e","Candy2","022dfefb0a6faea5303d85b617e29f88a6329176124c4dae5ebf1db635646be9c3","Candy3","03708b6905473dc634893a044d48d9b835dd4a6c5c933d85fff03b0367c28e0bb9"],"__func":"constructor"}u
https://whatsonchain.com/tx/5337178277bb9d13bf20f3ccb052e1de6eab5c64a4b3c7d7ce7975966f9d7b6c