@sei-js/create-sei 0.0.1 → 0.0.2
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 +6 -0
- package/dist/main.js +161 -0
- package/dist/templates/next-cosmos-template/.eslintrc.json +3 -0
- package/dist/templates/next-cosmos-template/README.md +60 -0
- package/dist/templates/next-cosmos-template/next-env.d.ts +5 -0
- package/dist/templates/next-cosmos-template/next.config.mjs +14 -0
- package/dist/templates/next-cosmos-template/package.json +31 -0
- package/dist/templates/next-cosmos-template/public/next.svg +1 -0
- package/dist/templates/next-cosmos-template/public/sei-logotype.svg +15 -0
- package/dist/templates/next-cosmos-template/public/vercel.svg +1 -0
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +177 -0
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +156 -0
- package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +110 -0
- package/dist/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +26 -0
- package/dist/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +39 -0
- package/dist/templates/next-cosmos-template/src/app/components/index.ts +3 -0
- package/dist/templates/next-cosmos-template/src/app/constants/chain.ts +16 -0
- package/dist/templates/next-cosmos-template/src/app/constants/index.ts +1 -0
- package/dist/templates/next-cosmos-template/src/app/favicon.ico +0 -0
- package/dist/templates/next-cosmos-template/src/app/index.css +171 -0
- package/dist/templates/next-cosmos-template/src/app/layout.tsx +21 -0
- package/dist/templates/next-cosmos-template/src/app/page.tsx +17 -0
- package/dist/templates/next-cosmos-template/tsconfig.json +26 -0
- package/dist/templates/next-cosmos-template/yarn.lock +9814 -0
- package/dist/templates/next-wagmi-template/.eslintrc.json +3 -0
- package/dist/templates/next-wagmi-template/README.md +58 -0
- package/dist/templates/next-wagmi-template/next-env.d.ts +5 -0
- package/dist/templates/next-wagmi-template/next.config.mjs +4 -0
- package/dist/templates/next-wagmi-template/package.json +30 -0
- package/dist/templates/next-wagmi-template/public/sei-logotype.svg +15 -0
- package/dist/templates/next-wagmi-template/src/app/components/Homepage/Examples.tsx +271 -0
- package/dist/templates/next-wagmi-template/src/app/components/Homepage/Homepage.css +156 -0
- package/dist/templates/next-wagmi-template/src/app/components/Homepage/Homepage.tsx +113 -0
- package/dist/templates/next-wagmi-template/src/app/components/Web3Provider.tsx +73 -0
- package/dist/templates/next-wagmi-template/src/app/components/index.ts +2 -0
- package/dist/templates/next-wagmi-template/src/app/constants/chain.ts +7 -0
- package/dist/templates/next-wagmi-template/src/app/constants/index.ts +1 -0
- package/dist/templates/next-wagmi-template/src/app/favicon.ico +0 -0
- package/dist/templates/next-wagmi-template/src/app/index.css +171 -0
- package/dist/templates/next-wagmi-template/src/app/layout.tsx +21 -0
- package/dist/templates/next-wagmi-template/src/app/page.tsx +21 -0
- package/dist/templates/next-wagmi-template/tsconfig.json +26 -0
- package/dist/templates/next-wagmi-template/yarn.lock +4809 -0
- package/dist/templates/vite-cosmos-template/.eslintrc.cjs +18 -0
- package/dist/templates/vite-cosmos-template/README.md +72 -0
- package/dist/templates/vite-cosmos-template/favicon.ico +0 -0
- package/dist/templates/vite-cosmos-template/index.html +16 -0
- package/dist/templates/vite-cosmos-template/package.json +35 -0
- package/dist/templates/vite-cosmos-template/public/sei-logotype.svg +15 -0
- package/dist/templates/vite-cosmos-template/src/App.tsx +16 -0
- package/dist/templates/vite-cosmos-template/src/assets/react.svg +1 -0
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +177 -0
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +156 -0
- package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +102 -0
- package/dist/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +26 -0
- package/dist/templates/vite-cosmos-template/src/components/Web3Provider.tsx +45 -0
- package/dist/templates/vite-cosmos-template/src/components/index.ts +4 -0
- package/dist/templates/vite-cosmos-template/src/constants/chain.ts +16 -0
- package/dist/templates/vite-cosmos-template/src/constants/index.ts +1 -0
- package/dist/templates/vite-cosmos-template/src/index.css +171 -0
- package/dist/templates/vite-cosmos-template/src/main.tsx +12 -0
- package/dist/templates/vite-cosmos-template/src/vite-env.d.ts +1 -0
- package/dist/templates/vite-cosmos-template/tsconfig.app.json +27 -0
- package/dist/templates/vite-cosmos-template/tsconfig.json +11 -0
- package/dist/templates/vite-cosmos-template/tsconfig.node.json +14 -0
- package/dist/templates/vite-cosmos-template/vite.config.ts +7 -0
- package/dist/templates/vite-cosmos-template/yarn.lock +9323 -0
- package/dist/templates/vite-wagmi-template/.eslintrc.cjs +18 -0
- package/dist/templates/vite-wagmi-template/README.md +72 -0
- package/dist/templates/vite-wagmi-template/favicon.ico +0 -0
- package/dist/templates/vite-wagmi-template/index.html +12 -0
- package/dist/templates/vite-wagmi-template/package.json +33 -0
- package/dist/templates/vite-wagmi-template/public/sei-logotype.svg +15 -0
- package/dist/templates/vite-wagmi-template/src/App.tsx +22 -0
- package/dist/templates/vite-wagmi-template/src/assets/react.svg +1 -0
- package/dist/templates/vite-wagmi-template/src/components/Homepage/Examples.tsx +269 -0
- package/dist/templates/vite-wagmi-template/src/components/Homepage/Homepage.css +156 -0
- package/dist/templates/vite-wagmi-template/src/components/Homepage/Homepage.tsx +106 -0
- package/dist/templates/vite-wagmi-template/src/components/Web3Provider.tsx +71 -0
- package/dist/templates/vite-wagmi-template/src/constants/chain.ts +6 -0
- package/dist/templates/vite-wagmi-template/src/constants/index.ts +1 -0
- package/dist/templates/vite-wagmi-template/src/index.css +170 -0
- package/dist/templates/vite-wagmi-template/src/main.tsx +12 -0
- package/dist/templates/vite-wagmi-template/src/vite-env.d.ts +1 -0
- package/dist/templates/vite-wagmi-template/tsconfig.app.json +27 -0
- package/dist/templates/vite-wagmi-template/tsconfig.json +11 -0
- package/dist/templates/vite-wagmi-template/tsconfig.node.json +14 -0
- package/dist/templates/vite-wagmi-template/vite.config.ts +10 -0
- package/dist/templates/vite-wagmi-template/yarn.lock +4603 -0
- package/package.json +1 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { RainbowKitProvider, connectorsForWallets, lightTheme } from '@rainbow-me/rainbowkit';
|
|
4
|
+
import { metaMaskWallet } from '@rainbow-me/rainbowkit/wallets';
|
|
5
|
+
import { Buffer } from 'buffer';
|
|
6
|
+
import { ReactNode, useMemo } from 'react';
|
|
7
|
+
import { WagmiProvider, createConfig, http } from 'wagmi';
|
|
8
|
+
|
|
9
|
+
import '@rainbow-me/rainbowkit/styles.css';
|
|
10
|
+
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
11
|
+
import { selectedChain } from '../constants';
|
|
12
|
+
|
|
13
|
+
const queryClient = new QueryClient();
|
|
14
|
+
|
|
15
|
+
interface Web3ProviderProps {
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const connectors = connectorsForWallets(
|
|
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
|
+
function Web3Provider({ children }: Web3ProviderProps) {
|
|
33
|
+
// Buffer polyfill
|
|
34
|
+
if (typeof window !== 'undefined') {
|
|
35
|
+
window.Buffer = window.Buffer ?? Buffer;
|
|
36
|
+
}
|
|
37
|
+
const chainConfig = selectedChain;
|
|
38
|
+
const config = useMemo(
|
|
39
|
+
() =>
|
|
40
|
+
createConfig({
|
|
41
|
+
chains: [chainConfig],
|
|
42
|
+
connectors,
|
|
43
|
+
transports: {
|
|
44
|
+
[chainConfig.id]: http()
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
[chainConfig]
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<WagmiProvider config={config}>
|
|
52
|
+
<QueryClientProvider client={queryClient}>
|
|
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
|
+
{children}
|
|
67
|
+
</RainbowKitProvider>
|
|
68
|
+
</QueryClientProvider>
|
|
69
|
+
</WagmiProvider>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export default Web3Provider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './chain';
|
|
Binary file
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
1. Use a more-intuitive box-sizing model.
|
|
3
|
+
*/
|
|
4
|
+
*, *::before, *::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
/*
|
|
8
|
+
2. Remove default margin
|
|
9
|
+
*/
|
|
10
|
+
* {
|
|
11
|
+
margin: 0;
|
|
12
|
+
}
|
|
13
|
+
/*
|
|
14
|
+
Typographic tweaks!
|
|
15
|
+
3. Add accessible line-height
|
|
16
|
+
4. Improve text rendering
|
|
17
|
+
*/
|
|
18
|
+
body {
|
|
19
|
+
line-height: 1.5;
|
|
20
|
+
-webkit-font-smoothing: antialiased;
|
|
21
|
+
}
|
|
22
|
+
/*
|
|
23
|
+
5. Improve media defaults
|
|
24
|
+
*/
|
|
25
|
+
img, picture, video, canvas, svg {
|
|
26
|
+
display: block;
|
|
27
|
+
max-width: 100%;
|
|
28
|
+
}
|
|
29
|
+
/*
|
|
30
|
+
6. Remove built-in form typography styles
|
|
31
|
+
*/
|
|
32
|
+
input, button, textarea, select {
|
|
33
|
+
font: inherit;
|
|
34
|
+
}
|
|
35
|
+
/*
|
|
36
|
+
7. Avoid text overflows
|
|
37
|
+
*/
|
|
38
|
+
p, h1, h2, h3, h4, h5, h6 {
|
|
39
|
+
overflow-wrap: break-word;
|
|
40
|
+
line-height: 1;
|
|
41
|
+
}
|
|
42
|
+
/*
|
|
43
|
+
8. Create a root stacking context
|
|
44
|
+
*/
|
|
45
|
+
#root, #__next {
|
|
46
|
+
isolation: isolate;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
:root {
|
|
51
|
+
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
52
|
+
line-height: 1.5;
|
|
53
|
+
font-weight: 400;
|
|
54
|
+
|
|
55
|
+
color-scheme: light dark;
|
|
56
|
+
color:#000;
|
|
57
|
+
background: var(--background);
|
|
58
|
+
|
|
59
|
+
font-synthesis: none;
|
|
60
|
+
text-rendering: optimizeLegibility;
|
|
61
|
+
-webkit-font-smoothing: antialiased;
|
|
62
|
+
-moz-osx-font-smoothing: grayscale;
|
|
63
|
+
|
|
64
|
+
--primary-color: #9F1239;
|
|
65
|
+
--primary-color-hover: #7F0A2E;
|
|
66
|
+
--background: linear-gradient(180deg, #F5F5F4 0%, #FFF 100%);
|
|
67
|
+
--border: #D6D3D1;
|
|
68
|
+
--card: #FFF;
|
|
69
|
+
--card-foreground: #242424;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
a {
|
|
73
|
+
font-weight: 500;
|
|
74
|
+
color: var(--primary-color);
|
|
75
|
+
text-decoration: inherit;
|
|
76
|
+
}
|
|
77
|
+
a:hover {
|
|
78
|
+
color: var(--primary-color-hover)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
body {
|
|
82
|
+
margin: 0;
|
|
83
|
+
padding: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
h1 {
|
|
87
|
+
font-size: 3.2em;
|
|
88
|
+
line-height: 1;
|
|
89
|
+
}
|
|
90
|
+
code {
|
|
91
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
92
|
+
monospace;
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
border-radius: 4px;
|
|
95
|
+
padding: 0.1rem 0.4rem;
|
|
96
|
+
background-color: #d7cccc;
|
|
97
|
+
color: var(--card-foreground);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
button {
|
|
101
|
+
border-radius: 4rem;
|
|
102
|
+
border: 1px solid transparent;
|
|
103
|
+
padding: 0.6em 1.2em;
|
|
104
|
+
font-size: 1em;
|
|
105
|
+
font-weight: 500;
|
|
106
|
+
font-family: inherit;
|
|
107
|
+
background-color: #cec9c1;
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
transition: all 0.25s ease;
|
|
110
|
+
color: black;
|
|
111
|
+
}
|
|
112
|
+
button:hover {
|
|
113
|
+
background-color: #b5afa7;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
button:disabled {
|
|
117
|
+
filter:grayscale(1) opacity(0.5);
|
|
118
|
+
color: rgb(56, 55, 55);
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
button.primary {
|
|
123
|
+
background-color: var(--primary-color);
|
|
124
|
+
color: #fff;
|
|
125
|
+
}
|
|
126
|
+
button.outline {
|
|
127
|
+
background-color: transparent;
|
|
128
|
+
border: 1px solid var(--border);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
button.primary:hover {
|
|
132
|
+
background-color: var(--primary-color-hover);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
button.secondary {
|
|
136
|
+
background-color: #000;
|
|
137
|
+
color: #fff;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
button.secondary:hover {
|
|
141
|
+
background-color: #2b2b2b;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
button:active {
|
|
145
|
+
transform: translateY(1px);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
button.small {
|
|
149
|
+
padding: 0.4em 0.8em;
|
|
150
|
+
font-size: 0.8em;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
button:focus-visible {
|
|
155
|
+
outline: 4px auto -webkit-focus-ring-color;
|
|
156
|
+
outline-offset: 4px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.header {
|
|
160
|
+
width: 100%;
|
|
161
|
+
height: 4rem;
|
|
162
|
+
padding: 0 1%;
|
|
163
|
+
display: flex;
|
|
164
|
+
align-items: center;
|
|
165
|
+
justify-content: right;
|
|
166
|
+
background-color: transparent;
|
|
167
|
+
border-bottom: 1px solid var(--border);
|
|
168
|
+
position: sticky;
|
|
169
|
+
top: 0;
|
|
170
|
+
background: #F5F5F4;
|
|
171
|
+
}
|
|
@@ -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
|
+
}
|