diff --git a/package-lock.json b/package-lock.json index 7353eeb..55fdb08 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@orionprotocol/sdk", - "version": "0.20.60", + "version": "0.20.64", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@orionprotocol/sdk", - "version": "0.20.60", + "version": "0.20.64", "hasInstallScript": true, "license": "ISC", "dependencies": { diff --git a/package.json b/package.json index 6fea188..9d54d0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@orionprotocol/sdk", - "version": "0.20.61-rc101", + "version": "0.20.61-rc102", "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 275b577..bed5a5d 100644 --- a/src/config/chains.json +++ b/src/config/chains.json @@ -47,7 +47,8 @@ "rpc": "https://opbnb-mainnet-rpc.bnbchain.org", "baseCurrencyName": "BNB", "contracts": { - "WETH": "0x4200000000000000000000000000000000000006" + "WETH": "0x4200000000000000000000000000000000000006", + "curveRegistry": "" } }, "3": { @@ -192,5 +193,31 @@ "WETH": "", "curveRegistry": "" } + }, + "2525": { + "chainId": "2525", + "label": "inEVM", + "shortName": "inEVM", + "code": "inevm", + "baseCurrencyName": "INJ", + "rpc": "https://inevm.calderachain.xyz/http/", + "explorer": "https://explorer.injective.network/", + "contracts": { + "WETH": "0x4C3A213bd5e8c4BD70a8396d6F3C8302571598Cd", + "curveRegistry": "" + } + }, + "59144": { + "chainId": "59144", + "label": "Linea", + "shortName": "Linea", + "code": "linea", + "baseCurrencyName": "ETH", + "rpc": "https://rpc.linea.build/", + "explorer": "https://lineascan.build/", + "contracts": { + "WETH": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f", + "curveRegistry": "" + } } } diff --git a/src/config/envs.json b/src/config/envs.json index d8ba4d2..41094b3 100644 --- a/src/config/envs.json +++ b/src/config/envs.json @@ -129,6 +129,42 @@ "http": "/orion-indexer/" } } + }, + "2525": { + "api": "https://trade.orion.xyz/inevm-mainnet", + "services": { + "aggregator": { + "http": "/backend", + "ws": "/v1" + }, + "blockchain": { + "http": "" + }, + "priceFeed": { + "all": "/price-feed" + }, + "indexer": { + "http": "/orion-indexer/" + } + } + }, + "59144": { + "api": "https://trade.orion.xyz/linea-mainnet", + "services": { + "aggregator": { + "http": "/backend", + "ws": "/v1" + }, + "blockchain": { + "http": "" + }, + "priceFeed": { + "all": "/price-feed" + }, + "indexer": { + "http": "/orion-indexer/" + } + } } } }, @@ -376,6 +412,42 @@ "http": "/orion-indexer/" } } + }, + "2525": { + "api": "https://trade.orion.xyz/inevm-mainnet", + "services": { + "aggregator": { + "http": "/backend", + "ws": "/v1" + }, + "blockchain": { + "http": "" + }, + "priceFeed": { + "all": "/price-feed" + }, + "indexer": { + "http": "/orion-indexer/" + } + } + }, + "59144": { + "api": "https://trade.orion.xyz/linea-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 74135ed..0e0b025 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -17,4 +17,6 @@ export const productionChains = [ SupportedChainId.OKC, SupportedChainId.ARBITRUM, SupportedChainId.OPBNB, + SupportedChainId.INEVM, + SupportedChainId.LINEA, ]; diff --git a/src/constants/networkCodes.ts b/src/constants/networkCodes.ts index d04ac04..74b0d0f 100644 --- a/src/constants/networkCodes.ts +++ b/src/constants/networkCodes.ts @@ -1 +1 @@ -export default ['ftm', 'bsc', 'eth', 'polygon', 'okc', 'arb', 'drip', 'opbnb'] as const; +export default ['ftm', 'bsc', 'eth', 'polygon', 'okc', 'arb', 'drip', 'opbnb', 'inevm', 'linea'] as const; diff --git a/src/constants/uppercasedNetworkCodes.ts b/src/constants/uppercasedNetworkCodes.ts index 8dc00e3..f3c9515 100644 --- a/src/constants/uppercasedNetworkCodes.ts +++ b/src/constants/uppercasedNetworkCodes.ts @@ -1 +1 @@ -export default ['FTM', 'BSC', 'ETH', 'POLYGON', 'OKC', 'ARB'] as const; +export default ['FTM', 'BSC', 'ETH', 'POLYGON', 'OKC', 'ARB', 'OPBNB', 'INEVM', 'LINEA'] as const; diff --git a/src/services/BlockchainService/schemas/referralDataSchema.ts b/src/services/BlockchainService/schemas/referralDataSchema.ts index 115e2a8..4b4674a 100644 --- a/src/services/BlockchainService/schemas/referralDataSchema.ts +++ b/src/services/BlockchainService/schemas/referralDataSchema.ts @@ -1,6 +1,6 @@ -import { z } from "zod"; +import { z } from 'zod'; export const referralDataSchema = z.object({ - referer: z.string(), + referer: z.string().nullable(), isReferral: z.boolean(), }); diff --git a/src/types.ts b/src/types.ts index b5f0330..5a96d83 100644 --- a/src/types.ts +++ b/src/types.ts @@ -88,6 +88,8 @@ export enum SupportedChainId { POLYGON = '137', OKC = '66', OPBNB = '204', + INEVM = '2525', + LINEA = '59144', POLYGON_TESTNET = '80001', FANTOM_TESTNET = '4002',