-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from base-org/use-viem-2
Update to use stable Viem / Wagmi versions
- Loading branch information
Showing
60 changed files
with
757 additions
and
1,240 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
"@op-wagmi/example": major | ||
"@op-wagmi/docs": major | ||
"op-wagmi": major | ||
--- | ||
|
||
Use Viem 2 stable release, remove OpConfig and rely on wagmi config. | ||
|
||
OpConfigs can be removed from the project and the wagmi config can be used instead. This will allow for a more streamlined configuration process. Please see the configuration documentation for more information. https://www.opwagmi.sh/docs/configuration.html |
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
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
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { blastSepolia, optimismSepolia, sepolia } from 'viem/chains' | ||
|
||
export const chainIdToExplorer: Record<number, string> = { | ||
[sepolia.id]: sepolia.blockExplorers.default.url, | ||
[blastSepolia.id]: blastSepolia.blockExplorers.default.url, | ||
[optimismSepolia.id]: optimismSepolia.blockExplorers.default.url, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { baseSepolia, optimismSepolia, sepolia } from 'viem/chains' | ||
|
||
export const networkToChainId: Record<string, number> = { | ||
sepolia: sepolia.id, | ||
baseSepolia: baseSepolia.id, | ||
optimismSepolia: optimismSepolia.id, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { useState } from 'react' | ||
|
||
export function useSelectedNetwork(defaultNetwork: 'optimismSepolia' | 'baseSepolia' | 'sepolia' = 'baseSepolia') { | ||
const [selectedNetwork, setSelectedNetwork] = useState<'optimismSepolia' | 'baseSepolia' | 'sepolia'>(defaultNetwork) | ||
|
||
return { selectedNetwork, setSelectedNetwork } | ||
} |
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
Oops, something went wrong.