Skip to content

Commit

Permalink
chore: sanchonet
Browse files Browse the repository at this point in the history
  • Loading branch information
slowbackspace committed Aug 23, 2023
1 parent 9ce31f8 commit 4245c49
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"pino",
"prebuild",
"preprod",
"sanchonet",
"SECP",
"ts",
"utxo",
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
19 changes: 19 additions & 0 deletions src/constants/genesis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ export const GENESIS: Record<Network, ResponseTypes.Ledger> = {
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<Network, ByronEraParameters> = {
Expand Down Expand Up @@ -77,6 +89,13 @@ export const BYRON_GENESIS: Record<Network, ByronEraParameters> = {
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<number, ProtocolInfo> = {
Expand Down
4 changes: 2 additions & 2 deletions src/types/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4245c49

Please sign in to comment.