- Start a local blockchain:
make anvil
This will start Anvil (local Ethereum node) in the background
- Deploy to local network:
make deploy-local
- Stop the local blockchain when done:
make stop-anvil
Note: Local deployment uses Anvil's default private key for convenience. Never use this key in production.
- Generate a new wallet:
make new-wallet
- Import the private key to an encrypted keystore:
make import-wallet
Follow the prompts to:
- Enter your private key
- Set a strong password (20+ characters)
- List available keystores:
make list-wallets
- Set up your environment:
- Copy
.env.example
to.env
- Fill in your RPC URLs and API keys
- Set your
KEYSTORE_NAME
andKEYSTORE_PASSWORD
- To deploy to Mumbai testnet:
make deploy-mumbai
- To deploy to Polygon mainnet:
make deploy-polygon
-
Keystore Password:
- Use a strong password (20+ characters)
- Never store the password in plaintext
- Consider using a password manager
-
Environment Security:
- Never commit
.env
file - Use different keys for testnet and mainnet
- Clear environment variables after use
- Never commit