From 3e81b87a0f6165593ced9e93c4e27afa955b5e57 Mon Sep 17 00:00:00 2001 From: slowbackspace Date: Wed, 23 Aug 2023 18:25:14 +0200 Subject: [PATCH] chore: sanchonet --- .vscode/settings.json | 1 + CHANGELOG.md | 1 + src/constants/genesis.ts | 20 ++++++++++++++++++++ src/types/common.ts | 4 ++-- 4 files changed, 24 insertions(+), 2 deletions(-) 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 25d4b10e..407288ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Flake now exports NixOS module +- support for Cardano Sanchonet ### Changed diff --git a/src/constants/genesis.ts b/src/constants/genesis.ts index 33a5afc4..924abd69 100644 --- a/src/constants/genesis.ts +++ b/src/constants/genesis.ts @@ -50,6 +50,19 @@ export const GENESIS: Record = { max_kes_evolutions: 62, security_param: 2160, }, + // TODO + sanchonet: { + active_slots_coefficient: 0.05, + update_quorum: 5, + max_lovelace_supply: '45000000000000000', + network_magic: 1, + epoch_length: 432_000, + system_start: 1_654_041_600, + slots_per_kes_period: 129_600, + slot_length: 1, + max_kes_evolutions: 62, + security_param: 2160, + }, }; export const BYRON_GENESIS: Record = { @@ -77,6 +90,13 @@ export const BYRON_GENESIS: Record = { safe_zone: 864, end_epoch: 0, }, + // TODO + 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;