create-stylus 0.0.5

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 (220) hide show
  1. package/.github/issue_template.md +7 -0
  2. package/.github/pull_request_template.md +11 -0
  3. package/.github/workflows/release-alpha.yml +32 -0
  4. package/.github/workflows/release-manual.yml +26 -0
  5. package/.yarnrc.yml +1 -0
  6. package/CONTRIBUTING.md +42 -0
  7. package/README.md +66 -0
  8. package/bin/create-dapp-ss.js +4 -0
  9. package/package.json +46 -0
  10. package/rollup.config.js +22 -0
  11. package/src/cli.ts +14 -0
  12. package/src/extensions.json +14 -0
  13. package/src/main.ts +72 -0
  14. package/src/tasks/copy-extension-file.ts +227 -0
  15. package/src/tasks/copy-template-files.ts +252 -0
  16. package/src/tasks/create-first-git-commit.ts +35 -0
  17. package/src/tasks/create-project-directory.ts +34 -0
  18. package/src/tasks/index.ts +5 -0
  19. package/src/tasks/install-packages.ts +15 -0
  20. package/src/tasks/prettier-format.ts +17 -0
  21. package/src/types.ts +31 -0
  22. package/src/utils/consts.ts +1 -0
  23. package/src/utils/find-files-recursively.ts +19 -0
  24. package/src/utils/link.ts +44 -0
  25. package/src/utils/load-extensions.ts +10 -0
  26. package/src/utils/merge-package-json.ts +33 -0
  27. package/src/utils/parse-arguments-into-options.ts +38 -0
  28. package/src/utils/prompt-for-missing-options.ts +53 -0
  29. package/src/utils/render-intro-message.ts +11 -0
  30. package/src/utils/render-outro-message.ts +34 -0
  31. package/templates/base/.github/ISSUE_TEMPLATE/bug_report.yml +58 -0
  32. package/templates/base/.github/ISSUE_TEMPLATE/config.yml +8 -0
  33. package/templates/base/.github/pull_request_template.md +16 -0
  34. package/templates/base/.github/workflows/lint.yaml +300 -0
  35. package/templates/base/.gitignore.template.mjs +19 -0
  36. package/templates/base/.gitmodules +0 -0
  37. package/templates/base/.husky/pre-commit +4 -0
  38. package/templates/base/.lintstagedrc.js +21 -0
  39. package/templates/base/.vscode/settings.json +7 -0
  40. package/templates/base/.yarn/plugins/@yarnpkg/plugin-typescript.cjs +9 -0
  41. package/templates/base/.yarn/releases/yarn-3.2.3.cjs +783 -0
  42. package/templates/base/.yarnrc.yml +11 -0
  43. package/templates/base/CONTRIBUTING.md +86 -0
  44. package/templates/base/LICENCE +21 -0
  45. package/templates/base/dist/cli.js +683 -0
  46. package/templates/base/dist/cli.js.map +1 -0
  47. package/templates/base/nitro-devnode/LICENSE +201 -0
  48. package/templates/base/nitro-devnode/README.md +70 -0
  49. package/templates/base/nitro-devnode/run-dev-node.sh +132 -0
  50. package/templates/base/nitro-devnode/start-chain-with-cors.sh +150 -0
  51. package/templates/base/nitro-devnode/stylus-deployer-bytecode.txt +1 -0
  52. package/templates/base/nitro-devnode/stylus-dev/Dockerfile +10 -0
  53. package/templates/base/package.json +44 -0
  54. package/templates/base/packages/nextjs/.env.example +13 -0
  55. package/templates/base/packages/nextjs/.eslintignore +11 -0
  56. package/templates/base/packages/nextjs/.eslintrc.json +15 -0
  57. package/templates/base/packages/nextjs/.gitignore.template.mjs +42 -0
  58. package/templates/base/packages/nextjs/.prettierrc.js +9 -0
  59. package/templates/base/packages/nextjs/.prettierrc.json +8 -0
  60. package/templates/base/packages/nextjs/app/blockexplorer/_components/AddressCodeTab.tsx +27 -0
  61. package/templates/base/packages/nextjs/app/blockexplorer/_components/AddressComponent.tsx +36 -0
  62. package/templates/base/packages/nextjs/app/blockexplorer/_components/AddressLogsTab.tsx +21 -0
  63. package/templates/base/packages/nextjs/app/blockexplorer/_components/AddressStorageTab.tsx +61 -0
  64. package/templates/base/packages/nextjs/app/blockexplorer/_components/BackButton.tsx +12 -0
  65. package/templates/base/packages/nextjs/app/blockexplorer/_components/ContractTabs.tsx +102 -0
  66. package/templates/base/packages/nextjs/app/blockexplorer/_components/PaginationButton.tsx +39 -0
  67. package/templates/base/packages/nextjs/app/blockexplorer/_components/SearchBar.tsx +49 -0
  68. package/templates/base/packages/nextjs/app/blockexplorer/_components/TransactionHash.tsx +28 -0
  69. package/templates/base/packages/nextjs/app/blockexplorer/_components/TransactionsTable.tsx +71 -0
  70. package/templates/base/packages/nextjs/app/blockexplorer/_components/index.tsx +7 -0
  71. package/templates/base/packages/nextjs/app/blockexplorer/address/[address]/page.tsx +101 -0
  72. package/templates/base/packages/nextjs/app/blockexplorer/layout.tsx +12 -0
  73. package/templates/base/packages/nextjs/app/blockexplorer/page.tsx +83 -0
  74. package/templates/base/packages/nextjs/app/blockexplorer/transaction/[txHash]/page.tsx +23 -0
  75. package/templates/base/packages/nextjs/app/blockexplorer/transaction/_components/TransactionComp.tsx +152 -0
  76. package/templates/base/packages/nextjs/app/debug/_components/DebugContracts.tsx +73 -0
  77. package/templates/base/packages/nextjs/app/debug/_components/contract/ContractInput.tsx +84 -0
  78. package/templates/base/packages/nextjs/app/debug/_components/contract/ContractReadMethods.tsx +43 -0
  79. package/templates/base/packages/nextjs/app/debug/_components/contract/ContractUI.tsx +164 -0
  80. package/templates/base/packages/nextjs/app/debug/_components/contract/ContractVariables.tsx +50 -0
  81. package/templates/base/packages/nextjs/app/debug/_components/contract/ContractWriteMethods.tsx +49 -0
  82. package/templates/base/packages/nextjs/app/debug/_components/contract/DisplayVariable.tsx +85 -0
  83. package/templates/base/packages/nextjs/app/debug/_components/contract/InheritanceTooltip.tsx +14 -0
  84. package/templates/base/packages/nextjs/app/debug/_components/contract/ReadOnlyFunctionForm.tsx +102 -0
  85. package/templates/base/packages/nextjs/app/debug/_components/contract/Tuple.tsx +44 -0
  86. package/templates/base/packages/nextjs/app/debug/_components/contract/TupleArray.tsx +142 -0
  87. package/templates/base/packages/nextjs/app/debug/_components/contract/TxReceipt.tsx +42 -0
  88. package/templates/base/packages/nextjs/app/debug/_components/contract/WriteOnlyFunctionForm.tsx +144 -0
  89. package/templates/base/packages/nextjs/app/debug/_components/contract/index.tsx +8 -0
  90. package/templates/base/packages/nextjs/app/debug/_components/contract/utilsContract.tsx +166 -0
  91. package/templates/base/packages/nextjs/app/debug/_components/contract/utilsDisplay.tsx +114 -0
  92. package/templates/base/packages/nextjs/app/debug/page.tsx +14 -0
  93. package/templates/base/packages/nextjs/app/layout.tsx +67 -0
  94. package/templates/base/packages/nextjs/app/not-found.tsx +16 -0
  95. package/templates/base/packages/nextjs/app/page.tsx +94 -0
  96. package/templates/base/packages/nextjs/components/Background.tsx +37 -0
  97. package/templates/base/packages/nextjs/components/Card.tsx +40 -0
  98. package/templates/base/packages/nextjs/components/Footer.tsx +93 -0
  99. package/templates/base/packages/nextjs/components/Header.tsx +114 -0
  100. package/templates/base/packages/nextjs/components/ScaffoldEthAppWithProviders.tsx +77 -0
  101. package/templates/base/packages/nextjs/components/SwitchTheme.tsx +41 -0
  102. package/templates/base/packages/nextjs/components/ThemeProvider.tsx +13 -0
  103. package/templates/base/packages/nextjs/components/assets/BuidlGuidlLogo.tsx +18 -0
  104. package/templates/base/packages/nextjs/components/scaffold-eth/Address/Address.tsx +187 -0
  105. package/templates/base/packages/nextjs/components/scaffold-eth/Address/AddressCopyIcon.tsx +23 -0
  106. package/templates/base/packages/nextjs/components/scaffold-eth/Address/AddressLinkWrapper.tsx +29 -0
  107. package/templates/base/packages/nextjs/components/scaffold-eth/Balance.tsx +75 -0
  108. package/templates/base/packages/nextjs/components/scaffold-eth/BlockieAvatar.tsx +17 -0
  109. package/templates/base/packages/nextjs/components/scaffold-eth/Faucet.tsx +131 -0
  110. package/templates/base/packages/nextjs/components/scaffold-eth/FaucetButton.tsx +75 -0
  111. package/templates/base/packages/nextjs/components/scaffold-eth/Input/AddressInput.tsx +120 -0
  112. package/templates/base/packages/nextjs/components/scaffold-eth/Input/Bytes32Input.tsx +31 -0
  113. package/templates/base/packages/nextjs/components/scaffold-eth/Input/BytesInput.tsx +28 -0
  114. package/templates/base/packages/nextjs/components/scaffold-eth/Input/EtherInput.tsx +128 -0
  115. package/templates/base/packages/nextjs/components/scaffold-eth/Input/InputBase.tsx +66 -0
  116. package/templates/base/packages/nextjs/components/scaffold-eth/Input/IntegerInput.tsx +63 -0
  117. package/templates/base/packages/nextjs/components/scaffold-eth/Input/index.ts +9 -0
  118. package/templates/base/packages/nextjs/components/scaffold-eth/Input/utils.ts +109 -0
  119. package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/AddressInfoDropdown.tsx +121 -0
  120. package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/AddressQRCodeModal.tsx +33 -0
  121. package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/BurnerWalletModal.tsx +63 -0
  122. package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/NetworkOptions.tsx +48 -0
  123. package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/WrongNetworkDropdown.tsx +32 -0
  124. package/templates/base/packages/nextjs/components/scaffold-eth/RainbowKitCustomConnectButton/index.tsx +89 -0
  125. package/templates/base/packages/nextjs/components/scaffold-eth/index.tsx +7 -0
  126. package/templates/base/packages/nextjs/contracts/deployedContracts.ts +9 -0
  127. package/templates/base/packages/nextjs/contracts/externalContracts.ts +16 -0
  128. package/templates/base/packages/nextjs/eslint.config.mjs +32 -0
  129. package/templates/base/packages/nextjs/hooks/scaffold-eth/index.ts +17 -0
  130. package/templates/base/packages/nextjs/hooks/scaffold-eth/useAnimationConfig.ts +20 -0
  131. package/templates/base/packages/nextjs/hooks/scaffold-eth/useContractLogs.ts +40 -0
  132. package/templates/base/packages/nextjs/hooks/scaffold-eth/useCopyToClipboard.ts +19 -0
  133. package/templates/base/packages/nextjs/hooks/scaffold-eth/useDeployedContractInfo.ts +86 -0
  134. package/templates/base/packages/nextjs/hooks/scaffold-eth/useDisplayUsdMode.ts +21 -0
  135. package/templates/base/packages/nextjs/hooks/scaffold-eth/useFetchBlocks.ts +133 -0
  136. package/templates/base/packages/nextjs/hooks/scaffold-eth/useInitializeNativeCurrencyPrice.ts +32 -0
  137. package/templates/base/packages/nextjs/hooks/scaffold-eth/useNativeCurrencyPrice.ts +34 -0
  138. package/templates/base/packages/nextjs/hooks/scaffold-eth/useNetworkColor.ts +22 -0
  139. package/templates/base/packages/nextjs/hooks/scaffold-eth/useOutsideClick.ts +23 -0
  140. package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldContract.ts +65 -0
  141. package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldEventHistory.ts +213 -0
  142. package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldReadContract.ts +80 -0
  143. package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldWatchContractEvent.ts +40 -0
  144. package/templates/base/packages/nextjs/hooks/scaffold-eth/useScaffoldWriteContract.ts +191 -0
  145. package/templates/base/packages/nextjs/hooks/scaffold-eth/useSelectedNetwork.ts +18 -0
  146. package/templates/base/packages/nextjs/hooks/scaffold-eth/useTargetNetwork.ts +23 -0
  147. package/templates/base/packages/nextjs/hooks/scaffold-eth/useTransactor.tsx +114 -0
  148. package/templates/base/packages/nextjs/hooks/scaffold-eth/useWatchBalance.ts +21 -0
  149. package/templates/base/packages/nextjs/icons/CompassIcon.tsx +39 -0
  150. package/templates/base/packages/nextjs/icons/DarkBugAntIcon.tsx +30 -0
  151. package/templates/base/packages/nextjs/icons/LightBugAntIcon.tsx +52 -0
  152. package/templates/base/packages/nextjs/next-env.d.ts +5 -0
  153. package/templates/base/packages/nextjs/next.config.js +19 -0
  154. package/templates/base/packages/nextjs/package.json +58 -0
  155. package/templates/base/packages/nextjs/postcss.config.js +6 -0
  156. package/templates/base/packages/nextjs/public/debug-image.png +0 -0
  157. package/templates/base/packages/nextjs/public/favicon.png +0 -0
  158. package/templates/base/packages/nextjs/public/logo.svg +8 -0
  159. package/templates/base/packages/nextjs/public/manifest.json +5 -0
  160. package/templates/base/packages/nextjs/public/thumbnail.jpg +0 -0
  161. package/templates/base/packages/nextjs/react-copy-to-clipboard.d.ts +44 -0
  162. package/templates/base/packages/nextjs/scaffold.config.ts +56 -0
  163. package/templates/base/packages/nextjs/services/store/store.ts +39 -0
  164. package/templates/base/packages/nextjs/services/web3/wagmiConfig.tsx +44 -0
  165. package/templates/base/packages/nextjs/services/web3/wagmiConnectors.tsx +51 -0
  166. package/templates/base/packages/nextjs/styles/globals.css +80 -0
  167. package/templates/base/packages/nextjs/tailwind.config.js +97 -0
  168. package/templates/base/packages/nextjs/tsconfig.json +28 -0
  169. package/templates/base/packages/nextjs/types/abitype/abi.d.ts +16 -0
  170. package/templates/base/packages/nextjs/types/utils.ts +3 -0
  171. package/templates/base/packages/nextjs/utils/scaffold-eth/block.ts +17 -0
  172. package/templates/base/packages/nextjs/utils/scaffold-eth/common.ts +8 -0
  173. package/templates/base/packages/nextjs/utils/scaffold-eth/contract.ts +352 -0
  174. package/templates/base/packages/nextjs/utils/scaffold-eth/contractsData.ts +11 -0
  175. package/templates/base/packages/nextjs/utils/scaffold-eth/decodeTxData.ts +65 -0
  176. package/templates/base/packages/nextjs/utils/scaffold-eth/fetchPriceFromUniswap.ts +72 -0
  177. package/templates/base/packages/nextjs/utils/scaffold-eth/getMetadata.ts +50 -0
  178. package/templates/base/packages/nextjs/utils/scaffold-eth/getParsedError.ts +35 -0
  179. package/templates/base/packages/nextjs/utils/scaffold-eth/index.ts +6 -0
  180. package/templates/base/packages/nextjs/utils/scaffold-eth/notification.tsx +90 -0
  181. package/templates/base/packages/nextjs/utils/scaffold-stylus/burner.ts +59 -0
  182. package/templates/base/packages/nextjs/utils/scaffold-stylus/chain.ts +42 -0
  183. package/templates/base/packages/nextjs/utils/scaffold-stylus/index.ts +3 -0
  184. package/templates/base/packages/nextjs/utils/scaffold-stylus/networks.ts +94 -0
  185. package/templates/base/packages/nextjs/vercel.json +3 -0
  186. package/templates/base/packages/stylus/.env.example +16 -0
  187. package/templates/base/packages/stylus/.eslintrc.js +23 -0
  188. package/templates/base/packages/stylus/.gitignore.template.mjs +7 -0
  189. package/templates/base/packages/stylus/jest.config.js +15 -0
  190. package/templates/base/packages/stylus/package.json +48 -0
  191. package/templates/base/packages/stylus/scripts/deploy.ts +46 -0
  192. package/templates/base/packages/stylus/scripts/deploy_contract.ts +84 -0
  193. package/templates/base/packages/stylus/scripts/deploy_wrapper.ts +39 -0
  194. package/templates/base/packages/stylus/scripts/export_abi.ts +87 -0
  195. package/templates/base/packages/stylus/scripts/index.ts +0 -0
  196. package/templates/base/packages/stylus/scripts/new_module.sh +35 -0
  197. package/templates/base/packages/stylus/scripts/test_network.ts +31 -0
  198. package/templates/base/packages/stylus/scripts/utils/command.ts +152 -0
  199. package/templates/base/packages/stylus/scripts/utils/contract.ts +228 -0
  200. package/templates/base/packages/stylus/scripts/utils/deployment.ts +260 -0
  201. package/templates/base/packages/stylus/scripts/utils/index.ts +6 -0
  202. package/templates/base/packages/stylus/scripts/utils/network.ts +132 -0
  203. package/templates/base/packages/stylus/scripts/utils/type.ts +51 -0
  204. package/templates/base/packages/stylus/scripts/utils.ts +3 -0
  205. package/templates/base/packages/stylus/tsconfig.json +41 -0
  206. package/templates/base/packages/stylus/your-contract/.cargo/config.toml +18 -0
  207. package/templates/base/packages/stylus/your-contract/Cargo.lock +5761 -0
  208. package/templates/base/packages/stylus/your-contract/Cargo.toml +48 -0
  209. package/templates/base/packages/stylus/your-contract/examples/counter.rs +78 -0
  210. package/templates/base/packages/stylus/your-contract/header.png +0 -0
  211. package/templates/base/packages/stylus/your-contract/licenses/Apache-2.0 +201 -0
  212. package/templates/base/packages/stylus/your-contract/licenses/COPYRIGHT.md +5 -0
  213. package/templates/base/packages/stylus/your-contract/licenses/DCO.txt +34 -0
  214. package/templates/base/packages/stylus/your-contract/licenses/MIT +21 -0
  215. package/templates/base/packages/stylus/your-contract/rust-toolchain.toml +2 -0
  216. package/templates/base/packages/stylus/your-contract/src/lib.rs +241 -0
  217. package/templates/base/packages/stylus/your-contract/src/main.rs +10 -0
  218. package/templates/base/readme.md +352 -0
  219. package/templates/base/yarn.lock +17859 -0
  220. package/tsconfig.json +13 -0
@@ -0,0 +1,21 @@
1
+ import { useEffect } from "react";
2
+ import { useTargetNetwork } from "./useTargetNetwork";
3
+ import { useQueryClient } from "@tanstack/react-query";
4
+ import { UseBalanceParameters, useBalance, useBlockNumber } from "wagmi";
5
+
6
+ /**
7
+ * Wrapper around wagmi's useBalance hook. Updates data on every block change.
8
+ */
9
+ export const useWatchBalance = (useBalanceParameters: UseBalanceParameters) => {
10
+ const { targetNetwork } = useTargetNetwork();
11
+ const queryClient = useQueryClient();
12
+ const { data: blockNumber } = useBlockNumber({ watch: true, chainId: targetNetwork.id });
13
+ const { queryKey, ...restUseBalanceReturn } = useBalance(useBalanceParameters);
14
+
15
+ useEffect(() => {
16
+ queryClient.invalidateQueries({ queryKey });
17
+ // eslint-disable-next-line react-hooks/exhaustive-deps
18
+ }, [blockNumber]);
19
+
20
+ return restUseBalanceReturn;
21
+ };
@@ -0,0 +1,39 @@
1
+ import React from "react";
2
+
3
+ const CompassIcon = ({ width = 28, height = 28, className = "" }) => {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width={width}
8
+ height={height}
9
+ viewBox="0 0 24 24"
10
+ fill="none"
11
+ className={className}
12
+ >
13
+ <g clipPath="url(#clip0_2148_341)">
14
+ <path
15
+ d="M12 0C5.373 0 0 5.373 0 12C0 18.627 5.373 24 12 24C18.627 24 24 18.6278 24 12C24 5.373 18.627 0 12 0ZM15.405 12.0007C15.405 13.8097 13.9897 15.276 12.2078 15.3855L8.08875 18.9412L7.5525 18.6307L8.9175 13.4272C8.70654 12.9812 8.59618 12.4942 8.59425 12.0007C8.59425 10.1917 10.0095 8.7255 11.7907 8.616L15.9113 5.06025L16.4475 5.36925L15.0825 10.5743C15.285 11.0092 15.4058 11.49 15.4058 12.0015L15.405 12.0007ZM10.452 12C10.452 12.4106 10.6151 12.8043 10.9054 13.0946C11.1957 13.3849 11.5894 13.548 12 13.548C12.4106 13.548 12.8043 13.3849 13.0946 13.0946C13.3849 12.8043 13.548 12.4106 13.548 12C13.548 11.5894 13.3849 11.1957 13.0946 10.9054C12.8043 10.6151 12.4106 10.452 12 10.452C11.5894 10.452 11.1957 10.6151 10.9054 10.9054C10.6151 11.1957 10.452 11.5894 10.452 12Z"
16
+ fill="url(#paint0_linear_2148_341)"
17
+ />
18
+ </g>
19
+ <defs>
20
+ <linearGradient
21
+ id="paint0_linear_2148_341"
22
+ x1="24"
23
+ y1="12"
24
+ x2="-2.07194"
25
+ y2="12"
26
+ gradientUnits="userSpaceOnUse"
27
+ >
28
+ <stop stopColor="#E3066E" />
29
+ <stop offset="1" stopColor="white" />
30
+ </linearGradient>
31
+ <clipPath id="clip0_2148_341">
32
+ <rect width="24" height="24" fill="white" />
33
+ </clipPath>
34
+ </defs>
35
+ </svg>
36
+ );
37
+ };
38
+
39
+ export default CompassIcon;
@@ -0,0 +1,30 @@
1
+ import React from "react";
2
+
3
+ const DarkBugAntIcon = ({ width = 26, height = 30, className = "" }) => {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width={width}
8
+ height={height}
9
+ viewBox="0 0 26 30"
10
+ fill="none"
11
+ className={className}
12
+ >
13
+ <path
14
+ d="M13.0007 16.0776C14.6792 16.0776 16.3313 16.1925 17.9469 16.4179C19.4631 16.6275 20.6752 17.8049 20.6752 19.3082C20.6752 24.6609 17.2393 29 12.9993 29C8.75924 29 5.32482 24.6609 5.32482 19.3082C5.32482 17.8063 6.53835 16.6275 8.05306 16.4179C9.69215 16.1909 11.3454 16.0772 13.0007 16.0776ZM13.0007 16.0776C17.2159 16.0776 21.2571 16.807 25 18.1452C24.8235 21.1048 24.2573 24.0295 23.3157 26.8463M13.0007 16.0776C8.78556 16.0776 4.74438 16.807 1 18.1452C1.18276 21.1661 1.76028 24.0837 2.68578 26.8463M13.0007 16.0776C13.4456 16.0777 13.8858 15.9891 14.2949 15.8174C14.7039 15.6456 15.0732 15.3941 15.3804 15.0782C15.6877 14.7622 15.9264 14.3884 16.0824 13.9792C16.2383 13.57 16.308 13.1341 16.2875 12.6977M13.0007 16.0776C12.5559 16.0777 12.1156 15.9891 11.7066 15.8174C11.2976 15.6456 10.9283 15.3941 10.621 15.0782C10.3138 14.7622 10.075 14.3884 9.91911 13.9792C9.7632 13.57 9.69342 13.1341 9.71398 12.6977M16.2875 12.6977C16.2484 11.8675 15.885 11.0841 15.2729 10.5102C14.6607 9.93635 13.847 9.61623 13.0007 9.61638M16.2875 12.6977C18.884 12.4615 21.447 11.9404 23.9254 11.1441C23.845 9.52592 23.652 7.93646 23.3522 6.38578M9.71398 12.6977C9.7531 11.8675 10.1165 11.0841 10.7286 10.5102C11.3407 9.93635 12.1545 9.61623 13.0007 9.61638M9.71398 12.6977C7.07201 12.4564 4.5163 11.9281 2.07755 11.1441C2.15617 9.54687 2.34767 7.95693 2.65069 6.38578M13.0007 9.61638C14.4555 9.61638 15.8825 9.50151 17.2729 9.27752C17.8621 9.18276 18.3549 8.7635 18.4353 8.18343C18.5851 7.07324 18.3813 5.94474 17.8519 4.95282M13.0007 9.61638C11.546 9.61638 10.1204 9.50151 8.72854 9.27752C8.14079 9.18276 7.6466 8.7635 7.56619 8.18343C7.4116 7.07159 7.61615 5.94014 8.15102 4.94852M8.15102 4.94852C7.52825 4.54124 6.9608 4.05923 6.46232 3.51126C6.56467 2.60669 6.85708 1.75668 7.30155 1.00287M8.15102 4.94852C8.61646 4.08119 9.31421 3.35657 10.169 2.85008C11.0238 2.3436 12.0031 2.07592 13.0015 2.07592C13.9998 2.07592 14.9792 2.3436 15.8339 2.85008C16.6887 3.35657 17.3865 4.08263 17.8519 4.94995C18.4762 4.54361 19.0435 4.05974 19.5406 3.51556C19.4414 2.62879 19.1551 1.77205 18.6999 1"
15
+ stroke="url(#paint0_linear_2148_38)"
16
+ strokeWidth="1.5"
17
+ strokeLinecap="round"
18
+ strokeLinejoin="round"
19
+ />
20
+ <defs>
21
+ <linearGradient id="paint0_linear_2148_38" x1="25" y1="15" x2="-1.07194" y2="15" gradientUnits="userSpaceOnUse">
22
+ <stop stopColor="#E3066E" />
23
+ <stop offset="1" stopColor="white" />
24
+ </linearGradient>
25
+ </defs>
26
+ </svg>
27
+ );
28
+ };
29
+
30
+ export default DarkBugAntIcon;
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+
3
+ const LightBugAntIcon = ({ width = 26, height = 30, className = "" }) => {
4
+ return (
5
+ <svg
6
+ xmlns="http://www.w3.org/2000/svg"
7
+ width={width}
8
+ height={height}
9
+ viewBox="0 0 26 30"
10
+ fill="none"
11
+ className={className}
12
+ >
13
+ <path
14
+ d="M13.0007 16.0776C14.6792 16.0776 16.3313 16.1925 17.9469 16.4179C19.4631 16.6275 20.6752 17.8049 20.6752 19.3082C20.6752 24.6609 17.2393 29 12.9993 29C8.75924 29 5.32482 24.6609 5.32482 19.3082C5.32482 17.8063 6.53835 16.6275 8.05306 16.4179C9.69215 16.1909 11.3454 16.0772 13.0007 16.0776ZM13.0007 16.0776C17.2159 16.0776 21.2571 16.807 25 18.1452C24.8235 21.1048 24.2573 24.0295 23.3157 26.8463M13.0007 16.0776C8.78556 16.0776 4.74438 16.807 1 18.1452C1.18276 21.1661 1.76028 24.0837 2.68578 26.8463M13.0007 16.0776C13.4456 16.0777 13.8858 15.9891 14.2949 15.8174C14.7039 15.6456 15.0732 15.3941 15.3804 15.0782C15.6877 14.7622 15.9264 14.3884 16.0824 13.9792C16.2383 13.57 16.308 13.1341 16.2875 12.6977M13.0007 16.0776C12.5559 16.0777 12.1156 15.9891 11.7066 15.8174C11.2976 15.6456 10.9283 15.3941 10.621 15.0782C10.3138 14.7622 10.075 14.3884 9.91911 13.9792C9.7632 13.57 9.69342 13.1341 9.71398 12.6977M13.0007 9.61638C14.4555 9.61638 15.8825 9.50151 17.2729 9.27752C17.8621 9.18276 18.3549 8.7635 18.4353 8.18343C18.5851 7.07324 18.3813 5.94474 17.8519 4.95282M13.0007 9.61638C11.546 9.61638 10.1204 9.50151 8.72854 9.27752C8.14079 9.18276 7.6466 8.7635 7.56619 8.18343C7.4116 7.07159 7.61615 5.94014 8.15102 4.94852M13.0007 9.61638C12.1545 9.61623 11.3407 9.93635 10.7286 10.5102C10.1165 11.0841 9.7531 11.8675 9.71398 12.6977M13.0007 9.61638C13.847 9.61623 14.6607 9.93635 15.2729 10.5102C15.885 11.0841 16.2484 11.8675 16.2875 12.6977M8.15102 4.94852C7.52825 4.54124 6.9608 4.05923 6.46232 3.51126C6.56467 2.60669 6.85708 1.75668 7.30155 1.00287M8.15102 4.94852C8.61646 4.08119 9.31421 3.35657 10.169 2.85008C11.0238 2.3436 12.0031 2.07592 13.0015 2.07592C13.9998 2.07592 14.9792 2.3436 15.8339 2.85008C16.6887 3.35657 17.3865 4.08263 17.8519 4.94995M17.8519 4.94995C18.4762 4.54361 19.0435 4.05974 19.5406 3.51556C19.4414 2.62879 19.1551 1.77205 18.6999 1M2.65069 6.38578C2.34767 7.95693 2.15617 9.54687 2.07755 11.1441C4.5163 11.9281 7.07201 12.4564 9.71398 12.6977M23.3522 6.38578C23.652 7.93646 23.845 9.52592 23.9254 11.1441C21.447 11.9404 18.884 12.4615 16.2875 12.6977"
15
+ fill="url(#paint0_linear_2148_348)"
16
+ />
17
+ <path
18
+ d="M13.0007 16.0776C14.6792 16.0776 16.3313 16.1925 17.9469 16.4179C19.4631 16.6275 20.6752 17.8049 20.6752 19.3082C20.6752 24.6609 17.2393 29 12.9993 29C8.75924 29 5.32482 24.6609 5.32482 19.3082C5.32482 17.8063 6.53835 16.6275 8.05306 16.4179C9.69215 16.1909 11.3454 16.0772 13.0007 16.0776ZM13.0007 16.0776C17.2159 16.0776 21.2571 16.807 25 18.1452C24.8235 21.1048 24.2573 24.0295 23.3157 26.8463M13.0007 16.0776C8.78556 16.0776 4.74438 16.807 1 18.1452C1.18276 21.1661 1.76028 24.0837 2.68578 26.8463M13.0007 16.0776C13.4456 16.0777 13.8858 15.9891 14.2949 15.8174C14.7039 15.6456 15.0732 15.3941 15.3804 15.0782C15.6877 14.7622 15.9264 14.3884 16.0824 13.9792C16.2383 13.57 16.308 13.1341 16.2875 12.6977M13.0007 16.0776C12.5559 16.0777 12.1156 15.9891 11.7066 15.8174C11.2976 15.6456 10.9283 15.3941 10.621 15.0782C10.3138 14.7622 10.075 14.3884 9.91911 13.9792C9.7632 13.57 9.69342 13.1341 9.71398 12.6977M16.2875 12.6977C16.2484 11.8675 15.885 11.0841 15.2729 10.5102C14.6607 9.93635 13.847 9.61623 13.0007 9.61638M16.2875 12.6977C18.884 12.4615 21.447 11.9404 23.9254 11.1441C23.845 9.52592 23.652 7.93646 23.3522 6.38578M9.71398 12.6977C9.7531 11.8675 10.1165 11.0841 10.7286 10.5102C11.3407 9.93635 12.1545 9.61623 13.0007 9.61638M9.71398 12.6977C7.07201 12.4564 4.5163 11.9281 2.07755 11.1441C2.15617 9.54687 2.34767 7.95693 2.65069 6.38578M13.0007 9.61638C14.4555 9.61638 15.8825 9.50151 17.2729 9.27752C17.8621 9.18276 18.3549 8.7635 18.4353 8.18343C18.5851 7.07324 18.3813 5.94474 17.8519 4.95282M13.0007 9.61638C11.546 9.61638 10.1204 9.50151 8.72854 9.27752C8.14079 9.18276 7.6466 8.7635 7.56619 8.18343C7.4116 7.07159 7.61615 5.94014 8.15102 4.94852M8.15102 4.94852C7.52825 4.54124 6.9608 4.05923 6.46232 3.51126C6.56467 2.60669 6.85708 1.75668 7.30155 1.00287M8.15102 4.94852C8.61646 4.08119 9.31421 3.35657 10.169 2.85008C11.0238 2.3436 12.0031 2.07592 13.0015 2.07592C13.9998 2.07592 14.9792 2.3436 15.8339 2.85008C16.6887 3.35657 17.3865 4.08263 17.8519 4.94995C18.4762 4.54361 19.0435 4.05974 19.5406 3.51556C19.4414 2.62879 19.1551 1.77205 18.6999 1"
19
+ stroke="url(#paint1_linear_2148_348)"
20
+ stroke-width="1.5"
21
+ stroke-linecap="round"
22
+ stroke-linejoin="round"
23
+ />
24
+ <defs>
25
+ <linearGradient
26
+ id="paint0_linear_2148_348"
27
+ x1="25"
28
+ y1="15"
29
+ x2="-1.07194"
30
+ y2="15"
31
+ gradientUnits="userSpaceOnUse"
32
+ >
33
+ <stop stop-color="#E3066E" />
34
+ <stop offset="1" stop-color="#203147" />
35
+ </linearGradient>
36
+ <linearGradient
37
+ id="paint1_linear_2148_348"
38
+ x1="25"
39
+ y1="15"
40
+ x2="-1.07194"
41
+ y2="15"
42
+ gradientUnits="userSpaceOnUse"
43
+ >
44
+ <stop stop-color="#E3066E" />
45
+ <stop offset="1" stop-color="#203147" />
46
+ </linearGradient>
47
+ </defs>
48
+ </svg>
49
+ );
50
+ };
51
+
52
+ export default LightBugAntIcon;
@@ -0,0 +1,5 @@
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/app/api-reference/config/typescript for more information.
@@ -0,0 +1,19 @@
1
+ // @ts-check
2
+
3
+ /** @type {import('next').NextConfig} */
4
+ const nextConfig = {
5
+ reactStrictMode: true,
6
+ typescript: {
7
+ ignoreBuildErrors: process.env.NEXT_PUBLIC_IGNORE_BUILD_ERROR === "true",
8
+ },
9
+ eslint: {
10
+ ignoreDuringBuilds: process.env.NEXT_PUBLIC_IGNORE_BUILD_ERROR === "true",
11
+ },
12
+ webpack: config => {
13
+ config.resolve.fallback = { fs: false, net: false, tls: false };
14
+ config.externals.push("pino-pretty", "lokijs", "encoding");
15
+ return config;
16
+ },
17
+ };
18
+
19
+ module.exports = nextConfig;
@@ -0,0 +1,58 @@
1
+ {
2
+ "name": "@ss/nextjs",
3
+ "private": true,
4
+ "version": "0.1.0",
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "start": "next dev",
8
+ "build": "next build",
9
+ "serve": "next start",
10
+ "lint": "next lint",
11
+ "format": "prettier --write . '!(node_modules|.next|contracts)/**/*'",
12
+ "check-types": "tsc --noEmit --incremental",
13
+ "vercel": "vercel",
14
+ "vercel:yolo": "vercel --build-env NEXT_PUBLIC_IGNORE_BUILD_ERROR=true"
15
+ },
16
+ "dependencies": {
17
+ "@ethersproject/providers": "^5.7.2",
18
+ "@heroicons/react": "^2.1.5",
19
+ "@rainbow-me/rainbowkit": "2.2.7",
20
+ "@tanstack/react-query": "^5.59.15",
21
+ "@uniswap/sdk-core": "^5.8.2",
22
+ "@uniswap/v2-sdk": "^4.6.1",
23
+ "blo": "^1.2.0",
24
+ "burner-connector": "0.0.16",
25
+ "daisyui": "4.5.0",
26
+ "kubo-rpc-client": "^5.0.2",
27
+ "next": "^15.2.3",
28
+ "next-nprogress-bar": "^2.3.13",
29
+ "next-themes": "^0.3.0",
30
+ "qrcode.react": "^4.0.1",
31
+ "react": "^19.0.0",
32
+ "react-dom": "^19.0.0",
33
+ "react-hot-toast": "^2.4.0",
34
+ "usehooks-ts": "^3.1.0",
35
+ "viem": "2.31.1",
36
+ "wagmi": "2.15.6",
37
+ "zustand": "^5.0.0"
38
+ },
39
+ "devDependencies": {
40
+ "@tailwindcss/postcss": "latest",
41
+ "@trivago/prettier-plugin-sort-imports": "^4.3.0",
42
+ "@types/node": "^18.19.50",
43
+ "@types/react": "^19.0.7",
44
+ "abitype": "1.0.6",
45
+ "autoprefixer": "^10.4.12",
46
+ "bgipfs": "^0.0.12",
47
+ "eslint": "^9.23.0",
48
+ "eslint-config-next": "^15.2.3",
49
+ "eslint-config-prettier": "^10.1.1",
50
+ "eslint-plugin-prettier": "^5.2.4",
51
+ "postcss": "^8.4.45",
52
+ "prettier": "^3.5.3",
53
+ "tailwindcss": "^3.3.3",
54
+ "type-fest": "^4.26.1",
55
+ "typescript": "^5.8.2",
56
+ "vercel": "^39.1.3"
57
+ }
58
+ }
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -0,0 +1,8 @@
1
+ <svg width="46" height="47" viewBox="0 0 46 47" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.824 28.0332L22.4381 29.4512L20.3516 31.5377L20.1619 31.7275L16.9891 30.7552C13.9751 29.8302 11.7228 27.4522 10.9617 24.3934C10.2005 21.3347 11.0756 18.1787 13.3046 15.9498L25.7411 3.50818C25.7793 3.52497 25.8169 3.54379 25.8525 3.56516C25.8907 3.58398 25.9283 3.60535 25.9639 3.62469C26.028 3.65776 26.0896 3.69592 26.1537 3.73153C26.2153 3.76714 26.2768 3.80479 26.3389 3.8455C26.3888 3.87653 26.4361 3.90706 26.4834 3.94013C26.5307 3.97116 26.578 4.00423 26.6259 4.03985C26.6711 4.07088 26.7134 4.10395 26.7561 4.13702C26.7943 4.16297 26.8319 4.19401 26.8675 4.22453C26.9006 4.24845 26.9316 4.27439 26.9622 4.30289C26.9667 4.30543 26.9718 4.30746 26.9764 4.31255C27.1189 4.4311 27.2537 4.55422 27.3865 4.68701L27.9889 5.2894L15.3153 17.961C13.8001 19.4787 13.2048 21.6242 13.7218 23.7061C14.2387 25.788 15.7726 27.4049 17.824 28.0332Z" fill="#1A1A1A"/>
3
+ <path d="M19.1825 23.8648L26.1583 25.731L23.8347 28.0546L18.4473 26.6127C16.9133 26.2047 15.7538 25.0452 15.3412 23.5112C14.9311 21.9773 15.3554 20.3929 16.4768 19.2716L29.2242 6.5242L31.2374 8.53743L18.49 21.2823C18.3333 21.441 18.2148 21.6211 18.1369 21.8206C18.0209 22.1243 18.0041 22.4535 18.0896 22.776C18.1064 22.8402 18.1278 22.9017 18.1537 22.9612C18.3364 23.4069 18.7088 23.7392 19.183 23.8648H19.1825Z" fill="#1A1A1A"/>
4
+ <path d="M32.6961 31.0493L20.257 43.4909L18.5144 45.2334C17.9477 44.8875 17.419 44.4698 16.9377 43.9885L16.3353 43.3861L18.0118 41.7097L30.6854 29.0381C32.2031 27.5204 32.7983 25.3723 32.2789 23.293C31.7594 21.2111 30.228 19.5942 28.1766 18.9658L23.5645 17.5504L23.7543 17.3606L25.8408 15.2741L29.0135 16.2464C32.027 17.1714 34.2799 19.5494 35.041 22.6082C35.7996 25.6669 34.925 28.8229 32.6961 31.0493Z" fill="white"/>
5
+ <path d="M29.5233 27.73L16.7785 40.4774L15.1021 42.1538L13.0888 40.1406L14.7653 38.4642L27.5126 25.7193C27.6714 25.558 27.7899 25.3779 27.8637 25.1785C27.9797 24.8748 27.9965 24.5456 27.911 24.225C27.8942 24.1609 27.8729 24.0994 27.8495 24.0399C27.6693 23.5942 27.2944 23.2619 26.8182 23.1342L19.8444 21.2706L20.0387 21.0762L21.9736 19.1414L22.168 18.947L27.5528 20.3838C29.0868 20.7964 30.2463 21.9559 30.6589 23.4878C31.069 25.0218 30.6447 26.6082 29.5233 27.73Z" fill="white"/>
6
+ <path d="M43.6291 23.4995C43.6291 25.1571 42.984 26.715 41.8128 27.8862L27.3864 42.3125C26.2152 43.4837 24.6573 44.1289 22.9998 44.1289C22.9026 44.1289 22.8054 44.1263 22.7103 44.1218H22.6818C22.606 44.1172 22.5322 44.1121 22.4589 44.105C22.433 44.1024 22.4091 44.1004 22.3831 44.0978C22.3098 44.0907 22.2386 44.0836 22.1648 44.0719C22.1531 44.0719 22.1409 44.0693 22.1292 44.0673C22.0982 44.0648 22.0651 44.0602 22.0321 44.0556C21.9491 44.0414 21.8682 44.0271 21.7878 44.0129C21.7761 44.0083 21.7639 44.0058 21.7548 44.0058C21.6815 43.989 21.6077 43.9727 21.5365 43.9559C21.4678 43.9391 21.3991 43.9228 21.3305 43.9015C21.2831 43.8898 21.2379 43.8755 21.1931 43.8633C21.1127 43.8394 21.0318 43.8134 20.9535 43.7849C20.9295 43.7753 20.9061 43.7682 20.8822 43.759C20.8751 43.7565 20.8705 43.7544 20.8634 43.7519C20.7947 43.728 20.7281 43.702 20.6619 43.6735C20.6334 43.6639 20.6049 43.6496 20.5764 43.6379C20.4793 43.5952 20.3821 43.5524 20.2849 43.5051C20.2753 43.5005 20.2661 43.4955 20.2564 43.4909L32.6955 31.0493C34.9245 28.8228 35.7995 25.6669 35.0405 22.6081C34.2793 19.5494 32.0265 17.1709 29.013 16.2464L25.8403 15.2741L23.7538 17.3606L23.564 17.5504L28.176 18.9658C30.2269 19.5942 31.7588 21.211 32.2783 23.293C32.7978 25.3723 32.2025 27.5209 30.6848 29.0381L18.0112 41.7096L16.3348 43.3861L15.102 42.1533L16.7784 40.4769L29.5233 27.7295C30.6446 26.6081 31.0695 25.0218 30.6589 23.4873C30.2463 21.9554 29.0868 20.7959 27.5528 20.3833L22.1679 18.9465L21.9735 19.1408L20.0387 21.0757L19.8443 21.2701L26.8181 23.1337C27.2948 23.2619 27.6693 23.5936 27.8494 24.0393C27.8733 24.0989 27.8947 24.1604 27.911 24.2245C27.9964 24.5445 27.9797 24.8742 27.8637 25.178C27.7904 25.3769 27.6713 25.5575 27.5126 25.7188L14.7652 38.4637L4.18723 27.8857C3.01603 26.7145 2.3709 25.1566 2.3709 23.499C2.3709 21.8414 3.01603 20.2835 4.18723 19.1123L18.6136 4.68701C19.7848 3.5158 21.3427 2.87067 23.0003 2.87067C23.0974 2.87067 23.1946 2.87322 23.2898 2.8778H23.3182C23.418 2.88238 23.5172 2.89204 23.6169 2.90171C23.6973 2.90883 23.7782 2.9185 23.8565 2.9302C23.8708 2.9302 23.8825 2.93274 23.8947 2.93478C23.9257 2.93732 23.9542 2.9419 23.9822 2.94648C24.058 2.95818 24.1318 2.97243 24.205 2.98668C24.2193 2.98922 24.231 2.99125 24.2452 2.9938C24.3185 3.01059 24.3897 3.02687 24.4635 3.04366C24.5322 3.06045 24.6009 3.07673 24.6696 3.0981C24.7052 3.10776 24.7428 3.11692 24.7784 3.12913C24.8329 3.14592 24.8873 3.1622 24.9423 3.18154C25.0491 3.21715 25.158 3.2548 25.2623 3.29754C25.3167 3.31433 25.3691 3.3357 25.421 3.36164C25.4755 3.38301 25.5299 3.40692 25.5823 3.43287C25.6367 3.45678 25.6891 3.48273 25.741 3.50868L13.3045 15.9503C11.0756 18.1792 10.2005 21.3352 10.9616 24.3939C11.7227 27.4527 13.9751 29.8312 16.9891 30.7557L20.1618 31.728L20.3516 31.5382L22.4381 29.4517L17.824 28.0337C15.7731 27.4054 14.2386 25.788 13.7217 23.7066C13.2048 21.6247 13.8001 19.4787 15.3152 17.9615L27.9888 5.28991L29.2241 6.52521L16.4767 19.2726C15.3554 20.394 14.9306 21.9783 15.3411 23.5122C15.7538 25.0462 16.9133 26.2057 18.4472 26.6137L23.8347 28.0556L26.1582 25.732L19.1824 23.8658C18.7082 23.7402 18.3358 23.4084 18.1531 22.9623C18.1272 22.9027 18.1058 22.8412 18.089 22.7771C18.0036 22.4545 18.0204 22.1248 18.1364 21.8216C18.2147 21.6226 18.3333 21.442 18.4894 21.2833L31.2368 8.53844L41.8123 19.1139C42.9835 20.2851 43.6286 21.8429 43.6286 23.5005L43.6291 23.4995Z" fill="#213147"/>
7
+ <path d="M43.4892 17.4344L32.9138 6.85897L30.9005 4.84574L29.0654 3.01059C28.5841 2.52929 28.0529 2.11209 27.4861 1.76561C26.1511 0.940377 24.61 0.499268 22.9997 0.499268C20.7092 0.499268 18.5561 1.39064 16.9367 3.01008L2.51081 17.4344C0.891376 19.0564 0 21.2095 0 23.5C0 25.7905 0.891376 27.9437 2.51081 29.5657L13.0888 40.1411L14.7652 38.4647L4.18723 27.8867C3.01603 26.7155 2.3709 25.1576 2.3709 23.5C2.3709 21.8424 3.01603 20.2846 4.18723 19.1134L18.6136 4.68701C19.7848 3.5158 21.3427 2.87067 23.0003 2.87067C23.0974 2.87067 23.1946 2.87322 23.2897 2.8778H23.3182C23.418 2.88238 23.5172 2.89204 23.6169 2.90171C23.6973 2.90883 23.7782 2.9185 23.8565 2.9302C23.8708 2.9302 23.8825 2.93275 23.8947 2.93478C23.9257 2.93732 23.9542 2.9419 23.9822 2.94648C24.058 2.95818 24.1318 2.97243 24.205 2.98668C24.2193 2.98922 24.231 2.99125 24.2452 2.9938C24.3185 3.01059 24.3897 3.02687 24.4635 3.04366C24.5322 3.06045 24.6009 3.07673 24.6695 3.0981C24.7052 3.10776 24.7428 3.11692 24.7784 3.12913C24.8329 3.14592 24.8873 3.1622 24.9423 3.18154C25.0491 3.21715 25.158 3.2548 25.2623 3.29754C25.3167 3.31433 25.3691 3.3357 25.421 3.36164C25.4755 3.38301 25.5299 3.40692 25.5823 3.43287C25.6367 3.45679 25.6891 3.48273 25.741 3.50868L13.3045 15.9503C11.0756 18.1792 10.2005 21.3352 10.9616 24.394C11.7227 27.4527 13.9751 29.8312 16.9891 30.7557L20.1618 31.728L20.3516 31.5382L22.4381 29.4517L17.824 28.0337C15.7731 27.4054 14.2386 25.788 13.7217 23.7066C13.2048 21.6247 13.8001 19.4787 15.3152 17.9615L27.9888 5.28991L27.972 5.27312L29.2241 6.52522L16.4767 19.2726C15.3554 20.394 14.9306 21.9783 15.3411 23.5122C15.7538 25.0462 16.9133 26.2057 18.4472 26.6137L23.8346 28.0556L26.1582 25.732L19.1824 23.8658C18.7082 23.7402 18.3358 23.4085 18.1531 22.9623C18.1272 22.9027 18.1058 22.8412 18.089 22.7771C18.0036 22.4545 18.0204 22.1248 18.1364 21.8216C18.2147 21.6226 18.3332 21.442 18.4894 21.2833L31.2368 8.53844L41.8123 19.1139C42.9835 20.2851 43.6286 21.8429 43.6286 23.5005C43.6286 25.1581 42.9835 26.716 41.8123 27.8872L27.3859 42.3136C26.2147 43.4848 24.6568 44.1299 22.9992 44.1299C22.9021 44.1299 22.8049 44.1274 22.7097 44.1228H22.6813C22.6054 44.1182 22.5317 44.1131 22.4584 44.106C22.4325 44.1034 22.4085 44.1014 22.3826 44.0989C22.3093 44.0917 22.2381 44.0846 22.1643 44.0729C22.1526 44.0729 22.1404 44.0704 22.1287 44.0683C22.0977 44.0658 22.0646 44.0612 22.0315 44.0566C21.9486 44.0424 21.8677 44.0281 21.7873 44.0139C21.7756 44.0093 21.7634 44.0068 21.7543 44.0068C21.681 43.99 21.6072 43.9737 21.536 43.9569C21.4673 43.9401 21.3986 43.9238 21.3299 43.9025C21.2826 43.8908 21.2373 43.8765 21.1926 43.8643C21.1122 43.8404 21.0313 43.8145 20.9529 43.786C20.929 43.7763 20.9056 43.7692 20.8817 43.76C20.8746 43.7575 20.87 43.7554 20.8629 43.7529C20.7942 43.729 20.7276 43.703 20.6614 43.6745C20.6329 43.6649 20.6044 43.6506 20.5759 43.6389C20.4788 43.5962 20.3816 43.5535 20.2844 43.5061C20.2747 43.5016 20.2656 43.4965 20.2559 43.4919L18.5134 45.2345C19.8484 46.0597 21.3895 46.5008 22.9997 46.5008C25.2903 46.5008 27.4434 45.6094 29.0654 43.99L43.4892 29.5662C45.1086 27.9442 46 25.7911 46 23.5005C46 21.21 45.1086 19.0569 43.4892 17.4349V17.4344Z" fill="#E3066E"/>
8
+ </svg>
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "Scaffold-Stylus DApp",
3
+ "description": "A DApp built with Scaffold-Stylus",
4
+ "iconPath": "logo.svg"
5
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * TypeScript Declaration File for react-copy-to-clipboard
3
+ *
4
+ * This file provides TypeScript type definitions for the "react-copy-to-clipboard"
5
+ * npm package, which is a React component that allows users to copy text to their
6
+ * clipboard with a single click.
7
+ *
8
+ * Purpose:
9
+ * - Enables TypeScript support for the react-copy-to-clipboard library
10
+ * - Provides type safety when using the CopyToClipboard component
11
+ * - Defines the expected props and their types
12
+ *
13
+ * Usage in this project:
14
+ * - Used in components that need clipboard functionality (e.g., copying addresses,
15
+ * transaction hashes, or other data to clipboard)
16
+ * - Common in blockchain/Web3 applications for sharing wallet addresses,
17
+ * transaction IDs, or contract addresses
18
+ *
19
+ * Key interfaces:
20
+ * - Options: Configuration for the copy operation (debug mode, success message)
21
+ * - Props: Component props including text to copy, callback functions, and children
22
+ *
23
+ * The component wraps any child elements and makes them clickable to copy the
24
+ * specified text to the user's clipboard.
25
+ */
26
+
27
+ declare module "react-copy-to-clipboard" {
28
+ import React from "react";
29
+
30
+ interface Options {
31
+ debug: boolean;
32
+ message: string;
33
+ }
34
+
35
+ interface Props {
36
+ text: string;
37
+ onCopy?(a: string, b: boolean): void;
38
+ options?: Options;
39
+ children?: ReactNode;
40
+ }
41
+
42
+ class CopyToClipboard extends React.Component<Props, object> {}
43
+ export default CopyToClipboard;
44
+ }
@@ -0,0 +1,56 @@
1
+ // @ts-nocheck
2
+
3
+ import { arbitrumNitro } from "./utils/scaffold-stylus/chain";
4
+ import * as chains from "viem/chains";
5
+
6
+ export type ScaffoldConfig = {
7
+ targetNetworks: readonly chains.Chain[];
8
+ pollingInterval: number;
9
+ alchemyApiKey: string;
10
+ rpcOverrides?: Record<number, string>;
11
+ walletConnectProjectId: string;
12
+ onlyLocalBurnerWallet: boolean;
13
+ walletAutoConnect: boolean;
14
+ };
15
+
16
+ export const DEFAULT_ALCHEMY_API_KEY = "oKxs-03sij-U_N0iOlrSsZFr29-IqbuF";
17
+
18
+ const scaffoldConfig = {
19
+ // The networks on which your DApp is live
20
+ targetNetworks: [arbitrumNitro],
21
+
22
+ // The interval at which your front-end polls the RPC servers for new data
23
+ // it has no effect if you only target the local network (default is 4000)
24
+ pollingInterval: 30000,
25
+
26
+ // This is ours Alchemy's default API key.
27
+ // You can get your own at https://dashboard.alchemyapi.io
28
+ // It's recommended to store it in an env variable:
29
+ // .env.local for local testing, and in the Vercel/system env config for live apps.
30
+ alchemyApiKey: process.env.NEXT_PUBLIC_ALCHEMY_API_KEY || DEFAULT_ALCHEMY_API_KEY,
31
+
32
+ // If you want to use a different RPC for a specific network, you can add it here.
33
+ // The key is the chain ID, and the value is the HTTP RPC URL
34
+ rpcOverrides: {
35
+ // Example:
36
+ // [chains.mainnet.id]: "https://mainnet.buidlguidl.com",
37
+ },
38
+
39
+ // This is ours WalletConnect's default project ID.
40
+ // You can get your own at https://cloud.walletconnect.com
41
+ // It's recommended to store it in an env variable:
42
+ // .env.local for local testing, and in the Vercel/system env config for live apps.
43
+ walletConnectProjectId: process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID || "3a8170812b534d0ff9d794f19a901d64",
44
+
45
+ // Only show the Burner Wallet when running on nitro network
46
+ onlyLocalBurnerWallet: true,
47
+
48
+ /**
49
+ * Auto connect:
50
+ * 1. If the user was connected into a wallet before, on page reload reconnect automatically
51
+ * 2. If user is not connected to any wallet: On reload, connect to burner wallet if burnerWallet.enabled is true && burnerWallet.onlyLocal is false
52
+ */
53
+ walletAutoConnect: true,
54
+ } as const satisfies ScaffoldConfig;
55
+
56
+ export default scaffoldConfig;
@@ -0,0 +1,39 @@
1
+ import { create } from "zustand";
2
+ import scaffoldConfig from "~~/scaffold.config";
3
+ import { ChainWithAttributes, NETWORKS_EXTRA_DATA } from "~~/utils/scaffold-stylus";
4
+
5
+ /**
6
+ * Zustand Store
7
+ *
8
+ * You can add global state to the app using this useGlobalState, to get & set
9
+ * values from anywhere in the app.
10
+ *
11
+ * Think about it as a global useState.
12
+ */
13
+
14
+ type GlobalState = {
15
+ nativeCurrency: {
16
+ price: number;
17
+ isFetching: boolean;
18
+ };
19
+ setNativeCurrencyPrice: (newNativeCurrencyPriceState: number) => void;
20
+ setIsNativeCurrencyFetching: (newIsNativeCurrencyFetching: boolean) => void;
21
+ targetNetwork: ChainWithAttributes;
22
+ setTargetNetwork: (newTargetNetwork: ChainWithAttributes) => void;
23
+ };
24
+
25
+ export const useGlobalState = create<GlobalState>(set => ({
26
+ nativeCurrency: {
27
+ price: 0,
28
+ isFetching: true,
29
+ },
30
+ setNativeCurrencyPrice: (newValue: number): void =>
31
+ set(state => ({ nativeCurrency: { ...state.nativeCurrency, price: newValue } })),
32
+ setIsNativeCurrencyFetching: (newValue: boolean): void =>
33
+ set(state => ({ nativeCurrency: { ...state.nativeCurrency, isFetching: newValue } })),
34
+ targetNetwork: {
35
+ ...scaffoldConfig.targetNetworks[0],
36
+ ...NETWORKS_EXTRA_DATA[scaffoldConfig.targetNetworks[0].id],
37
+ },
38
+ setTargetNetwork: (newTargetNetwork: ChainWithAttributes) => set(() => ({ targetNetwork: newTargetNetwork })),
39
+ }));
@@ -0,0 +1,44 @@
1
+ import { wagmiConnectors } from "./wagmiConnectors";
2
+ import { Chain, createClient, fallback, http } from "viem";
3
+ import { mainnet } from "viem/chains";
4
+ import { createConfig } from "wagmi";
5
+ import scaffoldConfig, { DEFAULT_ALCHEMY_API_KEY, ScaffoldConfig } from "~~/scaffold.config";
6
+ import { arbitrumNitro, getAlchemyHttpUrl } from "~~/utils/scaffold-stylus";
7
+
8
+ const { targetNetworks } = scaffoldConfig;
9
+
10
+ // We always want to have mainnet enabled (ENS resolution, ETH price, etc). But only once.
11
+ export const enabledChains = targetNetworks.find((network: Chain) => network.id === 1)
12
+ ? targetNetworks
13
+ : ([...targetNetworks, mainnet] as const);
14
+
15
+ export const wagmiConfig = createConfig({
16
+ chains: enabledChains,
17
+ connectors: wagmiConnectors,
18
+ ssr: true,
19
+ client({ chain }) {
20
+ let rpcFallbacks = [http()];
21
+
22
+ const rpcOverrideUrl = (scaffoldConfig.rpcOverrides as ScaffoldConfig["rpcOverrides"])?.[chain.id];
23
+ if (rpcOverrideUrl) {
24
+ rpcFallbacks = [http(rpcOverrideUrl), http()];
25
+ } else {
26
+ const alchemyHttpUrl = getAlchemyHttpUrl(chain.id);
27
+ if (alchemyHttpUrl) {
28
+ const isUsingDefaultKey = scaffoldConfig.alchemyApiKey === DEFAULT_ALCHEMY_API_KEY;
29
+ // If using default Scaffold-ETH 2 API key, we prioritize the default RPC
30
+ rpcFallbacks = isUsingDefaultKey ? [http(), http(alchemyHttpUrl)] : [http(alchemyHttpUrl), http()];
31
+ }
32
+ }
33
+
34
+ return createClient({
35
+ chain,
36
+ transport: fallback(rpcFallbacks),
37
+ ...(chain.id !== (arbitrumNitro as Chain).id
38
+ ? {
39
+ pollingInterval: scaffoldConfig.pollingInterval,
40
+ }
41
+ : {}),
42
+ });
43
+ },
44
+ });
@@ -0,0 +1,51 @@
1
+ import { connectorsForWallets } from "@rainbow-me/rainbowkit";
2
+ import {
3
+ braveWallet,
4
+ coinbaseWallet,
5
+ ledgerWallet,
6
+ metaMaskWallet,
7
+ rainbowWallet,
8
+ safeWallet,
9
+ walletConnectWallet,
10
+ } from "@rainbow-me/rainbowkit/wallets";
11
+ import { rainbowkitBurnerWallet } from "burner-connector";
12
+ import * as chains from "viem/chains";
13
+ import { arbitrumNitro } from "~~/utils/scaffold-stylus/chain";
14
+
15
+ import scaffoldConfig from "~~/scaffold.config";
16
+
17
+ const { onlyLocalBurnerWallet, targetNetworks } = scaffoldConfig;
18
+
19
+ rainbowkitBurnerWallet.rpcUrls = {
20
+ [arbitrumNitro.id]: arbitrumNitro.rpcUrls.default.http[0],
21
+ };
22
+
23
+ const wallets = [
24
+ ...(!targetNetworks.some(network => network.id !== (arbitrumNitro as chains.Chain).id) || !onlyLocalBurnerWallet
25
+ ? [rainbowkitBurnerWallet]
26
+ : []),
27
+ braveWallet,
28
+ metaMaskWallet,
29
+ walletConnectWallet,
30
+ ledgerWallet,
31
+ coinbaseWallet,
32
+ rainbowWallet,
33
+ safeWallet,
34
+ ];
35
+
36
+ /**
37
+ * wagmi connectors for the wagmi context
38
+ */
39
+ export const wagmiConnectors = connectorsForWallets(
40
+ [
41
+ {
42
+ groupName: "Supported Wallets",
43
+ wallets,
44
+ },
45
+ ],
46
+
47
+ {
48
+ appName: "scaffold-stylus",
49
+ projectId: scaffoldConfig.walletConnectProjectId,
50
+ },
51
+ );
@@ -0,0 +1,80 @@
1
+ @import "tailwindcss/base";
2
+ @import "tailwindcss/components";
3
+ @import "tailwindcss/utilities";
4
+
5
+ :root,
6
+ [data-theme] {
7
+ background: oklch(var(--b1));
8
+ }
9
+
10
+ body {
11
+ min-height: 100vh;
12
+ }
13
+
14
+ h1,
15
+ h2,
16
+ h3,
17
+ h4 {
18
+ margin-bottom: 0.5rem;
19
+ line-height: 1;
20
+ }
21
+
22
+ p {
23
+ margin: 1rem 0;
24
+ }
25
+
26
+ .btn {
27
+ @apply shadow-md;
28
+ }
29
+
30
+ .btn.btn-ghost {
31
+ @apply shadow-none;
32
+ }
33
+
34
+ .bg-secondary {
35
+ background-image: linear-gradient(90deg, #203147 0%, #e3066e 100%) !important;
36
+ color: #fff;
37
+ }
38
+
39
+ .bg-secondary:hover,
40
+ .hover\:bg-secondary:hover {
41
+ background-image: linear-gradient(90deg, #425b8c 0%, #ff4fa3 100%) !important;
42
+ color: #fff;
43
+ }
44
+
45
+ .border-round-color {
46
+ border-color: var(--round-color);
47
+ }
48
+
49
+ .gradient-border {
50
+ border: 1px solid transparent;
51
+ background:
52
+ linear-gradient(var(--bg-border), var(--bg-border)) padding-box,
53
+ linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%) border-box;
54
+ }
55
+
56
+ .gradient-border-light {
57
+ border: 1px solid transparent;
58
+ background:
59
+ linear-gradient(white, white) padding-box,
60
+ linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%) border-box;
61
+ }
62
+
63
+ .gradient-border-red {
64
+ border: 1px solid transparent;
65
+ background:
66
+ linear-gradient(180deg, #911048 0.23%, rgba(63, 2, 30, 0.46) 99.77%) padding-box,
67
+ linear-gradient(180deg, #e9257b 0%, #4a172e 100%) border-box;
68
+ }
69
+
70
+ .gradient-border-light-hover {
71
+ border: 1px solid transparent;
72
+ background:
73
+ linear-gradient(white, white) padding-box,
74
+ linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%) border-box;
75
+ }
76
+ .gradient-border-light-hover:hover {
77
+ background:
78
+ linear-gradient(270deg, #e3066e 0%, #203147 108.63%) padding-box,
79
+ linear-gradient(90deg, var(--gradient-start) 0%, var(--gradient-end) 100%) border-box;
80
+ }