Skip to content

Commit

Permalink
v1.1.8: add new batch of markets [BAC-2426] (#73)
Browse files Browse the repository at this point in the history
* fix market name

* v1.1.8: add new batch of markets

* fix
  • Loading branch information
samweinberg23 authored Mar 24, 2022
1 parent 6e78eda commit 21f607f
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 3 deletions.
3 changes: 2 additions & 1 deletion __tests__/signable/hashes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ describe('Pedersen hashes', () => {
expect(mockPedersen.callCount).toBe(1);
});

describe('after pre-computing hashes', () => {
// slowing down rest of test suite and will never be changed
describe.skip('after pre-computing hashes', () => {

beforeEach(async () => {
await proxyquiredHashes.preComputeHashes(NetworkId.ROPSTEN);
Expand Down
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.7",
"version": "1.1.8",
"description": "Cryptographic functions for use with StarkEx",
"main": "build/src/index.js",
"scripts": {
Expand Down
38 changes: 38 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,25 @@ export const SYNTHETIC_ASSET_MAP: Record<DydxMarket, SyntheticAsset> = {
[DydxMarket.TRX_USD]: DydxAsset.TRX,
[DydxMarket.XTZ_USD]: DydxAsset.XTZ,
[DydxMarket.HNT_USD]: DydxAsset.HNT,
[DydxMarket.ICP_USD]: DydxAsset.ICP,
[DydxMarket.RUNE_USD]: DydxAsset.RUNE,
[DydxMarket.LUNA_USD]: DydxAsset.LUNA,
[DydxMarket.NEAR_USD]: DydxAsset.NEAR,
[DydxMarket.AR_USD]: DydxAsset.AR,
[DydxMarket.FLOW_USD]: DydxAsset.FLOW,
[DydxMarket.PERP_USD]: DydxAsset.PERP,
[DydxMarket.REN_USD]: DydxAsset.REN,
[DydxMarket.CELO_USD]: DydxAsset.CELO,
[DydxMarket.KSM_USD]: DydxAsset.KSM,
[DydxMarket.BAL_USD]: DydxAsset.BAL,
[DydxMarket.BNT_USD]: DydxAsset.BNT,
[DydxMarket.MIR_USD]: DydxAsset.MIR,
[DydxMarket.SRM_USD]: DydxAsset.SRM,
[DydxMarket.LON_USD]: DydxAsset.LON,
[DydxMarket.DODO_USD]: DydxAsset.DODO,
[DydxMarket.ALPHA_USD]: DydxAsset.ALPHA,
[DydxMarket.WNXM_USD]: DydxAsset.WNXM,
[DydxMarket.XCH_USD]: DydxAsset.XCH,
};

/**
Expand Down Expand Up @@ -95,6 +114,25 @@ export const ASSET_RESOLUTION: Record<DydxAsset, number> = {
[DydxAsset.TRX]: 4,
[DydxAsset.XTZ]: 6,
[DydxAsset.HNT]: 7,
[DydxAsset.ICP]: 7,
[DydxAsset.RUNE]: 6,
[DydxAsset.LUNA]: 6,
[DydxAsset.NEAR]: 6,
[DydxAsset.AR]: 7,
[DydxAsset.FLOW]: 7,
[DydxAsset.PERP]: 6,
[DydxAsset.REN]: 5,
[DydxAsset.CELO]: 6,
[DydxAsset.KSM]: 8,
[DydxAsset.BAL]: 7,
[DydxAsset.BNT]: 6,
[DydxAsset.MIR]: 6,
[DydxAsset.SRM]: 6,
[DydxAsset.LON]: 6,
[DydxAsset.DODO]: 6,
[DydxAsset.ALPHA]: 5,
[DydxAsset.WNXM]: 7,
[DydxAsset.XCH]: 8,
};

export const COLLATERAL_ASSET_ADDRESS_BY_NETWORK: Record<NetworkId, string> = {
Expand Down
38 changes: 38 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ export enum DydxMarket {
TRX_USD = 'TRX-USD',
XTZ_USD = 'XTZ-USD',
HNT_USD = 'HNT-USD',
ICP_USD = 'ICP-USD',
RUNE_USD = 'RUNE-USD',
LUNA_USD = 'LUNA-USD',
NEAR_USD = 'NEAR-USD',
AR_USD = 'AR-USD',
FLOW_USD = 'FLOW-USD',
PERP_USD = 'PERP-USD',
REN_USD = 'REN-USD',
CELO_USD = 'CELO-USD',
KSM_USD = 'KSM-USD',
BAL_USD = 'BAL-USD',
BNT_USD = 'BNT-USD',
MIR_USD = 'MIR-USD',
SRM_USD = 'SRM-USD',
LON_USD = 'LON-USD',
DODO_USD = 'DODO-USD',
ALPHA_USD = 'ALPHA-USD',
WNXM_USD = 'WNXM-USD',
XCH_USD = 'XCH-USD',
}

export enum DydxAsset {
Expand Down Expand Up @@ -89,6 +108,25 @@ export enum DydxAsset {
TRX = 'TRX',
XTZ = 'XTZ',
HNT = 'HNT',
ICP = 'ICP',
RUNE = 'RUNE',
LUNA = 'LUNA',
NEAR = 'NEAR',
AR = 'AR',
FLOW = 'FLOW',
PERP = 'PERP',
REN = 'REN',
CELO = 'CELO',
KSM = 'KSM',
BAL = 'BAL',
BNT = 'BNT',
MIR = 'MIR',
SRM = 'SRM',
LON = 'LON',
DODO = 'DODO',
ALPHA = 'ALPHA',
WNXM = 'WNXM',
XCH = 'XCH',
}

export type SyntheticAsset = Exclude<DydxAsset, DydxAsset.USDC>;
Expand Down

0 comments on commit 21f607f

Please sign in to comment.