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,54 @@
1
+ import * as fsAsync from 'fs/promises';
2
+ import { mkdirSync, writeFileSync } from 'fs';
3
+ import { exit } from 'process';
4
+ import { dubheConfig } from '../dubhe.config';
5
+ import { dirname } from 'path';
6
+
7
+ type DeploymentJsonType = {
8
+ projectName: string;
9
+ network: 'mainnet' | 'testnet' | 'devnet' | 'local' | 'movementtestnet' | 'movementdevnet' | 'movementlocal';
10
+ packageId: string;
11
+ version: number;
12
+ };
13
+
14
+ async function getDeploymentJson(projectPath: string, network: string) {
15
+ try {
16
+ const data = await fsAsync.readFile(`${projectPath}/.history/aptos_${network}/latest.json`, 'utf8');
17
+ return JSON.parse(data) as DeploymentJsonType;
18
+ } catch {
19
+ console.log('store config failed.');
20
+ exit;
21
+ }
22
+ }
23
+
24
+ function storeConfig(network: string, packageId: string) {
25
+ let code = `import { NetworkType } from '@0xobelisk/aptos-client';
26
+
27
+ const NETWORK = '${network}' as NetworkType;
28
+
29
+ const PACKAGE_ID = '${packageId}';
30
+
31
+ export { NETWORK, PACKAGE_ID };
32
+ `;
33
+ const path = process.cwd();
34
+ writeOutput(code, `${path}/src/chain/config.ts`, 'storeConfig');
35
+ }
36
+
37
+ async function writeOutput(output: string, fullOutputPath: string, logPrefix?: string): Promise<void> {
38
+ mkdirSync(dirname(fullOutputPath), { recursive: true });
39
+
40
+ writeFileSync(fullOutputPath, output);
41
+ if (logPrefix !== undefined) {
42
+ console.log(`${logPrefix}: ${fullOutputPath}`);
43
+ }
44
+ }
45
+
46
+ async function main() {
47
+ const path = process.cwd();
48
+ const network = process.argv[2];
49
+ const contractPath = `${path}/contracts/${dubheConfig.name}`;
50
+ const deployment = await getDeploymentJson(contractPath, network);
51
+ storeConfig(deployment.network, deployment.packageId);
52
+ }
53
+
54
+ main();
@@ -0,0 +1,7 @@
1
+ import { Network } from '@0xobelisk/aptos-client';
2
+
3
+ const NETWORK: Network = Network.LOCAL;
4
+
5
+ const PACKAGE_ID = '0x51aefb82dd32579137652d75af53e37622730f2ac8490f26424ccd94d225dafb';
6
+
7
+ export { NETWORK, PACKAGE_ID };
@@ -0,0 +1,80 @@
1
+ import * as React from 'react'
2
+ import {motion} from "framer-motion";
3
+
4
+ //滑动指定位置的动画效果
5
+ const visible = { opacity: 1, y: 0, transition: { duration: 0.5 } };
6
+
7
+ const itemVariants = {
8
+ hidden: { opacity: 0, y: 40 },
9
+ visible
10
+ };
11
+ const InertiaTitle = ({ children }: { children: React.ReactNode }) => {
12
+
13
+ return (
14
+ <motion.div
15
+ initial={{ opacity: 0 ,y:100}}
16
+ whileInView={{ opacity: 1 ,y:0 }}
17
+ exit={{ opacity: 0, transition: { duration: 1 } }}
18
+ variants={{ visible: {
19
+ opacity: 1,
20
+ transition: { duration: 2 }
21
+ } }}
22
+ transition={{ type: "inertia", velocity: 180 }}
23
+ viewport={{ once: true }}
24
+ >
25
+ <div className="w-full">
26
+ {children}
27
+ </div>
28
+ </motion.div>
29
+
30
+
31
+ )
32
+ }
33
+ const TweenTitle = ({ children }: { children: React.ReactNode }) => {
34
+
35
+ return (
36
+ <motion.div
37
+ initial={{ opacity: 0 ,y:100}}
38
+ whileInView={{ opacity: 1 ,y:0 }}
39
+ exit={{ opacity: 0, transition: { duration: 1 } }}
40
+ variants={{ visible: {
41
+ opacity: 1,
42
+ transition: { duration: 2 }
43
+ } }}
44
+ transition={{ duration: 1, type: "tween",delay: 0.01 }}
45
+
46
+ viewport={{ once: true }}
47
+ >
48
+ <div className="w-full">
49
+ {children}
50
+ </div>
51
+ </motion.div>
52
+
53
+
54
+ )
55
+ }
56
+
57
+ const Animation = ({ children }: { children: React.ReactNode }) => {
58
+
59
+ return (
60
+ <motion.div
61
+ initial={{ opacity: 0 ,y:100}}
62
+ whileInView={{ opacity: 1 ,y:0 }}
63
+ exit={{ opacity: 0, transition: { duration: 1 } }}
64
+ variants={{ visible: {
65
+ opacity: 1,
66
+ transition: { duration: 2 }
67
+ } }}
68
+ transition={{ type: "spring", stiffness: 300 ,delay: 0.01}}
69
+ viewport={{ once: true }}
70
+ >
71
+ <div className="w-full">
72
+ {children}
73
+ </div>
74
+ </motion.div>
75
+
76
+
77
+ )
78
+ }
79
+
80
+ export {InertiaTitle,Animation,TweenTitle}
@@ -0,0 +1,11 @@
1
+ import clsx from 'clsx'
2
+
3
+ //组件公共样式
4
+ export function Container({ className, ...props }) {
5
+ return (
6
+ <div
7
+ className={clsx('mx-auto max-w-7xl px-4 sm:px-6 lg:px-8', className)}
8
+ {...props}
9
+ />
10
+ )
11
+ }
@@ -0,0 +1,138 @@
1
+ import Link from "next/link"
2
+ import {Container} from "../Container";
3
+
4
+
5
+ const ends =[
6
+ {
7
+ title:"Product",
8
+ content:[
9
+ {
10
+ h1:"Overview",
11
+ href:"",
12
+ },
13
+ {
14
+ h1:"Download",
15
+ href:"",
16
+ },
17
+ {
18
+ h1:"Docs",
19
+ href:"",
20
+ },
21
+ ]
22
+
23
+ },
24
+ {
25
+ title:"Resources",
26
+ content:[
27
+ {
28
+ h1:"About Us",
29
+ href:"",
30
+ },
31
+ {
32
+ h1:"Download",
33
+ href:"",
34
+ },
35
+ {
36
+ h1:"Docs",
37
+ href:"",
38
+ },
39
+ ]
40
+
41
+ },
42
+ {
43
+ title:"Follow Us",
44
+ content:[
45
+ {
46
+ h1:"Discord",
47
+ href:"",
48
+ },
49
+ {
50
+ h1:"Twitter",
51
+ href:"",
52
+ },
53
+ {
54
+ h1:"Telegram",
55
+ href:"",
56
+ },
57
+ {
58
+ h1:"Github",
59
+ href:"",
60
+ }
61
+ ]
62
+
63
+ }
64
+ ]
65
+ const participate=[
66
+ {
67
+ href:"",
68
+ img:"/telegram.svg"
69
+ },
70
+ {
71
+ href:"",
72
+ img:"/twitter.svg",
73
+ },
74
+ {
75
+ href:"",
76
+ img:"/discord.svg",
77
+ },
78
+ {
79
+ href:"",
80
+ img:"/medium.svg",
81
+ }
82
+
83
+ ]
84
+ const Footer=()=>{
85
+ return(
86
+ <>
87
+ <Container className="pt-10">
88
+ <div className="md:flex justify-between pt-12 items-center">
89
+
90
+ <div className="text-center md:flex justify-between mb-10 mt-10 md:mt-0 ">
91
+ {ends.map(end=>(
92
+ <div key={end.title} className="md:mr-10" >
93
+ <div className="text-white font-semibold text-base ">
94
+ {end.title}
95
+ </div>
96
+ {end.content.map(item=>(
97
+ <div key={item.h1} className="my-3 text-sm transition duration-300 transform hover:translate-x-2 md:text-left text-white">
98
+
99
+ <Link legacyBehavior href={item.href}>
100
+ <a>
101
+ {item.h1}
102
+ </a>
103
+ </Link>
104
+ </div>))}
105
+ </div>
106
+ ))}
107
+ </div>
108
+
109
+ <div>
110
+ <div className="flex justify-center md:justify-start " >
111
+ <img className="w-18" src="/logo.svg" alt=""/>
112
+ </div>
113
+ <div className="my-5 text-[#4F5568] text-sm text-center ">
114
+ Aura Wallet is the safest wallet
115
+ </div>
116
+ <div className="flex justify-center items-center md:justify-start ">
117
+ {participate.map(item=>(
118
+ <div key={item.img} className="mr-5 ">
119
+ <Link legacyBehavior href={item.href}>
120
+ <a className="">
121
+ <img className="w-6" src={item.img} alt=""/>
122
+ </a></Link>
123
+ </div> ))}
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div className="border-t border-[#1A1A1A] py-3 mt-5 ">
128
+ <div className=" flex justify-center md:block text-[#969696] text-sm ">
129
+ © 2022 Aura Wallet</div>
130
+ </div>
131
+ </Container>
132
+
133
+ </>
134
+ )
135
+ }
136
+ export {
137
+ Footer
138
+ }
@@ -0,0 +1,14 @@
1
+ import Head from 'next/head'
2
+ const Heads = () =>{
3
+ return(
4
+ <Head>
5
+ <title>Test Website</title>
6
+ {/*<meta*/}
7
+ {/* name="description"*/}
8
+ {/* content="Seamless Portal to Web3.0."*/}
9
+ {/*/>*/}
10
+ <link rel="icon" className="rounded-full" href="/favicon.ico" />
11
+ </Head>
12
+ )
13
+ }
14
+ export default Heads
@@ -0,0 +1,173 @@
1
+ import Link from "next/link";
2
+ import {useState} from "react";
3
+ import { Popover } from '@headlessui/react'
4
+ import { AnimatePresence, motion } from 'framer-motion'
5
+ import * as React from "react";
6
+
7
+ function classNames(...classes) {
8
+ return classes.filter(Boolean).join(' ')
9
+ }
10
+
11
+ function MenuIcon(props) {
12
+ return (
13
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true" {...props}>
14
+ <path
15
+ d="M5 6h14M5 18h14M5 12h14"
16
+ strokeWidth={2}
17
+ strokeLinecap="round"
18
+ strokeLinejoin="round"
19
+ />
20
+ </svg>
21
+ )
22
+ }
23
+
24
+ function ChevronUpIcon(props) {
25
+ return (
26
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true" {...props}>
27
+ <path
28
+ d="M17 14l-5-5-5 5"
29
+ strokeWidth={2}
30
+ strokeLinecap="round"
31
+ strokeLinejoin="round"
32
+ />
33
+ </svg>
34
+ )
35
+ }
36
+
37
+
38
+ const Header = () =>{
39
+ const [scroll,setScroll]=useState(false)
40
+ const navigation = [
41
+ {name:"Test1", href:"#test1"},
42
+ {name:"Test2", href:"#test2"},
43
+ {name:"Test3", href:"#test3"},
44
+ // {name:"TEAM", href:"#team"},
45
+ ]
46
+
47
+ if(typeof window !== "undefined"){
48
+ window.onscroll = function() {myFunction()};
49
+ }
50
+
51
+ function myFunction() {
52
+ if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) {
53
+ setScroll(true)
54
+ } else {
55
+ setScroll(false)
56
+ }
57
+ };
58
+ const to = (toEl)=>{
59
+ let bridge=document.querySelector(toEl);
60
+ let body =document.body;
61
+ let height =0;
62
+ do{
63
+ height+=bridge.offsetTop;
64
+ bridge=bridge.offsetParent;
65
+ }while(bridge!==body)
66
+
67
+ window.scrollTo({
68
+ top:height,
69
+ behavior:'smooth'
70
+ })
71
+
72
+ }
73
+ return (
74
+ <div className={classNames(scroll?'p-3 backdrop-blur-sm bg-[#2E2E2E]/80':"py-4 ","flex fixed mx-auto z-40 inset-x-0 px-4 sm:px-6 lg:px-8 xl:px-24 2xl:px-56 w-full justify-between transition-all duration-700 ease-in-out items-center")}>
75
+ <div className={"relative z-10 items-center flex "}>
76
+ <Link href="/" legacyBehavior>
77
+ <a>
78
+ <img
79
+ className="w-10 h-10 rounded-full flex lg:mr-5"
80
+ src="/logo.svg"
81
+ alt=""
82
+ />
83
+ </a>
84
+ </Link>
85
+ <div className="hidden lg:flex lg:gap-10">
86
+ {navigation.map((item) => (
87
+ <button key={item.name} onClick={()=>{to(item.href)}}
88
+ className="text-sm lg:text-base font-medium text-white transition duration-700 ">
89
+ {item.name}
90
+ </button>
91
+ ))}
92
+ </div>
93
+ </div>
94
+ <div className="flex items-center gap-6">
95
+
96
+ <Popover className="lg:hidden">
97
+
98
+ {({ open }) => (
99
+ <>
100
+ <Popover.Button
101
+ className="relative z-10 -m-2 inline-flex items-center rounded-lg stroke-gray-500 p-2 outline-none"
102
+ aria-label="Toggle site navigation"
103
+ >
104
+
105
+ {({ open }) =>
106
+ open ? (
107
+ <ChevronUpIcon className="h-10 w-10" />
108
+ ) : (
109
+ <MenuIcon className="h-10 w-10" />
110
+ )
111
+ }
112
+ </Popover.Button>
113
+ <AnimatePresence initial={false}>
114
+ {open && (
115
+ <>
116
+ <Popover.Overlay
117
+ static
118
+ as={motion.div}
119
+ initial={{ opacity: 0 }}
120
+ animate={{ opacity: 1 }}
121
+ exit={{ opacity: 0 }}
122
+ className="fixed inset-0 z-0 bg-gray-300/60 backdrop-blur"
123
+ />
124
+ <Popover.Panel
125
+ static
126
+ as={motion.div}
127
+ initial={{ opacity: 0, y: -32 }}
128
+ animate={{ opacity: 1, y: 0 }}
129
+ exit={{
130
+ opacity: 0,
131
+ y: -32,
132
+ transition: { duration: 0.2 },
133
+ }}
134
+ className="absolute inset-x-0 top-0 z-0 origin-top rounded-b-2xl bg-[#2E2E2E] px-6 pb-6 pt-24 shadow-2xl shadow-gray-900/20"
135
+ >
136
+
137
+ <div className="space-y-4 ">
138
+ {navigation.map((item) => (
139
+ <button key={item.name} onClick={()=>to(item.href)}
140
+ className="block text-base leading-7 tracking-tight text-white">
141
+ {item.name}
142
+ </button>
143
+ ))}
144
+ </div>
145
+
146
+
147
+ </Popover.Panel>
148
+ </>
149
+ )}
150
+ </AnimatePresence>
151
+ </>
152
+ )}
153
+ </Popover>
154
+
155
+ <div className="hidden lg:flex gap-4 items-center ">
156
+ <Link href="https://discord.gg/ceETxS2eTa" legacyBehavior>
157
+ <a target="_blank">
158
+ <img className="w-6 " src="discord.svg" alt=""/>
159
+ </a>
160
+ </Link>
161
+ <Link href="https://twitter.com/suirobots" legacyBehavior>
162
+ <a target="_blank">
163
+ <img className="w-6" src="twitter.svg" alt=""/>
164
+ </a>
165
+ </Link>
166
+ </div>
167
+ </div>
168
+ </div>
169
+
170
+ )
171
+ }
172
+
173
+ export default Header
@@ -0,0 +1,149 @@
1
+ import {useAtom} from "jotai";
2
+ import React, {Fragment, useEffect} from "react";
3
+ import Link from "next/link";
4
+ import {Dialog,Transition} from "@headlessui/react";
5
+ import {OpenBoxState, SellPopUpBoxState, SellState} from "../../jotai";
6
+
7
+ function classNames(...classes) {
8
+ return classes.filter(Boolean).join(' ')
9
+ }
10
+
11
+ //右侧弹出框
12
+ const PopUpBox = () =>{
13
+ const [pop_up_boxState,setSop_up_boxState] = useAtom(SellPopUpBoxState)
14
+ const [pop_up_boxData,] =useAtom(SellState)
15
+ let time
16
+ useEffect(()=>{
17
+ clearTimeout(time)
18
+ if(pop_up_boxState){
19
+ time = setTimeout(()=>{
20
+ setSop_up_boxState(false)
21
+ },6000)
22
+ }
23
+ const Pop_up_box = document.getElementById('Pop_up_box');
24
+ Pop_up_box.onmouseover = function(){
25
+ clearInterval(time);
26
+ }
27
+ Pop_up_box.onmouseout = function(){
28
+ time = setTimeout(()=>{
29
+ setSop_up_boxState(false)
30
+
31
+ },3000)
32
+ }
33
+ },[pop_up_boxState])
34
+ return(
35
+ <div
36
+ id="Pop_up_box"
37
+ aria-live="assertive"
38
+ className="pointer-events-none z-50 fixed inset-0 top-12 flex items-end px-4 py-6 sm:items-start sm:p-6 "
39
+ >
40
+ <div className="flex w-full flex-col items-center space-y-4 sm:items-end">
41
+ {/* Notification panel, dynamically insert this into the live region when it needs to be displayed */}
42
+ <Transition
43
+ show={pop_up_boxState}
44
+ as={Fragment}
45
+ enter="transform ease-out duration-300 transition"
46
+ enterFrom="translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2"
47
+ enterTo="translate-y-0 opacity-100 sm:translate-x-0"
48
+ leave="transition ease-in duration-100"
49
+ leaveFrom="opacity-100"
50
+ leaveTo="opacity-0"
51
+ >
52
+ <div className={classNames(pop_up_boxData.state?"bg-green-50":"bg-red-50","pointer-events-auto w-full max-w-xs overflow-hidden rounded-lg ")}>
53
+ <div className="p-4">
54
+ <div className="flex items-center">
55
+ <img className={pop_up_boxData.state?"w-10 mt-1":"hidden"} src="/successful.svg" alt=""/>
56
+ <img className={pop_up_boxData.state?"hidden":"w-10 mt-1"} src="/fail.svg" alt=""/>
57
+ <div className="ml-3 w-0 flex-1 pt-0.5 text-white text-sm">
58
+ <p className={classNames(pop_up_boxData.state?
59
+ "text-green-800"
60
+ :
61
+ "text-red-800",
62
+ "text-sm font-medium ")}>{pop_up_boxData.type} {classNames(pop_up_boxData.state?"success":"fail")}</p>
63
+ <p className={pop_up_boxData.state?"hidden":"mt-1 text-red-800 font-black"}>Please try again</p>
64
+ <div className={pop_up_boxData.hash == ""? "hidden":""}>
65
+ <Link legacyBehavior href={`https://explorer.sui.io/transaction/${pop_up_boxData.hash}?network=https%3A%2F%2Fwallet-rpc.devnet.sui.io%2F` } target="_Blank">
66
+ <a className={classNames(pop_up_boxData.state?
67
+ "bg-green-50 text-green-500 hover:bg-green-100"
68
+ :
69
+ "bg-red-50 text-red-500 hover:bg-red-100",
70
+ "mt-1 underline font-semibold ")}
71
+ target="_Blank">
72
+ View on Explorer
73
+ </a></Link>
74
+
75
+ </div>
76
+ </div>
77
+
78
+ <div className="-mt-4 flex flex-shrink-0">
79
+ <button
80
+ type="button"
81
+ className={classNames(pop_up_boxData.state?
82
+ "bg-green-50 text-green-500 hover:bg-green-100"
83
+ :
84
+ "bg-red-50 text-red-500 hover:bg-red-100",
85
+ "inline-flex rounded-md p-1.5")}
86
+ onClick={() => {
87
+ setSop_up_boxState(false)
88
+ }}
89
+ >
90
+ <i className="fa fa-times" aria-hidden="true"></i>
91
+ <span className="sr-only">Close</span>
92
+ </button>
93
+ </div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </Transition>
98
+ </div>
99
+ </div>
100
+ )
101
+ }
102
+
103
+ //加载弹出框
104
+ const Loading = () =>{
105
+ const [openLoading,setOpenLoading] =useAtom(OpenBoxState)
106
+ return(
107
+ <>
108
+ <Transition.Root show={openLoading} as={Fragment}>
109
+ <Dialog as="div" className="relative z-50" onClose={()=>false}>
110
+ <Transition.Child
111
+ as={Fragment}
112
+ enter="ease-out duration-300"
113
+ enterFrom="opacity-0"
114
+ enterTo="opacity-100"
115
+ leave="ease-in duration-200"
116
+ leaveFrom="opacity-100"
117
+ leaveTo="opacity-0"
118
+ >
119
+ <div className="fixed inset-0 bg-gray-400 bg-opacity-50 transition-opacity" />
120
+ </Transition.Child>
121
+
122
+ <div className="fixed inset-0 z-10 overflow-y-auto">
123
+ <div className="flex min-h-full items-center justify-center p-4 text-center sm:items-center sm:p-0">
124
+ <Transition.Child
125
+ as={Fragment}
126
+ enter="ease-out duration-300"
127
+ enterFrom="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
128
+ enterTo="opacity-100 translate-y-0 sm:scale-100"
129
+ leave="ease-in duration-200"
130
+ leaveFrom="opacity-100 translate-y-0 sm:scale-100"
131
+ leaveTo="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
132
+ >
133
+ <Dialog.Panel className="">
134
+
135
+ <div className="animate-spin text-white">
136
+ <i className="fa fa-spinner f-spin fa-2x fa-fw"></i>
137
+ </div>
138
+ </Dialog.Panel>
139
+ </Transition.Child>
140
+ </div>
141
+ </div>
142
+ </Dialog>
143
+ </Transition.Root>
144
+ </>
145
+ )
146
+ }
147
+ export {PopUpBox,Loading}
148
+
149
+