Chainvoice is a decentralized invoice management system built on blockchain technology. It offers a secure, transparent, and tamper-proof platform for creating, managing, and paying invoices. Leveraging Ethereum smart contracts, Chainvoice ensures trust, automation, and eliminates the need for intermediaries in financial transactions.
- Fork the Repository
- Clone the forked repository to your local machine:
git clone https://github.com/yourusername/Chainvoice.git
- Project Structure The repository contains two main folders:
- frontend: The user interface of the application.
- contracts: The smart contracts powering the backend logic.
- Navigate to the frontend folder:
cd frontend
- Install the dependencies::
npm install
- Start the development server::
npm run dev
- Open the app in your browser at http://localhost:5173.
- Navigate to the contracts folder:
cd contracts
- Install dependencies using Foundry:
forge install
- Run tests
forge test
This guide explains how to deploy Chainvoice smart contracts to the Ethereum Classic Mainnet using Foundry (Forge).
Prerequisites
- Foundry installed
- A funded wallet with ETC
- RPC URL (e.g. from Rivet, Ankr, or Chainstack)
-
Create .env File for Secrets
-
Create a .env in your project root i.e.
contracts/
-
Copy all the varible from
contracts/.env.example
to newly created.env
cp .env.example .env
-
Assign valid values to the variable.
-
-
Compile Contract
forge build
-
Load your .env in the terminal
source .env
-
Deploy the Contract using forge create
forge create contracts/src/Chainvoice.sol:Chainvoice \
--rpc-url $ETC_RPC_URL \
--private-key $PRIVATE_KEY \
--broadcast
-
Finally add Contract Address to Frontend
.env
-
Create a new .env file by copying .env.example:
cp frontend/.env.example frontend/.env
-
Open the new .env file and update the variables, especially:
VITE_CONTRACT_ADDRESS=your_deployed_contract_address_here
Replace your_deployed_contract_address_here with the actual contract address you got after deployment.
-
Save the .env file.
-
Restart your frontend development server so the new environment variables are loaded.
-