NEVER hardcode private keys in source files or commit them to version control.
This project uses environment variables for all sensitive credentials. To deploy contracts:
-
Copy
.env.exampleto.env:cp .env.example .env
-
Edit
.envand add your private key:DEPLOYER_PRIVATE_KEY=your_actual_private_key_here
-
Ensure
.envis in your.gitignore(it already is by default) -
Run deployment:
npm install # Install dotenv dependency node deploy-mainnet.js
If your private key was ever exposed in a public repository:
- Immediately transfer all funds from the compromised wallet to a new secure wallet
- Rotate the key - generate a new private key/mnemonic
- If the exposed key controls deployed contracts, consider:
- Transferring admin rights to a new address (if the contract supports it)
- Deploying new contract versions with the new key
- Report the exposure to relevant parties
If you discover a security vulnerability in this project, please:
- Do NOT create a public GitHub issue
- Send details privately to the maintainers
- Allow reasonable time for a fix before public disclosure
- Use hardware wallets for mainnet deployments
- Use separate keys for testnet and mainnet
- Enable 2FA on all accounts
- Regularly audit contract permissions
- Keep dependencies updated