@sei-js/create-sei 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.yarn/install-state.gz +0 -0
- package/CHANGELOG.md +12 -0
- package/README.md +16 -25
- package/biome.json +8 -0
- package/dist/main.js +10 -60
- package/dist/templates/next-template/.eslintrc.json +3 -0
- package/dist/templates/next-template/package.json +30 -0
- package/dist/templates/next-template/src/app/components/Homepage/Examples.tsx +257 -0
- package/dist/templates/next-template/src/app/components/Homepage/Homepage.css +154 -0
- package/dist/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Homepage.tsx +10 -36
- package/{templates/next-wagmi-template → dist/templates/next-template}/src/app/components/Web3Provider.tsx +29 -28
- package/dist/templates/next-template/src/app/components/index.ts +2 -0
- package/dist/templates/{next-wagmi-template → next-template}/src/app/constants/chain.ts +2 -2
- package/dist/templates/next-template/src/app/constants/index.ts +1 -0
- package/dist/templates/next-template/src/app/index.css +184 -0
- package/dist/templates/next-template/src/app/layout.tsx +21 -0
- package/dist/templates/next-template/src/app/page.tsx +21 -0
- package/dist/templates/next-template/tsconfig.json +26 -0
- package/dist/templates/vite-template/.eslintrc.cjs +11 -0
- package/dist/templates/vite-template/package.json +33 -0
- package/dist/templates/vite-template/src/App.tsx +21 -0
- package/dist/templates/vite-template/src/components/Homepage/Examples.tsx +255 -0
- package/dist/templates/vite-template/src/components/Homepage/Homepage.css +154 -0
- package/dist/templates/vite-template/src/components/Homepage/Homepage.tsx +81 -0
- package/{templates/vite-wagmi-template → dist/templates/vite-template}/src/components/Web3Provider.tsx +29 -28
- package/dist/templates/{vite-wagmi-template → vite-template}/src/constants/chain.ts +1 -1
- package/dist/templates/vite-template/src/constants/index.ts +1 -0
- package/dist/templates/vite-template/src/index.css +183 -0
- package/dist/templates/vite-template/src/main.tsx +12 -0
- package/dist/templates/vite-template/tsconfig.app.json +25 -0
- package/dist/templates/vite-template/tsconfig.json +11 -0
- package/dist/templates/vite-template/tsconfig.node.json +14 -0
- package/dist/templates/vite-template/vite.config.ts +10 -0
- package/package.json +1 -1
- package/src/main.ts +26 -87
- package/templates/next-template/.eslintrc.json +3 -0
- package/templates/next-template/package.json +30 -0
- package/templates/next-template/src/app/components/Homepage/Examples.tsx +257 -0
- package/templates/next-template/src/app/components/Homepage/Homepage.css +154 -0
- package/templates/{next-wagmi-template → next-template}/src/app/components/Homepage/Homepage.tsx +10 -36
- package/{dist/templates/next-wagmi-template → templates/next-template}/src/app/components/Web3Provider.tsx +29 -28
- package/templates/next-template/src/app/components/index.ts +2 -0
- package/templates/{next-wagmi-template → next-template}/src/app/constants/chain.ts +2 -2
- package/templates/next-template/src/app/constants/index.ts +1 -0
- package/templates/next-template/src/app/index.css +184 -0
- package/templates/next-template/src/app/layout.tsx +21 -0
- package/templates/next-template/src/app/page.tsx +21 -0
- package/templates/next-template/tsconfig.json +26 -0
- package/templates/vite-template/.eslintrc.cjs +11 -0
- package/templates/vite-template/package.json +33 -0
- package/templates/vite-template/src/App.tsx +21 -0
- package/templates/vite-template/src/components/Homepage/Examples.tsx +255 -0
- package/templates/vite-template/src/components/Homepage/Homepage.css +154 -0
- package/templates/vite-template/src/components/Homepage/Homepage.tsx +81 -0
- package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/components/Web3Provider.tsx +29 -28
- package/templates/{vite-wagmi-template → vite-template}/src/constants/chain.ts +1 -1
- package/templates/vite-template/src/constants/index.ts +1 -0
- package/templates/vite-template/src/index.css +183 -0
- package/templates/vite-template/src/main.tsx +12 -0
- package/templates/vite-template/tsconfig.app.json +25 -0
- package/templates/vite-template/tsconfig.json +11 -0
- package/templates/vite-template/tsconfig.node.json +14 -0
- package/templates/vite-template/vite.config.ts +10 -0
- package/tsconfig.json +18 -28
- package/dist/templates/next-cosmos-template/.eslintrc.json +0 -3
- package/dist/templates/next-cosmos-template/README.md +0 -60
- package/dist/templates/next-cosmos-template/next.config.mjs +0 -14
- package/dist/templates/next-cosmos-template/package.json +0 -31
- package/dist/templates/next-cosmos-template/public/next.svg +0 -1
- package/dist/templates/next-cosmos-template/public/vercel.svg +0 -1
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +0 -177
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +0 -156
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +0 -110
- package/dist/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
- package/dist/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +0 -39
- package/dist/templates/next-cosmos-template/src/app/components/index.ts +0 -3
- package/dist/templates/next-cosmos-template/src/app/constants/chain.ts +0 -16
- package/dist/templates/next-cosmos-template/src/app/constants/index.ts +0 -1
- package/dist/templates/next-cosmos-template/src/app/index.css +0 -171
- package/dist/templates/next-cosmos-template/src/app/layout.tsx +0 -21
- package/dist/templates/next-cosmos-template/src/app/page.tsx +0 -17
- package/dist/templates/next-cosmos-template/tsconfig.json +0 -26
- package/dist/templates/next-cosmos-template/yarn.lock +0 -9814
- package/dist/templates/next-wagmi-template/.eslintrc.json +0 -3
- package/dist/templates/next-wagmi-template/package.json +0 -30
- package/dist/templates/next-wagmi-template/src/app/components/Homepage/Examples.tsx +0 -271
- package/dist/templates/next-wagmi-template/src/app/components/Homepage/Homepage.css +0 -156
- package/dist/templates/next-wagmi-template/src/app/components/index.ts +0 -2
- package/dist/templates/next-wagmi-template/src/app/constants/index.ts +0 -1
- package/dist/templates/next-wagmi-template/src/app/index.css +0 -171
- package/dist/templates/next-wagmi-template/src/app/layout.tsx +0 -21
- package/dist/templates/next-wagmi-template/src/app/page.tsx +0 -21
- package/dist/templates/next-wagmi-template/tsconfig.json +0 -26
- package/dist/templates/vite-cosmos-template/.eslintrc.cjs +0 -18
- package/dist/templates/vite-cosmos-template/README.md +0 -72
- package/dist/templates/vite-cosmos-template/index.html +0 -16
- package/dist/templates/vite-cosmos-template/package.json +0 -35
- package/dist/templates/vite-cosmos-template/src/App.tsx +0 -16
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +0 -177
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +0 -156
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +0 -102
- package/dist/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
- package/dist/templates/vite-cosmos-template/src/components/Web3Provider.tsx +0 -45
- package/dist/templates/vite-cosmos-template/src/components/index.ts +0 -4
- package/dist/templates/vite-cosmos-template/src/constants/chain.ts +0 -16
- package/dist/templates/vite-cosmos-template/src/constants/index.ts +0 -1
- package/dist/templates/vite-cosmos-template/src/index.css +0 -171
- package/dist/templates/vite-cosmos-template/src/main.tsx +0 -12
- package/dist/templates/vite-cosmos-template/tsconfig.app.json +0 -27
- package/dist/templates/vite-cosmos-template/tsconfig.json +0 -11
- package/dist/templates/vite-cosmos-template/tsconfig.node.json +0 -14
- package/dist/templates/vite-cosmos-template/vite.config.ts +0 -7
- package/dist/templates/vite-cosmos-template/yarn.lock +0 -9323
- package/dist/templates/vite-wagmi-template/.eslintrc.cjs +0 -18
- package/dist/templates/vite-wagmi-template/package.json +0 -33
- package/dist/templates/vite-wagmi-template/src/App.tsx +0 -22
- package/dist/templates/vite-wagmi-template/src/components/Homepage/Examples.tsx +0 -269
- package/dist/templates/vite-wagmi-template/src/components/Homepage/Homepage.css +0 -156
- package/dist/templates/vite-wagmi-template/src/components/Homepage/Homepage.tsx +0 -106
- package/dist/templates/vite-wagmi-template/src/constants/index.ts +0 -1
- package/dist/templates/vite-wagmi-template/src/index.css +0 -170
- package/dist/templates/vite-wagmi-template/src/main.tsx +0 -12
- package/dist/templates/vite-wagmi-template/tsconfig.app.json +0 -27
- package/dist/templates/vite-wagmi-template/tsconfig.json +0 -11
- package/dist/templates/vite-wagmi-template/tsconfig.node.json +0 -14
- package/dist/templates/vite-wagmi-template/vite.config.ts +0 -10
- package/templates/next-cosmos-template/.eslintrc.json +0 -3
- package/templates/next-cosmos-template/README.md +0 -60
- package/templates/next-cosmos-template/next-env.d.ts +0 -5
- package/templates/next-cosmos-template/next.config.mjs +0 -14
- package/templates/next-cosmos-template/package.json +0 -31
- package/templates/next-cosmos-template/public/next.svg +0 -1
- package/templates/next-cosmos-template/public/sei-logotype.svg +0 -15
- package/templates/next-cosmos-template/public/vercel.svg +0 -1
- package/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +0 -177
- package/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +0 -156
- package/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +0 -110
- package/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
- package/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +0 -39
- package/templates/next-cosmos-template/src/app/components/index.ts +0 -3
- package/templates/next-cosmos-template/src/app/constants/chain.ts +0 -16
- package/templates/next-cosmos-template/src/app/constants/index.ts +0 -1
- package/templates/next-cosmos-template/src/app/favicon.ico +0 -0
- package/templates/next-cosmos-template/src/app/index.css +0 -171
- package/templates/next-cosmos-template/src/app/layout.tsx +0 -21
- package/templates/next-cosmos-template/src/app/page.tsx +0 -17
- package/templates/next-cosmos-template/tsconfig.json +0 -26
- package/templates/next-cosmos-template/yarn.lock +0 -9814
- package/templates/next-wagmi-template/.eslintrc.json +0 -3
- package/templates/next-wagmi-template/next-env.d.ts +0 -5
- package/templates/next-wagmi-template/package.json +0 -30
- package/templates/next-wagmi-template/public/sei-logotype.svg +0 -15
- package/templates/next-wagmi-template/src/app/components/Homepage/Examples.tsx +0 -271
- package/templates/next-wagmi-template/src/app/components/Homepage/Homepage.css +0 -156
- package/templates/next-wagmi-template/src/app/components/index.ts +0 -2
- package/templates/next-wagmi-template/src/app/constants/index.ts +0 -1
- package/templates/next-wagmi-template/src/app/favicon.ico +0 -0
- package/templates/next-wagmi-template/src/app/index.css +0 -171
- package/templates/next-wagmi-template/src/app/layout.tsx +0 -21
- package/templates/next-wagmi-template/src/app/page.tsx +0 -21
- package/templates/next-wagmi-template/tsconfig.json +0 -26
- package/templates/vite-cosmos-template/.eslintrc.cjs +0 -18
- package/templates/vite-cosmos-template/README.md +0 -72
- package/templates/vite-cosmos-template/favicon.ico +0 -0
- package/templates/vite-cosmos-template/index.html +0 -16
- package/templates/vite-cosmos-template/package.json +0 -35
- package/templates/vite-cosmos-template/public/sei-logotype.svg +0 -15
- package/templates/vite-cosmos-template/src/App.tsx +0 -16
- package/templates/vite-cosmos-template/src/assets/react.svg +0 -1
- package/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +0 -177
- package/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +0 -156
- package/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +0 -102
- package/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
- package/templates/vite-cosmos-template/src/components/Web3Provider.tsx +0 -45
- package/templates/vite-cosmos-template/src/components/index.ts +0 -4
- package/templates/vite-cosmos-template/src/constants/chain.ts +0 -16
- package/templates/vite-cosmos-template/src/constants/index.ts +0 -1
- package/templates/vite-cosmos-template/src/index.css +0 -171
- package/templates/vite-cosmos-template/src/main.tsx +0 -12
- package/templates/vite-cosmos-template/src/vite-env.d.ts +0 -1
- package/templates/vite-cosmos-template/tsconfig.app.json +0 -27
- package/templates/vite-cosmos-template/tsconfig.json +0 -11
- package/templates/vite-cosmos-template/tsconfig.node.json +0 -14
- package/templates/vite-cosmos-template/vite.config.ts +0 -7
- package/templates/vite-cosmos-template/yarn.lock +0 -9323
- package/templates/vite-wagmi-template/.eslintrc.cjs +0 -18
- package/templates/vite-wagmi-template/favicon.ico +0 -0
- package/templates/vite-wagmi-template/package.json +0 -33
- package/templates/vite-wagmi-template/public/sei-logotype.svg +0 -15
- package/templates/vite-wagmi-template/src/App.tsx +0 -22
- package/templates/vite-wagmi-template/src/assets/react.svg +0 -1
- package/templates/vite-wagmi-template/src/components/Homepage/Examples.tsx +0 -269
- package/templates/vite-wagmi-template/src/components/Homepage/Homepage.css +0 -156
- package/templates/vite-wagmi-template/src/components/Homepage/Homepage.tsx +0 -106
- package/templates/vite-wagmi-template/src/constants/index.ts +0 -1
- package/templates/vite-wagmi-template/src/index.css +0 -170
- package/templates/vite-wagmi-template/src/main.tsx +0 -12
- package/templates/vite-wagmi-template/src/vite-env.d.ts +0 -1
- package/templates/vite-wagmi-template/tsconfig.app.json +0 -27
- package/templates/vite-wagmi-template/tsconfig.json +0 -11
- package/templates/vite-wagmi-template/tsconfig.node.json +0 -14
- package/templates/vite-wagmi-template/vite.config.ts +0 -10
- /package/dist/templates/{next-wagmi-template → next-template}/README.md +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/next-env.d.ts +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/next.config.mjs +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/public/sei-logotype.svg +0 -0
- /package/dist/templates/{next-cosmos-template → next-template}/src/app/favicon.ico +0 -0
- /package/dist/templates/{next-wagmi-template → next-template}/yarn.lock +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/README.md +0 -0
- /package/dist/templates/{next-wagmi-template/src/app → vite-template}/favicon.ico +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/index.html +0 -0
- /package/dist/templates/{next-wagmi-template → vite-template}/public/sei-logotype.svg +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/src/assets/react.svg +0 -0
- /package/dist/templates/{vite-cosmos-template → vite-template}/src/vite-env.d.ts +0 -0
- /package/dist/templates/{vite-wagmi-template → vite-template}/yarn.lock +0 -0
- /package/templates/{next-wagmi-template → next-template}/README.md +0 -0
- /package/{dist/templates/next-wagmi-template → templates/next-template}/next-env.d.ts +0 -0
- /package/templates/{next-wagmi-template → next-template}/next.config.mjs +0 -0
- /package/{dist/templates/vite-cosmos-template → templates/next-template}/public/sei-logotype.svg +0 -0
- /package/{dist/templates/vite-cosmos-template → templates/next-template/src/app}/favicon.ico +0 -0
- /package/templates/{next-wagmi-template → next-template}/yarn.lock +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/README.md +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/favicon.ico +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/index.html +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/public/sei-logotype.svg +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/assets/react.svg +0 -0
- /package/{dist/templates/vite-wagmi-template → templates/vite-template}/src/vite-env.d.ts +0 -0
- /package/templates/{vite-wagmi-template → vite-template}/yarn.lock +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { ConnectButton } from '@rainbow-me/rainbowkit';
|
|
4
4
|
import Examples from './Examples';
|
|
5
|
-
import
|
|
5
|
+
import './Homepage.css';
|
|
6
6
|
|
|
7
7
|
type HelpItem = {
|
|
8
8
|
title: string;
|
|
@@ -14,13 +14,11 @@ const renderHelpItem = ({ title, description, link }: HelpItem) => (
|
|
|
14
14
|
<div className="card secondary">
|
|
15
15
|
<div className="card-header">
|
|
16
16
|
<p className="card__title">
|
|
17
|
-
<a href={link} target=
|
|
17
|
+
<a href={link} target="_blank" rel="noopener noreferrer" className="external-link">
|
|
18
18
|
{title} {externalIcon}
|
|
19
19
|
</a>
|
|
20
20
|
</p>
|
|
21
|
-
<small className="card__description">
|
|
22
|
-
{description}
|
|
23
|
-
</small>
|
|
21
|
+
<small className="card__description">{description}</small>
|
|
24
22
|
</div>
|
|
25
23
|
</div>
|
|
26
24
|
);
|
|
@@ -49,13 +47,7 @@ const helpItems: HelpItem[] = [
|
|
|
49
47
|
];
|
|
50
48
|
|
|
51
49
|
const externalIcon = (
|
|
52
|
-
<svg
|
|
53
|
-
width="16"
|
|
54
|
-
height="16"
|
|
55
|
-
viewBox="0 0 16 16"
|
|
56
|
-
fill="none"
|
|
57
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
58
|
-
>
|
|
50
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
59
51
|
<path
|
|
60
52
|
d="M12 8.66667V12.6667C12 13.0203 11.8595 13.3594 11.6095 13.6095C11.3594 13.8595 11.0203 14 10.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V5.33333C2 4.97971 2.14048 4.64057 2.39052 4.39052C2.64057 4.14048 2.97971 4 3.33333 4H7.33333"
|
|
61
53
|
stroke="#9F1239"
|
|
@@ -63,34 +55,19 @@ const externalIcon = (
|
|
|
63
55
|
strokeLinecap="round"
|
|
64
56
|
strokeLinejoin="round"
|
|
65
57
|
/>
|
|
66
|
-
<path
|
|
67
|
-
|
|
68
|
-
stroke="#9F1239"
|
|
69
|
-
strokeWidth="1.33333"
|
|
70
|
-
strokeLinecap="round"
|
|
71
|
-
strokeLinejoin="round"
|
|
72
|
-
/>
|
|
73
|
-
<path
|
|
74
|
-
d="M6.66663 9.33333L14 2"
|
|
75
|
-
stroke="#9F1239"
|
|
76
|
-
strokeWidth="1.33333"
|
|
77
|
-
strokeLinecap="round"
|
|
78
|
-
strokeLinejoin="round"
|
|
79
|
-
/>
|
|
58
|
+
<path d="M10 2H14V6" stroke="#9F1239" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round" />
|
|
59
|
+
<path d="M6.66663 9.33333L14 2" stroke="#9F1239" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round" />
|
|
80
60
|
</svg>
|
|
81
61
|
);
|
|
82
62
|
|
|
83
63
|
function Homepage() {
|
|
84
|
-
|
|
85
64
|
return (
|
|
86
65
|
<div className="container">
|
|
87
66
|
<img src="sei-logotype.svg" className="logo" alt="SEI logotype" />
|
|
88
67
|
<div className="card intro">
|
|
89
68
|
<div className="card-header">
|
|
90
69
|
<p className="card__title">Wallet address</p>
|
|
91
|
-
<small className="card__description">
|
|
92
|
-
Connect wallet to see your address and balance
|
|
93
|
-
</small>
|
|
70
|
+
<small className="card__description">Connect wallet to see your address and balance</small>
|
|
94
71
|
</div>
|
|
95
72
|
<ConnectButton />
|
|
96
73
|
</div>
|
|
@@ -99,12 +76,9 @@ function Homepage() {
|
|
|
99
76
|
Get started by editing <code>src/app/page.tsx</code>
|
|
100
77
|
</div>
|
|
101
78
|
<div className="grid docs">
|
|
102
|
-
{
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
{renderHelpItem(item)}
|
|
106
|
-
</div>))
|
|
107
|
-
}
|
|
79
|
+
{helpItems.map((item, index) => (
|
|
80
|
+
<div key={item.title}>{renderHelpItem(item)}</div>
|
|
81
|
+
))}
|
|
108
82
|
</div>
|
|
109
83
|
</div>
|
|
110
84
|
);
|
|
@@ -17,18 +17,18 @@ interface Web3ProviderProps {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
const connectors = connectorsForWallets(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
groupName: 'Recommended',
|
|
23
|
+
wallets: [metaMaskWallet]
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
{
|
|
27
|
+
appName: '<YOUR_APPNAME_HERE>',
|
|
28
|
+
projectId: '<YOUR_ID_HERE>'
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
|
|
32
32
|
function Web3Provider({ children }: Web3ProviderProps) {
|
|
33
33
|
// Buffer polyfill
|
|
34
34
|
if (typeof window !== 'undefined') {
|
|
@@ -50,22 +50,23 @@ function Web3Provider({ children }: Web3ProviderProps) {
|
|
|
50
50
|
return (
|
|
51
51
|
<WagmiProvider config={config}>
|
|
52
52
|
<QueryClientProvider client={queryClient}>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
53
|
+
<RainbowKitProvider
|
|
54
|
+
theme={lightTheme({
|
|
55
|
+
accentColor: '#7e1914',
|
|
56
|
+
accentColorForeground: 'white',
|
|
57
|
+
borderRadius: 'medium',
|
|
58
|
+
fontStack: 'system'
|
|
59
|
+
})}
|
|
60
|
+
appInfo={{
|
|
61
|
+
appName: '<APP-NAME-HERE>',
|
|
62
|
+
learnMoreUrl: 'https://www.docs.sei.io/user-guides/wallet-setup'
|
|
63
|
+
}}
|
|
64
|
+
modalSize="compact"
|
|
65
|
+
initialChain={chainConfig.id}
|
|
66
|
+
>
|
|
67
|
+
{children}
|
|
68
|
+
</RainbowKitProvider>
|
|
69
|
+
</QueryClientProvider>
|
|
69
70
|
</WagmiProvider>
|
|
70
71
|
);
|
|
71
72
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Set your selected chain here
|
|
2
|
-
import { seiDevnet } from
|
|
2
|
+
import { seiDevnet } from 'viem/chains';
|
|
3
3
|
|
|
4
4
|
// Set your selected chain here
|
|
5
5
|
// To point to mainnet, use sei.
|
|
6
6
|
// To point to testnet, use seiTestnet.
|
|
7
|
-
export const selectedChain = seiDevnet
|
|
7
|
+
export const selectedChain = seiDevnet;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './chain';
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/*
|
|
2
|
+
1. Use a more-intuitive box-sizing model.
|
|
3
|
+
*/
|
|
4
|
+
*,
|
|
5
|
+
*::before,
|
|
6
|
+
*::after {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
/*
|
|
10
|
+
2. Remove default margin
|
|
11
|
+
*/
|
|
12
|
+
* {
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
/*
|
|
16
|
+
Typographic tweaks!
|
|
17
|
+
3. Add accessible line-height
|
|
18
|
+
4. Improve text rendering
|
|
19
|
+
*/
|
|
20
|
+
body {
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
-webkit-font-smoothing: antialiased;
|
|
23
|
+
}
|
|
24
|
+
/*
|
|
25
|
+
5. Improve media defaults
|
|
26
|
+
*/
|
|
27
|
+
img,
|
|
28
|
+
picture,
|
|
29
|
+
video,
|
|
30
|
+
canvas,
|
|
31
|
+
svg {
|
|
32
|
+
display: block;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
}
|
|
35
|
+
/*
|
|
36
|
+
6. Remove built-in form typography styles
|
|
37
|
+
*/
|
|
38
|
+
input,
|
|
39
|
+
button,
|
|
40
|
+
textarea,
|
|
41
|
+
select {
|
|
42
|
+
font: inherit;
|
|
43
|
+
}
|
|
44
|
+
/*
|
|
45
|
+
7. Avoid text overflows
|
|
46
|
+
*/
|
|
47
|
+
p,
|
|
48
|
+
h1,
|
|
49
|
+
h2,
|
|
50
|
+
h3,
|
|
51
|
+
h4,
|
|
52
|
+
h5,
|
|
53
|
+
h6 {
|
|
54
|
+
overflow-wrap: break-word;
|
|
55
|
+
line-height: 1;
|
|
56
|
+
}
|
|
57
|
+
/*
|
|
58
|
+
8. Create a root stacking context
|
|
59
|
+
*/
|
|
60
|
+
#root,
|
|
61
|
+
#__next {
|
|
62
|
+
isolation: isolate;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:root {
|
|
66
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
67
|
+
line-height: 1.5;
|
|
68
|
+
font-weight: 400;
|
|
69
|
+
|
|
70
|
+
color-scheme: light dark;
|
|
71
|
+
color: #000;
|
|
72
|
+
background: var(--background);
|
|
73
|
+
|
|
74
|
+
font-synthesis: none;
|
|
75
|
+
text-rendering: optimizeLegibility;
|
|
76
|
+
-webkit-font-smoothing: antialiased;
|
|
77
|
+
-moz-osx-font-smoothing: grayscale;
|
|
78
|
+
|
|
79
|
+
--primary-color: #9f1239;
|
|
80
|
+
--primary-color-hover: #7f0a2e;
|
|
81
|
+
--background: linear-gradient(180deg, #f5f5f4 0%, #fff 100%);
|
|
82
|
+
--border: #d6d3d1;
|
|
83
|
+
--card: #fff;
|
|
84
|
+
--card-foreground: #242424;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
a {
|
|
88
|
+
font-weight: 500;
|
|
89
|
+
color: var(--primary-color);
|
|
90
|
+
text-decoration: inherit;
|
|
91
|
+
}
|
|
92
|
+
a:hover {
|
|
93
|
+
color: var(--primary-color-hover);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
body {
|
|
97
|
+
margin: 0;
|
|
98
|
+
padding: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
h1 {
|
|
102
|
+
font-size: 3.2em;
|
|
103
|
+
line-height: 1;
|
|
104
|
+
}
|
|
105
|
+
code {
|
|
106
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
|
|
107
|
+
display: inline-flex;
|
|
108
|
+
border-radius: 4px;
|
|
109
|
+
padding: 0.1rem 0.4rem;
|
|
110
|
+
background-color: #d7cccc;
|
|
111
|
+
color: var(--card-foreground);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
button {
|
|
115
|
+
border-radius: 4rem;
|
|
116
|
+
border: 1px solid transparent;
|
|
117
|
+
padding: 0.6em 1.2em;
|
|
118
|
+
font-size: 1em;
|
|
119
|
+
font-weight: 500;
|
|
120
|
+
font-family: inherit;
|
|
121
|
+
background-color: #cec9c1;
|
|
122
|
+
cursor: pointer;
|
|
123
|
+
transition: all 0.25s ease;
|
|
124
|
+
color: black;
|
|
125
|
+
}
|
|
126
|
+
button:hover {
|
|
127
|
+
background-color: #b5afa7;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
button:disabled {
|
|
131
|
+
filter: grayscale(1) opacity(0.5);
|
|
132
|
+
color: rgb(56, 55, 55);
|
|
133
|
+
pointer-events: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
button.primary {
|
|
137
|
+
background-color: var(--primary-color);
|
|
138
|
+
color: #fff;
|
|
139
|
+
}
|
|
140
|
+
button.outline {
|
|
141
|
+
background-color: transparent;
|
|
142
|
+
border: 1px solid var(--border);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
button.primary:hover {
|
|
146
|
+
background-color: var(--primary-color-hover);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
button.secondary {
|
|
150
|
+
background-color: #000;
|
|
151
|
+
color: #fff;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
button.secondary:hover {
|
|
155
|
+
background-color: #2b2b2b;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
button:active {
|
|
159
|
+
transform: translateY(1px);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
button.small {
|
|
163
|
+
padding: 0.4em 0.8em;
|
|
164
|
+
font-size: 0.8em;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
button:focus-visible {
|
|
168
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
169
|
+
outline-offset: 4px;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.header {
|
|
173
|
+
width: 100%;
|
|
174
|
+
height: 4rem;
|
|
175
|
+
padding: 0 1%;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: right;
|
|
179
|
+
background-color: transparent;
|
|
180
|
+
border-bottom: 1px solid var(--border);
|
|
181
|
+
position: sticky;
|
|
182
|
+
top: 0;
|
|
183
|
+
background: #f5f5f4;
|
|
184
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Metadata } from 'next';
|
|
2
|
+
import { Inter } from 'next/font/google';
|
|
3
|
+
|
|
4
|
+
const inter = Inter({ subsets: ['latin'] });
|
|
5
|
+
|
|
6
|
+
export const metadata: Metadata = {
|
|
7
|
+
title: 'Sei Next App (Wagmi)',
|
|
8
|
+
description: 'Generated by create sei app'
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default function RootLayout({
|
|
12
|
+
children
|
|
13
|
+
}: Readonly<{
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}>) {
|
|
16
|
+
return (
|
|
17
|
+
<html lang="en">
|
|
18
|
+
<body className={inter.className}>{children}</body>
|
|
19
|
+
</html>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ConnectButton } from '@rainbow-me/rainbowkit';
|
|
2
|
+
import Web3Provider from './components/Web3Provider';
|
|
3
|
+
import Homepage from './components/Homepage/Homepage';
|
|
4
|
+
|
|
5
|
+
import './index.css';
|
|
6
|
+
|
|
7
|
+
export default function Home() {
|
|
8
|
+
return (
|
|
9
|
+
<Web3Provider>
|
|
10
|
+
<div className="header">
|
|
11
|
+
<ConnectButton
|
|
12
|
+
showBalance={{
|
|
13
|
+
smallScreen: false,
|
|
14
|
+
largeScreen: true
|
|
15
|
+
}}
|
|
16
|
+
/>
|
|
17
|
+
</div>
|
|
18
|
+
<Homepage />
|
|
19
|
+
</Web3Provider>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
4
|
+
"allowJs": true,
|
|
5
|
+
"skipLibCheck": true,
|
|
6
|
+
"strict": true,
|
|
7
|
+
"noEmit": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"module": "esnext",
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"isolatedModules": true,
|
|
13
|
+
"jsx": "preserve",
|
|
14
|
+
"incremental": true,
|
|
15
|
+
"plugins": [
|
|
16
|
+
{
|
|
17
|
+
"name": "next"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"paths": {
|
|
21
|
+
"@/*": ["./src/*"]
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
|
25
|
+
"exclude": ["node_modules"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: { browser: true, es2020: true },
|
|
4
|
+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended'],
|
|
5
|
+
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
|
6
|
+
parser: '@typescript-eslint/parser',
|
|
7
|
+
plugins: ['react-refresh'],
|
|
8
|
+
rules: {
|
|
9
|
+
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }]
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "template-vite-sei-app",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "vite",
|
|
8
|
+
"build": "tsc -b && vite build",
|
|
9
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@rainbow-me/rainbowkit": "^2.1.2",
|
|
14
|
+
"@sei-js/evm": "^1.2.0",
|
|
15
|
+
"@tanstack/react-query": "^5.45.1",
|
|
16
|
+
"react": "^18.3.1",
|
|
17
|
+
"react-dom": "^18.3.1",
|
|
18
|
+
"viem": "^2.15.1",
|
|
19
|
+
"wagmi": "^2.10.2"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@types/react": "^18.3.3",
|
|
23
|
+
"@types/react-dom": "^18.3.0",
|
|
24
|
+
"@typescript-eslint/eslint-plugin": "^7.13.1",
|
|
25
|
+
"@typescript-eslint/parser": "^7.13.1",
|
|
26
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
27
|
+
"eslint": "^8.57.0",
|
|
28
|
+
"eslint-plugin-react-hooks": "^4.6.2",
|
|
29
|
+
"eslint-plugin-react-refresh": "^0.4.7",
|
|
30
|
+
"typescript": "^5.2.2",
|
|
31
|
+
"vite": "^5.3.1"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { ConnectButton } from '@rainbow-me/rainbowkit';
|
|
3
|
+
import Homepage from './components/Homepage/Homepage';
|
|
4
|
+
|
|
5
|
+
function App() {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<div className="header">
|
|
9
|
+
<ConnectButton
|
|
10
|
+
showBalance={{
|
|
11
|
+
smallScreen: false,
|
|
12
|
+
largeScreen: true
|
|
13
|
+
}}
|
|
14
|
+
/>
|
|
15
|
+
</div>
|
|
16
|
+
<Homepage />
|
|
17
|
+
</>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default App;
|