From 8116b3fd0a4d19e5693e3e8fc9d54e00d78ea7a7 Mon Sep 17 00:00:00 2001 From: James Jia Date: Thu, 23 Jun 2022 15:47:42 -0700 Subject: [PATCH] v1.1.10 add new markets --- package-lock.json | 2 +- package.json | 2 +- src/constants.ts | 30 ++++++++++++++++++++++++++++++ src/types.ts | 30 ++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4c12cb6..520bbda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/starkex-lib", - "version": "1.1.9", + "version": "1.1.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6bf5153..014c447 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dydxprotocol/starkex-lib", - "version": "1.1.9", + "version": "1.1.10", "description": "Cryptographic functions for use with StarkEx", "main": "build/src/index.js", "scripts": { diff --git a/src/constants.ts b/src/constants.ts index bd7cce1..d169785 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -71,6 +71,21 @@ export const SYNTHETIC_ASSET_MAP: Record = { [DydxMarket.ALPHA_USD]: DydxAsset.ALPHA, [DydxMarket.WNXM_USD]: DydxAsset.WNXM, [DydxMarket.XCH_USD]: DydxAsset.XCH, + [DydxMarket.APE_USD]: DydxAsset.APE, + [DydxMarket.GMT_USD]: DydxAsset.GMT, + [DydxMarket.FTM_USD]: DydxAsset.FTM, + [DydxMarket.AXS_USD]: DydxAsset.AXS, + [DydxMarket.OP_USD]: DydxAsset.OP, + [DydxMarket.WAVES_USD]: DydxAsset.WAVES, + [DydxMarket.GALA_USD]: DydxAsset.GALA, + [DydxMarket.SAND_USD]: DydxAsset.SAND, + [DydxMarket.MANA_USD]: DydxAsset.MANA, + [DydxMarket.SHIB_USD]: DydxAsset.SHIB, + [DydxMarket.THETA_USD]: DydxAsset.THETA, + [DydxMarket.RSR_USD]: DydxAsset.RSR, + [DydxMarket.ZIL_USD]: DydxAsset.ZIL, + [DydxMarket.VET_USD]: DydxAsset.VET, + [DydxMarket.ENS_USD]: DydxAsset.ENS, }; /** @@ -133,6 +148,21 @@ export const ASSET_RESOLUTION: Record = { [DydxAsset.ALPHA]: 5, [DydxAsset.WNXM]: 7, [DydxAsset.XCH]: 8, + [DydxAsset.APE]: 7, + [DydxAsset.GMT]: 6, + [DydxAsset.FTM]: 6, + [DydxAsset.AXS]: 7, + [DydxAsset.OP]: 6, + [DydxAsset.WAVES]: 7, + [DydxAsset.GALA]: 5, + [DydxAsset.SAND]: 6, + [DydxAsset.MANA]: 6, + [DydxAsset.SHIB]: 0, + [DydxAsset.THETA]: 6, + [DydxAsset.RSR]: 3, + [DydxAsset.ZIL]: 4, + [DydxAsset.VET]: 4, + [DydxAsset.ENS]: 7, }; export const COLLATERAL_ASSET_ADDRESS_BY_NETWORK: Record = { diff --git a/src/types.ts b/src/types.ts index caf209e..516302d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -70,6 +70,21 @@ export enum DydxMarket { ALPHA_USD = 'ALPHA-USD', WNXM_USD = 'WNXM-USD', XCH_USD = 'XCH-USD', + APE_USD = 'APE-USD', + GMT_USD = 'GMT-USD', + FTM_USD = 'FTM-USD', + AXS_USD = 'AXS-USD', + OP_USD = 'OP-USD', + WAVES_USD = 'WAVES-USD', + GALA_USD = 'GALA-USD', + SAND_USD = 'SAND-USD', + MANA_USD = 'MANA-USD', + SHIB_USD = 'SHIB-USD', + THETA_USD = 'THETA-USD', + RSR_USD = 'RSR-USD', + ZIL_USD = 'ZIL-USD', + VET_USD = 'VET-USD', + ENS_USD = 'ENS-USD', } export enum DydxAsset { @@ -127,6 +142,21 @@ export enum DydxAsset { ALPHA = 'ALPHA', WNXM = 'WNXM', XCH = 'XCH', + APE = 'APE', + GMT = 'GMT', + FTM = 'FTM', + AXS = 'AXS', + OP = 'OP', + WAVES = 'WAVES', + GALA = 'GALA', + SAND = 'SAND', + MANA = 'MANA', + SHIB = 'SHIB', + THETA = 'THETA', + RSR = 'RSR', + ZIL = 'ZIL', + VET = 'VET', + ENS = 'ENS', } export type SyntheticAsset = Exclude;