Deployment
Deploying Move contracts to the Movement testnet and configuration generation.
Deploying to Movement Testnet
Once you've built and tested your Move contracts locally, you can deploy them to the Movement testnet.
Quick Deploy
To deploy all contracts to the Movement testnet:
pnpm move:deploy
This single command handles the entire deployment and configuration process.
What Happens During Deployment
The deployment script performs the following steps automatically:
-
Environment Check: Verifies the Movement CLI is installed and configured
-
Module Publishing: Deploys all contracts to the network:
gig_contract- Standard gig lifecycle managementescrow_module- Payment escrow and releaserating_module- User reputation systemdispute_module- Dispute resolutionlocation_based_gig- Location-based opportunities
-
Configuration Generation: Runs
apps/move/scripts/generate-config.jsto:- Extract deployed contract addresses
- Parse contract ABIs and function signatures
- Generate TypeScript constant files
-
App Updates: Copies generated configuration to:
apps/native/src/constants/- For the mobile appapps/admin/constants/- For the admin dashboard
Generated Configuration
For each deployed module, a TypeScript file is generated containing:
- MODULE_ADDRESS: The deployed contract address
- MODULE_NAME: The module identifier
- Resources: Resource type constants (e.g.,
GIG_RESOURCE) - Functions: Entry function paths (e.g.,
CREATE_GIG_FUNCTION) - View Functions: View function paths (e.g.,
GET_GIGS_PAGINATED_FUNCTION)
Usage Example
import * as GigContract from '@/constants/gig_contract';
// Submit a transaction
await submitTransaction(
GigContract.CREATE_GIG_FUNCTION,
[description, budget, contractIpfsHash]
);
// Query data
const result = await viewFunction(
GigContract.GET_GIGS_PAGINATED_FUNCTION,
[],
["0", "50"]
);
Advanced Options
The underlying deployment script supports additional options:
# Dry run (simulate without deploying)
cd apps/move
bash scripts/deploy.sh --dry-run
# Skip configuration generation
bash scripts/deploy.sh --skip-config
Verifying Deployment
After deployment, verify your contracts are live:
- Check the generated config files in
apps/native/src/constants/ - View your contracts on the Movement explorer
- Test contract interactions from the mobile app or admin dashboard
Troubleshooting
"Movement CLI not found": Run pnpm move:install to install the CLI
"No account configured": Run pnpm move:init to set up your deployment account
"Insufficient funds": Visit the Movement Faucet to get testnet tokens
