Skip to content

Commit

Permalink
v1.1.10 add new markets
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajames committed Jun 23, 2022
1 parent 6ef8dba commit 8116b3f
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
30 changes: 30 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ export const SYNTHETIC_ASSET_MAP: Record<DydxMarket, SyntheticAsset> = {
[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,
};

/**
Expand Down Expand Up @@ -133,6 +148,21 @@ export const ASSET_RESOLUTION: Record<DydxAsset, number> = {
[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<NetworkId, string> = {
Expand Down
30 changes: 30 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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<DydxAsset, DydxAsset.USDC>;
Expand Down

0 comments on commit 8116b3f

Please sign in to comment.