sh -ci "$(curl -fsSL https://smartcontracts.org/install.sh)"
dfx --versionIf not installed, run the above commands.
dfx start --backgroundMake sure no other dfx process is running. If port conflicts, stop previous dfx or use another port.
cd ~/ai-bot-projectCheck your dfx.json and ensure canisters are defined. If not, run:
dfx canister create <your_canister>dfx buildIf you see errors, check your Motoko/JS source and dependencies.
dfx deployThis deploys all canisters to your local replica (cost-free). To deploy a single canister:
dfx deploy <canister_name>Start your frontend (e.g., Vite/Next.js):
pnpm dev
# or
npm run devOpen your browser to the displayed local address (e.g., http://localhost:5173). If port is busy, check for other processes or change the port.
- Interact with your canister through the frontend.
- For backend testing:
dfx canister call <canister_name> <method> <args>Create mock users/data as needed. Use dfx-generated identities for wallet simulation.
- See: IC Testnet Deployment Docs
- You may need a test identity and faucet ICP.
dfx stopStop the local replica when finished. To reset state, delete the .dfx directory.
For cost-free deployment, always use the local replica (dfx start). Official testnets may require ICP tokens.