actualize testnet chains (#260)

This commit is contained in:
Dmitry
2024-06-11 16:14:52 +03:00
committed by GitHub
parent 233718bb78
commit f8b52aaa02
5 changed files with 30 additions and 236 deletions

View File

@@ -81,7 +81,7 @@ describe('Orion', () => {
test('Init Orion testing', () => {
const orion = new Orion('testing');
expect(orion.referralSystem).toBeInstanceOf(ReferralSystem);
expect(orion.unitsArray.length).toBe(4); // eth, bsc, polygon, fantom
expect(orion.unitsArray.length).toBe(2); // eth, bsc
const unitBSC = orion.units[SupportedChainId.BSC_TESTNET];
expect(unitBSC?.chainId).toBe(SupportedChainId.BSC_TESTNET);
@@ -89,23 +89,11 @@ describe('Orion', () => {
expect(orion.getSiblingsOf(SupportedChainId.BSC_TESTNET)).toHaveLength(3);
expect(unitBSC?.networkCode).toBe('bsc');
const unitRopsten = orion.units[SupportedChainId.ROPSTEN]
expect(unitRopsten?.chainId).toBe(SupportedChainId.ROPSTEN);
const unitSepolia = orion.units[SupportedChainId.SEPOLIA]
expect(unitSepolia?.chainId).toBe(SupportedChainId.SEPOLIA);
// expect(unitRopsten?.env).toBe('testing');
expect(orion.getSiblingsOf(SupportedChainId.ROPSTEN)).toHaveLength(3);
expect(unitRopsten?.networkCode).toBe('eth');
const unitPolygon = orion.units[SupportedChainId.POLYGON_TESTNET];
expect(unitPolygon?.chainId).toBe(SupportedChainId.POLYGON_TESTNET);
// expect(unitPolygon?.env).toBe('testing');
expect(orion.getSiblingsOf(SupportedChainId.POLYGON_TESTNET)).toHaveLength(3);
expect(unitPolygon?.networkCode).toBe('polygon');
const unitFantom = orion.units[SupportedChainId.FANTOM_TESTNET];
expect(unitFantom?.chainId).toBe(SupportedChainId.FANTOM_TESTNET);
// expect(unitFantom?.env).toBe('testing');
expect(orion.getSiblingsOf(SupportedChainId.FANTOM_TESTNET)).toHaveLength(3);
expect(unitFantom?.networkCode).toBe('ftm');
expect(orion.getSiblingsOf(SupportedChainId.SEPOLIA)).toHaveLength(3);
expect(unitSepolia?.networkCode).toBe('eth');
});
test('Init Orion production', () => {

View File

@@ -51,32 +51,6 @@
"curveRegistry": ""
}
},
"3": {
"chainId": "3",
"explorer": "https://ropsten.etherscan.io/",
"label": "Ropsten",
"shortName": "ETH-Ropsten",
"code": "eth",
"rpc": "https://testing.orion.xyz/eth-ropsten/rpc",
"baseCurrencyName": "ETH",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"5": {
"chainId": "5",
"explorer": "https://goerli.etherscan.io/",
"label": "Goerli",
"shortName": "ETH-Goerli",
"code": "eth",
"rpc": "https://testing.orion.xyz/eth-goerli/rpc",
"baseCurrencyName": "ETH",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"11155111": {
"chainId": "11155111",
"explorer": "https://sepolia.etherscan.io/",
@@ -90,19 +64,6 @@
"curveRegistry": ""
}
},
"421613": {
"chainId": "421613",
"explorer": "https://goerli.arbiscan.io/",
"label": "Arbitrum Goerli",
"shortName": "Arbitrum Goerli",
"code": "arb",
"rpc": "https://goerli-rollup.arbitrum.io/rpc",
"baseCurrencyName": "ETH",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"42161": {
"chainId": "42161",
"explorer": "https://arbiscan.io/",
@@ -116,19 +77,6 @@
"curveRegistry": "0x445FE580eF8d70FF569aB36e80c647af338db351"
}
},
"4002": {
"chainId": "4002",
"explorer": "https://testnet.ftmscan.com/",
"label": "Fantom Testnet",
"shortName": "FTM-Testnet",
"code": "ftm",
"rpc": "https://rpc.testnet.fantom.network/",
"baseCurrencyName": "FTM",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"250": {
"chainId": "250",
"explorer": "https://ftmscan.com/",
@@ -155,19 +103,6 @@
"curveRegistry": "0x094d12e5b541784701FD8d65F11fc0598FBC6332"
}
},
"80001": {
"chainId": "80001",
"label": "Polygon Mumbai",
"shortName": "Polygon Mumbai",
"code": "polygon",
"baseCurrencyName": "MATIC",
"rpc": "https://rpc.ankr.com/polygon_mumbai",
"explorer": "https://mumbai.polygonscan.com/",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"66": {
"chainId": "66",
"explorer": "https://www.oklink.com/okc/",
@@ -181,32 +116,6 @@
"curveRegistry": ""
}
},
"65": {
"chainId": "65",
"explorer": "https://www.oklink.com/okc-test/",
"label": "OKC Testnet",
"shortName": "OKC-Testnet",
"code": "okc",
"rpc": "https://exchaintestrpc.okex.org/",
"baseCurrencyName": "OKT",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"56303": {
"chainId": "56303",
"label": "DRIP Chain",
"shortName": "DRIP Chain",
"code": "drip",
"baseCurrencyName": "DRIP",
"rpc": "https://testnet.1d.rip/",
"explorer": "https://explorer-testnet.1d.rip/",
"contracts": {
"WETH": "",
"curveRegistry": ""
}
},
"2525": {
"chainId": "2525",
"label": "inEVM",

View File

@@ -244,78 +244,6 @@
"http": "/orion-indexer/"
}
}
},
"421613": {
"api": "https://testing.orion.xyz/arbitrum-goerli",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
},
"indexer": {
"http": "/orion-indexer/"
}
}
},
"4002": {
"api": "https://testing.orion.xyz/ftm-testnet",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
},
"indexer": {
"http": "/orion-indexer/"
}
}
},
"80001": {
"api": "https://testing.orion.xyz/polygon-mumbai",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
},
"indexer": {
"http": "/orion-indexer/"
}
}
},
"56303": {
"api": "https://testing.orion.xyz/drip-testnet",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
},
"indexer": {
"http": "/orion-indexer/"
}
}
}
}
},
@@ -544,24 +472,6 @@
"http": "/orion-indexer/"
}
}
},
"3": {
"api": "https://dn-dev.orion.xyz/eth-ropsten",
"services": {
"aggregator": {
"http": "/backend",
"ws": "/v1"
},
"blockchain": {
"http": ""
},
"priceFeed": {
"all": "/price-feed"
},
"indexer": {
"http": "/orion-indexer/"
}
}
}
}
},

View File

@@ -2,13 +2,7 @@ import { SupportedChainId } from '../types.js';
export const developmentChains = [
SupportedChainId.BSC_TESTNET,
SupportedChainId.ROPSTEN,
SupportedChainId.GOERLI,
SupportedChainId.SEPOLIA,
SupportedChainId.ARBITRUM_GOERLI,
SupportedChainId.FANTOM_TESTNET,
SupportedChainId.POLYGON_TESTNET,
SupportedChainId.OKC_TESTNET,
];
export const productionChains = [
SupportedChainId.MAINNET,

View File

@@ -82,26 +82,19 @@ export type Pair = {
export enum SupportedChainId {
MAINNET = '1',
ARBITRUM = '42161',
FANTOM_OPERA = '250',
POLYGON = '137',
OKC = '66',
OPBNB = '204',
INEVM = '2525',
LINEA = '59144',
AVAX = '43114',
BASE = '8453',
ROPSTEN = '3',
GOERLI = '5',
SEPOLIA = '11155111',
POLYGON_TESTNET = '80001',
FANTOM_TESTNET = '4002',
BSC = '56',
OKC = '66',
POLYGON = '137',
OPBNB = '204',
FANTOM_OPERA = '250',
INEVM = '2525',
BASE = '8453',
ARBITRUM = '42161',
AVAX = '43114',
LINEA = '59144',
BSC_TESTNET = '97',
OKC_TESTNET = '65',
DRIP_TESTNET = '56303',
ARBITRUM_GOERLI = '421613',
SEPOLIA = '11155111',
// For testing and debug purpose
// BROKEN = '0',
@@ -291,22 +284,22 @@ export type EnvConfig = {
referralAPI: string
frontageAPI: string
networks: Partial<
Record<
SupportedChainId,
VerboseUnitConfig
Record<
SupportedChainId,
VerboseUnitConfig
>
>
>
}
export type AggregatedAssets = Partial<
Record<
string,
Partial<
Record<SupportedChainId, {
address: string
}>
Record<
string,
Partial<
Record<SupportedChainId, {
address: string
}>
>
>
>
>;
>;
export type RedeemOrder = {
sender: string
@@ -446,9 +439,9 @@ type BridgeHistory = Awaited<ReturnType<typeof getHistory>>;
type BridgeHistoryItem = NonNullable<BridgeHistory[string]>;
export type AtomicSwap = Partial<
Omit<BridgeHistoryItem, 'creationDate' | 'expiration' | 'secret'>
Omit<BridgeHistoryItem, 'creationDate' | 'expiration' | 'secret'>
> & Partial<
Omit<AtomicSwapLocal, 'creationDate' | 'expiration' | 'secret'>
Omit<AtomicSwapLocal, 'creationDate' | 'expiration' | 'secret'>
> & {
sourceChainId: SupportedChainId
targetChainId: SupportedChainId