From 8eeb9488bf560e9aa1806428e4db735826013dc3 Mon Sep 17 00:00:00 2001 From: Victor Creed <69458664+creed-victor@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:20:21 +0300 Subject: [PATCH] SOV-2389: DLLR margin trading (#2538) * feat: RBTC/DLLR margin trading * feat: add bpro and sov for dllr margin trades * chore: leave only DLLR/RBTC for DLLR trading * feat: enable both short and long trades * chore: change testnet settlement contract * fix: remove faulty rpc * fix: update BTCWrapperProxy address --------- Co-authored-by: Peiman Co-authored-by: Peiman <25097709+Rickk137@users.noreply.github.com> --- src/utils/blockchain/contracts.testnet.ts | 2 +- src/utils/classifiers.ts | 6 +----- .../dictionaries/trading-pair-dictionary.ts | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/utils/blockchain/contracts.testnet.ts b/src/utils/blockchain/contracts.testnet.ts index 456f52e292..01e3462d8a 100644 --- a/src/utils/blockchain/contracts.testnet.ts +++ b/src/utils/blockchain/contracts.testnet.ts @@ -299,7 +299,7 @@ export const contracts = { abi: OrderBookMarginAbi, }, settlement: { - address: '0x4dfb9ab1653Eb5A295109E02e37fc222D85fdA74', + address: '0x8bf75a88e7af8a7adf44d69e93efaf283a235e0c', abi: SettlementAbi, }, sovrynNFT: { diff --git a/src/utils/classifiers.ts b/src/utils/classifiers.ts index dc5f25a989..512d7590c5 100644 --- a/src/utils/classifiers.ts +++ b/src/utils/classifiers.ts @@ -28,11 +28,7 @@ export const blockExplorers = { export const rpcNodes = { 30: ['https://rsk-live.sovryn.app/rpc', 'https://public-node.rsk.co/'], - 31: [ - 'https://testnet.sovryn.app/rpc', - 'https://testnet2.sovryn.app/rpc', - 'https://public-node.testnet.rsk.co/', - ], + 31: ['https://testnet.sovryn.app/rpc', 'https://public-node.testnet.rsk.co/'], 56: 'wss://bsc.sovryn.app/mainnet/websocket', 97: 'wss://bsc.sovryn.app/testnet/websocket', }; diff --git a/src/utils/dictionaries/trading-pair-dictionary.ts b/src/utils/dictionaries/trading-pair-dictionary.ts index 6f015c505a..4c1b07a515 100644 --- a/src/utils/dictionaries/trading-pair-dictionary.ts +++ b/src/utils/dictionaries/trading-pair-dictionary.ts @@ -7,6 +7,7 @@ export enum TradingPairType { RBTC_XUSD = 'RBTC_XUSD', RBTC_DOC = 'RBTC_DOC', RBTC_USDT = 'RBTC_USDT', + RBTC_DLLR = 'RBTC_DLLR', BPRO_XUSD = 'BPRO_XUSD', BPRO_USDT = 'BPRO_USDT', BPRO_DOC = 'BPRO_DOC', @@ -31,6 +32,7 @@ export const pairs = { [TradingPairType.RBTC_USDT]: [Asset.RBTC, Asset.USDT], [TradingPairType.RBTC_DOC]: [Asset.RBTC, Asset.DOC], [TradingPairType.RBTC_XUSD]: [Asset.RBTC, Asset.XUSD], + [TradingPairType.RBTC_DLLR]: [Asset.RBTC, Asset.DLLR], // @dev testnet only pairs [TradingPairType.RBTC_XUSD_legacy]: [Asset.RBTC, Asset.XUSD_legacy], [TradingPairType.BPRO_XUSD_legacy]: [Asset.BPRO, Asset.XUSD_legacy], @@ -81,6 +83,20 @@ export class TradingPairDictionary { false, ), ], + [ + TradingPairType.RBTC_DLLR, + new TradingPair( + TradingPairType.RBTC_DLLR, + RenderTradingPairName({ asset1: Asset.RBTC, asset2: Asset.DLLR }), + 'RBTC/DLLR', + Asset.DLLR, + Asset.RBTC, + [Asset.RBTC, Asset.DLLR], + false, + true, + true, + ), + ], [ TradingPairType.SOV_RBTC, new TradingPair(