diff --git a/package.json b/package.json index 577092e..9560eb9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.20.45", + "version": "0.20.43-rc1", "description": "Orion Protocol SDK", "main": "./lib/index.cjs", "module": "./lib/index.js", diff --git a/src/config/chains.json b/src/config/chains.json index 4fad92a..ea887a8 100644 --- a/src/config/chains.json +++ b/src/config/chains.json @@ -38,6 +38,18 @@ "curveRegistry": "0x93461072c00b2740c474a3d52c70be6249c802d8" } }, + "204": { + "chainId": "204", + "explorer": "http://opbnbscan.com/", + "label": "opBNB Chain", + "shortName": "opBNB", + "code": "opbnb", + "rpc": "https://opbnb-mainnet-rpc.bnbchain.org", + "baseCurrencyName": "BNB", + "contracts": { + "WETH": "0x4200000000000000000000000000000000000006" + } + }, "3": { "chainId": "3", "explorer": "https://ropsten.etherscan.io/", @@ -77,6 +89,19 @@ "curveRegistry": "" } }, + "42161": { + "chainId": "42161", + "explorer": "https://arbiscan.io/", + "label": "Arbitrum", + "shortName": "Arbitrum", + "code": "arb", + "rpc": "https://arb1.arbitrum.io/rpc", + "baseCurrencyName": "ARB", + "contracts": { + "WETH": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1", + "curveRegistiry": "0x445FE580eF8d70FF569aB36e80c647af338db351" + } + }, "4002": { "chainId": "4002", "explorer": "https://testnet.ftmscan.com/", diff --git a/src/config/envs.json b/src/config/envs.json index be254cf..8672516 100644 --- a/src/config/envs.json +++ b/src/config/envs.json @@ -93,6 +93,42 @@ "http": "/orion-indexer/" } } + }, + "42161": { + "api": "https://trade.orion.xyz/arbitrum-mainnet", + "services": { + "aggregator": { + "http": "/backend", + "ws": "/v1" + }, + "blockchain": { + "http": "" + }, + "priceFeed": { + "all": "/price-feed" + }, + "indexer": { + "http": "/orion-indexer/" + } + } + }, + "204": { + "api": "https://trade.orion.xyz/opbnb-mainnet", + "services": { + "aggregator": { + "http": "/backend", + "ws": "/v1" + }, + "blockchain": { + "http": "" + }, + "priceFeed": { + "all": "/price-feed" + }, + "indexer": { + "http": "/orion-indexer/" + } + } } } }, diff --git a/src/constants/chains.ts b/src/constants/chains.ts index 790a42d..74135ed 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -15,4 +15,6 @@ export const productionChains = [ SupportedChainId.FANTOM_OPERA, SupportedChainId.POLYGON, SupportedChainId.OKC, + SupportedChainId.ARBITRUM, + SupportedChainId.OPBNB, ]; diff --git a/src/constants/networkCodes.ts b/src/constants/networkCodes.ts index 75fe8ee..d04ac04 100644 --- a/src/constants/networkCodes.ts +++ b/src/constants/networkCodes.ts @@ -1 +1 @@ -export default ['ftm', 'bsc', 'eth', 'polygon', 'okc', 'arb', 'drip'] as const; +export default ['ftm', 'bsc', 'eth', 'polygon', 'okc', 'arb', 'drip', 'opbnb'] as const; diff --git a/src/types.ts b/src/types.ts index 930c150..dcc0324 100644 --- a/src/types.ts +++ b/src/types.ts @@ -83,10 +83,11 @@ export enum SupportedChainId { MAINNET = '1', ROPSTEN = '3', GOERLI = '5', - ARBITRUM_GOERLI = '421613', + ARBITRUM = '42161', FANTOM_OPERA = '250', POLYGON = '137', OKC = '66', + OPBNB = '204', POLYGON_TESTNET = '80001', FANTOM_TESTNET = '4002', @@ -94,6 +95,7 @@ export enum SupportedChainId { BSC_TESTNET = '97', OKC_TESTNET = '65', DRIP_TESTNET = '56303', + ARBITRUM_GOERLI = '421613', // For testing and debug purpose // BROKEN = '0',