package-installer-cli 2.3.0 → 2.4.0

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 (372) hide show
  1. checksums.yaml +4 -4
  2. data/bundle-standalone/cli-with-packages.js +568 -369
  3. data/bundle-standalone/template.json +87 -14
  4. data/bundle-standalone/templates/c++_c/crow/template/CMakeLists.txt +18 -0
  5. data/bundle-standalone/templates/c++_c/crow/template/README.md +11 -0
  6. data/bundle-standalone/templates/c++_c/crow/template/include/routes.hpp +19 -0
  7. data/bundle-standalone/templates/c++_c/crow/template/main.cpp +12 -0
  8. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/README.md +36 -0
  9. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/eslint.config.mjs +16 -0
  10. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/middleware.ts +18 -0
  11. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/next.config.ts +7 -0
  12. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/package.json +28 -0
  13. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/pnpm-lock.yaml +3819 -0
  14. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/postcss.config.mjs +5 -0
  15. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/public/file.svg +1 -0
  16. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/public/globe.svg +1 -0
  17. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/public/next.svg +1 -0
  18. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/public/vercel.svg +1 -0
  19. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/public/window.svg +1 -0
  20. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/src/app/favicon.ico +0 -0
  21. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/src/app/globals.css +26 -0
  22. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/src/app/layout.tsx +34 -0
  23. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/src/app/page.tsx +33 -0
  24. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/src/lib/auth0.ts +3 -0
  25. data/bundle-standalone/templates/combination-templates/nextjs-auth0-shadcn/tsconfig.json +27 -0
  26. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/README.md +36 -0
  27. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/components.json +21 -0
  28. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/eslint.config.mjs +16 -0
  29. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/middleware.ts +12 -0
  30. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/next.config.ts +7 -0
  31. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/package.json +37 -0
  32. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/pnpm-lock.yaml +4113 -0
  33. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/postcss.config.mjs +5 -0
  34. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/public/file.svg +1 -0
  35. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/public/globe.svg +1 -0
  36. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/public/next.svg +1 -0
  37. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/public/vercel.svg +1 -0
  38. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/public/window.svg +1 -0
  39. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/app/favicon.ico +0 -0
  40. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/app/globals.css +122 -0
  41. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/app/layout.tsx +55 -0
  42. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/app/page.tsx +10 -0
  43. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/components/ui/button.tsx +59 -0
  44. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/components/ui/card.tsx +92 -0
  45. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/components/ui/input.tsx +21 -0
  46. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/components/ui/textarea.tsx +18 -0
  47. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/lib/utils.ts +6 -0
  48. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/src/middleware.ts +12 -0
  49. data/bundle-standalone/templates/combination-templates/nextjs-clerk-shadcn/tsconfig.json +27 -0
  50. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/README.md +36 -0
  51. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/eslint.config.mjs +16 -0
  52. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/middleware.ts +0 -0
  53. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/next.config.ts +7 -0
  54. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/package.json +28 -0
  55. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/pnpm-lock.yaml +3862 -0
  56. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/postcss.config.mjs +5 -0
  57. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/public/file.svg +1 -0
  58. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/public/globe.svg +1 -0
  59. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/public/next.svg +1 -0
  60. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/public/vercel.svg +1 -0
  61. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/public/window.svg +1 -0
  62. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/app/api/auth/[...nextauth]/route.ts +6 -0
  63. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/app/favicon.ico +0 -0
  64. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/app/globals.css +26 -0
  65. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/app/layout.tsx +39 -0
  66. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/app/page.tsx +10 -0
  67. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/lib/auth-provider.tsx +7 -0
  68. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/src/lib/auth.ts +126 -0
  69. data/bundle-standalone/templates/combination-templates/nextjs-next-auth-shadcn/tsconfig.json +27 -0
  70. data/bundle-standalone/templates/game/unity/template/README.md +3 -0
  71. data/bundle-standalone/templates/game/unity/template/Scripts/PlayerController.cs +25 -0
  72. data/bundle-standalone/templates/game/unreal/template/README.md +3 -0
  73. data/bundle-standalone/templates/game/unreal/template/Source/PlayerCharacter.cpp +33 -0
  74. data/bundle-standalone/templates/game/unreal/template/Source/PlayerCharacter.h +20 -0
  75. data/bundle-standalone/templates/javascript/preactjs/javascript/template/index.html +13 -0
  76. data/bundle-standalone/templates/javascript/preactjs/javascript/template/package.json +18 -0
  77. data/bundle-standalone/templates/javascript/preactjs/javascript/template/public/vite.svg +1 -0
  78. data/bundle-standalone/templates/javascript/preactjs/javascript/template/src/app.css +25 -0
  79. data/bundle-standalone/templates/javascript/preactjs/javascript/template/src/app.jsx +43 -0
  80. data/bundle-standalone/templates/javascript/preactjs/javascript/template/src/assets/preact.svg +1 -0
  81. data/bundle-standalone/templates/javascript/preactjs/javascript/template/src/index.css +68 -0
  82. data/bundle-standalone/templates/javascript/preactjs/javascript/template/src/main.jsx +5 -0
  83. data/bundle-standalone/templates/javascript/preactjs/javascript/template/vite.config.js +7 -0
  84. data/bundle-standalone/templates/javascript/preactjs/typescript/template/index.html +13 -0
  85. data/bundle-standalone/templates/javascript/preactjs/typescript/template/package.json +20 -0
  86. data/bundle-standalone/templates/javascript/preactjs/typescript/template/public/vite.svg +1 -0
  87. data/bundle-standalone/templates/javascript/preactjs/typescript/template/src/app.css +25 -0
  88. data/bundle-standalone/templates/javascript/preactjs/typescript/template/src/app.tsx +43 -0
  89. data/bundle-standalone/templates/javascript/preactjs/typescript/template/src/assets/preact.svg +1 -0
  90. data/bundle-standalone/templates/javascript/preactjs/typescript/template/src/index.css +68 -0
  91. data/bundle-standalone/templates/javascript/preactjs/typescript/template/src/main.tsx +5 -0
  92. data/bundle-standalone/templates/javascript/preactjs/typescript/template/tsconfig.app.json +33 -0
  93. data/bundle-standalone/templates/javascript/preactjs/typescript/template/tsconfig.json +7 -0
  94. data/bundle-standalone/templates/javascript/preactjs/typescript/template/tsconfig.node.json +26 -0
  95. data/bundle-standalone/templates/javascript/preactjs/typescript/template/vite.config.ts +7 -0
  96. data/bundle-standalone/templates/javascript/solidjs/javascript/template/README.md +28 -0
  97. data/bundle-standalone/templates/javascript/solidjs/javascript/template/index.html +13 -0
  98. data/bundle-standalone/templates/javascript/solidjs/javascript/template/package.json +18 -0
  99. data/bundle-standalone/templates/javascript/solidjs/javascript/template/public/vite.svg +1 -0
  100. data/bundle-standalone/templates/javascript/solidjs/javascript/template/src/App.css +27 -0
  101. data/bundle-standalone/templates/javascript/solidjs/javascript/template/src/App.jsx +35 -0
  102. data/bundle-standalone/templates/javascript/solidjs/javascript/template/src/assets/solid.svg +1 -0
  103. data/bundle-standalone/templates/javascript/solidjs/javascript/template/src/index.css +68 -0
  104. data/bundle-standalone/templates/javascript/solidjs/javascript/template/src/index.jsx +8 -0
  105. data/bundle-standalone/templates/javascript/solidjs/javascript/template/vite.config.js +6 -0
  106. data/bundle-standalone/templates/javascript/solidjs/typescript/template/README.md +28 -0
  107. data/bundle-standalone/templates/javascript/solidjs/typescript/template/index.html +13 -0
  108. data/bundle-standalone/templates/javascript/solidjs/typescript/template/package.json +20 -0
  109. data/bundle-standalone/templates/javascript/solidjs/typescript/template/public/vite.svg +1 -0
  110. data/bundle-standalone/templates/javascript/solidjs/typescript/template/src/App.css +27 -0
  111. data/bundle-standalone/templates/javascript/solidjs/typescript/template/src/App.tsx +35 -0
  112. data/bundle-standalone/templates/javascript/solidjs/typescript/template/src/assets/solid.svg +1 -0
  113. data/bundle-standalone/templates/javascript/solidjs/typescript/template/src/index.css +68 -0
  114. data/bundle-standalone/templates/javascript/solidjs/typescript/template/src/index.tsx +8 -0
  115. data/bundle-standalone/templates/javascript/solidjs/typescript/template/tsconfig.app.json +29 -0
  116. data/bundle-standalone/templates/javascript/solidjs/typescript/template/tsconfig.json +7 -0
  117. data/bundle-standalone/templates/javascript/solidjs/typescript/template/tsconfig.node.json +26 -0
  118. data/bundle-standalone/templates/javascript/solidjs/typescript/template/vite.config.ts +6 -0
  119. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/README.md +43 -0
  120. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/index.html +13 -0
  121. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/jsconfig.json +33 -0
  122. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/package.json +16 -0
  123. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/public/vite.svg +1 -0
  124. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/src/App.svelte +47 -0
  125. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/src/app.css +79 -0
  126. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/src/assets/svelte.svg +1 -0
  127. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/src/lib/Counter.svelte +10 -0
  128. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/src/main.js +9 -0
  129. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/svelte.config.js +8 -0
  130. data/bundle-standalone/templates/javascript/sveltejs/javascript/template/vite.config.js +7 -0
  131. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/README.md +47 -0
  132. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/index.html +13 -0
  133. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/package.json +21 -0
  134. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/public/vite.svg +1 -0
  135. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/src/App.svelte +47 -0
  136. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/src/app.css +79 -0
  137. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/src/assets/svelte.svg +1 -0
  138. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/src/lib/Counter.svelte +10 -0
  139. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/src/main.ts +9 -0
  140. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/svelte.config.js +8 -0
  141. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/tsconfig.app.json +21 -0
  142. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/tsconfig.json +7 -0
  143. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/tsconfig.node.json +26 -0
  144. data/bundle-standalone/templates/javascript/sveltejs/typescript/template/vite.config.ts +7 -0
  145. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/README.md +50 -0
  146. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/app/(tabs)/_layout.jsx +35 -0
  147. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/app/(tabs)/explore.jsx +112 -0
  148. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/app/(tabs)/index.jsx +98 -0
  149. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/app/_layout.jsx +24 -0
  150. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/app/modal.jsx +29 -0
  151. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/app.json +48 -0
  152. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/android-icon-background.png +0 -0
  153. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/android-icon-foreground.png +0 -0
  154. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/android-icon-monochrome.png +0 -0
  155. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/favicon.png +0 -0
  156. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/icon.png +0 -0
  157. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/partial-react-logo.png +0 -0
  158. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/react-logo.png +0 -0
  159. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/react-logo@2x.png +0 -0
  160. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/react-logo@3x.png +0 -0
  161. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/assets/images/splash-icon.png +0 -0
  162. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/external-link.jsx +25 -0
  163. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/haptic-tab.jsx +18 -0
  164. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/hello-wave.jsx +19 -0
  165. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/parallax-scroll-view.jsx +79 -0
  166. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/themed-text.jsx +60 -0
  167. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/themed-view.jsx +14 -0
  168. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/ui/collapsible.jsx +45 -0
  169. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/ui/icon-symbol.ios.jsx +32 -0
  170. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/components/ui/icon-symbol.jsx +41 -0
  171. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/constants/theme.js +53 -0
  172. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/eslint.config.js +10 -0
  173. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/hooks/use-color-scheme.js +1 -0
  174. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/hooks/use-color-scheme.web.js +21 -0
  175. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/hooks/use-theme-color.js +21 -0
  176. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/jsconfig.json +17 -0
  177. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/package.json +47 -0
  178. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/pnpm-workspace.yaml +1 -0
  179. data/bundle-standalone/templates/mobile/react-native/javascript/expo-cli-template/scripts/reset-project.js +112 -0
  180. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/README.md +50 -0
  181. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/app/(tabs)/_layout.tsx +35 -0
  182. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/app/(tabs)/explore.tsx +112 -0
  183. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/app/(tabs)/index.tsx +98 -0
  184. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/app/_layout.tsx +24 -0
  185. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/app/modal.tsx +29 -0
  186. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/app.json +48 -0
  187. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/android-icon-background.png +0 -0
  188. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/android-icon-foreground.png +0 -0
  189. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/android-icon-monochrome.png +0 -0
  190. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/favicon.png +0 -0
  191. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/icon.png +0 -0
  192. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/partial-react-logo.png +0 -0
  193. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/react-logo.png +0 -0
  194. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/react-logo@2x.png +0 -0
  195. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/react-logo@3x.png +0 -0
  196. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/assets/images/splash-icon.png +0 -0
  197. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/external-link.tsx +25 -0
  198. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/haptic-tab.tsx +18 -0
  199. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/hello-wave.tsx +19 -0
  200. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/parallax-scroll-view.tsx +79 -0
  201. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/themed-text.tsx +60 -0
  202. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/themed-view.tsx +14 -0
  203. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/ui/collapsible.tsx +45 -0
  204. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/ui/icon-symbol.ios.tsx +32 -0
  205. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/components/ui/icon-symbol.tsx +41 -0
  206. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/constants/theme.ts +53 -0
  207. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/eslint.config.js +10 -0
  208. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/hooks/use-color-scheme.ts +1 -0
  209. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/hooks/use-color-scheme.web.ts +21 -0
  210. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/hooks/use-theme-color.ts +21 -0
  211. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/package.json +47 -0
  212. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/pnpm-workspace.yaml +1 -0
  213. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/scripts/reset-project.js +112 -0
  214. data/bundle-standalone/templates/mobile/react-native/typescript/expo-cli-template/tsconfig.json +17 -0
  215. data/bundle-standalone/templates/python/bottle/template/README.md +0 -0
  216. data/bundle-standalone/templates/python/bottle/template/main.py +6 -0
  217. data/bundle-standalone/templates/python/bottle/template/pyproject.toml +7 -0
  218. data/bundle-standalone/templates/python/dash/template/README.md +0 -0
  219. data/bundle-standalone/templates/python/dash/template/main.py +6 -0
  220. data/bundle-standalone/templates/python/dash/template/pyproject.toml +7 -0
  221. data/bundle-standalone/templates/python/falcon/template/README.md +0 -0
  222. data/bundle-standalone/templates/python/falcon/template/main.py +6 -0
  223. data/bundle-standalone/templates/python/falcon/template/pyproject.toml +7 -0
  224. data/bundle-standalone/templates/python/fastapi/template/README.md +0 -0
  225. data/bundle-standalone/templates/python/fastapi/template/main.py +27 -0
  226. data/bundle-standalone/templates/python/fastapi/template/pyproject.toml +7 -0
  227. data/bundle-standalone/templates/python/pyramid/template/README.md +0 -0
  228. data/bundle-standalone/templates/python/pyramid/template/main.py +6 -0
  229. data/bundle-standalone/templates/python/pyramid/template/pyproject.toml +7 -0
  230. data/bundle-standalone/templates/python/quart/template/README.md +0 -0
  231. data/bundle-standalone/templates/python/quart/template/main.py +6 -0
  232. data/bundle-standalone/templates/python/quart/template/pyproject.toml +7 -0
  233. data/bundle-standalone/templates/python/streamlit/template/README.md +0 -0
  234. data/bundle-standalone/templates/python/streamlit/template/main.py +6 -0
  235. data/bundle-standalone/templates/python/streamlit/template/pyproject.toml +7 -0
  236. data/bundle-standalone/templates/python/tornado/template/README.md +0 -0
  237. data/bundle-standalone/templates/python/tornado/template/main.py +6 -0
  238. data/bundle-standalone/templates/python/tornado/template/pyproject.toml +7 -0
  239. data/bundle-standalone/templates/template.json +87 -14
  240. data/bundle-standalone/templates/web3/anchor/template/Anchor.toml +6 -0
  241. data/bundle-standalone/templates/web3/anchor/template/Cargo.toml +23 -0
  242. data/bundle-standalone/templates/web3/anchor/template/README.md +10 -0
  243. data/bundle-standalone/templates/web3/anchor/template/migrations/deploy.ts +27 -0
  244. data/bundle-standalone/templates/web3/anchor/template/programs/mysolanaapp/src/lib.rs +40 -0
  245. data/bundle-standalone/templates/web3/anchor/template/tests/mysolanaapp.ts +26 -0
  246. data/bundle-standalone/templates/web3/ethersjs/template/README.md +12 -0
  247. data/bundle-standalone/templates/web3/ethersjs/template/contracts/SimpleStorage.sol +17 -0
  248. data/bundle-standalone/templates/web3/ethersjs/template/hardhat.config.js +8 -0
  249. data/bundle-standalone/templates/web3/ethersjs/template/package.json +29 -0
  250. data/bundle-standalone/templates/web3/ethersjs/template/scripts/deploy.ts +18 -0
  251. data/bundle-standalone/templates/web3/ethersjs/template/scripts/interact.ts +17 -0
  252. data/bundle-standalone/templates/web3/solidity/solidity-learning/01_data-types/DataTypes.sol +37 -0
  253. data/bundle-standalone/templates/web3/solidity/solidity-learning/01_data-types/SolidityOperations.sol +48 -0
  254. data/bundle-standalone/templates/web3/solidity/solidity-learning/02_contructors/Constructor.sol +16 -0
  255. data/bundle-standalone/templates/web3/solidity/solidity-learning/03_variables/Variables.sol +31 -0
  256. data/bundle-standalone/templates/web3/solidity/solidity-learning/04_functions/Functions.sol +19 -0
  257. data/bundle-standalone/templates/web3/solidity/solidity-learning/05_visibility/FunctionVisibility.sol +39 -0
  258. data/bundle-standalone/templates/web3/solidity/solidity-learning/06_pure_and_view_functions/PureAndViewFunction.sol +19 -0
  259. data/bundle-standalone/templates/web3/solidity/solidity-learning/07_function_modifiers/Modifiers.sol +27 -0
  260. data/bundle-standalone/templates/web3/solidity/solidity-learning/09_events/Events.sol +19 -0
  261. data/bundle-standalone/templates/web3/solidity/solidity-learning/10_error_handling/ErrorHandling.sol +25 -0
  262. data/bundle-standalone/templates/web3/solidity/solidity-learning/11_fallback_function/Fallback.sol +7 -0
  263. data/bundle-standalone/templates/web3/solidity/solidity-learning/12_for_loop/ForLoop.sol +15 -0
  264. data/bundle-standalone/templates/web3/solidity/solidity-learning/13_array/Array.sol +40 -0
  265. data/bundle-standalone/templates/web3/solidity/solidity-learning/14_mapping/Mapping.sol +21 -0
  266. data/bundle-standalone/templates/web3/solidity/solidity-learning/14_mapping/NestedMapping.sol +25 -0
  267. data/bundle-standalone/templates/web3/solidity/solidity-learning/15_enum/Enum.sol +22 -0
  268. data/bundle-standalone/templates/web3/solidity/solidity-learning/16_struct/Struct.sol +23 -0
  269. data/bundle-standalone/templates/web3/solidity/solidity-learning/17_payable_modifier/Payable.sol +26 -0
  270. data/bundle-standalone/templates/web3/solidity/solidity-learning/18_imports/Contract1.sol +15 -0
  271. data/bundle-standalone/templates/web3/solidity/solidity-learning/18_imports/Contract2.sol +11 -0
  272. data/bundle-standalone/templates/web3/solidity/solidity-learning/19_contract_cleanup/Cleanup.sol +18 -0
  273. data/bundle-standalone/templates/web3/solidity/solidity-learning/20_memory_and_storage/MemoryAndStorage.sol +20 -0
  274. data/bundle-standalone/templates/web3/solidity/solidity-learning/21_inheritance/Inheritance.sol +67 -0
  275. data/bundle-standalone/templates/web3/solidity/solidity-learning/22_if_statement/if-statement.sol +22 -0
  276. data/bundle-standalone/templates/web3/solidity/solidity-learning/23_libraries/libraries.sol +31 -0
  277. data/bundle-standalone/templates/web3/solidity/solidity-learning/23_libraries/safemath.sol +116 -0
  278. data/bundle-standalone/templates/web3/solidity/solidity-learning/24_interface/interface.sol +88 -0
  279. data/bundle-standalone/templates/web3/solidity/solidity-learning/README.md +423 -0
  280. data/bundle-standalone/templates/web3/solidity/uniswap-simple-swap/SimpleSwap.sol +46 -0
  281. metadata +369 -93
  282. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/App.jsx +0 -0
  283. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/Gemfile +0 -0
  284. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/README.md +0 -0
  285. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/__tests__/App.test.tsx +0 -0
  286. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/build.gradle +0 -0
  287. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/debug.keystore +0 -0
  288. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/proguard-rules.pro +0 -0
  289. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/AndroidManifest.xml +0 -0
  290. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/java/com/template/MainActivity.kt +0 -0
  291. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/java/com/template/MainApplication.kt +0 -0
  292. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -0
  293. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  294. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  295. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  296. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  297. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  298. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  299. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  300. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  301. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  302. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  303. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/values/strings.xml +0 -0
  304. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/app/src/main/res/values/styles.xml +0 -0
  305. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/build.gradle +0 -0
  306. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  307. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/gradle/wrapper/gradle-wrapper.properties +0 -0
  308. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/gradle.properties +0 -0
  309. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/gradlew +0 -0
  310. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/gradlew.bat +0 -0
  311. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/android/settings.gradle +0 -0
  312. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/app.json +0 -0
  313. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/babel.config.js +0 -0
  314. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/index.js +0 -0
  315. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/Podfile +0 -0
  316. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template/AppDelegate.swift +0 -0
  317. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
  318. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template/Images.xcassets/Contents.json +0 -0
  319. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template/Info.plist +0 -0
  320. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template/LaunchScreen.storyboard +0 -0
  321. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template/PrivacyInfo.xcprivacy +0 -0
  322. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template.xcodeproj/project.pbxproj +0 -0
  323. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/ios/template.xcodeproj/xcshareddata/xcschemes/template.xcscheme +0 -0
  324. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/jest.config.js +0 -0
  325. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/metro.config.js +0 -0
  326. /data/bundle-standalone/templates/mobile/react-native/javascript/{template → react-native-cli-template}/package.json +0 -0
  327. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/App.tsx +0 -0
  328. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/Gemfile +0 -0
  329. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/README.md +0 -0
  330. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/__tests__/App.test.tsx +0 -0
  331. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/build.gradle +0 -0
  332. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/debug.keystore +0 -0
  333. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/proguard-rules.pro +0 -0
  334. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/AndroidManifest.xml +0 -0
  335. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/java/com/template/MainActivity.kt +0 -0
  336. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/java/com/template/MainApplication.kt +0 -0
  337. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -0
  338. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  339. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  340. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  341. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  342. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  343. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  344. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  345. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  346. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  347. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  348. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/values/strings.xml +0 -0
  349. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/app/src/main/res/values/styles.xml +0 -0
  350. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/build.gradle +0 -0
  351. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  352. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/gradle/wrapper/gradle-wrapper.properties +0 -0
  353. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/gradle.properties +0 -0
  354. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/gradlew +0 -0
  355. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/gradlew.bat +0 -0
  356. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/android/settings.gradle +0 -0
  357. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/app.json +0 -0
  358. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/babel.config.js +0 -0
  359. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/index.js +0 -0
  360. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/Podfile +0 -0
  361. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template/AppDelegate.swift +0 -0
  362. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template/Images.xcassets/AppIcon.appiconset/Contents.json +0 -0
  363. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template/Images.xcassets/Contents.json +0 -0
  364. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template/Info.plist +0 -0
  365. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template/LaunchScreen.storyboard +0 -0
  366. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template/PrivacyInfo.xcprivacy +0 -0
  367. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template.xcodeproj/project.pbxproj +0 -0
  368. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/ios/template.xcodeproj/xcshareddata/xcschemes/template.xcscheme +0 -0
  369. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/jest.config.js +0 -0
  370. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/metro.config.js +0 -0
  371. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/package.json +0 -0
  372. /data/bundle-standalone/templates/mobile/react-native/typescript/{template → react-native-cli-template}/tsconfig.json +0 -0
@@ -0,0 +1,40 @@
1
+ use anchor_lang::prelude::*;
2
+
3
+ declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS");
4
+
5
+ #[program]
6
+ pub mod mysolanaapp {
7
+ use super::*;
8
+
9
+ pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
10
+ let account = &mut ctx.accounts.base_account;
11
+ account.data = 42;
12
+ Ok(())
13
+ }
14
+
15
+ pub fn update(ctx: Context<Update>, data: u64) -> Result<()> {
16
+ let account = &mut ctx.accounts.base_account;
17
+ account.data = data;
18
+ Ok(())
19
+ }
20
+ }
21
+
22
+ #[derive(Accounts)]
23
+ pub struct Initialize<'info> {
24
+ #[account(init, payer = user, space = 8 + 8)]
25
+ pub base_account: Account<'info, BaseAccount>,
26
+ #[account(mut)]
27
+ pub user: Signer<'info>,
28
+ pub system_program: Program<'info, System>,
29
+ }
30
+
31
+ #[derive(Accounts)]
32
+ pub struct Update<'info> {
33
+ #[account(mut)]
34
+ pub base_account: Account<'info, BaseAccount>,
35
+ }
36
+
37
+ #[account]
38
+ pub struct BaseAccount {
39
+ pub data: u64,
40
+ }
@@ -0,0 +1,26 @@
1
+ import * as anchor from "@coral-xyz/anchor";
2
+ import { Program } from "@coral-xyz/anchor";
3
+ import { Mysolanaapp } from "../target/types/mysolanaapp";
4
+ import assert from "assert";
5
+
6
+ describe("mysolanaapp", () => {
7
+ const provider = anchor.AnchorProvider.env();
8
+ anchor.setProvider(provider);
9
+
10
+ const program = anchor.workspace.Mysolanaapp as Program<Mysolanaapp>;
11
+ const baseAccount = anchor.web3.Keypair.generate();
12
+
13
+ it("Initialize the account!", async () => {
14
+ await program.methods.initialize()
15
+ .accounts({
16
+ baseAccount: baseAccount.publicKey,
17
+ user: provider.wallet.publicKey,
18
+ systemProgram: anchor.web3.SystemProgram.programId,
19
+ })
20
+ .signers([baseAccount])
21
+ .rpc();
22
+
23
+ const account = await program.account.baseAccount.fetch(baseAccount.publicKey);
24
+ assert.ok(account.data.eq(new anchor.BN(42)));
25
+ });
26
+ });
@@ -0,0 +1,12 @@
1
+ # Ethers.js + Solidity Template
2
+
3
+ This template includes:
4
+ - A basic Solidity contract (SimpleStorage)
5
+ - Deployment and interaction scripts using Ethers.js
6
+
7
+ ## Setup
8
+ ```bash
9
+ npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox ethers
10
+ npx hardhat compile
11
+ node scripts/deploy.js
12
+ node scripts/interact.js
@@ -0,0 +1,17 @@
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity ^0.8.20;
3
+
4
+ contract SimpleStorage {
5
+ uint256 private data;
6
+
7
+ event DataUpdated(uint256 newValue);
8
+
9
+ function set(uint256 _data) public {
10
+ data = _data;
11
+ emit DataUpdated(_data);
12
+ }
13
+
14
+ function get() public view returns (uint256) {
15
+ return data;
16
+ }
17
+ }
@@ -0,0 +1,8 @@
1
+ import "@nomicfoundation/hardhat-toolbox";
2
+
3
+ export default {
4
+ solidity: "0.8.20",
5
+ networks: {
6
+ hardhat: {},
7
+ },
8
+ };
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "ethersjs-web3-template",
3
+ "version": "1.0.0",
4
+ "description": "A simple template for Web3 projects using Ethers.js",
5
+ "main": "index.js",
6
+ "type": "module",
7
+ "scripts": {
8
+ "start": "node index.js",
9
+ "dev": "nodemon index.js",
10
+ "test": "echo \"No test specified\" && exit 0"
11
+ },
12
+ "keywords": [
13
+ "web3",
14
+ "ethers",
15
+ "ethereum",
16
+ "smart-contract",
17
+ "blockchain",
18
+ "template"
19
+ ],
20
+ "author": "Sharique Chaudhary",
21
+ "license": "MIT",
22
+ "dependencies": {
23
+ "ethers": "^6.13.0",
24
+ "dotenv": "^16.4.5"
25
+ },
26
+ "devDependencies": {
27
+ "nodemon": "^3.1.0"
28
+ }
29
+ }
@@ -0,0 +1,18 @@
1
+ import { ethers } from "ethers";
2
+ import fs from "fs";
3
+ import path from "path";
4
+
5
+ const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545");
6
+ const wallet = new ethers.Wallet("YOUR_PRIVATE_KEY_HERE", provider);
7
+
8
+ const contractPath = path.resolve("artifacts/contracts/SimpleStorage.sol/SimpleStorage.json");
9
+ const contractJSON = JSON.parse(fs.readFileSync(contractPath, "utf8"));
10
+
11
+ async function main() {
12
+ const factory = new ethers.ContractFactory(contractJSON.abi, contractJSON.bytecode, wallet);
13
+ const contract = await factory.deploy();
14
+ await contract.waitForDeployment();
15
+ console.log("Contract deployed to:", contract.target);
16
+ }
17
+
18
+ main().catch(console.error);
@@ -0,0 +1,17 @@
1
+ import { ethers } from "ethers";
2
+
3
+ const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545");
4
+ const contractAddress = "DEPLOYED_CONTRACT_ADDRESS";
5
+ const abi = [
6
+ "function set(uint256 _data) public",
7
+ "function get() public view returns (uint256)"
8
+ ];
9
+
10
+ const contract = new ethers.Contract(contractAddress, abi, provider);
11
+
12
+ async function readData() {
13
+ const value = await contract.get();
14
+ console.log("Stored value:", value.toString());
15
+ }
16
+
17
+ readData();
@@ -0,0 +1,37 @@
1
+ pragma solidity ^0.8.0;
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ contract DataTypes {
5
+ // Boolean
6
+ bool public isTrue = true;
7
+
8
+ // Integer
9
+ int public myInt = -42; // int8 to int256
10
+ uint public myUint = 42; // uint8 to uint256
11
+
12
+ // Address
13
+ // this is my metamask ethereum public key
14
+ // you can me some ethereum
15
+ address public myAddress = 0x42B603B561606Af0FeE2eE10316bEA96722a060d;
16
+
17
+ // Bytes
18
+ bytes1 public myBytes1 = 0x12;
19
+ bytes32 public myBytes32 = 0x1234567890123456789012345678901234567890123456789012345678901234;
20
+
21
+ // String
22
+ string public myString = "Hello, Solidity!";
23
+
24
+ // Array
25
+ uint[] public myArray = [1, 2, 3, 4, 5];
26
+
27
+ // Struct
28
+ struct Person {
29
+ string name;
30
+ uint age;
31
+ }
32
+ Person public person = Person("Alice", 30);
33
+
34
+ // Enum
35
+ enum Status { Pending, Active, Inactive }
36
+ Status public status = Status.Active;
37
+ }
@@ -0,0 +1,48 @@
1
+ pragma solidity ^0.8.0;
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ contract Operations {
5
+ // Arithmetic Operations
6
+ uint256 public variable_add = 70;
7
+ uint256 public variable_sub = 50;
8
+ uint256 public variable_mul = 25;
9
+ uint256 public variable_div = 80;
10
+ uint256 public variable_mod = 68;
11
+
12
+ function getResults() public {
13
+ variable_add += 25;
14
+ variable_sub -= 30;
15
+ variable_mul *= 25;
16
+ variable_div /= 5;
17
+ variable_mod %= 60;
18
+ return;
19
+ }
20
+
21
+ uint256 public a = 10;
22
+ uint256 public b = 90;
23
+ // Comparison Operations
24
+ function isEqual(uint256 x, uint256 y) public pure returns (bool) {
25
+ return x == y;
26
+ }
27
+
28
+ function isGreater(uint256 x, uint256 y) public pure returns (bool) {
29
+ return x > y;
30
+ }
31
+
32
+ function isLess(uint256 x, uint256 y) public pure returns (bool) {
33
+ return x < y;
34
+ }
35
+
36
+ // Logical Operations
37
+ function and(bool x, bool y) public pure returns (bool) {
38
+ return x && y;
39
+ }
40
+
41
+ function or(bool x, bool y) public pure returns (bool) {
42
+ return x || y;
43
+ }
44
+
45
+ function not(bool x) public pure returns (bool) {
46
+ return !x;
47
+ }
48
+ }
@@ -0,0 +1,16 @@
1
+ pragma solidity ^0.8.0;
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ contract Constructor {
5
+ uint256 public x;
6
+ uint256 public y;
7
+ address public owner;
8
+ uint256 public createdAt;
9
+
10
+ constructor(uint256 _x, uint256 _y) {
11
+ x = _x;
12
+ y = _y;
13
+ owner = msg.sender;
14
+ createdAt = block.timestamp;
15
+ }
16
+ }
@@ -0,0 +1,31 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/variables-in-solidity-smart-contracts/
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract SampleContract {
8
+ //state variable of data type unint declared called "storedData"
9
+ //Data in this variable will be saved to the block chain
10
+ uint256 public storedData;
11
+
12
+ function getResult() public pure returns (uint256) {
13
+ //local variable
14
+ uint256 a = 7;
15
+ //local variable
16
+ uint256 b = 3;
17
+ uint256 result = a + b;
18
+ //access the local variable
19
+ return result;
20
+ }
21
+
22
+ function getSenderOfTransaction() public view returns (address) {
23
+ //access global variables
24
+ return msg.sender;
25
+ }
26
+
27
+ function getChainId() public view returns (uint256) {
28
+ //access global variables
29
+ return block.chainid;
30
+ }
31
+ }
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/functions
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ string private name;
9
+
10
+ //Functions that create transaction on block chain
11
+ function setName(string memory newName) public {
12
+ name = newName;
13
+ }
14
+
15
+ //Functions that do not create transaction on block chain (view and pure)
16
+ function getName() public view returns (string memory) {
17
+ return name;
18
+ }
19
+ }
@@ -0,0 +1,39 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/visibility
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ // Private – A private function/state variable is only available inside the contract that defines it. It is generally good practice to keep functions private.
9
+ // Internal – A internal function/state variable is only available inside the contract that defines it AND any contracts that inherit it
10
+ // External – An external function can only be called by external contacts. Not visible inside the contract that defines it.
11
+ // Public – A public function/state variable is available to any contract or third party that wants to call it. Public is the default if visibility is not specified.
12
+
13
+ // private state variable
14
+ string private name;
15
+ uint256 internal age = 35;
16
+ string public id = "123";
17
+
18
+ // public function
19
+ function setName(string memory newName) public {
20
+ name = newName;
21
+ }
22
+
23
+ // public function
24
+ function getName() public view returns (string memory) {
25
+ return name;
26
+ }
27
+
28
+ function getAge() public view returns (uint256) {
29
+ return privateFunction();
30
+ }
31
+
32
+ function privateFunction() private view returns (uint256) {
33
+ return age;
34
+ }
35
+
36
+ function externalFunction() external pure returns (string memory) {
37
+ return "external-function";
38
+ }
39
+ }
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/pure-and-view
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ string private name = "John Doe";
9
+
10
+ // View functions are read only functions and do not modify the state of the block chain. In other words if you want to read data from the block chain one can use view.
11
+ function getName() public view returns (string memory) {
12
+ return name;
13
+ }
14
+
15
+ // Pure functions are more restrictive then view functions and do not modify the state AND do not read the state of the block chain.
16
+ function sum(int256 a, int256 b) public pure returns (int256) {
17
+ return a + b;
18
+ }
19
+ }
@@ -0,0 +1,27 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/function-modifiers
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ address public owner;
9
+ string private name;
10
+
11
+ constructor() {
12
+ owner = msg.sender;
13
+ }
14
+
15
+ modifier onlyOwner() {
16
+ require(msg.sender == owner, "Not owner");
17
+ _;
18
+ }
19
+
20
+ function setName(string memory newName) public onlyOwner {
21
+ name = newName;
22
+ }
23
+
24
+ function getName() public view returns (string memory) {
25
+ return name;
26
+ }
27
+ }
@@ -0,0 +1,19 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/events
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ string private name;
9
+
10
+
11
+ // event declaration
12
+ event nameEvent(string newName);
13
+
14
+ function setName(string memory newName) public {
15
+ name = newName;
16
+ // event emit
17
+ emit nameEvent(newName);
18
+ }
19
+ }
@@ -0,0 +1,25 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/error-handling
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ // Assert – is used to check for conditions that should never be possible. Asserts should always evaluate to true and should never fail. If it does fail then there is a bug in the code and the assert will use up all gas and the transaction will be rolled back.
9
+ // Require – Is used to evaluate inputs, preconditions and outputs of functions. If not true solidity with throw an error and fail. The require statement will accept an optional error message. If there is a failure it will NOT use up all gas.
10
+ // Revert – Is similar to require but only takes one argument which is the error message. Revert might be better to use when the condition to check is complex.
11
+ uint256 public balance;
12
+
13
+ function deposit(uint256 amount) public {
14
+ uint256 oldBalance = balance;
15
+ uint256 newBalance = balance + amount;
16
+ require(newBalance >= oldBalance, "Overflow");
17
+
18
+ balance += amount;
19
+ assert(balance >= amount);
20
+
21
+ if (balance < amount) {
22
+ revert("underflow");
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,7 @@
1
+ pragma solidity ^0.8.0;
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ contract FallbackFunctions {
5
+ fallback() external payable {}
6
+
7
+ }
@@ -0,0 +1,15 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/for-loop
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ uint256 public loopCount;
9
+
10
+ function doLoop(uint256 n) public {
11
+ for (uint256 i = 0; i < n; i++) {
12
+ loopCount += 1;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,40 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/array
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ uint256[] public myArray; //this is a dynamic array of type uint
9
+ uint256[] public myArray2 = [1, 2, 3, 4]; //this is a dynamic array with 1, 2 and 3 as default values
10
+ uint256[10] public myFixedSizeArray; //this is a fixed size array of type uint
11
+
12
+ uint256[] intergerArray; //sample array of integers
13
+ bool[] boolArray; //sample array of booleans
14
+ address[] addressArray; //sample array of address
15
+
16
+ function pushIsToAdd(uint256 i) public {
17
+ myArray.push(i);
18
+ }
19
+
20
+ function getItemInArray(uint256 index) public view returns (uint256) {
21
+ return myArray[index];
22
+ }
23
+
24
+ function updateTheArray(uint256 locationInArray, uint256 valueToChange) public {
25
+ myArray[locationInArray] = valueToChange;
26
+ }
27
+
28
+ function remove(uint256 index) public {
29
+ delete myArray[index];
30
+ }
31
+
32
+ function removeAndCompact(uint256 index) public {
33
+ myArray[index] = myArray[myArray.length - 1];
34
+ myArray.pop();
35
+ }
36
+
37
+ function getLength() public view returns (uint256) {
38
+ return myArray.length;
39
+ }
40
+ }
@@ -0,0 +1,21 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/how-to-create-a-map-in-a-solidity-smart-contract/
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ mapping(address => bool) public myMap; // mapping syntax
9
+
10
+ function set(address _addr, bool i) public {
11
+ myMap[_addr] = i;
12
+ }
13
+
14
+ function get(address _addr) public view returns (bool) {
15
+ return myMap[_addr];
16
+ }
17
+
18
+ function remove(address _addr) public {
19
+ delete myMap[_addr];
20
+ }
21
+ }
@@ -0,0 +1,25 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/how-to-create-a-map-in-a-solidity-smart-contract/
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract NestedMapsContract {
8
+ mapping(address => mapping(address => uint256)) public allowance; // nested mapping syntax
9
+
10
+ function get(address _addressOwner, address _addressSpender) public view returns (uint256) {
11
+ return allowance[_addressOwner][_addressSpender];
12
+ }
13
+
14
+ function set(
15
+ address _addressOwner,
16
+ address _addressSpender,
17
+ uint256 amount
18
+ ) public {
19
+ allowance[_addressOwner][_addressSpender] = amount;
20
+ }
21
+
22
+ function remove(address _addressOwner, address _addressSpender) public {
23
+ delete allowance[_addressOwner][_addressSpender];
24
+ }
25
+ }
@@ -0,0 +1,22 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/enum
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ enum Status {
9
+ Pending,
10
+ Shipped,
11
+ Accepted,
12
+ Rejected,
13
+ Canceled
14
+ }
15
+
16
+ Status public status;
17
+
18
+ function ship() public {
19
+ require(status == Status.Pending);
20
+ status = Status.Shipped;
21
+ }
22
+ }
@@ -0,0 +1,23 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/struct
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ struct Todo {
9
+ string text;
10
+ bool completed;
11
+ }
12
+
13
+ Todo[] public todos;
14
+
15
+ function create(string memory _text) public {
16
+ todos.push(Todo(_text, false));
17
+ }
18
+
19
+ function get(uint256 _index) public view returns (string memory, bool) {
20
+ Todo storage todo = todos[_index];
21
+ return (todo.text, todo.completed);
22
+ }
23
+ }
@@ -0,0 +1,26 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/payable-functions
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ contract MyContract {
8
+ address payable public owner;
9
+
10
+ constructor() payable {
11
+ owner = payable(msg.sender);
12
+ }
13
+
14
+ modifier onlyOwner() {
15
+ require(msg.sender == owner, "Not owner");
16
+ _;
17
+ }
18
+
19
+ function withdraw(uint256 amount) public onlyOwner {
20
+ owner.transfer(amount);
21
+ }
22
+
23
+ function transfer(address payable _to, uint256 amount) public onlyOwner {
24
+ _to.transfer(amount);
25
+ }
26
+ }
@@ -0,0 +1,15 @@
1
+ // SPDX-License-Identifier: MIT
2
+ //
3
+ // https://cryptomarketpool.com/importing-into-a-contract
4
+
5
+ pragma solidity ^0.8.0;
6
+
7
+ import "./Contract2.sol";
8
+
9
+ contract MyContract {
10
+ Contract2 public contract2 = new Contract2();
11
+
12
+ function callOtherContract(uint256 a, uint256 b) public view returns (uint256) {
13
+ return contract2.sum(a, b);
14
+ }
15
+ }