Skip to content

Commit

Permalink
Client/js: Add new chains
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley authored and evan-gray committed Apr 22, 2024
1 parent bda43b2 commit 35f0b34
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 50 deletions.
28 changes: 16 additions & 12 deletions clients/js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,10 @@ Options:
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "wormchain",
"cosmoshub", "evmos", "kujira", "neutron", "celestia", "stargaze", "seda",
"dymension", "sepolia", "arbitrum_sepolia", "base_sepolia",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
-n, --network Network
[required] [choices: "mainnet", "testnet", "devnet"]
Expand Down Expand Up @@ -311,18 +312,20 @@ Options:
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "wormchain",
"cosmoshub", "evmos", "kujira", "neutron", "celestia", "stargaze", "seda",
"dymension", "sepolia", "arbitrum_sepolia", "base_sepolia",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
--dst-chain destination chain
[required] [choices: "solana", "ethereum", "terra", "bsc", "polygon",
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "wormchain",
"cosmoshub", "evmos", "kujira", "neutron", "celestia", "stargaze", "seda",
"dymension", "sepolia", "arbitrum_sepolia", "base_sepolia",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
--dst-addr destination address [string] [required]
--token-addr token address [string] [default: native token]
Expand Down Expand Up @@ -355,9 +358,10 @@ Positionals:
"avalanche", "oasis", "algorand", "aurora", "fantom", "karura", "acala",
"klaytn", "celo", "near", "moonbeam", "neon", "terra2", "injective",
"osmosis", "sui", "aptos", "arbitrum", "optimism", "gnosis", "pythnet",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "wormchain",
"cosmoshub", "evmos", "kujira", "neutron", "celestia", "stargaze", "seda",
"dymension", "sepolia", "arbitrum_sepolia", "base_sepolia",
"xpla", "btc", "base", "sei", "rootstock", "scroll", "mantle", "blast",
"xlayer", "linea", "berachain", "seievm", "wormchain", "cosmoshub", "evmos",
"kujira", "neutron", "celestia", "stargaze", "seda", "dymension",
"provenance", "sepolia", "arbitrum_sepolia", "base_sepolia",
"optimism_sepolia", "holesky", "polygon_sepolia"]
tx Source transaction hash [string]

Expand Down
14 changes: 7 additions & 7 deletions clients/js/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 clients/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
],
"dependencies": {
"@celo-tools/celo-ethers-wrapper": "^0.1.0",
"@certusone/wormhole-sdk": "^0.10.13",
"@certusone/wormhole-sdk": "^0.10.14",
"@cosmjs/encoding": "^0.26.2",
"@improbable-eng/grpc-web-node-http-transport": "^0.15.0",
"@injectivelabs/networks": "^1.10.7",
Expand Down
6 changes: 6 additions & 0 deletions clients/js/src/chains/generic/getOriginalAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export const getOriginalAsset = async (
// case "rootstock":
case "scroll":
case "mantle":
case "blast":
case "xlayer":
case "linea":
case "berachain":
case "seievm":
case "sepolia":
case "arbitrum_sepolia":
case "base_sepolia":
Expand Down Expand Up @@ -125,6 +130,7 @@ export const getOriginalAsset = async (
case "stargaze":
case "seda":
case "dymension":
case "provenance":
case "rootstock":
throw new Error(`${chainName} not supported`);
default:
Expand Down
6 changes: 6 additions & 0 deletions clients/js/src/chains/generic/getWrappedAssetAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ export const getWrappedAssetAddress = async (
// case "rootstock":
case "scroll":
case "mantle":
case "blast":
case "xlayer":
case "linea":
case "berachain":
case "seievm":
case "sepolia":
case "arbitrum_sepolia":
case "base_sepolia":
Expand Down Expand Up @@ -172,6 +177,7 @@ export const getWrappedAssetAddress = async (
case "stargaze":
case "seda":
case "dymension":
case "provenance":
throw new Error(`${chainName} not supported`);
default:
impossible(chainName);
Expand Down
6 changes: 6 additions & 0 deletions clients/js/src/chains/generic/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ export const getProviderForChain = <T extends ChainId | ChainName>(
// case "rootstock":
case "scroll":
case "mantle":
case "blast":
case "xlayer":
case "linea":
case "berachain":
case "seievm":
case "sepolia":
case "arbitrum_sepolia":
case "base_sepolia":
Expand Down Expand Up @@ -169,6 +174,7 @@ export const getProviderForChain = <T extends ChainId | ChainName>(
case "stargaze":
case "seda":
case "dymension":
case "provenance":
case "rootstock":
throw new Error(`${chainName} not supported`);
default:
Expand Down
2 changes: 2 additions & 0 deletions clients/js/src/cmds/submit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,8 @@ async function executeSubmit(
throw Error("seda is not supported yet");
} else if (chain === "dymension") {
throw Error("dymension is not supported yet");
} else if (chain === "provenance") {
throw Error("provenance is not supported yet");
} else if (chain === "rootstock") {
throw Error("rootstock is not supported yet");
} else {
Expand Down
2 changes: 2 additions & 0 deletions clients/js/src/cmds/transfer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ export const handler = async (
throw Error("seda is not supported yet");
} else if (srcChain === "dymension") {
throw Error("dymension is not supported yet");
} else if (srcChain === "provenance") {
throw Error("provenance is not supported yet");
} else if (srcChain === "rootstock") {
throw Error("rootstock is not supported yet");
} else {
Expand Down
Loading

0 comments on commit 35f0b34

Please sign in to comment.