-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to all alchemy providers (#314)
* move to all alchemy providers Signed-off-by: Aaron Sutula <[email protected]> * fix test call Signed-off-by: Aaron Sutula <[email protected]> --------- Signed-off-by: Aaron Sutula <[email protected]> Co-authored-by: Aaron Sutula <[email protected]>
- Loading branch information
Showing
6 changed files
with
9 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import { configureChains } from "@wagmi/core"; | ||
import { infuraProvider } from "@wagmi/core/providers/infura"; | ||
import { jsonRpcProvider } from "@wagmi/core/providers/jsonRpc"; | ||
import { alchemyProvider } from "@wagmi/core/providers/alchemy"; | ||
import { publicProvider } from "@wagmi/core/providers/public"; | ||
import { defineChain } from "viem"; | ||
import { | ||
|
@@ -21,8 +20,7 @@ import { | |
} from "viem/chains"; | ||
|
||
export interface ApiKeys { | ||
infura?: string; | ||
quickNode?: string; | ||
alchemy?: string; | ||
} | ||
|
||
// Note: copied from [email protected] | ||
|
@@ -78,22 +76,10 @@ function supportedChains(isLocalDev = false) { | |
} | ||
|
||
function configuredChains(isLocalDev = false, apiKeys?: ApiKeys) { | ||
const infuraKey = apiKeys?.infura ?? ""; | ||
const quickNodeKey = apiKeys?.quickNode ?? ""; | ||
const alchemyKey = apiKeys?.alchemy ?? ""; | ||
|
||
return configureChains(supportedChains(isLocalDev), [ | ||
infuraProvider({ apiKey: infuraKey }), | ||
jsonRpcProvider({ | ||
rpc: (chain) => { | ||
let slug = "breakit"; | ||
if (chain.id === arbitrumNova.id) { | ||
slug = "nova-mainnet"; | ||
} | ||
return { | ||
http: `https://skilled-yolo-mountain.${slug}.quiknode.pro/${quickNodeKey}/`, | ||
}; | ||
}, | ||
}), | ||
alchemyProvider({ apiKey: alchemyKey }), | ||
publicProvider(), | ||
]); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68e63bc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
studio – ./
studio-neon.vercel.app
studio.tableland.xyz
studio-git-main-tableland.vercel.app
studio-tableland.vercel.app