Skip to content

Commit

Permalink
added zkLink network
Browse files Browse the repository at this point in the history
  • Loading branch information
Doctor-Cyclone committed Apr 15, 2024
1 parent b5d5f95 commit 15a4223
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"ng-inline-svg-2": "^15.0.1",
"ngx-cookie-service": "^16.0.0",
"querystring-es3": "^0.2.1",
"rubic-sdk": "5.15.3",
"rubic-sdk": "5.16.0-alpha-zkLink.0",
"rxjs": "7.8.1",
"ts-cacheable": "^1.0.5",
"viem": "^1.21.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const blockchainsToFetch: BlockchainName[] = [
BLOCKCHAIN_NAME.MERLIN,
BLOCKCHAIN_NAME.ROOTSTOCK,
BLOCKCHAIN_NAME.MODE,
BLOCKCHAIN_NAME.ZK_FAIR
BLOCKCHAIN_NAME.ZK_FAIR,
BLOCKCHAIN_NAME.ZK_LINK
];

export const blockchainsWithOnePage: BlockchainName[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1008,5 +1008,8 @@ export const defaultTokens: Record<BlockchainName, Token[]> = {
],
[BLOCKCHAIN_NAME.ZK_FAIR]: [
{ ...nativeTokensList[BLOCKCHAIN_NAME.ZK_FAIR], ...defaultTokenParams } as Token
],
[BLOCKCHAIN_NAME.ZK_LINK]: [
{ ...nativeTokensList[BLOCKCHAIN_NAME.ZK_LINK], ...defaultTokenParams } as Token
]
};
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,9 @@ export const defaultBlockchainData: Partial<Record<EvmBlockchainName, DefaultBlo
[BLOCKCHAIN_NAME.ZK_FAIR]: {
name: 'zkFair',
rpc: 'https://rpc.zkfair.io'
},
[BLOCKCHAIN_NAME.ZK_FAIR]: {
name: 'zkLink',
rpc: 'https://rpc.zklink.io'
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export const blockchainsList: RankedBlockchain[] = [
{ name: BLOCKCHAIN_NAME.MODE, rank: 0, tags: ['ETH'] },
{ name: BLOCKCHAIN_NAME.MERLIN, rank: 0, tags: ['BTC'] },
{ name: BLOCKCHAIN_NAME.ZK_FAIR, rank: 0, tags: ['USDC'] },
{ name: BLOCKCHAIN_NAME.ZK_LINK, rank: 0, tags: ['ETH'] },
{ name: BLOCKCHAIN_NAME.MANTLE, rank: 0, tags: ['MNT'] },
{ name: BLOCKCHAIN_NAME.MANTA_PACIFIC, rank: 0, tags: ['ETH'] },
{ name: BLOCKCHAIN_NAME.POLYGON_ZKEVM, rank: 0, tags: ['ETH'] },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ export const blockchainImageKey: Record<BlockchainName, string> = {
[BLOCKCHAIN_NAME.MERLIN]: 'merlin',
[BLOCKCHAIN_NAME.ROOTSTOCK]: 'rootstock',
[BLOCKCHAIN_NAME.MODE]: 'mode',
[BLOCKCHAIN_NAME.ZK_FAIR]: 'zkfair'
[BLOCKCHAIN_NAME.ZK_FAIR]: 'zkfair',
[BLOCKCHAIN_NAME.ZK_LINK]: 'zklink'
};
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const onChainBlacklist: Record<SupportedOnChainNetworks, OnChainTradeType[]> = {
[BLOCKCHAIN_NAME.MERLIN]: [],
[BLOCKCHAIN_NAME.ROOTSTOCK]: [],
[BLOCKCHAIN_NAME.MODE]: [],
[BLOCKCHAIN_NAME.ZK_FAIR]: []
[BLOCKCHAIN_NAME.ZK_FAIR]: [],
[BLOCKCHAIN_NAME.ZK_LINK]: []
};

export const onChainBlacklistProviders: OnChainTradeType[] = [
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/constants/blockchain/backend-blockchains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ const BLOCKCHAINS_MAPPING = {
[BLOCKCHAIN_NAME.HORIZEN_EON]: 'horizen-eon',
[BLOCKCHAIN_NAME.MERLIN]: 'merlin',
[BLOCKCHAIN_NAME.MODE]: 'mode',
[BLOCKCHAIN_NAME.ZK_FAIR]: 'zkfair'
[BLOCKCHAIN_NAME.ZK_FAIR]: 'zkfair',
[BLOCKCHAIN_NAME.ZK_LINK]: 'zklink'
} as const;

export const TO_BACKEND_BLOCKCHAINS: Record<BlockchainName, BackendBlockchain> = {
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/constants/blockchain/blockchain-color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,6 @@ export const blockchainColor: Record<BlockchainName, string> = {
[BLOCKCHAIN_NAME.HORIZEN_EON]: '#041742',
[BLOCKCHAIN_NAME.MERLIN]: '#ffffff',
[BLOCKCHAIN_NAME.MODE]: '#000000',
[BLOCKCHAIN_NAME.ZK_FAIR]: '#000000'
[BLOCKCHAIN_NAME.ZK_FAIR]: '#000000',
[BLOCKCHAIN_NAME.ZK_LINK]: '#000000'
};
3 changes: 2 additions & 1 deletion src/app/shared/constants/blockchain/blockchain-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,5 +140,6 @@ export const blockchainIcon: Record<BlockchainName, string> = {
[BLOCKCHAIN_NAME.HORIZEN_EON]: `${basePath}horizen.svg`,
[BLOCKCHAIN_NAME.MERLIN]: `${basePath}merlin.svg`,
[BLOCKCHAIN_NAME.MODE]: `${basePath}mode.svg`,
[BLOCKCHAIN_NAME.ZK_FAIR]: `${basePath}zkfair.svg`
[BLOCKCHAIN_NAME.ZK_FAIR]: `${basePath}zkfair.svg`,
[BLOCKCHAIN_NAME.ZK_LINK]: `${basePath}zklink.svg`
};
3 changes: 2 additions & 1 deletion src/app/shared/constants/blockchain/blockchain-label.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,6 @@ export const blockchainLabel: Record<BlockchainName, string> = {
[BLOCKCHAIN_NAME.HORIZEN_EON]: 'Horizen EON',
[BLOCKCHAIN_NAME.MERLIN]: 'Merlin',
[BLOCKCHAIN_NAME.MODE]: 'Mode',
[BLOCKCHAIN_NAME.ZK_FAIR]: 'zkFair'
[BLOCKCHAIN_NAME.ZK_FAIR]: 'zkFair',
[BLOCKCHAIN_NAME.ZK_LINK]: 'zkLink'
};
8 changes: 8 additions & 0 deletions src/app/shared/constants/blockchain/blockchain-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1114,5 +1114,13 @@ export const blockchainScanner: Record<BlockchainName, ScannerObject> = {
[ADDRESS_TYPE.TOKEN]: 'address/',
[ADDRESS_TYPE.TRANSACTION]: 'tx/',
[ADDRESS_TYPE.BLOCK]: 'block/'
},
[BLOCKCHAIN_NAME.ZK_LINK]: {
baseUrl: 'https://explorer.zklink.io/',
nativeCoinUrl: '',
[ADDRESS_TYPE.WALLET]: 'address/',
[ADDRESS_TYPE.TOKEN]: 'address/',
[ADDRESS_TYPE.TRANSACTION]: 'tx/',
[ADDRESS_TYPE.BLOCK]: 'block/'
}
};
3 changes: 2 additions & 1 deletion src/app/shared/constants/blockchain/rpc-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,5 +279,6 @@ export const rpcList: Record<EvmBlockchainName, string[]> &
'https://1rpc.io/mode',
'https://mode.drpc.org'
],
[BLOCKCHAIN_NAME.ZK_FAIR]: ['https://rpc.zkfair.io']
[BLOCKCHAIN_NAME.ZK_FAIR]: ['https://rpc.zkfair.io'],
[BLOCKCHAIN_NAME.ZK_LINK]: ['https://rpc.zklink.io', 'https://rpc.zklink.network']
};
5 changes: 5 additions & 0 deletions src/assets/images/icons/coins/zklink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16441,10 +16441,10 @@ rpc-websockets@^7.5.1:
bufferutil "^4.0.1"
utf-8-validate "^5.0.2"

rubic-sdk@5.15.3:
version "5.15.3"
resolved "https://registry.yarnpkg.com/rubic-sdk/-/rubic-sdk-5.15.3.tgz#8ca91b66b2d5557a33b451875d41e0d098ea6130"
integrity sha512-UjTjqmucKaIYp0ESkbZtUvPETHjJmYLOr0IXMqojbSig1q1N8riyp1w/rmPjgza11H5OV9kZTDv63ReuGn+OZg==
rubic-sdk@5.16.0-alpha-zkLink.0:
version "5.16.0-alpha-zkLink.0"
resolved "https://registry.yarnpkg.com/rubic-sdk/-/rubic-sdk-5.16.0-alpha-zkLink.0.tgz#7dac0c2aea74eb918c1a4944490938ad90694a93"
integrity sha512-x5c1rU4Rmbrl+8OmputtiU6wkqGwEADv8bqc/qs3VW+YM/9Cfth0wB0YFEVZLtXPLVTzIx0Wk88VRYhS9HYF9A==
dependencies:
"@1inch/limit-order-protocol-utils" "3.0.1"
"@arbitrum/sdk" "^3.1.3"
Expand Down

0 comments on commit 15a4223

Please sign in to comment.