In this study, a privacy-preserving and verifiable electronic voting scheme is proposed based on a smart contract that is cost-effective and practical. The scheme uses electronic ballot as token for voting, and the smart contract verifies accuracy of the ballot. First, an agent generates electronic ballot via ElGamal encryption scheme, which is verified by the smart contract. The agent then generates decryption parameters based on the electronic ballot. Second, the agent assigns the electronic ballot to a voter and shares the decryption parameters to all voters with Shamir secret sharing scheme. Third, a voter generates and submits a vote that is the electronic ballot and a public parameter to the smart contract. Finally, the voter computes decryption data with the sum of decryption parameters restored by smart contract using shares summary submitted from voters. The voter then computes voting result via the homomorphic method with the decryption data. Experiment illustrates correctness and practicality of the proposed scheme.