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
2 changes: 2 additions & 0 deletions spartan/aztec-network/templates/blob-sink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ spec:
fieldPath: metadata.namespace
- name: BLOB_SINK_PORT
value: "{{ .Values.blobSink.service.nodePort }}"
- name: BLOB_SINK_ARCHIVE_API_URL
value: "{{ .Values.blobSink.archiveApiUrl }}"
- name: LOG_LEVEL
value: "{{ .Values.blobSink.logLevel }}"
- name: LOG_JSON
Expand Down
1 change: 1 addition & 0 deletions spartan/aztec-network/values/alpha-testnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ network:

blobSink:
enabled: true
archiveApiUrl: "https://api.sepolia.blobscan.com"
dataStoreConfig:
dataDir: "/data"
storageSize: "128Gi"
Expand Down
10 changes: 5 additions & 5 deletions yarn-project/blob-sink/src/archive/factory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ import type { BlobSinkArchiveApiConfig } from './config.js';
import { createBlobArchiveClient } from './factory.js';

describe('BlobscanArchiveClient factory', () => {
it.each<[string, BlobSinkArchiveApiConfig, boolean, string]>([
['empty config', {}, false, ''],
['random chain, no custom URL', { l1ChainId: 23478 }, false, ''],
it.each<[string, BlobSinkArchiveApiConfig, boolean, string | undefined]>([
['empty config', {}, false, undefined],
['random chain, no custom URL', { l1ChainId: 23478 }, false, undefined],
[
'random chain, custom URL',
{ l1ChainId: 23478, archiveApiUrl: 'https://example.com' },
true,
'https://example.com/',
],
['ETH mainnet default URL', { l1ChainId: 1 }, true, 'https://api.blobscan.com/'],
['ETH mainnet no default URL', { l1ChainId: 1 }, false, undefined],
['ETH mainnet custom URL', { l1ChainId: 1, archiveApiUrl: 'https://example.com' }, true, 'https://example.com/'],
['Sepolia default URL', { l1ChainId: 11155111 }, true, 'https://api.sepolia.blobscan.com/'],
['Sepolia no default URL', { l1ChainId: 11155111 }, false, undefined],
['Seplia custom URL', { l1ChainId: 11155111, archiveApiUrl: 'https://example.com' }, true, 'https://example.com/'],
])('can instantiate a client: %s', (_, cfg, clientExpected, expectedBaseUrl) => {
const client = createBlobArchiveClient(cfg);
Expand Down
6 changes: 0 additions & 6 deletions yarn-project/blob-sink/src/archive/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,5 @@ export function createBlobArchiveClient(config: BlobSinkConfig): BlobArchiveClie
return new BlobscanArchiveClient(config.archiveApiUrl);
}

if (config.l1ChainId === 1) {
return new BlobscanArchiveClient('https://api.blobscan.com');
} else if (config.l1ChainId === 11155111) {
return new BlobscanArchiveClient('https://api.sepolia.blobscan.com');
}

return undefined;
}