@sei-js/create-sei 0.0.0-internal-20250328063440 → 0.0.1

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.
Files changed (181) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/package.json +1 -1
  3. package/.yarn/install-state.gz +0 -0
  4. package/dist/main.js +0 -161
  5. package/dist/templates/express-action-template/yarn-error.log +0 -2760
  6. package/dist/templates/next-cosmos-template/.eslintrc.json +0 -3
  7. package/dist/templates/next-cosmos-template/README.md +0 -60
  8. package/dist/templates/next-cosmos-template/next-env.d.ts +0 -5
  9. package/dist/templates/next-cosmos-template/next.config.mjs +0 -14
  10. package/dist/templates/next-cosmos-template/package.json +0 -31
  11. package/dist/templates/next-cosmos-template/public/next.svg +0 -1
  12. package/dist/templates/next-cosmos-template/public/sei-logotype.svg +0 -15
  13. package/dist/templates/next-cosmos-template/public/vercel.svg +0 -1
  14. package/dist/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +0 -177
  15. package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +0 -156
  16. package/dist/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +0 -110
  17. package/dist/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
  18. package/dist/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +0 -39
  19. package/dist/templates/next-cosmos-template/src/app/components/index.ts +0 -3
  20. package/dist/templates/next-cosmos-template/src/app/constants/chain.ts +0 -16
  21. package/dist/templates/next-cosmos-template/src/app/constants/index.ts +0 -1
  22. package/dist/templates/next-cosmos-template/src/app/favicon.ico +0 -0
  23. package/dist/templates/next-cosmos-template/src/app/index.css +0 -171
  24. package/dist/templates/next-cosmos-template/src/app/layout.tsx +0 -21
  25. package/dist/templates/next-cosmos-template/src/app/page.tsx +0 -17
  26. package/dist/templates/next-cosmos-template/tsconfig.json +0 -26
  27. package/dist/templates/next-cosmos-template/yarn.lock +0 -9814
  28. package/dist/templates/next-wagmi-template/.eslintrc.json +0 -3
  29. package/dist/templates/next-wagmi-template/README.md +0 -58
  30. package/dist/templates/next-wagmi-template/next-env.d.ts +0 -5
  31. package/dist/templates/next-wagmi-template/next.config.mjs +0 -4
  32. package/dist/templates/next-wagmi-template/package.json +0 -30
  33. package/dist/templates/next-wagmi-template/public/sei-logotype.svg +0 -15
  34. package/dist/templates/next-wagmi-template/src/app/components/Homepage/Examples.tsx +0 -271
  35. package/dist/templates/next-wagmi-template/src/app/components/Homepage/Homepage.css +0 -156
  36. package/dist/templates/next-wagmi-template/src/app/components/Homepage/Homepage.tsx +0 -113
  37. package/dist/templates/next-wagmi-template/src/app/components/Web3Provider.tsx +0 -73
  38. package/dist/templates/next-wagmi-template/src/app/components/index.ts +0 -2
  39. package/dist/templates/next-wagmi-template/src/app/constants/chain.ts +0 -7
  40. package/dist/templates/next-wagmi-template/src/app/constants/index.ts +0 -1
  41. package/dist/templates/next-wagmi-template/src/app/favicon.ico +0 -0
  42. package/dist/templates/next-wagmi-template/src/app/index.css +0 -171
  43. package/dist/templates/next-wagmi-template/src/app/layout.tsx +0 -21
  44. package/dist/templates/next-wagmi-template/src/app/page.tsx +0 -21
  45. package/dist/templates/next-wagmi-template/tsconfig.json +0 -26
  46. package/dist/templates/next-wagmi-template/yarn.lock +0 -4809
  47. package/dist/templates/templates/express-action-template/yarn-error.log +0 -2760
  48. package/dist/templates/templates/next-cosmos-template/.eslintrc.json +0 -3
  49. package/dist/templates/templates/next-cosmos-template/README.md +0 -60
  50. package/dist/templates/templates/next-cosmos-template/next-env.d.ts +0 -5
  51. package/dist/templates/templates/next-cosmos-template/next.config.mjs +0 -14
  52. package/dist/templates/templates/next-cosmos-template/package.json +0 -31
  53. package/dist/templates/templates/next-cosmos-template/public/next.svg +0 -1
  54. package/dist/templates/templates/next-cosmos-template/public/sei-logotype.svg +0 -15
  55. package/dist/templates/templates/next-cosmos-template/public/vercel.svg +0 -1
  56. package/dist/templates/templates/next-cosmos-template/src/app/components/Homepage/Examples.tsx +0 -177
  57. package/dist/templates/templates/next-cosmos-template/src/app/components/Homepage/Homepage.css +0 -156
  58. package/dist/templates/templates/next-cosmos-template/src/app/components/Homepage/Homepage.tsx +0 -110
  59. package/dist/templates/templates/next-cosmos-template/src/app/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
  60. package/dist/templates/templates/next-cosmos-template/src/app/components/Web3Provider.tsx +0 -39
  61. package/dist/templates/templates/next-cosmos-template/src/app/components/index.ts +0 -3
  62. package/dist/templates/templates/next-cosmos-template/src/app/constants/chain.ts +0 -16
  63. package/dist/templates/templates/next-cosmos-template/src/app/constants/index.ts +0 -1
  64. package/dist/templates/templates/next-cosmos-template/src/app/favicon.ico +0 -0
  65. package/dist/templates/templates/next-cosmos-template/src/app/index.css +0 -171
  66. package/dist/templates/templates/next-cosmos-template/src/app/layout.tsx +0 -21
  67. package/dist/templates/templates/next-cosmos-template/src/app/page.tsx +0 -17
  68. package/dist/templates/templates/next-cosmos-template/tsconfig.json +0 -26
  69. package/dist/templates/templates/next-cosmos-template/yarn.lock +0 -9814
  70. package/dist/templates/templates/next-wagmi-template/.eslintrc.json +0 -3
  71. package/dist/templates/templates/next-wagmi-template/README.md +0 -58
  72. package/dist/templates/templates/next-wagmi-template/next-env.d.ts +0 -5
  73. package/dist/templates/templates/next-wagmi-template/next.config.mjs +0 -4
  74. package/dist/templates/templates/next-wagmi-template/package.json +0 -30
  75. package/dist/templates/templates/next-wagmi-template/public/sei-logotype.svg +0 -15
  76. package/dist/templates/templates/next-wagmi-template/src/app/components/Homepage/Examples.tsx +0 -271
  77. package/dist/templates/templates/next-wagmi-template/src/app/components/Homepage/Homepage.css +0 -156
  78. package/dist/templates/templates/next-wagmi-template/src/app/components/Homepage/Homepage.tsx +0 -113
  79. package/dist/templates/templates/next-wagmi-template/src/app/components/Web3Provider.tsx +0 -73
  80. package/dist/templates/templates/next-wagmi-template/src/app/components/index.ts +0 -2
  81. package/dist/templates/templates/next-wagmi-template/src/app/constants/chain.ts +0 -7
  82. package/dist/templates/templates/next-wagmi-template/src/app/constants/index.ts +0 -1
  83. package/dist/templates/templates/next-wagmi-template/src/app/favicon.ico +0 -0
  84. package/dist/templates/templates/next-wagmi-template/src/app/index.css +0 -171
  85. package/dist/templates/templates/next-wagmi-template/src/app/layout.tsx +0 -21
  86. package/dist/templates/templates/next-wagmi-template/src/app/page.tsx +0 -21
  87. package/dist/templates/templates/next-wagmi-template/tsconfig.json +0 -26
  88. package/dist/templates/templates/next-wagmi-template/yarn.lock +0 -4809
  89. package/dist/templates/templates/vite-cosmos-template/.eslintrc.cjs +0 -18
  90. package/dist/templates/templates/vite-cosmos-template/README.md +0 -72
  91. package/dist/templates/templates/vite-cosmos-template/favicon.ico +0 -0
  92. package/dist/templates/templates/vite-cosmos-template/index.html +0 -16
  93. package/dist/templates/templates/vite-cosmos-template/package.json +0 -35
  94. package/dist/templates/templates/vite-cosmos-template/public/sei-logotype.svg +0 -15
  95. package/dist/templates/templates/vite-cosmos-template/src/App.tsx +0 -16
  96. package/dist/templates/templates/vite-cosmos-template/src/assets/react.svg +0 -1
  97. package/dist/templates/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +0 -177
  98. package/dist/templates/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +0 -156
  99. package/dist/templates/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +0 -102
  100. package/dist/templates/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
  101. package/dist/templates/templates/vite-cosmos-template/src/components/Web3Provider.tsx +0 -45
  102. package/dist/templates/templates/vite-cosmos-template/src/components/index.ts +0 -4
  103. package/dist/templates/templates/vite-cosmos-template/src/constants/chain.ts +0 -16
  104. package/dist/templates/templates/vite-cosmos-template/src/constants/index.ts +0 -1
  105. package/dist/templates/templates/vite-cosmos-template/src/index.css +0 -171
  106. package/dist/templates/templates/vite-cosmos-template/src/main.tsx +0 -12
  107. package/dist/templates/templates/vite-cosmos-template/src/vite-env.d.ts +0 -1
  108. package/dist/templates/templates/vite-cosmos-template/tsconfig.app.json +0 -27
  109. package/dist/templates/templates/vite-cosmos-template/tsconfig.json +0 -11
  110. package/dist/templates/templates/vite-cosmos-template/tsconfig.node.json +0 -14
  111. package/dist/templates/templates/vite-cosmos-template/vite.config.ts +0 -7
  112. package/dist/templates/templates/vite-cosmos-template/yarn.lock +0 -9323
  113. package/dist/templates/templates/vite-wagmi-template/.eslintrc.cjs +0 -18
  114. package/dist/templates/templates/vite-wagmi-template/README.md +0 -72
  115. package/dist/templates/templates/vite-wagmi-template/favicon.ico +0 -0
  116. package/dist/templates/templates/vite-wagmi-template/index.html +0 -12
  117. package/dist/templates/templates/vite-wagmi-template/package.json +0 -33
  118. package/dist/templates/templates/vite-wagmi-template/public/sei-logotype.svg +0 -15
  119. package/dist/templates/templates/vite-wagmi-template/src/App.tsx +0 -22
  120. package/dist/templates/templates/vite-wagmi-template/src/assets/react.svg +0 -1
  121. package/dist/templates/templates/vite-wagmi-template/src/components/Homepage/Examples.tsx +0 -269
  122. package/dist/templates/templates/vite-wagmi-template/src/components/Homepage/Homepage.css +0 -156
  123. package/dist/templates/templates/vite-wagmi-template/src/components/Homepage/Homepage.tsx +0 -106
  124. package/dist/templates/templates/vite-wagmi-template/src/components/Web3Provider.tsx +0 -71
  125. package/dist/templates/templates/vite-wagmi-template/src/constants/chain.ts +0 -6
  126. package/dist/templates/templates/vite-wagmi-template/src/constants/index.ts +0 -1
  127. package/dist/templates/templates/vite-wagmi-template/src/index.css +0 -170
  128. package/dist/templates/templates/vite-wagmi-template/src/main.tsx +0 -12
  129. package/dist/templates/templates/vite-wagmi-template/src/vite-env.d.ts +0 -1
  130. package/dist/templates/templates/vite-wagmi-template/tsconfig.app.json +0 -27
  131. package/dist/templates/templates/vite-wagmi-template/tsconfig.json +0 -11
  132. package/dist/templates/templates/vite-wagmi-template/tsconfig.node.json +0 -14
  133. package/dist/templates/templates/vite-wagmi-template/vite.config.ts +0 -10
  134. package/dist/templates/templates/vite-wagmi-template/yarn.lock +0 -4603
  135. package/dist/templates/vite-cosmos-template/.eslintrc.cjs +0 -18
  136. package/dist/templates/vite-cosmos-template/README.md +0 -72
  137. package/dist/templates/vite-cosmos-template/favicon.ico +0 -0
  138. package/dist/templates/vite-cosmos-template/index.html +0 -16
  139. package/dist/templates/vite-cosmos-template/package.json +0 -35
  140. package/dist/templates/vite-cosmos-template/public/sei-logotype.svg +0 -15
  141. package/dist/templates/vite-cosmos-template/src/App.tsx +0 -16
  142. package/dist/templates/vite-cosmos-template/src/assets/react.svg +0 -1
  143. package/dist/templates/vite-cosmos-template/src/components/Homepage/Examples.tsx +0 -177
  144. package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.css +0 -156
  145. package/dist/templates/vite-cosmos-template/src/components/Homepage/Homepage.tsx +0 -102
  146. package/dist/templates/vite-cosmos-template/src/components/WalletConnectButton/WalletConnectButton.tsx +0 -26
  147. package/dist/templates/vite-cosmos-template/src/components/Web3Provider.tsx +0 -45
  148. package/dist/templates/vite-cosmos-template/src/components/index.ts +0 -4
  149. package/dist/templates/vite-cosmos-template/src/constants/chain.ts +0 -16
  150. package/dist/templates/vite-cosmos-template/src/constants/index.ts +0 -1
  151. package/dist/templates/vite-cosmos-template/src/index.css +0 -171
  152. package/dist/templates/vite-cosmos-template/src/main.tsx +0 -12
  153. package/dist/templates/vite-cosmos-template/src/vite-env.d.ts +0 -1
  154. package/dist/templates/vite-cosmos-template/tsconfig.app.json +0 -27
  155. package/dist/templates/vite-cosmos-template/tsconfig.json +0 -11
  156. package/dist/templates/vite-cosmos-template/tsconfig.node.json +0 -14
  157. package/dist/templates/vite-cosmos-template/vite.config.ts +0 -7
  158. package/dist/templates/vite-cosmos-template/yarn.lock +0 -9323
  159. package/dist/templates/vite-wagmi-template/.eslintrc.cjs +0 -18
  160. package/dist/templates/vite-wagmi-template/README.md +0 -72
  161. package/dist/templates/vite-wagmi-template/favicon.ico +0 -0
  162. package/dist/templates/vite-wagmi-template/index.html +0 -12
  163. package/dist/templates/vite-wagmi-template/package.json +0 -33
  164. package/dist/templates/vite-wagmi-template/public/sei-logotype.svg +0 -15
  165. package/dist/templates/vite-wagmi-template/src/App.tsx +0 -22
  166. package/dist/templates/vite-wagmi-template/src/assets/react.svg +0 -1
  167. package/dist/templates/vite-wagmi-template/src/components/Homepage/Examples.tsx +0 -269
  168. package/dist/templates/vite-wagmi-template/src/components/Homepage/Homepage.css +0 -156
  169. package/dist/templates/vite-wagmi-template/src/components/Homepage/Homepage.tsx +0 -106
  170. package/dist/templates/vite-wagmi-template/src/components/Web3Provider.tsx +0 -71
  171. package/dist/templates/vite-wagmi-template/src/constants/chain.ts +0 -6
  172. package/dist/templates/vite-wagmi-template/src/constants/index.ts +0 -1
  173. package/dist/templates/vite-wagmi-template/src/index.css +0 -170
  174. package/dist/templates/vite-wagmi-template/src/main.tsx +0 -12
  175. package/dist/templates/vite-wagmi-template/src/vite-env.d.ts +0 -1
  176. package/dist/templates/vite-wagmi-template/tsconfig.app.json +0 -27
  177. package/dist/templates/vite-wagmi-template/tsconfig.json +0 -11
  178. package/dist/templates/vite-wagmi-template/tsconfig.node.json +0 -14
  179. package/dist/templates/vite-wagmi-template/vite.config.ts +0 -10
  180. package/dist/templates/vite-wagmi-template/yarn.lock +0 -4603
  181. package/templates/express-action-template/yarn-error.log +0 -2760
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "next/core-web-vitals"
3
- }
@@ -1,58 +0,0 @@
1
- This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2
-
3
- ## Getting Started
4
-
5
- Install dependencies by running
6
- ```bash
7
- npm install
8
- #or
9
- yarn
10
- ```
11
-
12
- Then, run the development server:
13
-
14
- ```bash
15
- npm run dev
16
- # or
17
- yarn dev
18
- ```
19
-
20
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
21
-
22
- You can start editing the page by modifying `src/app/page.tsx`. The page auto-updates as you edit the file.
23
-
24
- This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.
25
-
26
- ## Repository Basics
27
- This repository includes basic features that allow you to connect to a wallet and use the wallet to interact with the chain.
28
-
29
- Additionally, basic examples and links to documentation are provided on the example homepage in `src/app/components/Homepage`.
30
-
31
- This repository uses helper methods from [@sei-js/evm/viem](https://github.com/sei-protocol/sei-js/tree/main/packages/evm/src/viem)
32
-
33
- ### Web3 Provider
34
- This component is a Sei specific wrapper around a Wagmi Provider that should wrap the application. Wrapping the application in this provider will enable it to access hooks in Wagmi. These hooks are enable connection to a wallet and interaction with the chain.
35
-
36
- In addition, this app uses [RainbowKit](https://www.rainbowkit.com/docs/wallet-button) which provides wallet connect functionality out of the box.
37
-
38
- To change the list of supported wallets, as well as connection configurations you can modify the `src/app/components/Web3Provider.tsx` component.
39
-
40
- ### Changing the Chain
41
- This application connects to the arctic-1 devnet by default, using chain configurations uploaded to viem.
42
-
43
- To change the chain the app connects to, edit the `selectedChain` variable in the `chain.ts` file in `src/app/constants`
44
-
45
- ## Learn More
46
-
47
- To learn more about Next.js, take a look at the following resources:
48
-
49
- - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
50
- - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
51
-
52
- You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
53
-
54
- ## Deploy on Vercel
55
-
56
- The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
57
-
58
- Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
@@ -1,5 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
-
4
- // NOTE: This file should not be edited
5
- // see https://nextjs.org/docs/basic-features/typescript for more information.
@@ -1,4 +0,0 @@
1
- /** @type {import('next').NextConfig} */
2
- const nextConfig = {};
3
-
4
- export default nextConfig;
@@ -1,30 +0,0 @@
1
- {
2
- "name": "template-next-wagmi-sei-app",
3
- "version": "0.1.0",
4
- "private": true,
5
- "scripts": {
6
- "dev": "next dev",
7
- "build": "next build",
8
- "start": "next start",
9
- "lint": "next lint"
10
- },
11
- "dependencies": {
12
- "@rainbow-me/rainbowkit": "^2.1.2",
13
- "@sei-js/evm": "^1.2.0",
14
- "@tanstack/react-query": "^5.45.1",
15
- "encoding": "^0.1.13",
16
- "next": "14.2.4",
17
- "pino-pretty": "^11.2.1",
18
- "react": "^18",
19
- "react-dom": "^18",
20
- "viem": "^2.15.1",
21
- "wagmi": "^2.10.2"
22
- },
23
- "devDependencies": {
24
- "@types/node": "^20",
25
- "@types/react": "^18",
26
- "@types/react-dom": "^18",
27
- "eslint-config-next": "14.2.4",
28
- "typescript": "^5"
29
- }
30
- }
@@ -1,15 +0,0 @@
1
- <svg width="86" height="32" viewBox="0 0 86 32" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g id="sei-logotype" clip-path="url(#clip0_1_53)">
3
- <path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M15.8553 31.8727C20.5775 31.8727 24.8201 29.8188 27.7383 26.5556C26.3808 25.3758 24.3351 25.3041 22.8899 26.4702L22.6138 26.693C19.9677 28.8281 16.1121 28.5128 13.8481 25.9762C12.6133 24.5927 10.4986 24.4514 9.09076 25.6584L5.90753 28.3874C8.63393 30.5685 12.0923 31.8727 15.8553 31.8727ZM21.0223 24.1558C23.5427 22.1221 27.0852 22.195 29.5092 24.1592C30.9581 21.7586 31.7917 18.9448 31.7917 15.9363C31.7917 12.5934 30.7624 9.49098 29.0035 6.9285C27.8696 6.68701 26.6405 6.96905 25.7075 7.79581L25.442 8.03112C22.8973 10.2861 19.0312 10.1491 16.6526 7.71961C15.3553 6.39459 13.2362 6.35106 11.8856 7.62174L8.1813 11.1067L6.1435 8.94069L9.84784 5.45571C12.3779 3.07544 16.3473 3.15694 18.7775 5.63906C20.0473 6.936 22.1112 7.00916 23.4696 5.80535L23.7351 5.57004C24.5597 4.83932 25.5138 4.3467 26.5127 4.08762C23.6893 1.54648 19.9529 0 15.8553 0C7.76541 0 1.08344 6.02803 0.0559658 13.8374C2.51319 12.6583 5.54417 13.112 7.5477 15.1637C8.81252 16.4589 10.8491 16.5956 12.2757 15.4811L14.3469 13.863C16.9498 11.8295 20.6294 11.9279 23.1199 14.0978L27.1522 17.6109L25.1986 19.8531L21.1663 16.34C19.7502 15.1062 17.6579 15.0502 16.1777 16.2066L14.1066 17.8246C11.4855 19.8723 7.74378 19.6211 5.41997 17.2414C4.06868 15.8577 1.85863 15.8094 0.448196 17.1329L0 17.5534C0.335417 20.8819 1.69509 23.9081 3.75904 26.3121L7.15509 23.4006C9.79233 21.1396 13.7538 21.4042 16.0669 23.9959C17.2755 25.3501 19.3337 25.5184 20.7463 24.3786L21.0223 24.1558Z" fill="url(#paint0_linear_1_53)"/>
4
- <path id="Union" fill-rule="evenodd" clip-rule="evenodd" d="M85.5173 2.22307C85.5173 3.44217 84.5132 4.44614 83.2944 4.44614C82.0751 4.44614 81.071 3.44217 81.071 2.22307C81.071 0.968111 82.0751 0 83.2944 0C84.5132 0 85.5173 0.968111 85.5173 2.22307ZM85.0152 26.139H81.6448V8.60541H85.0152V26.139ZM43.2705 21.0474C43.2705 24.382 45.888 26.5692 50.0114 26.5692C54.1707 26.5692 57.039 24.4537 57.039 21.1191C57.039 18.5016 55.5692 17.1391 52.593 16.422L49.5095 15.669C47.7884 15.2388 46.9278 14.4499 46.9278 13.2667C46.9278 11.6532 48.1111 10.7209 50.2266 10.7209C52.2703 10.7209 53.4536 11.8324 53.5253 13.5894H56.7526C56.6809 10.2548 54.1707 8.10343 50.3341 8.10343C46.4617 8.10343 43.7367 10.1472 43.7367 13.3742C43.7367 15.9558 45.2067 17.4977 48.3262 18.2506L51.4098 18.9678C53.2385 19.4339 53.8122 20.151 53.8122 21.3343C53.8122 22.9478 52.4497 23.9159 50.0831 23.9159C47.8601 23.9159 46.4975 22.8402 46.4975 21.0474H43.2705ZM69.0593 26.5692C73.3981 26.5692 76.3382 24.4537 77.1989 20.6889H74.0436C73.4698 22.6968 71.749 23.7725 69.1311 23.7725C65.7965 23.7725 63.8605 21.7286 63.6094 18.0355L77.1631 17.9997V16.7447C77.1631 11.5456 73.9002 8.10343 68.9165 8.10343C63.8246 8.10343 60.3465 11.9042 60.3465 17.3901C60.3465 22.8402 63.8963 26.5692 69.0593 26.5692ZM68.9165 10.936C71.8925 10.936 73.7926 12.8723 73.7926 15.7766H63.6811C64.1115 12.693 65.9758 10.936 68.9165 10.936Z" fill="black"/>
5
- </g>
6
- <defs>
7
- <linearGradient id="paint0_linear_1_53" x1="15.8958" y1="2.37374e-07" x2="22.1762" y2="31.8667" gradientUnits="userSpaceOnUse">
8
- <stop stop-color="#780000"/>
9
- <stop offset="1" stop-color="#C1121F"/>
10
- </linearGradient>
11
- <clipPath id="clip0_1_53">
12
- <rect width="85.5172" height="32" fill="white"/>
13
- </clipPath>
14
- </defs>
15
- </svg>
@@ -1,271 +0,0 @@
1
- 'use client';
2
-
3
- import { BANK_PRECOMPILE_ABI, BANK_PRECOMPILE_ADDRESS, WASM_PRECOMPILE_ABI, WASM_PRECOMPILE_ADDRESS } from "@sei-js/evm";
4
- import { useState } from "react";
5
- import { ReadContractParameters, formatEther, fromHex, parseEther, toHex } from "viem";
6
- import { useAccount, usePublicClient, useWriteContract } from "wagmi";
7
-
8
- import "./Homepage.css";
9
-
10
- function Examples() {
11
- const [balance, setBalance] = useState('')
12
- const [supply, setSupply] = useState('');
13
- const [count, setCount] = useState(0)
14
-
15
- const publicClient = usePublicClient();
16
- const { address } = useAccount();
17
- const { writeContractAsync } = useWriteContract();
18
-
19
- const formatLargeSeiNumber = (num: string, decimals: number): string => {
20
- if (num.length > 10) {
21
- return (Number(num) / 1000000 / 1000000000).toLocaleString(navigator.language, { minimumFractionDigits: decimals, maximumFractionDigits: decimals}) + ' B';
22
- } else {
23
- return (Number(num) / 1000000).toLocaleString(navigator.language);
24
- }
25
- };
26
-
27
- const copyToClipboard = (text: string) => {
28
- try {
29
- navigator.clipboard.writeText(text);
30
- } catch (err) {
31
- console.error("Failed to copy text: ", err);
32
- } finally {
33
- alert("Copied to clipboard!");
34
- }
35
- }
36
-
37
- const renderAddressExample = () => {
38
- return (
39
- <div className="card">
40
- <div className="card-header">
41
- <p className="card__title">Wallet address</p>
42
- <small className="card__description">
43
- <a
44
- href="https://viem.sh/docs/clients/public.html"
45
- target="_blank">Viem Public Client</a> query example
46
- </small>
47
- </div>
48
- <div className="card-body">
49
- <div className="content-background space-between">
50
- {
51
- address ?
52
- <div>
53
- <p className="card-footer">
54
- {address}
55
- </p>
56
- </div> :
57
- <p> --- </p>
58
- }
59
-
60
- <button
61
- className="small outline"
62
- onClick={() =>
63
- copyToClipboard(
64
- address as string
65
- )
66
- }
67
- >
68
- Copy
69
- </button>
70
- </div>
71
- </div>
72
- <div className="card-footer">
73
- </div>
74
- </div>
75
- )
76
- }
77
-
78
- const getBalanceWagmi = async () => {
79
- if (!address || !publicClient) {
80
- return undefined
81
- }
82
- const weiBalance = await publicClient.getBalance({address});
83
- const seiBalance = formatEther(weiBalance)
84
- setBalance(seiBalance);
85
- }
86
-
87
- const renderBalanceExample = () => {
88
- return (
89
- <div className="card">
90
- <div className="card-header">
91
- <p className="card__title">Wallet balance</p>
92
- <small className="card__description">
93
- <a
94
- href="https://viem.sh/docs/clients/public.html"
95
- target="_blank">Viem Public Client</a> query example
96
- </small>
97
- </div>
98
- <div className="card-body">
99
- <div className="content-background space-between">
100
- <small>SEI</small>
101
- <p>{balance ? balance : '---' } SEI</p>
102
- </div>
103
- </div>
104
- <div className="card-footer">
105
- <button onClick={getBalanceWagmi}>Fetch balance</button>
106
- </div>
107
- </div>
108
- )
109
- }
110
-
111
- // Example of using precompiles to query native Sei modules.
112
- const getBankSupply = async () => {
113
- if (!publicClient) {
114
- return;
115
- }
116
-
117
- const params: ReadContractParameters = {
118
- address: BANK_PRECOMPILE_ADDRESS,
119
- abi: BANK_PRECOMPILE_ABI,
120
- functionName: 'supply',
121
- args: ['usei']
122
- }
123
- try {
124
- const response = await publicClient.readContract(params) as BigInt;
125
- const supply = formatLargeSeiNumber(response.toString(), 1)
126
- setSupply(supply);
127
- } catch (e) {
128
- console.log(e);
129
- }
130
- }
131
-
132
- const renderBankSupplyExample = () => {
133
- return (
134
- <div className="card">
135
- <div className="card-header">
136
- <p className="card__title">Total Sei supply</p>
137
- <small className="card__description">
138
- <a
139
- href="https://www.docs.sei.io/dev-interoperability/precompiles/bank"
140
- target="_blank"> Bank precompile
141
- </a> example for querying native Sei
142
- modules
143
- </small>
144
- </div>
145
- <div className="card-body">
146
- <div className="content-background space-between">
147
- <small>SEI</small>
148
- <p>{supply}</p>
149
- </div>
150
- </div>
151
- <div className="card-footer">
152
- <button onClick={getBankSupply}>Fetch supply</button>
153
- </div>
154
- </div>
155
- )
156
- }
157
-
158
- // Fetch count of a CosmWasm Contract using WASM Precompile
159
- const fetchCount = async () => {
160
- if (!publicClient) {
161
- return;
162
- }
163
-
164
- const COUNTER_CONTRACT_ADDRESS =
165
- "sei14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sh9m79m";
166
-
167
- const queryMsg = toHex(JSON.stringify({ get_count: {} }));
168
-
169
- const params: ReadContractParameters = {
170
- address: WASM_PRECOMPILE_ADDRESS,
171
- abi: WASM_PRECOMPILE_ABI,
172
- functionName: 'query',
173
- args: [COUNTER_CONTRACT_ADDRESS, queryMsg]
174
- }
175
- try {
176
- const response = await publicClient?.readContract(params) as `0x${string}`;
177
- const { count } = JSON.parse(fromHex(response, 'string'));
178
- setCount(count);
179
- } catch (e) {
180
- console.log(e);
181
- }
182
- }
183
-
184
- // Fetch count of a CosmWasm Contract using WASM Precompile
185
- const incrementCounter = async () => {
186
- if (!address || !publicClient) {
187
- return;
188
- }
189
-
190
- const COUNTER_CONTRACT_ADDRESS =
191
- "sei14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sh9m79m";
192
-
193
- const execMsg = toHex(JSON.stringify({ increment: {} }));
194
- const coins = toHex('[]')
195
- const params = {
196
- account: address,
197
- address: WASM_PRECOMPILE_ADDRESS,
198
- abi: WASM_PRECOMPILE_ABI,
199
- functionName: 'execute',
200
- args: [COUNTER_CONTRACT_ADDRESS, execMsg, coins],
201
- value: parseEther('0')
202
- }
203
-
204
- try {
205
- const estimatedGas = await publicClient.estimateContractGas(params);
206
-
207
- // Call smart contract execute msg
208
- await writeContractAsync({ ...params, gas: estimatedGas});
209
-
210
- // Wait for 1 block to confirm transaction
211
- setTimeout(() => {}, 400);
212
- await fetchCount();
213
-
214
- } catch (error) {
215
- console.log(error)
216
- }
217
- };
218
-
219
- const renderCounterContractExample = () => {
220
- return (
221
- <div className="card">
222
- <div className="card-header">
223
- <p className="card__title">Smart contract interaction</p>
224
- <small>
225
- <a
226
- href="https://www.docs.sei.io/dev-interoperability/precompiles/cosmwasm"
227
- target="_blank">
228
- WASM Precompile
229
- </a> example of CosmWasm smart
230
- contract interaction
231
- </small>
232
- </div>
233
- <div className="card-body">
234
- <div className="content-background space-between">
235
- <small>Count</small>
236
- <p>{count}</p>
237
- <button
238
- className="small outline"
239
- onClick={incrementCounter}
240
- >
241
- Increase
242
- </button>
243
- </div>
244
- </div>
245
- <div className="card-footer">
246
- <button onClick={fetchCount}>Fetch count</button>
247
- </div>
248
- </div>
249
- )
250
- }
251
-
252
- return (
253
- <div className="container">
254
- <div className="grid">
255
- {/* First card */}
256
- {renderAddressExample()}
257
-
258
- {/* Second card */}
259
- {renderBalanceExample()}
260
-
261
- {/* Third card */}
262
- {renderBankSupplyExample()}
263
-
264
- {/* Fourth card */}
265
- {renderCounterContractExample()}
266
- </div>
267
- </div>
268
- )
269
- }
270
-
271
- export default Examples;
@@ -1,156 +0,0 @@
1
- #root {
2
- display: flex;
3
- flex-direction: column;
4
- min-height: 100vh;
5
- }
6
- .app {
7
- width: 100%;
8
- height: 100%;
9
- }
10
-
11
- .logo {
12
- width: 20%;
13
- align-self: center;
14
- }
15
-
16
- .container {
17
- margin: 0 auto;
18
- display: flex;
19
- flex-direction: column;
20
- gap: 3rem;
21
- width: 100%;
22
- padding: 1rem;
23
- height: -webkit-fill-available;
24
- flex-grow: 1;
25
- justify-content: center;
26
- }
27
-
28
- .grid {
29
- width: 100%;
30
- display: grid;
31
- grid-template-columns: repeat(1, 1fr);
32
- gap: 1rem;
33
- }
34
- .grid.docs {
35
- grid-template-columns: repeat(1, 1fr);
36
- }
37
-
38
- .card {
39
- width: 100%;
40
- padding: 1.5em;
41
- border-radius: 1rem;
42
- background: var(--card);
43
- color: var(--card-foreground);
44
- box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.09);
45
- }
46
-
47
- .card.secondary {
48
- background: transparent;
49
- border: 1px solid var(--border);
50
- box-shadow: none;
51
- }
52
- .card.intro {
53
- display: flex;
54
- flex-direction: column;
55
- gap: 1rem;
56
- justify-content: space-between;
57
- align-items: flex-start;
58
- }
59
- .card-header {
60
- display: flex;
61
- flex-direction: column;
62
- justify-content: space-between;
63
- gap: 0.25rem;
64
- }
65
- .card-body {
66
- display: flex;
67
- flex-direction: column;
68
- justify-content: space-between;
69
- margin: 1.5rem 0;
70
- }
71
-
72
- .card-footer {
73
- display: flex;
74
- flex-direction: row;
75
- gap: 0.5rem;
76
- }
77
-
78
- .card__title {
79
- font-size: 1.15rem;
80
- font-weight: 600;
81
- }
82
- .content-background {
83
- overflow: hidden;
84
- background: #fafaf9;
85
- border-radius: 4rem;
86
- padding: 0 1rem;
87
- height: 3.5rem;
88
- display: flex;
89
- align-items: center;
90
- }
91
-
92
- .wallet-address {
93
- text-wrap: anywhere;
94
- line-break: anywhere;
95
- }
96
-
97
- .space-between {
98
- justify-content: space-between;
99
- gap: 1rem;
100
- }
101
-
102
- .hide-on-mobile {
103
- display: none;
104
- }
105
-
106
- .hide-on-desktop {
107
- display: block;
108
- }
109
-
110
- .external-link {
111
- display: inline-flex;
112
- gap: 0.25rem;
113
- }
114
-
115
- .get-started {
116
- text-align: center;
117
- }
118
-
119
- .wallet-connect {
120
- display: flex;
121
- gap: 1rem;
122
- align-items: center;
123
- }
124
-
125
-
126
- @media (min-width: 768px) {
127
-
128
- .card.intro {
129
- grid-column: span 2;
130
- flex-direction: row;
131
- align-items: center;
132
- }
133
- .hide-on-mobile {
134
- display: block;
135
- }
136
- .hide-on-desktop {
137
- display: none;
138
- }
139
-
140
- .container {
141
- max-width: 96rem;
142
- padding: 2rem;
143
- }
144
- .grid {
145
- grid-template-columns: repeat(2, 1fr);
146
- }
147
- .grid.docs {
148
- grid-template-columns: repeat(2, 1fr);
149
- }
150
- }
151
-
152
- @media (min-width: 1024px) {
153
- .container {
154
- max-width: 80rem;
155
- }
156
- }
@@ -1,113 +0,0 @@
1
- 'use client';
2
-
3
- import { ConnectButton } from '@rainbow-me/rainbowkit';
4
- import Examples from './Examples';
5
- import "./Homepage.css"
6
-
7
- type HelpItem = {
8
- title: string;
9
- description: string;
10
- link: string;
11
- };
12
-
13
- const renderHelpItem = ({ title, description, link }: HelpItem) => (
14
- <div className="card secondary">
15
- <div className="card-header">
16
- <p className="card__title">
17
- <a href={link} target='_blank' rel='noopener noreferrer' className="external-link">
18
- {title} {externalIcon}
19
- </a>
20
- </p>
21
- <small className="card__description">
22
- {description}
23
- </small>
24
- </div>
25
- </div>
26
- );
27
-
28
- const helpItems: HelpItem[] = [
29
- {
30
- title: 'Sei Docs',
31
- description: 'Find in-depth information about Sei.',
32
- link: 'https://docs.sei.io/'
33
- },
34
- {
35
- title: 'Wagmi',
36
- description: "Learn about Wagmi and it's hooks for chain interaction.",
37
- link: 'https://wagmi.sh/'
38
- },
39
- {
40
- title: 'Viem',
41
- description: 'Interact with Sei using Viem modules + Wagmi.',
42
- link: 'https://viem.sh/'
43
- },
44
- {
45
- title: 'EVM JSON-RPC API',
46
- description: 'Learn about the EVM api available on Sei.',
47
- link: 'https://ethereum.org/en/developers/docs/apis/json-rpc/'
48
- }
49
- ];
50
-
51
- 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
- >
59
- <path
60
- 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
- stroke="#9F1239"
62
- strokeWidth="1.33333"
63
- strokeLinecap="round"
64
- strokeLinejoin="round"
65
- />
66
- <path
67
- d="M10 2H14V6"
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
- />
80
- </svg>
81
- );
82
-
83
- function Homepage() {
84
-
85
- return (
86
- <div className="container">
87
- <img src="sei-logotype.svg" className="logo" alt="SEI logotype" />
88
- <div className="card intro">
89
- <div className="card-header">
90
- <p className="card__title">Wallet address</p>
91
- <small className="card__description">
92
- Connect wallet to see your address and balance
93
- </small>
94
- </div>
95
- <ConnectButton />
96
- </div>
97
- <Examples />
98
- <div className="get-started">
99
- Get started by editing <code>src/app/page.tsx</code>
100
- </div>
101
- <div className="grid docs">
102
- {
103
- helpItems.map((item, index) => (
104
- <div key={item.title}>
105
- {renderHelpItem(item)}
106
- </div>))
107
- }
108
- </div>
109
- </div>
110
- );
111
- }
112
-
113
- export default Homepage;