diff --git a/.vscode/settings.json b/.vscode/settings.json index bcec5b1f..ca5e1fc0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -21,6 +21,7 @@ "pino", "prebuild", "preprod", + "sanchonet", "SECP", "ts", "utxo", diff --git a/CHANGELOG.md b/CHANGELOG.md index cb3fbad3..ae6432fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- support for Cardano Sanchonet - translation of cost models from numerical IDs to strings, required for `cardano-db-sync 13.1.1.3` and newer [#130](https://github.com/blockfrost/blockfrost-backend-ryo/pull/130) diff --git a/src/constants/genesis.ts b/src/constants/genesis.ts index 33a5afc4..dcae4e15 100644 --- a/src/constants/genesis.ts +++ b/src/constants/genesis.ts @@ -50,6 +50,18 @@ export const GENESIS: Record = { max_kes_evolutions: 62, security_param: 2160, }, + sanchonet: { + active_slots_coefficient: 0.05, + update_quorum: 3, + max_lovelace_supply: '45000000000000000', + network_magic: 4, + epoch_length: 86_400, + system_start: 1_686_789_000, + slots_per_kes_period: 129_600, + slot_length: 1, + max_kes_evolutions: 62, + security_param: 432, + }, }; export const BYRON_GENESIS: Record = { @@ -77,6 +89,12 @@ export const BYRON_GENESIS: Record = { safe_zone: 864, end_epoch: 0, }, + sanchonet: { + epoch_length: 4320, + slot_length: 20, + safe_zone: 864, + end_epoch: 0, + }, }; export const PROTOCOL_VERSIONS: Record = { diff --git a/src/types/common.ts b/src/types/common.ts index 549c02ca..c02d8c3f 100644 --- a/src/types/common.ts +++ b/src/types/common.ts @@ -5,9 +5,9 @@ import { components } from '@blockfrost/openapi'; export type Order = 'asc' | 'desc'; export type AddressType = 'byron' | 'shelley'; -export const CARDANO_NETWORKS = ['mainnet', 'testnet', 'preview', 'preprod']; +export const CARDANO_NETWORKS = ['mainnet', 'testnet', 'preview', 'preprod', 'sanchonet']; -export type Network = 'mainnet' | 'testnet' | 'preview' | 'preprod'; +export type Network = 'mainnet' | 'testnet' | 'preview' | 'preprod' | 'sanchonet'; export interface ResultFound { result: number;