Skip to content
Closed
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
8 changes: 8 additions & 0 deletions atp-indexer/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,14 @@ function deploy() {
fi

yarn install --frozen-lockfile

# Use providers-testnet folder for testnet, providers for prod
if [ "$infra_environment" = "testnet" ]; then
export PROVIDERS_DIR="providers-testnet"
else
export PROVIDERS_DIR="providers"
fi
log_step "Using providers directory: $PROVIDERS_DIR"
yarn bootstrap

# Load contract addresses from environment variables or JSON file
Expand Down
7 changes: 6 additions & 1 deletion atp-indexer/scripts/aggregate-providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,15 @@ function normalizeProvider(metadata: any, filename: string): ProviderMetadata |
* Aggregate all provider metadata files into a single JSON file
*/
function aggregateProviders() {
const providersDir = join(__dirname, '../../providers');
// Allow overriding the providers directory via environment variable
// Defaults to 'providers' for production
const providersFolderName = process.env.PROVIDERS_DIR || 'providers';
const providersDir = join(__dirname, '../..', providersFolderName);
const outputDir = join(__dirname, '../src/api/data');
const outputFile = join(outputDir, 'providers.json');

console.log(`Using providers directory: ${providersDir}`);

const providerMap = new Map<number, { provider: ProviderMetadata; filename: string }>();
let skippedCount = 0;
let duplicateCount = 0;
Expand Down
40 changes: 40 additions & 0 deletions providers-testnet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Providers (Testnet)

Provider metadata for the **testnet** staking dashboard deployment.

> **Note:** This folder is used for testnet deployments. For production providers, see the `providers/` folder.

## File Structure

File name format: `{providerId}-{provider-name}.json`

Example: `1-aztec-foundation.json`

```json
{
"providerId": 1,
"providerName": "Aztec Foundation",
"providerDescription": "Brief description of the provider",
"providerEmail": "contact@provider.com",
"providerWebsite": "https://provider.com",
"providerLogoUrl": "https://provider.com/logo.png",
"discordUsername": "username",
"providerSelfStake": ["0x1234...", "0x5678..."]
}
```

## Adding a Provider

1. Copy `_example.json` to `{providerId}-{provider-name}.json`
2. Fill in your details
3. Submit a pull request

## Rules

**Required:** `providerId` must match on-chain registration and be unique.

**Optional:** All other fields are optional. Invalid or missing fields will display as empty on the dashboard.

**Self-stake:** `providerSelfStake` is an optional array of attester addresses for sequencers the provider directly stakes. Omit this field if empty.

**Duplicates:** If multiple files have the same `providerId`, only the first file (alphabetically) will be used.
10 changes: 10 additions & 0 deletions providers-testnet/_example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"providerId": 0,
"providerName": "",
"providerDescription": "",
"providerEmail": "",
"providerWebsite": "",
"providerLogoUrl": "",
"discordUsername": "",
"providerSelfStake": ["0x..."]
}