Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pradel/stackspulse
Real-Time Gateway to Stacks DeFi.
https://github.com/pradel/stackspulse
defi indexer stacks
Last synced: 3 months ago
JSON representation
Real-Time Gateway to Stacks DeFi.
- Host: GitHub
- URL: https://github.com/pradel/stackspulse
- Owner: pradel
- License: mit
- Created: 2024-03-17T13:57:29.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:26:18.000Z (3 months ago)
- Last Synced: 2024-10-29T11:38:14.173Z (3 months ago)
- Topics: defi, indexer, stacks
- Language: TypeScript
- Homepage: https://www.stackspulse.com
- Size: 1.92 MB
- Stars: 13
- Watchers: 4
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# stackspulse
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.
## Development
First, install the dependencies:
```bash
pnpm install
```Create and migrate the database:
```bash
pnpm db:generate
pnpm db:migrate
```Then, run the development server:
```bash
pnpm dev
```Once the server is running you can run the predicates of your choice using chainhooks:
```bash
chainhook predicates scan //chainhooks/arkadiko/arkadiko-swap-v2-1.swap-x-for-y.json --mainnet
```## Deploy to production
Create a `.env.production.local` file with the following content:
```bash
CHAINHOOKS_API_TOKEN=your-prod-token
```Generate the chainhoooks predicates with the correct settings for the production environment.
```bash
pnpm chainhooks:generate
```Then, deploy the production server to fly (or any other provider of your choice):
```bash
fly deploy --remote-only
```Finally upload the chainhooks predicates file `chainhooks.production.json` to the [Hiro platform](https://platform.hiro.so/) for your project.
### Add new production environment variables
To add a new encrypted production environment variable (replace `MY_NAME` and `my-value` with your values) run the following command:
```bash
pnpm dotenvx set MY_NAME "my-value" -f .env.production.local
```If you need to read the value of an encrypted environment variable run the following command:
```bash
pnpm dotenvx get MY_NAME -f .env.production.local
```### Download the production database locally
```bash
flyctl ssh issue --agent
flyctl proxy 10022:22
scp -r -P 10022 root@localhost:/data /your/local/path/where/to/copy/data
```