-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,930 additions
and
1,203 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 |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
"out", | ||
"dist", | ||
".next", | ||
".turbo" | ||
".turbo", | ||
"examples" | ||
], | ||
"rules": { | ||
// Core | ||
|
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,24 +1,24 @@ | ||
{ | ||
"name": "@apps/gallery", | ||
"version": "3.0.0-91ecf92a", | ||
"version": "3.0.0-8d5e8f4e", | ||
"private": true, | ||
"main": "index.js", | ||
"scripts": { | ||
"dev:gallery": "storybook dev -p 6006", | ||
"build:gallery": "storybook build -o out" | ||
}, | ||
"dependencies": { | ||
"@web3modal/ui": "3.0.0-91ecf92a", | ||
"@web3modal/ui": "3.0.0-8d5e8f4e", | ||
"lit": "2.8.0", | ||
"storybook": "7.2.1" | ||
"storybook": "7.2.3" | ||
}, | ||
"devDependencies": { | ||
"@storybook/addon-essentials": "7.2.1", | ||
"@storybook/addon-links": "7.2.1", | ||
"@storybook/blocks": "7.2.1", | ||
"@storybook/theming": "7.2.1", | ||
"@storybook/web-components": "7.2.1", | ||
"@storybook/web-components-vite": "7.2.1", | ||
"file-system-cache": "2.4.3" | ||
"@storybook/addon-essentials": "7.2.3", | ||
"@storybook/addon-links": "7.2.3", | ||
"@storybook/blocks": "7.2.3", | ||
"@storybook/theming": "7.2.3", | ||
"@storybook/web-components": "7.2.3", | ||
"@storybook/web-components-vite": "7.2.3", | ||
"file-system-cache": "2.4.4" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>React wagmi example</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.jsx"></script> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "@examples/react-wagmi", | ||
"private": true, | ||
"version": "3.0.0-8d5e8f4e", | ||
"scripts": { | ||
"dev:example": "vite --port 3001", | ||
"build:example": "vite build" | ||
}, | ||
"dependencies": { | ||
"@web3modal/wagmi": "3.0.0-8d5e8f4e" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-react": "4.0.4" | ||
} | ||
} |
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,36 @@ | ||
import { useWeb3Modal } from '@web3modal/wagmi' | ||
import { WagmiConfig, configureChains, createConfig } from 'wagmi' | ||
import { arbitrum, mainnet } from 'wagmi/chains' | ||
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet' | ||
import { InjectedConnector } from 'wagmi/connectors/injected' | ||
import { WalletConnectConnector } from 'wagmi/connectors/walletConnect' | ||
import { publicProvider } from 'wagmi/providers/public' | ||
|
||
// 1. Get projectId | ||
const projectId = import.meta.env.VITE_PROJECT_ID | ||
if (!projectId) { | ||
throw new Error('VITE_PROJECT_ID is not set') | ||
} | ||
|
||
// 2. Create wagmiConfig | ||
const { chains, publicClient } = configureChains([mainnet, arbitrum], [publicProvider()]) | ||
const wagmiConfig = createConfig({ | ||
autoConnect: true, | ||
connectors: [ | ||
new WalletConnectConnector({ chains, options: { projectId, showQrModal: false } }), | ||
new InjectedConnector({ chains, options: { shimDisconnect: true } }), | ||
new CoinbaseWalletConnector({ chains, options: { appName: 'Web3Modal' } }) | ||
], | ||
publicClient | ||
}) | ||
|
||
export default function App() { | ||
// 3. Create modal | ||
const modal = useWeb3Modal({ wagmiConfig, projectId, chains }) | ||
|
||
return ( | ||
<WagmiConfig config={wagmiConfig}> | ||
<button onClick={() => modal.open()}>Open Modal</button> | ||
</WagmiConfig> | ||
) | ||
} |
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 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from './App.jsx' | ||
|
||
ReactDOM.createRoot(document.getElementById('app')).render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode> | ||
) |
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,6 @@ | ||
import react from '@vitejs/plugin-react' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [react()] | ||
}) |
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,12 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Vue wagmi example</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "@examples/vue-wagmi", | ||
"private": true, | ||
"version": "3.0.0-8d5e8f4e", | ||
"scripts": { | ||
"dev:example": "vite --port 3002", | ||
"build:example": "vite build" | ||
}, | ||
"dependencies": { | ||
"@web3modal/wagmi": "3.0.0-8d5e8f4e" | ||
}, | ||
"devDependencies": { | ||
"@vitejs/plugin-vue": "4.2.3" | ||
} | ||
} |
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,34 @@ | ||
<script setup> | ||
import { useWeb3Modal } from '@web3modal/wagmi/vue' | ||
import { configureChains, createConfig } from '@wagmi/core' | ||
import { arbitrum, mainnet } from 'wagmi/chains' | ||
import { CoinbaseWalletConnector } from '@wagmi/core/connectors/coinbaseWallet' | ||
import { InjectedConnector } from '@wagmi/core/connectors/injected' | ||
import { WalletConnectConnector } from '@wagmi/core/connectors/walletConnect' | ||
import { publicProvider } from '@wagmi/core/providers/public' | ||
// 1. Get projectId | ||
const projectId = import.meta.env.VITE_PROJECT_ID | ||
if (!projectId) { | ||
throw new Error('VITE_PROJECT_ID is not set') | ||
} | ||
// 2. Create wagmiConfig | ||
const { chains, publicClient } = configureChains([mainnet, arbitrum], [publicProvider()]) | ||
const wagmiConfig = createConfig({ | ||
autoConnect: true, | ||
connectors: [ | ||
new WalletConnectConnector({ chains, options: { projectId, showQrModal: false } }), | ||
new InjectedConnector({ chains, options: { shimDisconnect: true } }), | ||
new CoinbaseWalletConnector({ chains, options: { appName: 'Web3Modal' } }) | ||
], | ||
publicClient | ||
}) | ||
// 3. Create modal | ||
const modal = useWeb3Modal({ wagmiConfig, projectId, chains }) | ||
</script> | ||
|
||
<template> | ||
<button @click="() => modal.open()">Open Modal</button> | ||
</template> |
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,4 @@ | ||
import { createApp } from 'vue' | ||
import App from './App.vue' | ||
|
||
createApp(App).mount('#app') |
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,6 @@ | ||
import vue from '@vitejs/plugin-vue' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [vue()] | ||
}) |
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.
4fb6113
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:
web3modal-laboratory – ./
web3modal-laboratory-v3.vercel.app
web3modal-laboratory-git-v3-walletconnect1.vercel.app
web3modal-laboratory-walletconnect1.vercel.app