This guide explains how to deploy your FractalCoin project to Filecoin using the automated deployment scripts.
The deployment scripts automate the process of deploying your FractalCoin project to Filecoin via Web3.Storage. This eliminates the need for a local server and leverages decentralized storage for your application.
Before running the deployment scripts, ensure you have:
- Web3.Storage Account: Create an account at Web3.Storage to get an API token.
- FractalCoin API Key: Required for the Filecoin bridge integration.
- Node.js and npm: Make sure you have Node.js and npm installed.
- Environment Setup: Configure your
.envfile with the necessary credentials.
Create a .env file in your project root with the following variables:
# Required for Web3.Storage deployment
WEB3_STORAGE_TOKEN=your_web3_storage_token
# FractalCoin-Filecoin Bridge Configuration
SETUP_FILECOIN_INTEGRATION=true
FRACTALCOIN_API_KEY=your_fractalcoin_api_key
FRACTALCOIN_API_ENDPOINT=https://api.fractalcoin.network/v1
FRACTALCOIN_FILECOIN_ALLOCATION=20
# Optional: ENS Configuration (if you want to use an ENS domain)
ENS_PRIVATE_KEY=your_ethereum_private_key_for_ens_domain
ENS_DOMAIN=your-domain.ethRun the PowerShell script:
.\deploy-fractalcoin-to-filecoin.ps1Make the script executable and run it:
chmod +x deploy-fractalcoin-to-filecoin.sh
./deploy-fractalcoin-to-filecoin.shThe deployment scripts perform the following steps:
- Environment Validation: Check for required tools and environment variables.
- Dependency Installation: Install all necessary npm packages.
- Application Building: Clean, check, and build your application.
- Web3.Storage Deployment: Upload your built application to IPFS/Filecoin via Web3.Storage.
- FractalCoin-Filecoin Bridge Setup: Configure the bridge between FractalCoin and Filecoin.
- ENS Domain Configuration: Update ENS records if configured.
- Deployment Verification: Verify the deployment and provide access URLs.
After successful deployment, you'll receive:
- IPFS CID: The Content Identifier for your application on IPFS/Filecoin.
- Gateway URL: A URL to access your application via an IPFS gateway.
- Bridge CID: The identifier for your FractalCoin-Filecoin bridge (if configured).
- ENS URL: A URL to access your application via ENS (if configured).
Your application will be accessible via:
- IPFS Gateway:
https://{CID}.ipfs.dweb.link/ - ENS Domain:
https://{your-domain}.eth.link/(if configured)
If you encounter issues during deployment:
- Check the Log File: The script creates a detailed log file with the format
fractalcoin-deployment-YYYYMMDD-HHMMSS.log. - Verify Credentials: Ensure your Web3.Storage token and FractalCoin API key are valid.
- Check Build Process: Make sure your application builds successfully locally before deployment.
- Network Issues: Verify your internet connection and firewall settings.
If you need assistance with the deployment process, please contact the FractalCoin support team or open an issue in the project repository.