Real-Time Gateway to Stacks DeFi.
This project aims to provide a real-time view of Stacks DeFi ecosystem by aggregating public blockchain data and making it accessible through a easy to use interface.
First, install the dependencies:
pnpm installCreate and migrate the database:
pnpm db:generate
pnpm db:migrateThen, run the development server:
pnpm devOnce the server is running you can run the predicates of your choice using chainhooks:
chainhook predicates scan /<path-to-stackspulse>/chainhooks/arkadiko/arkadiko-swap-v2-1.swap-x-for-y.json --mainnetCreate a .env.production.local file with the following content:
CHAINHOOKS_API_TOKEN=your-prod-tokenGenerate the chainhoooks predicates with the correct settings for the production environment.
pnpm chainhooks:generateThen, deploy the production server to fly (or any other provider of your choice):
fly deploy --remote-onlyFinally upload the chainhooks predicates file chainhooks.production.json to the Hiro platform for your project.
To add a new encrypted production environment variable (replace MY_NAME and my-value with your values) run the following command:
pnpm dotenvx set MY_NAME "my-value" -f .env.production.localIf you need to read the value of an encrypted environment variable run the following command:
pnpm dotenvx get MY_NAME -f .env.production.localflyctl ssh issue --agent
flyctl proxy 10022:22
scp -r -P 10022 root@localhost:/data /your/local/path/where/to/copy/data