Zeta-Coin: On-chain Implementation of a Backend for a Privacy-Preserving Central Bank issued Digital Currency
The contracts and scripts folders contain the Solidity and Python code for the on-chain and off-chain components of the proposed solution. The 'experiments' folder contains experimental code that is not part of the system and is included for completeness only. The remaining folders are generated by the Brownie Web3 development framework and do not contain any source code.
To run the system, the user must have the following libraries installed
- python3
- pip3
- pycryptodome
- ganache-cli
- eth-brownie
To run the code, Brownie expects a number of environment variables, that should be exported in form of a .env file, namely
export PRIVATE_KEY=val1
export WEB3_INFURA_PROJECT_ID=val2
export ETHERSCAN_TOKEN=val3
To compile the Solidity contracts, use the ´´´brownie compile´´´ command.
The ```brownie run scripts/deploy_zetacoin.py´´´ and ´´´brownie run scripts/deploy_ecc_zetacoin.py´´´ commands will deploy the FFC and ECC based variants respectively on a local blockchain spun up in ganache, and run through the minting and spending process to ensure the correct function of the system.
To deploy on the Rinkeby testnet, add the ´´´--network Rinkeby´´´ flag.