A decentralized finance platform for secure token staking and vault management.
This repository contains sensitive configurations. Before deploying or sharing:
- NEVER commit
.envfiles - NEVER share private keys
- NEVER commit real API keys or URLs
- Use
.env.examplefiles as templates - Keep contract addresses private unless deployed to public networks
# Required
VITE_VAULT_CONTRACT_ADDRESS= # Your deployed vault contract address
VITE_TOKEN_CONTRACT_ADDRESS= # Your deployed token contract address
# Optional
VITE_CHAIN_ID= # Network chain ID
VITE_NETWORK_NAME= # Network name# Required
PRIVATE_KEY= # Your wallet private key
ETHERSCAN_API_KEY= # For contract verification
ALCHEMY_API_KEY= # Your Alchemy API key
# Optional
OWNER_ADDRESS= # Contract owner address
INITIAL_TOKEN_SUPPLY= # Initial token supply- Secure ETH vault system
- Token staking with rewards
- Portfolio management
- Real-time transaction tracking
- MetaMask integration
- Node.js (v14+ recommended)
- npm or yarn
- MetaMask wallet
- Hardhat for local development
- Clone the repository:
git clone <your-repo-url>
cd cryptovault- Install dependencies:
# Install smart contract dependencies
cd smart_contract
npm install
# Install client dependencies
cd ../client
npm install- Environment Setup:
- Copy
.env.exampleto.envin both client and smart_contract directories - Update the environment variables with your values
- NEVER commit the actual
.envfiles
- Start local blockchain (for development):
cd smart_contract
npx hardhat node- Deploy contracts (in a new terminal):
cd smart_contract
npx hardhat run scripts/deploy.js --network localhost- Start the frontend:
cd client
npm run devThe project includes two main smart contracts:
CryptoVault.sol: Manages the ETH vault systemVaultToken.sol: Handles the platform's token (CVLT) and staking
-
Environment Variables:
- Use
.envfiles for sensitive data - Keep different
.envfiles for development and production - Never commit actual
.envfiles
- Use
-
Contract Deployment:
- Use hardhat for local development
- Test thoroughly before mainnet deployment
- Verify contracts on Etherscan after deployment
-
Frontend Security:
- Never expose private keys in frontend code
- Use environment variables for contract addresses
- Implement proper error handling
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
MIT