Skip to content

Commit

Permalink
feat: added Line and inEVM mainnet chains
Browse files Browse the repository at this point in the history
  • Loading branch information
cheshirrrcat committed Mar 1, 2024
1 parent fb68096 commit ede0d4a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package",
"name": "@electra.finance/sdk",
"version": "0.1.57",
"version": "0.1.57-rc0",
"description": "Electra finance SDK",
"main": "./lib/index.cjs",
"module": "./lib/index.js",
Expand Down
18 changes: 18 additions & 0 deletions src/config/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,23 @@
"baseCurrencyName": "DRIP",
"rpc": "testnet.1d.rip",
"explorer": "https://explorer-testnet.1d.rip/"
},
"2525": {
"chainId": "2525",
"label": "inEVM",
"shortName": "inEVM",
"code": "inevm",
"baseCurrencyName": "INJ",
"rpc": "https://inevm.calderachain.xyz/http/",
"explorer": "https://explorer.injective.network/"
},
"59144": {
"chainId": "59144",
"label": "Linea",
"shortName": "Linea",
"code": "linea",
"baseCurrencyName": "ETH",
"rpc": "https://rpc.linea.build/",
"explorer": "https://lineascan.build/"
}
}
32 changes: 31 additions & 1 deletion src/config/envs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"referralAPI": "https://electra.finance/referral-api",
"networks": {
"1": {
"api": "https://cfd-ethelectra.finance",
"api": "https://cfd-eth.electra.finance",
"services": {
"aggregator": {
"http": "/backend",
Expand Down Expand Up @@ -77,6 +77,36 @@
"all": "/price-feed"
}
}
},
"2525": {
"api": "https://cfd-inevm.electra.finance/",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
}
}
},
"59144": {
"api": "https://cfd-linea.electra.finance/",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
}
}
}
}
},
Expand Down
2 changes: 2 additions & 0 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ export const productionChains = [
SupportedChainId.FANTOM_OPERA,
SupportedChainId.POLYGON,
SupportedChainId.OKC,
SupportedChainId.INEVM,
SupportedChainId.LINEA,
];
2 changes: 1 addition & 1 deletion src/constants/networkCodes.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default ['ftm', 'bsc', 'eth', 'polygon', 'okc', 'arb', 'drip'] as const;
export default ['ftm', 'bsc', 'eth', 'polygon', 'okc', 'arb', 'drip', 'inevm', 'linea'] as const;
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export enum SupportedChainId {
FANTOM_OPERA = '250',
POLYGON = '137',
OKC = '66',
INEVM = '2525',
LINEA = '59144',

POLYGON_TESTNET = '80001',
FANTOM_TESTNET = '4002',
Expand Down

0 comments on commit ede0d4a

Please sign in to comment.