Contrak is a dead-simple tool to keep track of your smart contract deployments and keep your docs up-to-date.
- Click the "Deploy on Railway" button above
- Fill in the environment variables:
| Variable | Description |
|---|---|
NEXT_PUBLIC_SITE_URL |
Set this to https://${{RAILWAY_PUBLIC_DOMAIN}}/ |
DATABASE_URL |
Set this to ${{RAILWAY_VOLUME_MOUNT_PATH}}/data.db |
- Click "Deploy"
- Install Node 18 and Yarn
- Run
cp .env.example .envand fill in any missing environment variables - Run
yarn install - Run
yarn db:pushto generate the database - Run
yarn build:sdkto build the SDK package - Run
yarn dev:webto start the web server - Run
yarn dev:clito run the CLI to deploy a contract
web: Contains the Next.js web app for Contrakcli: Contains a Node.js CLI for interacting with Contrakpackages/db: Contains the database schema using Drizzle ORMpackages/rest: Contains the REST API client for Contrakpackages/sdk: Contains the TypeScript SDK for Contrakpackages/utils: Contains utility functions used across the project
