EtherVac is an innovative vaccination e-certification system that harnesses the power of Ethereum blockchain to provide a secure, tamper-proof, and convenient solution for managing vaccination certificates. EtherVac is a web-based system that is developed using Java and Java Servlet Pages (JSP), utilizing Solidity smart contract to securely store vaccination certificates. EtherVac takes user authentication to the next level by implementing a password-less login, where users can easily access the system using their MetaMask wallet. With EtherVac, clinic can sign and issue vaccination certificates to the patients. While patients can download certificates in PDF file and then verify it by scanning the QR code contained within the certificate. All certificates will be stored in the smart contract deployed into Ethereum Sepolia test network.
EtherVac implements a centralized account transaction model, which utilizes one central account for all transactions when performing data update on smart contract. It also implements the Elliptic Curve Digital Signature Algorithm (ECDSA) to guarantee the certificates authenticity.
The system requires every user to have their own account on the Ethereum blockchain. Any of Web3 enabled browser like Google Chrome is required for the usage of MetaMask crypto wallet. User is required to install MetaMask extension to their browser then create a new crypto account. Don't forget to get free SepoliaETH tokens via Sepolia Faucets.
To quckly deploy EtherVac, it is required to follow the guidelines in order.
- Download the latest EtherVac release then extract the ZIP file.
- Upload all smart contracts (
.sol
file) to Remix Ethereum IDE. CompileEtherVac.sol
using compiler with version 0.8.0 and above.
Note:If an error
CompilerError: Stack too deep.
occurs, go to Advanced Configurations then select Use configuration file. Open thecompiler_config.json
, add"viaIR": true
in thesettings
object, and compile the contract again. - Use crypto account to deploy the smart contract.
- Contract address will be given after a successful contract deployment.
- Go to Infura Dashboard and create a new API key.
- Copy Ethereum Sepolia HTTPS endpoint URL. The URL should look like
https://sepolia.infura.io/v3/<api_key>
.
Configure ethereum_config.ini
by entering values for the keys below:
node_api_url
- The URL of the Web3 API endpoint.private_key
- The private key of the crypto wallet account.gas_price
- Gas price in unit 'wei'. 1000000000 wei is equivalent to 1 Gwei.gas_limit
- To define the maximum transaction fee by formula max_transaction_fee = gas_price * gas_limitcontract_address
- The address of smart contract deployed usingprivate_key
.
Edit run.bat
and configure below variables ONLY:
HTTPS_PROXY_HOST
- Optional. IP address of the proxy server. Could also be the loopback address127.0.0.1
.HTTPS_PROXY_PORT
- Optional. Port number of the proxy server.
Start EtherVac by executing run.bat
.
The system is developed using Java language, and runs on Java SE Development Kit (JDK) and Apache Tomcat 9 runtime environment. The system is built in the Eclipse IDE using a dynamic web project with Maven nature.
There are several items required during development: runtime environments, IDEs, and useful tools and platforms for development. Besides, there are some libraries used in the system. Use [Download]
hyperlink for quick download.
These are the runtime environments and IDEs which are required to be installed first before contributing to development.
- Java SE Development Kit (Windows x64) [Download]
A cross-platform software development environment using Java technology by Oracle. - Eclipse IDE [Download]
A Java Integrated Development Environment (IDE) software. - Apache Tomcat 9 [Download]
An open-source Java servlet and Java Server Page container.
- Smart contract IDE - Used to develop, compile and deploy Solidity smart contracts.
- Remix Ethereum IDE
A powerful toolset for developing, deploying, debugging, and testing Ethereum and EVM-compatible smart contracts.
- Remix Ethereum IDE
- Smart contract converter - Used to convert Solidity smart contracts to Java Wrapper Classes.
- web3j/web3j-cli [GitHub]
A command line tool enable developers to interact with blockchains more easily.
- web3j/web3j-cli [GitHub]
- Sepolia faucets - Used to get free SepoliaETH tokens to pay transaction fees when testing transactions on Sepolia test network.
- Web3j
Maven: org.web3j|core|5.0.0
- Apache PDFBox
Maven: org.apache.pdfbox|pdfbox|2.0.26
- ZXing Core
Maven: com.google.zxing|core|3.5.1
- ZXing Java SE Extensions
Maven: com.google.zxing|javase|3.5.1
- Google Gson [Download]
- mebjas/html5-qrcode [GitHub]
Download the source code and extract the EtherVac-main
folder from the ZIP file.
- Navigate to Help -> Install New Software....
- Select a suitable site that matches to your Eclipse IDE version.
- Check Web, XML, Java EE and OSGi Enterprise Development, click Next then click Finish.
- After a complete installation and reboot, navigate to Windows -> Perspective -> Open Perspective -> Other. Choose Java EE and click Open.
- Navigate to File -> New -> Dynamic Web Project.
- Enter 'EtherVac' as the project name and choose Apache Tomcat 9.0 as the target runtime, then click Finish.
- Navigate to File -> Import.... Select General -> File System and click Next.
- Click Browse for From directory: and select the
EtherVac-main
folder extracted earlier. Click Select All to import all files. - Click Browse for Into folder: and select the
EtherVac
project folder. Then click Finish to finish import.
- Navigate to Window -> Preferences -> Server -> Runtime Environment.
- Click Add. Select Apache -> Apache Tomcat v9.0 and click Next.
- Click Browse and select the Apache Tomcat 9.0 main folder. Then click Finish followed by Apply and Close.
- In the Server tab, right click then click New -> Server.
- Select Apache -> Apache Tomcat v9.0 then click Next.
- Click Add All >> and click Finish.
- Select the currently created project then navigate to Project -> Properties -> Server.
- Select Tomcat v9.0 Server at localhost and click Apply and Close.
- If you wish to change port number, simply replacing the value of the
port
attribute of the line below inserver.xml
:The<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
server.xml
file is located at Server -> Tomcat v9.0 Server at localhost-config in the Explorer tab. - Copy
ethereum_config.ini
to the Eclipse IDE working directory. Usually this directory is located at%HOMEDRIVE%%HOMEPATH%\eclipse\java-<yyyy>-<mm>\eclipse
. - Create a folder named
storage
at the Eclipse IDE working directory, then create two sub-folders:certificates
andqr
within it. Next, copycert-template.pdf
to thecertificates
folder.