Skip to content
This repository was archived by the owner on Aug 30, 2022. It is now read-only.

Update avalanche RPC url #483

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion etc/sdk.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export enum ChainId {
// Warning: (ae-internal-missing-underscore) The name "ChainOrRpc" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal (undocumented)
export type ChainOrRpc = "mumbai" | "polygon" | "matic" | "rinkeby" | "goerli" | "mainnet" | "ethereum" | "fantom" | "avalanche" | "optimism" | "optimism-testnet" | "arbitrum" | "arbitrum-testnet" | (string & {});
export type ChainOrRpc = "mumbai" | "polygon" | "matic" | "rinkeby" | "goerli" | "mainnet" | "ethereum" | "fantom" | "avalanche" | "avalanche-testnet" | "optimism" | "optimism-testnet" | "arbitrum" | "arbitrum-testnet" | (string & {});

// Warning: (ae-internal-missing-underscore) The name "CidWithFileName" should be prefixed with an underscore because the declaration is marked as @internal
//
Expand Down
3 changes: 3 additions & 0 deletions src/constants/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export type ChainOrRpc =
| "ethereum"
| "fantom"
| "avalanche"
| "avalanche-testnet"
| "optimism"
| "optimism-testnet"
| "arbitrum"
Expand Down Expand Up @@ -87,6 +88,8 @@ export function getProviderForNetwork(network: ChainOrRpc | SignerOrProvider) {
return "https://rpc.ftm.tools";
case "avalanche":
return "https://api.avax.network/ext/bc/C/rpc";
case "avalanche-testnet":
return "https://api.avax-test.network/ext/bc/C/rpc";
default:
if (network.startsWith("http") || network.startsWith("ws")) {
return network;
Expand Down