create-dubhe 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/index.mjs +100 -0
  4. package/index.js +3 -0
  5. package/package.json +46 -0
  6. package/template/101/aptos-template/.dockerignore +7 -0
  7. package/template/101/aptos-template/.eslintrc.json +3 -0
  8. package/template/101/aptos-template/.prettierrc +8 -0
  9. package/template/101/aptos-template/Dockerfile +56 -0
  10. package/template/101/aptos-template/LICENSE +674 -0
  11. package/template/101/aptos-template/README.md +14 -0
  12. package/template/101/aptos-template/contracts/counter/Move.toml +16 -0
  13. package/template/101/aptos-template/contracts/counter/sources/codegen/eps/events.move +34 -0
  14. package/template/101/aptos-template/contracts/counter/sources/codegen/eps/world.move +65 -0
  15. package/template/101/aptos-template/contracts/counter/sources/codegen/init.move +17 -0
  16. package/template/101/aptos-template/contracts/counter/sources/codegen/schemas/counter.move +59 -0
  17. package/template/101/aptos-template/contracts/counter/sources/entity_key.move +31 -0
  18. package/template/101/aptos-template/contracts/counter/sources/script/deploy_hook.move +19 -0
  19. package/template/101/aptos-template/contracts/counter/sources/system/counter_system.move +11 -0
  20. package/template/101/aptos-template/dubhe.config.ts +13 -0
  21. package/template/101/aptos-template/jest.config.ts +17 -0
  22. package/template/101/aptos-template/next-env.d.ts +5 -0
  23. package/template/101/aptos-template/next-i18next.config.js +6 -0
  24. package/template/101/aptos-template/next.config.js +15 -0
  25. package/template/101/aptos-template/package.json +83 -0
  26. package/template/101/aptos-template/postcss.config.js +6 -0
  27. package/template/101/aptos-template/public/discord.svg +9 -0
  28. package/template/101/aptos-template/public/fail.svg +12 -0
  29. package/template/101/aptos-template/public/favicon.ico +0 -0
  30. package/template/101/aptos-template/public/locales/de/common.json +8 -0
  31. package/template/101/aptos-template/public/locales/de/footer.json +3 -0
  32. package/template/101/aptos-template/public/locales/de/second-page.json +5 -0
  33. package/template/101/aptos-template/public/locales/en/common.json +8 -0
  34. package/template/101/aptos-template/public/locales/en/footer.json +3 -0
  35. package/template/101/aptos-template/public/locales/en/second-page.json +5 -0
  36. package/template/101/aptos-template/public/locales/zn/common.json +8 -0
  37. package/template/101/aptos-template/public/locales/zn/footer.json +3 -0
  38. package/template/101/aptos-template/public/locales/zn/second-page.json +5 -0
  39. package/template/101/aptos-template/public/logo.svg +1 -0
  40. package/template/101/aptos-template/public/medium.svg +9 -0
  41. package/template/101/aptos-template/public/successful.svg +11 -0
  42. package/template/101/aptos-template/public/telegram.svg +9 -0
  43. package/template/101/aptos-template/public/twitter.svg +9 -0
  44. package/template/101/aptos-template/scripts/formatAccount.ts +35 -0
  45. package/template/101/aptos-template/scripts/generateAccount.ts +25 -0
  46. package/template/101/aptos-template/scripts/storeConfig.ts +54 -0
  47. package/template/101/aptos-template/src/chain/config.ts +7 -0
  48. package/template/101/aptos-template/src/css/font-awesome.css +2337 -0
  49. package/template/101/aptos-template/src/css/font-awesome.min.css +4 -0
  50. package/template/101/aptos-template/src/fonts/FontAwesome.otf +0 -0
  51. package/template/101/aptos-template/src/fonts/fontawesome-webfont.eot +0 -0
  52. package/template/101/aptos-template/src/fonts/fontawesome-webfont.svg +2671 -0
  53. package/template/101/aptos-template/src/fonts/fontawesome-webfont.ttf +0 -0
  54. package/template/101/aptos-template/src/fonts/fontawesome-webfont.woff +0 -0
  55. package/template/101/aptos-template/src/fonts/fontawesome-webfont.woff2 +0 -0
  56. package/template/101/aptos-template/src/jotai/index.tsx +12 -0
  57. package/template/101/aptos-template/src/pages/_app.tsx +9 -0
  58. package/template/101/aptos-template/src/pages/home/index.tsx +78 -0
  59. package/template/101/aptos-template/src/pages/index.tsx +12 -0
  60. package/template/101/aptos-template/tailwind.config.js +56 -0
  61. package/template/101/aptos-template/tsconfig.json +25 -0
  62. package/template/101/sui-template/.dockerignore +7 -0
  63. package/template/101/sui-template/.eslintrc.json +3 -0
  64. package/template/101/sui-template/.prettierrc +8 -0
  65. package/template/101/sui-template/Dockerfile +52 -0
  66. package/template/101/sui-template/LICENSE +674 -0
  67. package/template/101/sui-template/README.md +14 -0
  68. package/template/101/sui-template/contracts/counter/Move.toml +13 -0
  69. package/template/101/sui-template/contracts/counter/sources/codegen/dapp_key.move +16 -0
  70. package/template/101/sui-template/contracts/counter/sources/codegen/schemas/counter.move +50 -0
  71. package/template/101/sui-template/contracts/counter/sources/script/deploy_hook.move +67 -0
  72. package/template/101/sui-template/contracts/counter/sources/system/counter.move +11 -0
  73. package/template/101/sui-template/docker-compose.yaml +29 -0
  74. package/template/101/sui-template/dubhe.config.ts +14 -0
  75. package/template/101/sui-template/jest.config.ts +17 -0
  76. package/template/101/sui-template/localnet/dubhe-framework/Move.toml +39 -0
  77. package/template/101/sui-template/localnet/dubhe-framework/README.md +18 -0
  78. package/template/101/sui-template/localnet/dubhe-framework/sources/access_control.move +35 -0
  79. package/template/101/sui-template/localnet/dubhe-framework/sources/events.move +23 -0
  80. package/template/101/sui-template/localnet/dubhe-framework/sources/resource_id.move +22 -0
  81. package/template/101/sui-template/localnet/dubhe-framework/sources/resource_types.move +18 -0
  82. package/template/101/sui-template/localnet/dubhe-framework/sources/schema.move +36 -0
  83. package/template/101/sui-template/localnet/dubhe-framework/sources/schemas/dapps/dapps.move +73 -0
  84. package/template/101/sui-template/localnet/dubhe-framework/sources/schemas/dapps/metadata.move +96 -0
  85. package/template/101/sui-template/localnet/dubhe-framework/sources/storages/double_map.move +156 -0
  86. package/template/101/sui-template/localnet/dubhe-framework/sources/storages/map.move +159 -0
  87. package/template/101/sui-template/localnet/dubhe-framework/sources/storages/value.move +100 -0
  88. package/template/101/sui-template/localnet/dubhe-framework/sources/systems/dapps.move +90 -0
  89. package/template/101/sui-template/localnet/dubhe-framework/sources/world.move +81 -0
  90. package/template/101/sui-template/localnet/dubhe-framework/tests/dapp.move +16 -0
  91. package/template/101/sui-template/localnet/dubhe-framework/tests/init.move +6 -0
  92. package/template/101/sui-template/localnet/dubhe-framework/tests/obelisk_framework_tests.move +19 -0
  93. package/template/101/sui-template/localnet/dubhe-framework/tests/storage.move +398 -0
  94. package/template/101/sui-template/next-env.d.ts +5 -0
  95. package/template/101/sui-template/next-i18next.config.js +6 -0
  96. package/template/101/sui-template/next.config.js +15 -0
  97. package/template/101/sui-template/package.json +82 -0
  98. package/template/101/sui-template/postcss.config.js +6 -0
  99. package/template/101/sui-template/public/discord.svg +9 -0
  100. package/template/101/sui-template/public/fail.svg +12 -0
  101. package/template/101/sui-template/public/favicon.ico +0 -0
  102. package/template/101/sui-template/public/locales/de/common.json +8 -0
  103. package/template/101/sui-template/public/locales/de/footer.json +3 -0
  104. package/template/101/sui-template/public/locales/de/second-page.json +5 -0
  105. package/template/101/sui-template/public/locales/en/common.json +8 -0
  106. package/template/101/sui-template/public/locales/en/footer.json +3 -0
  107. package/template/101/sui-template/public/locales/en/second-page.json +5 -0
  108. package/template/101/sui-template/public/locales/zn/common.json +8 -0
  109. package/template/101/sui-template/public/locales/zn/footer.json +3 -0
  110. package/template/101/sui-template/public/locales/zn/second-page.json +5 -0
  111. package/template/101/sui-template/public/logo.svg +1 -0
  112. package/template/101/sui-template/public/medium.svg +9 -0
  113. package/template/101/sui-template/public/successful.svg +11 -0
  114. package/template/101/sui-template/public/telegram.svg +9 -0
  115. package/template/101/sui-template/public/twitter.svg +9 -0
  116. package/template/101/sui-template/scripts/checkBalance.ts +40 -0
  117. package/template/101/sui-template/scripts/deployment/common.ts +60 -0
  118. package/template/101/sui-template/scripts/deployment/localnet/deploy.ts +42 -0
  119. package/template/101/sui-template/scripts/deployment/testnet/deploy.ts +48 -0
  120. package/template/101/sui-template/scripts/deployment/types.ts +13 -0
  121. package/template/101/sui-template/scripts/framework/common.ts +17 -0
  122. package/template/101/sui-template/scripts/framework/deploy.ts +199 -0
  123. package/template/101/sui-template/scripts/framework/parse-history.ts +76 -0
  124. package/template/101/sui-template/scripts/framework/types.ts +8 -0
  125. package/template/101/sui-template/scripts/generateAccount.ts +55 -0
  126. package/template/101/sui-template/scripts/storeConfig.ts +61 -0
  127. package/template/101/sui-template/scripts/waitNode.ts +9 -0
  128. package/template/101/sui-template/src/chain/config.ts +7 -0
  129. package/template/101/sui-template/src/css/font-awesome.css +2337 -0
  130. package/template/101/sui-template/src/css/font-awesome.min.css +4 -0
  131. package/template/101/sui-template/src/fonts/FontAwesome.otf +0 -0
  132. package/template/101/sui-template/src/fonts/fontawesome-webfont.eot +0 -0
  133. package/template/101/sui-template/src/fonts/fontawesome-webfont.svg +2671 -0
  134. package/template/101/sui-template/src/fonts/fontawesome-webfont.ttf +0 -0
  135. package/template/101/sui-template/src/fonts/fontawesome-webfont.woff +0 -0
  136. package/template/101/sui-template/src/fonts/fontawesome-webfont.woff2 +0 -0
  137. package/template/101/sui-template/src/jotai/index.tsx +12 -0
  138. package/template/101/sui-template/src/pages/_app.tsx +9 -0
  139. package/template/101/sui-template/src/pages/home/index.tsx +82 -0
  140. package/template/101/sui-template/src/pages/index.tsx +14 -0
  141. package/template/101/sui-template/tailwind.config.js +56 -0
  142. package/template/101/sui-template/tsconfig.json +25 -0
  143. package/template/cocos/aptos-template/.creator/asset-template/typescript/Custom Script Template Help Documentation.url +2 -0
  144. package/template/cocos/aptos-template/README.md +11 -0
  145. package/template/cocos/aptos-template/assets/Scripts/aptos.ts +87 -0
  146. package/template/cocos/aptos-template/assets/Scripts/aptos.ts.meta +9 -0
  147. package/template/cocos/aptos-template/assets/Scripts/chain/config.ts +12 -0
  148. package/template/cocos/aptos-template/assets/Scripts/chain/config.ts.meta +9 -0
  149. package/template/cocos/aptos-template/assets/Scripts/chain/key.ts.meta +9 -0
  150. package/template/cocos/aptos-template/assets/Scripts/chain.meta +9 -0
  151. package/template/cocos/aptos-template/assets/Scripts/dubhe.config.ts +13 -0
  152. package/template/cocos/aptos-template/assets/Scripts/dubhe.config.ts.meta +9 -0
  153. package/template/cocos/aptos-template/assets/Scripts.meta +9 -0
  154. package/template/cocos/aptos-template/assets/lib/dubhe.js +22281 -0
  155. package/template/cocos/aptos-template/assets/lib/obelisk.js +22281 -0
  156. package/template/cocos/aptos-template/assets/lib/obelisk.js.meta +15 -0
  157. package/template/cocos/aptos-template/assets/lib.meta +12 -0
  158. package/template/cocos/aptos-template/assets/main.scene +875 -0
  159. package/template/cocos/aptos-template/assets/main.scene.meta +11 -0
  160. package/template/cocos/aptos-template/contracts/counter/Move.toml +16 -0
  161. package/template/cocos/aptos-template/contracts/counter/sources/codegen/eps/events.move +34 -0
  162. package/template/cocos/aptos-template/contracts/counter/sources/codegen/eps/world.move +65 -0
  163. package/template/cocos/aptos-template/contracts/counter/sources/codegen/init.move +17 -0
  164. package/template/cocos/aptos-template/contracts/counter/sources/codegen/schemas/counter.move +59 -0
  165. package/template/cocos/aptos-template/contracts/counter/sources/entity_key.move +31 -0
  166. package/template/cocos/aptos-template/contracts/counter/sources/script/deploy_hook.move +19 -0
  167. package/template/cocos/aptos-template/contracts/counter/sources/system/counter_system.move +11 -0
  168. package/template/cocos/aptos-template/package.json +39 -0
  169. package/template/cocos/aptos-template/scripts/formatAccount.ts +35 -0
  170. package/template/cocos/aptos-template/scripts/generateAccount.ts +25 -0
  171. package/template/cocos/aptos-template/scripts/storeConfig.ts +68 -0
  172. package/template/cocos/aptos-template/settings/v2/packages/builder.json +3 -0
  173. package/template/cocos/aptos-template/settings/v2/packages/cocos-service.json +23 -0
  174. package/template/cocos/aptos-template/settings/v2/packages/device.json +3 -0
  175. package/template/cocos/aptos-template/settings/v2/packages/engine.json +150 -0
  176. package/template/cocos/aptos-template/settings/v2/packages/information.json +23 -0
  177. package/template/cocos/aptos-template/settings/v2/packages/program.json +3 -0
  178. package/template/cocos/aptos-template/settings/v2/packages/project.json +3 -0
  179. package/template/cocos/aptos-template/tsconfig.json +12 -0
  180. package/template/cocos/sui-template/.creator/asset-template/typescript/Custom Script Template Help Documentation.url +2 -0
  181. package/template/cocos/sui-template/README.md +11 -0
  182. package/template/cocos/sui-template/assets/Scripts/chain/config.ts +12 -0
  183. package/template/cocos/sui-template/assets/Scripts/chain/config.ts.meta +9 -0
  184. package/template/cocos/sui-template/assets/Scripts/chain/key.ts.meta +9 -0
  185. package/template/cocos/sui-template/assets/Scripts/chain.meta +9 -0
  186. package/template/cocos/sui-template/assets/Scripts/dubhe.config.ts +13 -0
  187. package/template/cocos/sui-template/assets/Scripts/dubhe.config.ts.meta +9 -0
  188. package/template/cocos/sui-template/assets/Scripts/sui.ts +120 -0
  189. package/template/cocos/sui-template/assets/Scripts/sui.ts.meta +9 -0
  190. package/template/cocos/sui-template/assets/Scripts.meta +12 -0
  191. package/template/cocos/sui-template/assets/lib/dubhe.js +55694 -0
  192. package/template/cocos/sui-template/assets/lib/dubhe.js.meta +15 -0
  193. package/template/cocos/sui-template/assets/lib.meta +12 -0
  194. package/template/cocos/sui-template/assets/main.scene +875 -0
  195. package/template/cocos/sui-template/assets/main.scene.meta +11 -0
  196. package/template/cocos/sui-template/contracts/counter/Move.toml +13 -0
  197. package/template/cocos/sui-template/contracts/counter/sources/codegen/dapp_key.move +16 -0
  198. package/template/cocos/sui-template/contracts/counter/sources/codegen/schemas/counter.move +50 -0
  199. package/template/cocos/sui-template/contracts/counter/sources/script/deploy_hook.move +67 -0
  200. package/template/cocos/sui-template/contracts/counter/sources/system/counter.move +11 -0
  201. package/template/cocos/sui-template/docker-compose.yaml +18 -0
  202. package/template/cocos/sui-template/package.json +27 -0
  203. package/template/cocos/sui-template/scripts/generateAccount.ts +55 -0
  204. package/template/cocos/sui-template/scripts/storeConfig.ts +75 -0
  205. package/template/cocos/sui-template/settings/v2/packages/builder.json +3 -0
  206. package/template/cocos/sui-template/settings/v2/packages/cocos-service.json +23 -0
  207. package/template/cocos/sui-template/settings/v2/packages/device.json +3 -0
  208. package/template/cocos/sui-template/settings/v2/packages/engine.json +150 -0
  209. package/template/cocos/sui-template/settings/v2/packages/information.json +23 -0
  210. package/template/cocos/sui-template/settings/v2/packages/program.json +3 -0
  211. package/template/cocos/sui-template/settings/v2/packages/project.json +3 -0
  212. package/template/cocos/sui-template/tsconfig.json +19 -0
  213. package/template/nextjs/aptos-template/.dockerignore +7 -0
  214. package/template/nextjs/aptos-template/.eslintrc.json +3 -0
  215. package/template/nextjs/aptos-template/.prettierrc +8 -0
  216. package/template/nextjs/aptos-template/Dockerfile +56 -0
  217. package/template/nextjs/aptos-template/LICENSE +674 -0
  218. package/template/nextjs/aptos-template/README.md +13 -0
  219. package/template/nextjs/aptos-template/contracts/counter/Move.toml +16 -0
  220. package/template/nextjs/aptos-template/contracts/counter/sources/codegen/eps/events.move +34 -0
  221. package/template/nextjs/aptos-template/contracts/counter/sources/codegen/eps/world.move +65 -0
  222. package/template/nextjs/aptos-template/contracts/counter/sources/codegen/init.move +17 -0
  223. package/template/nextjs/aptos-template/contracts/counter/sources/codegen/schemas/counter.move +59 -0
  224. package/template/nextjs/aptos-template/contracts/counter/sources/entity_key.move +31 -0
  225. package/template/nextjs/aptos-template/contracts/counter/sources/script/deploy_hook.move +19 -0
  226. package/template/nextjs/aptos-template/contracts/counter/sources/system/counter_system.move +11 -0
  227. package/template/nextjs/aptos-template/dubhe.config.ts +13 -0
  228. package/template/nextjs/aptos-template/jest.config.ts +17 -0
  229. package/template/nextjs/aptos-template/next-env.d.ts +5 -0
  230. package/template/nextjs/aptos-template/next-i18next.config.js +6 -0
  231. package/template/nextjs/aptos-template/next.config.js +15 -0
  232. package/template/nextjs/aptos-template/package.json +82 -0
  233. package/template/nextjs/aptos-template/postcss.config.js +6 -0
  234. package/template/nextjs/aptos-template/public/discord.svg +9 -0
  235. package/template/nextjs/aptos-template/public/fail.svg +12 -0
  236. package/template/nextjs/aptos-template/public/favicon.ico +0 -0
  237. package/template/nextjs/aptos-template/public/locales/de/common.json +8 -0
  238. package/template/nextjs/aptos-template/public/locales/de/footer.json +3 -0
  239. package/template/nextjs/aptos-template/public/locales/de/second-page.json +5 -0
  240. package/template/nextjs/aptos-template/public/locales/en/common.json +8 -0
  241. package/template/nextjs/aptos-template/public/locales/en/footer.json +3 -0
  242. package/template/nextjs/aptos-template/public/locales/en/second-page.json +5 -0
  243. package/template/nextjs/aptos-template/public/locales/zn/common.json +8 -0
  244. package/template/nextjs/aptos-template/public/locales/zn/footer.json +3 -0
  245. package/template/nextjs/aptos-template/public/locales/zn/second-page.json +5 -0
  246. package/template/nextjs/aptos-template/public/logo.svg +1 -0
  247. package/template/nextjs/aptos-template/public/medium.svg +9 -0
  248. package/template/nextjs/aptos-template/public/successful.svg +11 -0
  249. package/template/nextjs/aptos-template/public/telegram.svg +9 -0
  250. package/template/nextjs/aptos-template/public/twitter.svg +9 -0
  251. package/template/nextjs/aptos-template/scripts/formatAccount.ts +35 -0
  252. package/template/nextjs/aptos-template/scripts/generateAccount.ts +25 -0
  253. package/template/nextjs/aptos-template/scripts/storeConfig.ts +54 -0
  254. package/template/nextjs/aptos-template/src/chain/config.ts +7 -0
  255. package/template/nextjs/aptos-template/src/components/Animation.tsx +80 -0
  256. package/template/nextjs/aptos-template/src/components/Container.tsx +11 -0
  257. package/template/nextjs/aptos-template/src/components/footer/index.tsx +138 -0
  258. package/template/nextjs/aptos-template/src/components/head/index.tsx +14 -0
  259. package/template/nextjs/aptos-template/src/components/header/index.tsx +173 -0
  260. package/template/nextjs/aptos-template/src/components/pop_up_box/index.tsx +149 -0
  261. package/template/nextjs/aptos-template/src/css/font-awesome.css +2337 -0
  262. package/template/nextjs/aptos-template/src/css/font-awesome.min.css +4 -0
  263. package/template/nextjs/aptos-template/src/fonts/FontAwesome.otf +0 -0
  264. package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.eot +0 -0
  265. package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.svg +2671 -0
  266. package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.ttf +0 -0
  267. package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.woff +0 -0
  268. package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.woff2 +0 -0
  269. package/template/nextjs/aptos-template/src/jotai/index.tsx +13 -0
  270. package/template/nextjs/aptos-template/src/pages/_app.tsx +32 -0
  271. package/template/nextjs/aptos-template/src/pages/home/index.tsx +112 -0
  272. package/template/nextjs/aptos-template/src/pages/index.tsx +15 -0
  273. package/template/nextjs/aptos-template/tailwind.config.js +59 -0
  274. package/template/nextjs/aptos-template/tsconfig.json +35 -0
  275. package/template/nextjs/sui-template/.dockerignore +7 -0
  276. package/template/nextjs/sui-template/.eslintrc.json +3 -0
  277. package/template/nextjs/sui-template/.prettierrc +8 -0
  278. package/template/nextjs/sui-template/Dockerfile +52 -0
  279. package/template/nextjs/sui-template/LICENSE +674 -0
  280. package/template/nextjs/sui-template/README.md +13 -0
  281. package/template/nextjs/sui-template/contracts/counter/Move.toml +13 -0
  282. package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp_key.move +16 -0
  283. package/template/nextjs/sui-template/contracts/counter/sources/codegen/schemas/counter.move +50 -0
  284. package/template/nextjs/sui-template/contracts/counter/sources/script/deploy_hook.move +67 -0
  285. package/template/nextjs/sui-template/contracts/counter/sources/system/counter.move +11 -0
  286. package/template/nextjs/sui-template/docker-compose.yaml +29 -0
  287. package/template/nextjs/sui-template/dubhe.config.ts +14 -0
  288. package/template/nextjs/sui-template/jest.config.ts +17 -0
  289. package/template/nextjs/sui-template/localnet/dubhe-framework/Move.toml +39 -0
  290. package/template/nextjs/sui-template/localnet/dubhe-framework/README.md +18 -0
  291. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/access_control.move +35 -0
  292. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/events.move +23 -0
  293. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/resource_id.move +22 -0
  294. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/resource_types.move +18 -0
  295. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/schema.move +36 -0
  296. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/schemas/dapps/dapps.move +73 -0
  297. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/schemas/dapps/metadata.move +96 -0
  298. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/storages/double_map.move +156 -0
  299. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/storages/map.move +159 -0
  300. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/storages/value.move +100 -0
  301. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/systems/dapps.move +90 -0
  302. package/template/nextjs/sui-template/localnet/dubhe-framework/sources/world.move +81 -0
  303. package/template/nextjs/sui-template/localnet/dubhe-framework/tests/dapp.move +16 -0
  304. package/template/nextjs/sui-template/localnet/dubhe-framework/tests/init.move +6 -0
  305. package/template/nextjs/sui-template/localnet/dubhe-framework/tests/obelisk_framework_tests.move +19 -0
  306. package/template/nextjs/sui-template/localnet/dubhe-framework/tests/storage.move +398 -0
  307. package/template/nextjs/sui-template/next-env.d.ts +5 -0
  308. package/template/nextjs/sui-template/next-i18next.config.js +6 -0
  309. package/template/nextjs/sui-template/next.config.js +15 -0
  310. package/template/nextjs/sui-template/package.json +84 -0
  311. package/template/nextjs/sui-template/postcss.config.js +6 -0
  312. package/template/nextjs/sui-template/public/discord.svg +9 -0
  313. package/template/nextjs/sui-template/public/fail.svg +12 -0
  314. package/template/nextjs/sui-template/public/favicon.ico +0 -0
  315. package/template/nextjs/sui-template/public/locales/de/common.json +8 -0
  316. package/template/nextjs/sui-template/public/locales/de/footer.json +3 -0
  317. package/template/nextjs/sui-template/public/locales/de/second-page.json +5 -0
  318. package/template/nextjs/sui-template/public/locales/en/common.json +8 -0
  319. package/template/nextjs/sui-template/public/locales/en/footer.json +3 -0
  320. package/template/nextjs/sui-template/public/locales/en/second-page.json +5 -0
  321. package/template/nextjs/sui-template/public/locales/zn/common.json +8 -0
  322. package/template/nextjs/sui-template/public/locales/zn/footer.json +3 -0
  323. package/template/nextjs/sui-template/public/locales/zn/second-page.json +5 -0
  324. package/template/nextjs/sui-template/public/logo.svg +1 -0
  325. package/template/nextjs/sui-template/public/medium.svg +9 -0
  326. package/template/nextjs/sui-template/public/successful.svg +11 -0
  327. package/template/nextjs/sui-template/public/telegram.svg +9 -0
  328. package/template/nextjs/sui-template/public/twitter.svg +9 -0
  329. package/template/nextjs/sui-template/scripts/checkBalance.ts +40 -0
  330. package/template/nextjs/sui-template/scripts/deployment/common.ts +60 -0
  331. package/template/nextjs/sui-template/scripts/deployment/localnet/deploy.ts +42 -0
  332. package/template/nextjs/sui-template/scripts/deployment/testnet/deploy.ts +48 -0
  333. package/template/nextjs/sui-template/scripts/deployment/types.ts +13 -0
  334. package/template/nextjs/sui-template/scripts/framework/common.ts +17 -0
  335. package/template/nextjs/sui-template/scripts/framework/deploy.ts +199 -0
  336. package/template/nextjs/sui-template/scripts/framework/parse-history.ts +76 -0
  337. package/template/nextjs/sui-template/scripts/framework/types.ts +8 -0
  338. package/template/nextjs/sui-template/scripts/generateAccount.ts +55 -0
  339. package/template/nextjs/sui-template/scripts/storeConfig.ts +61 -0
  340. package/template/nextjs/sui-template/scripts/waitNode.ts +9 -0
  341. package/template/nextjs/sui-template/src/chain/config.ts +7 -0
  342. package/template/nextjs/sui-template/src/components/Animation.tsx +80 -0
  343. package/template/nextjs/sui-template/src/components/Container.tsx +11 -0
  344. package/template/nextjs/sui-template/src/components/footer/index.tsx +138 -0
  345. package/template/nextjs/sui-template/src/components/head/index.tsx +14 -0
  346. package/template/nextjs/sui-template/src/components/header/index.tsx +173 -0
  347. package/template/nextjs/sui-template/src/components/pop_up_box/index.tsx +149 -0
  348. package/template/nextjs/sui-template/src/css/font-awesome.css +2337 -0
  349. package/template/nextjs/sui-template/src/css/font-awesome.min.css +4 -0
  350. package/template/nextjs/sui-template/src/fonts/FontAwesome.otf +0 -0
  351. package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.eot +0 -0
  352. package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.svg +2671 -0
  353. package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.ttf +0 -0
  354. package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.woff +0 -0
  355. package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.woff2 +0 -0
  356. package/template/nextjs/sui-template/src/jotai/index.tsx +13 -0
  357. package/template/nextjs/sui-template/src/pages/_app.tsx +32 -0
  358. package/template/nextjs/sui-template/src/pages/home/index.tsx +147 -0
  359. package/template/nextjs/sui-template/src/pages/index.tsx +15 -0
  360. package/template/nextjs/sui-template/tailwind.config.js +56 -0
  361. package/template/nextjs/sui-template/tsconfig.json +35 -0
@@ -0,0 +1,14 @@
1
+ ## How to use
2
+ ```bash
3
+
4
+ 1 install aptos <https://aptos.dev>
5
+ 2 cd quick_start folder
6
+ 3 pnpm install
7
+ 4 open new window && pnpm run localnode
8
+ 5 open new window && pnpm run start-template
9
+
10
+ environment : node v18.16.0 best
11
+ please use node -v check your node version
12
+ ```
13
+
14
+ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
@@ -0,0 +1,16 @@
1
+ [package]
2
+ name = "counter"
3
+ version = "1.0.0"
4
+ authors = []
5
+
6
+ [addresses]
7
+ counter = "_"
8
+
9
+ [dev-addresses]
10
+
11
+ [dependencies.AptosFramework]
12
+ git = "https://github.com/aptos-labs/aptos-core.git"
13
+ rev = "mainnet"
14
+ subdir = "aptos-move/framework/aptos-framework"
15
+
16
+ [dev-dependencies]
@@ -0,0 +1,34 @@
1
+ module counter::events {
2
+ use std::option::Option;
3
+ use aptos_framework::event;
4
+
5
+ #[event]
6
+ struct SchemaSetRecord<T: drop + store> has drop, store {
7
+ _dubhe_schema_id: vector<u8>,
8
+ _dubhe_schema_type: u8,
9
+ _dubhe_entity_key: Option<address>,
10
+ data: T
11
+ }
12
+
13
+ #[event]
14
+ struct SchemaRemoveRecord has drop, store {
15
+ _dubhe_schema_id: vector<u8>,
16
+ _dubhe_entity_key: address
17
+ }
18
+
19
+ public fun new_set_record_event<T: drop + store>(_dubhe_schema_id: vector<u8>, _dubhe_schema_type: u8, _dubhe_entity_key: Option<address>, data: T): SchemaSetRecord<T> {
20
+ SchemaSetRecord { _dubhe_schema_id, _dubhe_schema_type, _dubhe_entity_key, data }
21
+ }
22
+
23
+ public fun new_remove_record_event(_dubhe_schema_id: vector<u8>, _dubhe_entity_key: address): SchemaRemoveRecord {
24
+ SchemaRemoveRecord { _dubhe_schema_id, _dubhe_entity_key }
25
+ }
26
+
27
+ public fun emit_set<T: drop + store>(_dubhe_schema_id: vector<u8>, _dubhe_schema_type: u8, _dubhe_entity_key: Option<address>, data: T) {
28
+ event::emit(new_set_record_event<T>(_dubhe_schema_id, _dubhe_schema_type, _dubhe_entity_key, data));
29
+ }
30
+
31
+ public fun emit_remove(_dubhe_schema_id: vector<u8>, _dubhe_entity_key: address) {
32
+ event::emit(new_remove_record_event(_dubhe_schema_id, _dubhe_entity_key));
33
+ }
34
+ }
@@ -0,0 +1,65 @@
1
+ module counter::world {
2
+ use std::string::String;
3
+ use aptos_framework::account::{SignerCapability, create_signer_with_capability, get_signer_capability_address};
4
+ use aptos_framework::account;
5
+ use std::signer;
6
+
7
+ friend counter::init;
8
+ friend counter::counter_schema;
9
+ friend counter::deploy_hook;
10
+
11
+ const VERSION: u64 = 1;
12
+
13
+ /// Schema does not exist
14
+ const ESchemaDoesNotExist: u64 = 0;
15
+ /// Schema already exists
16
+ const ESchemaAlreadyExists: u64 = 1;
17
+ /// Not the right admin for this world
18
+ const ENotAdmin: u64 = 2;
19
+ /// Migration is not an upgrade
20
+ const ENotUpgrade: u64 = 3;
21
+ /// Calling functions from the wrong package version
22
+ const EWrongVersion: u64 = 4;
23
+
24
+ struct World has key {
25
+ /// Deployer
26
+ deployer: address,
27
+ /// Name of the world
28
+ name: String,
29
+ /// Description of the world
30
+ description: String,
31
+ /// Resource Capability of the world
32
+ resource_cap: SignerCapability
33
+ }
34
+
35
+ public(friend) fun create(deployer_signer: &signer, name: String, description: String) {
36
+ let deployer = signer::address_of(deployer_signer);
37
+ let (_, resource_cap) = account::create_resource_account(deployer_signer, b"Examples");
38
+ move_to(deployer_signer, World { deployer, name, description, resource_cap });
39
+ }
40
+
41
+ public(friend) fun resource_signer(): signer acquires World {
42
+ let _dubhe_world = borrow_global_mut<World>(@counter);
43
+ create_signer_with_capability(&_dubhe_world.resource_cap)
44
+ }
45
+
46
+ // ============================= View Function =============================
47
+
48
+ #[view]
49
+ public fun resource_address(): address acquires World {
50
+ let _dubhe_world = borrow_global_mut<World>(@counter);
51
+ get_signer_capability_address(&_dubhe_world.resource_cap)
52
+ }
53
+
54
+ #[view]
55
+ public fun deployer_address(): address acquires World {
56
+ let _dubhe_world = borrow_global_mut<World>(@counter);
57
+ _dubhe_world.deployer
58
+ }
59
+
60
+ #[view]
61
+ public fun info(): (String, String, address) acquires World {
62
+ let _dubhe_world = borrow_global_mut<World>(@counter);
63
+ (_dubhe_world.name, _dubhe_world.description, _dubhe_world.deployer)
64
+ }
65
+ }
@@ -0,0 +1,17 @@
1
+ module counter::init {
2
+ use std::string;
3
+ use counter::world;
4
+ use counter::counter_schema;
5
+
6
+ fun init_module(deployer: &signer) {
7
+ world::create(deployer, string::utf8(b"Examples"), string::utf8(b"Examples"));
8
+
9
+ // Add Schema
10
+ counter_schema::register(deployer);
11
+ }
12
+
13
+ #[test_only]
14
+ public fun init_world_for_test(deployer: &signer){
15
+ init_module(deployer)
16
+ }
17
+ }
@@ -0,0 +1,59 @@
1
+ module counter::counter_schema {
2
+ use std::option::none;
3
+ use std::signer::address_of;
4
+ use counter::events;
5
+ use counter::world;
6
+
7
+ // Systems
8
+ friend counter::counter_system;
9
+ friend counter::deploy_hook;
10
+
11
+ // value
12
+ struct CounterData has key {
13
+ value: u64
14
+ }
15
+
16
+ struct CounterDataEvent has drop, store {
17
+ value: u64
18
+ }
19
+
20
+ public fun new(value: u64): CounterData {
21
+ CounterData {
22
+ value
23
+ }
24
+ }
25
+
26
+ public fun register(deployer: &signer) {
27
+ assert!(address_of(deployer) == world::deployer_address(), 0);
28
+ let _dubhe_schema = new(0);
29
+ let resource_signer = world::resource_signer();
30
+ move_to(&resource_signer, _dubhe_schema)
31
+ }
32
+
33
+ public(friend) fun set( value: u64) acquires CounterData {
34
+ let _dubhe_resource_address = world::resource_address();
35
+ let _dubhe_schema = borrow_global_mut<CounterData>(_dubhe_resource_address);
36
+ _dubhe_schema.value = value;
37
+ events::emit_set(schema_id(), schema_type(), none(), CounterDataEvent { value });
38
+ }
39
+
40
+ #[view]
41
+ public fun get(): u64 acquires CounterData {
42
+ let _dubhe_resource_address = world::resource_address();
43
+ let _dubhe_schema = borrow_global<CounterData>(_dubhe_resource_address);
44
+ (
45
+ _dubhe_schema.value
46
+ )
47
+ }
48
+
49
+ #[view]
50
+ public fun schema_id(): vector<u8> {
51
+ b"counter"
52
+ }
53
+
54
+ #[view]
55
+ public fun schema_type(): u8 {
56
+ 1
57
+ }
58
+
59
+ }
@@ -0,0 +1,31 @@
1
+ module counter::entity_key {
2
+ use aptos_framework::util::address_from_bytes;
3
+ use aptos_framework::transaction_context::generate_auid_address;
4
+ use aptos_std::aptos_hash::keccak256;
5
+ use aptos_framework::account::create_resource_address;
6
+ use std::signer::address_of;
7
+ use std::bcs::to_bytes;
8
+ use std::vector;
9
+
10
+ public fun from_signer(signer: &signer): address {
11
+ address_of(signer)
12
+ }
13
+
14
+ public fun from_bytes(bytes: vector<u8>): address {
15
+ address_from_bytes(keccak256(bytes))
16
+ }
17
+
18
+ public fun from_u256(x: u256): address {
19
+ let vec = b"u256";
20
+ vector::append(&mut vec, to_bytes<u256>(&x));
21
+ address_from_bytes(keccak256(vec))
22
+ }
23
+
24
+ public fun from_address_with_seed(addr: address, seed: vector<u8>): address {
25
+ create_resource_address(&addr, seed)
26
+ }
27
+
28
+ public fun from_auid(): address {
29
+ generate_auid_address()
30
+ }
31
+ }
@@ -0,0 +1,19 @@
1
+ module counter::deploy_hook {
2
+ use counter::world;
3
+ use std::signer::address_of;
4
+
5
+ /// Not the right admin for this world
6
+ const ENotAdmin: u64 = 0;
7
+
8
+ public entry fun run(deployer: &signer) {
9
+ assert!( address_of(deployer) == world::deployer_address(), ENotAdmin);
10
+
11
+ // Logic that needs to be automated once the contract is deployed
12
+
13
+ }
14
+
15
+ #[test_only]
16
+ public fun deploy_hook_for_testing(deployer: &signer){
17
+ run(deployer)
18
+ }
19
+ }
@@ -0,0 +1,11 @@
1
+ module counter::counter_system {
2
+ use counter::counter_schema;
3
+
4
+ public entry fun increase(_caller: &signer) {
5
+ let old_number = counter_schema::get();
6
+ let new_number = old_number + 1;
7
+ counter_schema::set(new_number);
8
+ }
9
+ }
10
+
11
+
@@ -0,0 +1,13 @@
1
+ import { DubheConfig } from '@0xobelisk/aptos-common';
2
+
3
+ export const dubheConfig = {
4
+ name: 'counter',
5
+ description: 'counter',
6
+ systems: ['counter_system'],
7
+ schemas: {
8
+ counter: {
9
+ valueType: 'u64',
10
+ defaultValue: 0,
11
+ },
12
+ },
13
+ } as DubheConfig;
@@ -0,0 +1,17 @@
1
+ import type { InitialOptionsTsJest } from 'ts-jest/dist/types'
2
+
3
+ const config: InitialOptionsTsJest = {
4
+ preset: 'ts-jest',
5
+ setupFilesAfterEnv: ['<rootDir>/setupTests.ts'],
6
+ transform: {
7
+ '.+\\.(css|styl|less|sass|scss)$': 'jest-css-modules-transform',
8
+ },
9
+ testEnvironment: 'jsdom',
10
+ globals: {
11
+ 'ts-jest': {
12
+ tsconfig: 'tsconfig.test.json',
13
+ },
14
+ },
15
+ }
16
+
17
+ export default config
@@ -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/basic-features/typescript for more information.
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ i18n: {
3
+ defaultLocale: 'cn',
4
+ locales: ['en','cn'],
5
+ },
6
+ };
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ const { i18n } = require('./next-i18next.config');
3
+
4
+ module.exports = {
5
+ experimental: {
6
+ // outputStandalone: true,
7
+ ignoreDuringBuilds: true,
8
+ },
9
+ staticPageGenerationTimeout: 1000,
10
+ eslint: {
11
+ dirs: ['src'], // Only run ESLint on the 'pages' and 'utils' directories during production builds (next build)
12
+ },
13
+ i18n,
14
+ }
15
+
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "dubhe-101-template",
3
+ "version": "0.0.1",
4
+ "description": "Simple starter template",
5
+ "author": "team@0xobelisk.com",
6
+ "license": "MIT",
7
+ "scripts": {
8
+ "dev": "pnpm run dev:aptos",
9
+ "dev:aptos": "pnpm dubhe hello && pnpm run start-template",
10
+ "dev:movement": "pnpm dubhe hello && pnpm run start-movement-template",
11
+ "start-template": "pnpm run localnode && sleep 15 && ts-node scripts/generateAccount.ts && pnpm dubhe faucet --network local && pnpm dubhe publish --network local && ts-node scripts/storeConfig.ts local && next",
12
+ "start-movement-template": "ts-node scripts/formatAccount.ts && pnpm dubhe publish --network movementdevnet && ts-node scripts/storeConfig.ts movementdevnet && next",
13
+ "next": "next",
14
+ "build": "next build",
15
+ "start": "next start",
16
+ "type-check": "tsc",
17
+ "test": "jest",
18
+ "format": "prettier --write 'src/**/*ts'",
19
+ "lint": "next lint",
20
+ "faucet-localnet": "pnpm dubhe faucet --network local",
21
+ "faucet-devnet": "pnpm dubhe faucet --network devnet",
22
+ "faucet-testnet": "pnpm dubhe faucet --network testnet",
23
+ "world-publsih-localnet": "pnpm dubhe publish --network local && ts-node scripts/storeConfig.ts local",
24
+ "world-publsih-devnet": "pnpm dubhe publish --network devnet && ts-node scripts/storeConfig.ts devnet",
25
+ "world-publsih-testnet": "pnpm dubhe publish --network testnet && ts-node scripts/storeConfig.ts testnet",
26
+ "world-publsih-mainnet": "pnpm dubhe publish --network mainnet && ts-node scripts/storeConfig.ts mainnet",
27
+ "world-publsih-movement-localnet": "pnpm dubhe publish --network movementlocal && ts-node scripts/storeConfig.ts movementlocal",
28
+ "world-publsih-movement-devnet": "pnpm dubhe publish --network movementdevnet && ts-node scripts/storeConfig.ts movementdevnet",
29
+ "world-publsih-movement-testnet": "pnpm dubhe publish --network movementtestnet && ts-node scripts/storeConfig.ts movementtestnet",
30
+ "world-upgrade-localnet": "pnpm dubhe upgrade --network local && ts-node scripts/storeConfig.ts local",
31
+ "world-upgrade-devnet": "pnpm dubhe upgrade --network devnet && ts-node scripts/storeConfig.ts devnet",
32
+ "world-upgrade-testnet": "pnpm dubhe upgrade --network testnet && ts-node scripts/storeConfig.ts testnet",
33
+ "world-upgrade-mainnet": "pnpm dubhe upgrade --network mainnet && ts-node scripts/storeConfig.ts mainnet",
34
+ "localnode": "nohup pnpm dubhe localnode > localnode.nohup.out &",
35
+ "worldgen": "pnpm dubhe schemagen dubhe.config.ts",
36
+ "storeConfig": "ts-node scripts/storeConfig.ts",
37
+ "generateAccount": "ts-node scripts/generateAccount.ts"
38
+ },
39
+ "dependencies": {
40
+ "@0xobelisk/aptos-common": "^0.0.7",
41
+ "@0xobelisk/aptos-client": "^0.0.13",
42
+ "@0xobelisk/aptos-cli": "^0.0.10",
43
+ "aptos": "^1.20.0",
44
+ "clsx": "^1.2.1",
45
+ "dotenv": "^16.0.3",
46
+ "framer-motion": "^10.12.16",
47
+ "jotai": "^1.7.2",
48
+ "next": "^12.1.6",
49
+ "next-i18next": "^11.0.0",
50
+ "react": "18.1.0",
51
+ "react-dom": "18.1.0",
52
+ "react-select": "^5.4.0",
53
+ "swiper": "^9.2.4"
54
+ },
55
+ "devDependencies": {
56
+ "@headlessui/react": "^1.7.15",
57
+ "@heroicons/react": "^2.0.18",
58
+ "@tailwindcss/aspect-ratio": "^0.4.2",
59
+ "@tailwindcss/forms": "^0.5.3",
60
+ "@tailwindcss/line-clamp": "^0.4.4",
61
+ "@tailwindcss/typography": "^0.5.9",
62
+ "@testing-library/jest-dom": "^5.16.5",
63
+ "@testing-library/react": "^14.0.0",
64
+ "@testing-library/user-event": "^14.4.3",
65
+ "@types/jest": "^29.5.2",
66
+ "@types/node": "18.16.16",
67
+ "@types/react": "18.2.8",
68
+ "@types/react-dom": "18.2.4",
69
+ "autoprefixer": "^10.4.14",
70
+ "eslint": "^8.41.0",
71
+ "eslint-config-next": "13.4.4",
72
+ "jest": "^29.5.0",
73
+ "jest-css-modules-transform": "^4.4.2",
74
+ "postcss": "^8.4.24",
75
+ "prettier": "^2.8.8",
76
+ "prop-types": "^15.8.1",
77
+ "tailwind-scrollbar": "^2.1.0",
78
+ "tailwindcss": "^3.2.4",
79
+ "ts-jest": "^29.1.0",
80
+ "ts-node": "^10.9.1",
81
+ "typescript": "^4.7.3"
82
+ }
83
+ }
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }