Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Treasury instance within treasury metadata transactions
# this is used to filter out metadata and transactions which are not relevant

# 9e65e4ed7d6fd86fc4827d2b45da6d2c601fb920e8bfd794b8ecc619 = Intersect 2025 budget instance

TREASURY_INSTANCE=

# Sync mainnet start point (slot and block hash)
# The indexer will start syncing from this point on first run

# 160964954 and 560c7537831007f9670d287b15a69ba18a322b1edc39c0c23ccab3c12ad77b9f are good for Intersect 2025 budget instance

STORE_CARDANO_SYNC_START_SLOT=
STORE_CARDANO_SYNC_START_BLOCKHASH=
6 changes: 0 additions & 6 deletions .example.env

This file was deleted.

24 changes: 11 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Intersect Budget Administration Data

A system to collect on-chain Budget administration data
A system to collect on-chain Budget administration data for instances of [treasury-contracts](https://github.com/SundaeSwap-finance/treasury-contracts)
and offer a simple API.

Using YACI Store for blockchain indexing,
Expand Down Expand Up @@ -65,6 +65,7 @@ administration-data/
### Prerequisites

- Docker and Docker Compose
- Create a `.env` based on [`.env.example`](./.env.example)

### Start All Services

Expand Down Expand Up @@ -172,21 +173,18 @@ TREASURY_INSTANCE=9e65e4ed7d6fd86fc4827d2b45da6d2c601fb920e8bfd794b8ecc619

This environment variable is passed to the indexer container via `docker-compose.yml` and used by the `treasury-filter.mvel` plugin script to filter metadata.

| Property | Value |
|----------|-------|
| Payment Address | `addr1xxzc8pt7fgf0lc0x7eq6z7z6puhsxmzktna7dluahrj6g6v9swzhujsjlls7dajp59u95re0qdk9vh8mumlemw89535s4ecqxj` |
| Stake Address | `stake17xzc8pt7fgf0lc0x7eq6z7z6puhsxmzktna7dluahrj6g6ghh5qjr` |
| Script Hash | `8583857e4a12ffe1e6f641a1785a0f2f036c565cfbe6ff9db8e5a469` |

### Sync Configuration

| Property | Value |
|----------|-------|
| Network | Mainnet |
| Start Slot | 160964954 |
| Start Block | 12125945 |
Limitation: this is only configured for Mainnet currently

The sync start point is configured via environment variables in `.env`:

```bash
STORE_CARDANO_SYNC_START_SLOT=160964954
STORE_CARDANO_SYNC_START_BLOCKHASH=560c7537831007f9670d287b15a69ba18a322b1edc39c0c23ccab3c12ad77b9f
```

Edit `indexer/application.properties` to modify sync settings.
Network settings (host, port, protocol magic) are in `indexer/application.properties`.

## Development Commands

Expand Down
10 changes: 5 additions & 5 deletions indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ store.cardano.protocol-magic=764824073

### Sync Start Point

To start syncing from a specific point:
The sync start point is configured via environment variables in `.env`:

```properties
store.cardano.sync-start-slot=160964954
store.cardano.sync-start-blockhash=560c7537831007f9670d287b15a69ba18a322b1edc39c0c23ccab3c12ad77b9f
```bash
STORE_CARDANO_SYNC_START_SLOT=160964954
STORE_CARDANO_SYNC_START_BLOCKHASH=560c7537831007f9670d287b15a69ba18a322b1edc39c0c23ccab3c12ad77b9f
```

Remove these lines to sync from genesis.
Remove these from `.env` to sync from genesis.

### Enabled Stores

Expand Down
4 changes: 0 additions & 4 deletions indexer/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ store.cardano.host=backbone.cardano.iog.io
store.cardano.port=3001
store.cardano.protocol-magic=764824073

# Sync Start Point (mainnet slot and block hash)
store.cardano.sync-start-slot=160964954
store.cardano.sync-start-blockhash=560c7537831007f9670d287b15a69ba18a322b1edc39c0c23ccab3c12ad77b9f

# Database Configuration - Use yaci_store schema
spring.datasource.url=jdbc:postgresql://postgres:5432/administration_data?currentSchema=yaci_store
spring.datasource.username=postgres
Expand Down
4 changes: 0 additions & 4 deletions indexer/application.render.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ store.cardano.host=backbone.cardano.iog.io
store.cardano.port=3001
store.cardano.protocol-magic=764824073

# Sync Start Point (mainnet slot and block hash)
store.cardano.sync-start-slot=160964954
store.cardano.sync-start-blockhash=560c7537831007f9670d287b15a69ba18a322b1edc39c0c23ccab3c12ad77b9f

# Database Configuration - Uses environment variables from Render
# URL is set via SPRING_DATASOURCE_URL env var (converted to JDBC format by entrypoint)
spring.datasource.username=${SPRING_DATASOURCE_USERNAME:postgres}
Expand Down