Skip to content

Commit

Permalink
calculate testnet times
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromtcosta committed Nov 24, 2022
1 parent 3a4d878 commit 79de04c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/neo4j/txs/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import {
} from "@emurgo/cardano-serialization-lib-nodejs";
import { mapNeo4jAssets } from "../utils";

const network = config.get("network");

const GENESIS_UNIX_TIMESTAMP = 1506243091;
const SHELLEY_UNIX_TIMESTAMP = 1596491091;
const SHELLEY_INITIAL_SLOT = 4924800;

const GENESIS_UNIX_TIMESTAMP = network === "mainnet" ? 1506243091 : 1654048800;
const SHELLEY_UNIX_TIMESTAMP = network === "mainnet" ? 1596491091 : 1655776800;
const SHELLEY_INITIAL_SLOT = network === "mainnet" ? 4924800 : 86400;
const BYRON_SLOT_DURATION_IN_SECONDS = 20;

export const neo4jCast = <T>(r: any) => {
Expand Down

0 comments on commit 79de04c

Please sign in to comment.