Secure Smart Contract-Based Data Aggregation using Homomorphic Encryption