Skip to content

Commit

Permalink
Add scroll (#186)
Browse files Browse the repository at this point in the history
* 0.0.204

* Add Scroll

---------

Co-authored-by: Tatyana Stemkovski <tanya_stemkovski@hotmail.com>
  • Loading branch information
tstemko and Tatyana Stemkovski committed Apr 17, 2024
1 parent da04d40 commit b6a4275
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ichidao/ichi-sdk",
"version": "0.0.203",
"version": "0.0.204",
"description": "",
"main": "dist/index.js",
"module": "index.ts",
Expand Down
26 changes: 22 additions & 4 deletions src/crypto/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,24 @@ export enum ChainId {
Rinkeby = 4,
Goerli = 5,
Polygon = 137,
Mumbai = 80001,
Arbitrum = 42161,
Avalanche = 43114,
Mumbai = 80001,
Base = 8453,
Blast = 81457,
Bsc = 56,
Celo = 42220,
Eon = 7332,
Evmos = 9001,
Fantom = 250,
zkSync = 324,
Hedera = 295,
Mantle = 5000,
Kava = 2222,
Linea = 59144,
Mantle = 5000,
opBNB = 204,
Scroll = 534352,
zkEVM = 1101,
Kava = 2222,
zkSync = 324,
}

export interface IAssetData {
Expand Down Expand Up @@ -365,6 +366,23 @@ export const SUPPORTED_NETWORKS: SupportedNetworkList = {
}
}
},
[ChainId.Scroll]: {
chainId: ChainId.Scroll,
name: 'Scroll',
color: 'linear-gradient(90deg, rgba(161,128,217,1) 0%, rgba(130,71,229,1) 100%)',
icon: generateIconUrl(ChainId.Scroll, 'svg'),
env: 'mainnet',
scanLink: 'https://scrollscan.com/',
scanName: 'ScrollScan',
coingecko: 'Scroll',
rpc: {
rpcUrl: 'https://1rpc.io/scroll',
nativeCurrency: {
symbol: 'ETH',
name: 'ETH'
}
}
},
[ChainId.zkEVM]: {
chainId: ChainId.zkEVM,
name: 'Polygon_zkEVM',
Expand Down
7 changes: 7 additions & 0 deletions src/crypto/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ export const providerCacheReference: Record<ChainId, ProviderCache> = {
cacheHit: 0,
cacheMiss: 0
},
[ChainId.Scroll]: {
lastUdated: 0,
cacheHit: 0,
cacheMiss: 0
},
[ChainId.zkEVM]: {
lastUdated: 0,
cacheHit: 0,
Expand Down Expand Up @@ -251,6 +256,8 @@ const getRpcEnvName = (chainId: ChainId): EnvUtils.EnvName => {
return EnvUtils.EnvName.OPBNB_RPC_HOSTS;
case ChainId.Polygon:
return EnvUtils.EnvName.POLYGON_RPC_HOSTS;
case ChainId.Scroll:
return EnvUtils.EnvName.SCROLL_RPC_HOSTS;
case ChainId.zkEVM:
return EnvUtils.EnvName.ZKEVM_RPC_HOSTS;
case ChainId.zkSync:
Expand Down
2 changes: 2 additions & 0 deletions src/utils/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export namespace EnvUtils {
MANTLE_RPC_HOSTS = 'MANTLE_RPC_HOSTS',
OPBNB_RPC_HOSTS = 'OPBNB_RPC_HOSTS',
POLYGON_RPC_HOSTS = 'POLYGON_RPC_HOSTS',
SCROLL_RPC_HOSTS = 'SCROLL_RPC_HOSTS',
ZKEVM_RPC_HOSTS = 'ZKEVM_RPC_HOSTS',
ZKSYNC_RPC_HOSTS = 'ZKSYNC_RPC_HOSTS',
MUMBAI_RPC_HOSTS = 'MUMBAI_RPC_HOSTS',
Expand Down Expand Up @@ -49,6 +50,7 @@ export namespace EnvUtils {
GATSBY_MANTLE_RPC_HOSTS = 'GATSBY_MANTLE_RPC_HOSTS',
GATSBY_OPBNB_RPC_HOSTS = 'GATSBY_OPBNB_RPC_HOSTS',
GATSBY_POLYGON_RPC_HOSTS = 'GATSBY_POLYGON_RPC_HOSTS',
GATSBY_SCROLL_RPC_HOSTS = 'GATSBY_SCROLL_RPC_HOSTS',
GATSBY_ZKEVM_RPC_HOSTS = 'GATSBY_ZKEVM_RPC_HOSTS',
GATSBY_ZKSYNC_RPC_HOSTS = 'GATSBY_ZKSYNC_RPC_HOSTS',
GATSBY_MUMBAI_RPC_HOSTS = 'GATSBY_MUMBAI_RPC_HOSTS',
Expand Down

0 comments on commit b6a4275

Please sign in to comment.