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.
- package/LICENSE +21 -0
- package/README.md +9 -0
- package/dist/index.mjs +100 -0
- package/index.js +3 -0
- package/package.json +46 -0
- package/template/101/aptos-template/.dockerignore +7 -0
- package/template/101/aptos-template/.eslintrc.json +3 -0
- package/template/101/aptos-template/.prettierrc +8 -0
- package/template/101/aptos-template/Dockerfile +56 -0
- package/template/101/aptos-template/LICENSE +674 -0
- package/template/101/aptos-template/README.md +14 -0
- package/template/101/aptos-template/contracts/counter/Move.toml +16 -0
- package/template/101/aptos-template/contracts/counter/sources/codegen/eps/events.move +34 -0
- package/template/101/aptos-template/contracts/counter/sources/codegen/eps/world.move +65 -0
- package/template/101/aptos-template/contracts/counter/sources/codegen/init.move +17 -0
- package/template/101/aptos-template/contracts/counter/sources/codegen/schemas/counter.move +59 -0
- package/template/101/aptos-template/contracts/counter/sources/entity_key.move +31 -0
- package/template/101/aptos-template/contracts/counter/sources/script/deploy_hook.move +19 -0
- package/template/101/aptos-template/contracts/counter/sources/system/counter_system.move +11 -0
- package/template/101/aptos-template/dubhe.config.ts +13 -0
- package/template/101/aptos-template/jest.config.ts +17 -0
- package/template/101/aptos-template/next-env.d.ts +5 -0
- package/template/101/aptos-template/next-i18next.config.js +6 -0
- package/template/101/aptos-template/next.config.js +15 -0
- package/template/101/aptos-template/package.json +83 -0
- package/template/101/aptos-template/postcss.config.js +6 -0
- package/template/101/aptos-template/public/discord.svg +9 -0
- package/template/101/aptos-template/public/fail.svg +12 -0
- package/template/101/aptos-template/public/favicon.ico +0 -0
- package/template/101/aptos-template/public/locales/de/common.json +8 -0
- package/template/101/aptos-template/public/locales/de/footer.json +3 -0
- package/template/101/aptos-template/public/locales/de/second-page.json +5 -0
- package/template/101/aptos-template/public/locales/en/common.json +8 -0
- package/template/101/aptos-template/public/locales/en/footer.json +3 -0
- package/template/101/aptos-template/public/locales/en/second-page.json +5 -0
- package/template/101/aptos-template/public/locales/zn/common.json +8 -0
- package/template/101/aptos-template/public/locales/zn/footer.json +3 -0
- package/template/101/aptos-template/public/locales/zn/second-page.json +5 -0
- package/template/101/aptos-template/public/logo.svg +1 -0
- package/template/101/aptos-template/public/medium.svg +9 -0
- package/template/101/aptos-template/public/successful.svg +11 -0
- package/template/101/aptos-template/public/telegram.svg +9 -0
- package/template/101/aptos-template/public/twitter.svg +9 -0
- package/template/101/aptos-template/scripts/formatAccount.ts +35 -0
- package/template/101/aptos-template/scripts/generateAccount.ts +25 -0
- package/template/101/aptos-template/scripts/storeConfig.ts +54 -0
- package/template/101/aptos-template/src/chain/config.ts +7 -0
- package/template/101/aptos-template/src/css/font-awesome.css +2337 -0
- package/template/101/aptos-template/src/css/font-awesome.min.css +4 -0
- package/template/101/aptos-template/src/fonts/FontAwesome.otf +0 -0
- package/template/101/aptos-template/src/fonts/fontawesome-webfont.eot +0 -0
- package/template/101/aptos-template/src/fonts/fontawesome-webfont.svg +2671 -0
- package/template/101/aptos-template/src/fonts/fontawesome-webfont.ttf +0 -0
- package/template/101/aptos-template/src/fonts/fontawesome-webfont.woff +0 -0
- package/template/101/aptos-template/src/fonts/fontawesome-webfont.woff2 +0 -0
- package/template/101/aptos-template/src/jotai/index.tsx +12 -0
- package/template/101/aptos-template/src/pages/_app.tsx +9 -0
- package/template/101/aptos-template/src/pages/home/index.tsx +78 -0
- package/template/101/aptos-template/src/pages/index.tsx +12 -0
- package/template/101/aptos-template/tailwind.config.js +56 -0
- package/template/101/aptos-template/tsconfig.json +25 -0
- package/template/101/sui-template/.dockerignore +7 -0
- package/template/101/sui-template/.eslintrc.json +3 -0
- package/template/101/sui-template/.prettierrc +8 -0
- package/template/101/sui-template/Dockerfile +52 -0
- package/template/101/sui-template/LICENSE +674 -0
- package/template/101/sui-template/README.md +14 -0
- package/template/101/sui-template/contracts/counter/Move.toml +13 -0
- package/template/101/sui-template/contracts/counter/sources/codegen/dapp_key.move +16 -0
- package/template/101/sui-template/contracts/counter/sources/codegen/schemas/counter.move +50 -0
- package/template/101/sui-template/contracts/counter/sources/script/deploy_hook.move +67 -0
- package/template/101/sui-template/contracts/counter/sources/system/counter.move +11 -0
- package/template/101/sui-template/docker-compose.yaml +29 -0
- package/template/101/sui-template/dubhe.config.ts +14 -0
- package/template/101/sui-template/jest.config.ts +17 -0
- package/template/101/sui-template/localnet/dubhe-framework/Move.toml +39 -0
- package/template/101/sui-template/localnet/dubhe-framework/README.md +18 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/access_control.move +35 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/events.move +23 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/resource_id.move +22 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/resource_types.move +18 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/schema.move +36 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/schemas/dapps/dapps.move +73 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/schemas/dapps/metadata.move +96 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/storages/double_map.move +156 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/storages/map.move +159 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/storages/value.move +100 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/systems/dapps.move +90 -0
- package/template/101/sui-template/localnet/dubhe-framework/sources/world.move +81 -0
- package/template/101/sui-template/localnet/dubhe-framework/tests/dapp.move +16 -0
- package/template/101/sui-template/localnet/dubhe-framework/tests/init.move +6 -0
- package/template/101/sui-template/localnet/dubhe-framework/tests/obelisk_framework_tests.move +19 -0
- package/template/101/sui-template/localnet/dubhe-framework/tests/storage.move +398 -0
- package/template/101/sui-template/next-env.d.ts +5 -0
- package/template/101/sui-template/next-i18next.config.js +6 -0
- package/template/101/sui-template/next.config.js +15 -0
- package/template/101/sui-template/package.json +82 -0
- package/template/101/sui-template/postcss.config.js +6 -0
- package/template/101/sui-template/public/discord.svg +9 -0
- package/template/101/sui-template/public/fail.svg +12 -0
- package/template/101/sui-template/public/favicon.ico +0 -0
- package/template/101/sui-template/public/locales/de/common.json +8 -0
- package/template/101/sui-template/public/locales/de/footer.json +3 -0
- package/template/101/sui-template/public/locales/de/second-page.json +5 -0
- package/template/101/sui-template/public/locales/en/common.json +8 -0
- package/template/101/sui-template/public/locales/en/footer.json +3 -0
- package/template/101/sui-template/public/locales/en/second-page.json +5 -0
- package/template/101/sui-template/public/locales/zn/common.json +8 -0
- package/template/101/sui-template/public/locales/zn/footer.json +3 -0
- package/template/101/sui-template/public/locales/zn/second-page.json +5 -0
- package/template/101/sui-template/public/logo.svg +1 -0
- package/template/101/sui-template/public/medium.svg +9 -0
- package/template/101/sui-template/public/successful.svg +11 -0
- package/template/101/sui-template/public/telegram.svg +9 -0
- package/template/101/sui-template/public/twitter.svg +9 -0
- package/template/101/sui-template/scripts/checkBalance.ts +40 -0
- package/template/101/sui-template/scripts/deployment/common.ts +60 -0
- package/template/101/sui-template/scripts/deployment/localnet/deploy.ts +42 -0
- package/template/101/sui-template/scripts/deployment/testnet/deploy.ts +48 -0
- package/template/101/sui-template/scripts/deployment/types.ts +13 -0
- package/template/101/sui-template/scripts/framework/common.ts +17 -0
- package/template/101/sui-template/scripts/framework/deploy.ts +199 -0
- package/template/101/sui-template/scripts/framework/parse-history.ts +76 -0
- package/template/101/sui-template/scripts/framework/types.ts +8 -0
- package/template/101/sui-template/scripts/generateAccount.ts +55 -0
- package/template/101/sui-template/scripts/storeConfig.ts +61 -0
- package/template/101/sui-template/scripts/waitNode.ts +9 -0
- package/template/101/sui-template/src/chain/config.ts +7 -0
- package/template/101/sui-template/src/css/font-awesome.css +2337 -0
- package/template/101/sui-template/src/css/font-awesome.min.css +4 -0
- package/template/101/sui-template/src/fonts/FontAwesome.otf +0 -0
- package/template/101/sui-template/src/fonts/fontawesome-webfont.eot +0 -0
- package/template/101/sui-template/src/fonts/fontawesome-webfont.svg +2671 -0
- package/template/101/sui-template/src/fonts/fontawesome-webfont.ttf +0 -0
- package/template/101/sui-template/src/fonts/fontawesome-webfont.woff +0 -0
- package/template/101/sui-template/src/fonts/fontawesome-webfont.woff2 +0 -0
- package/template/101/sui-template/src/jotai/index.tsx +12 -0
- package/template/101/sui-template/src/pages/_app.tsx +9 -0
- package/template/101/sui-template/src/pages/home/index.tsx +82 -0
- package/template/101/sui-template/src/pages/index.tsx +14 -0
- package/template/101/sui-template/tailwind.config.js +56 -0
- package/template/101/sui-template/tsconfig.json +25 -0
- package/template/cocos/aptos-template/.creator/asset-template/typescript/Custom Script Template Help Documentation.url +2 -0
- package/template/cocos/aptos-template/README.md +11 -0
- package/template/cocos/aptos-template/assets/Scripts/aptos.ts +87 -0
- package/template/cocos/aptos-template/assets/Scripts/aptos.ts.meta +9 -0
- package/template/cocos/aptos-template/assets/Scripts/chain/config.ts +12 -0
- package/template/cocos/aptos-template/assets/Scripts/chain/config.ts.meta +9 -0
- package/template/cocos/aptos-template/assets/Scripts/chain/key.ts.meta +9 -0
- package/template/cocos/aptos-template/assets/Scripts/chain.meta +9 -0
- package/template/cocos/aptos-template/assets/Scripts/dubhe.config.ts +13 -0
- package/template/cocos/aptos-template/assets/Scripts/dubhe.config.ts.meta +9 -0
- package/template/cocos/aptos-template/assets/Scripts.meta +9 -0
- package/template/cocos/aptos-template/assets/lib/dubhe.js +22281 -0
- package/template/cocos/aptos-template/assets/lib/obelisk.js +22281 -0
- package/template/cocos/aptos-template/assets/lib/obelisk.js.meta +15 -0
- package/template/cocos/aptos-template/assets/lib.meta +12 -0
- package/template/cocos/aptos-template/assets/main.scene +875 -0
- package/template/cocos/aptos-template/assets/main.scene.meta +11 -0
- package/template/cocos/aptos-template/contracts/counter/Move.toml +16 -0
- package/template/cocos/aptos-template/contracts/counter/sources/codegen/eps/events.move +34 -0
- package/template/cocos/aptos-template/contracts/counter/sources/codegen/eps/world.move +65 -0
- package/template/cocos/aptos-template/contracts/counter/sources/codegen/init.move +17 -0
- package/template/cocos/aptos-template/contracts/counter/sources/codegen/schemas/counter.move +59 -0
- package/template/cocos/aptos-template/contracts/counter/sources/entity_key.move +31 -0
- package/template/cocos/aptos-template/contracts/counter/sources/script/deploy_hook.move +19 -0
- package/template/cocos/aptos-template/contracts/counter/sources/system/counter_system.move +11 -0
- package/template/cocos/aptos-template/package.json +39 -0
- package/template/cocos/aptos-template/scripts/formatAccount.ts +35 -0
- package/template/cocos/aptos-template/scripts/generateAccount.ts +25 -0
- package/template/cocos/aptos-template/scripts/storeConfig.ts +68 -0
- package/template/cocos/aptos-template/settings/v2/packages/builder.json +3 -0
- package/template/cocos/aptos-template/settings/v2/packages/cocos-service.json +23 -0
- package/template/cocos/aptos-template/settings/v2/packages/device.json +3 -0
- package/template/cocos/aptos-template/settings/v2/packages/engine.json +150 -0
- package/template/cocos/aptos-template/settings/v2/packages/information.json +23 -0
- package/template/cocos/aptos-template/settings/v2/packages/program.json +3 -0
- package/template/cocos/aptos-template/settings/v2/packages/project.json +3 -0
- package/template/cocos/aptos-template/tsconfig.json +12 -0
- package/template/cocos/sui-template/.creator/asset-template/typescript/Custom Script Template Help Documentation.url +2 -0
- package/template/cocos/sui-template/README.md +11 -0
- package/template/cocos/sui-template/assets/Scripts/chain/config.ts +12 -0
- package/template/cocos/sui-template/assets/Scripts/chain/config.ts.meta +9 -0
- package/template/cocos/sui-template/assets/Scripts/chain/key.ts.meta +9 -0
- package/template/cocos/sui-template/assets/Scripts/chain.meta +9 -0
- package/template/cocos/sui-template/assets/Scripts/dubhe.config.ts +13 -0
- package/template/cocos/sui-template/assets/Scripts/dubhe.config.ts.meta +9 -0
- package/template/cocos/sui-template/assets/Scripts/sui.ts +120 -0
- package/template/cocos/sui-template/assets/Scripts/sui.ts.meta +9 -0
- package/template/cocos/sui-template/assets/Scripts.meta +12 -0
- package/template/cocos/sui-template/assets/lib/dubhe.js +55694 -0
- package/template/cocos/sui-template/assets/lib/dubhe.js.meta +15 -0
- package/template/cocos/sui-template/assets/lib.meta +12 -0
- package/template/cocos/sui-template/assets/main.scene +875 -0
- package/template/cocos/sui-template/assets/main.scene.meta +11 -0
- package/template/cocos/sui-template/contracts/counter/Move.toml +13 -0
- package/template/cocos/sui-template/contracts/counter/sources/codegen/dapp_key.move +16 -0
- package/template/cocos/sui-template/contracts/counter/sources/codegen/schemas/counter.move +50 -0
- package/template/cocos/sui-template/contracts/counter/sources/script/deploy_hook.move +67 -0
- package/template/cocos/sui-template/contracts/counter/sources/system/counter.move +11 -0
- package/template/cocos/sui-template/docker-compose.yaml +18 -0
- package/template/cocos/sui-template/package.json +27 -0
- package/template/cocos/sui-template/scripts/generateAccount.ts +55 -0
- package/template/cocos/sui-template/scripts/storeConfig.ts +75 -0
- package/template/cocos/sui-template/settings/v2/packages/builder.json +3 -0
- package/template/cocos/sui-template/settings/v2/packages/cocos-service.json +23 -0
- package/template/cocos/sui-template/settings/v2/packages/device.json +3 -0
- package/template/cocos/sui-template/settings/v2/packages/engine.json +150 -0
- package/template/cocos/sui-template/settings/v2/packages/information.json +23 -0
- package/template/cocos/sui-template/settings/v2/packages/program.json +3 -0
- package/template/cocos/sui-template/settings/v2/packages/project.json +3 -0
- package/template/cocos/sui-template/tsconfig.json +19 -0
- package/template/nextjs/aptos-template/.dockerignore +7 -0
- package/template/nextjs/aptos-template/.eslintrc.json +3 -0
- package/template/nextjs/aptos-template/.prettierrc +8 -0
- package/template/nextjs/aptos-template/Dockerfile +56 -0
- package/template/nextjs/aptos-template/LICENSE +674 -0
- package/template/nextjs/aptos-template/README.md +13 -0
- package/template/nextjs/aptos-template/contracts/counter/Move.toml +16 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/codegen/eps/events.move +34 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/codegen/eps/world.move +65 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/codegen/init.move +17 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/codegen/schemas/counter.move +59 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/entity_key.move +31 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/script/deploy_hook.move +19 -0
- package/template/nextjs/aptos-template/contracts/counter/sources/system/counter_system.move +11 -0
- package/template/nextjs/aptos-template/dubhe.config.ts +13 -0
- package/template/nextjs/aptos-template/jest.config.ts +17 -0
- package/template/nextjs/aptos-template/next-env.d.ts +5 -0
- package/template/nextjs/aptos-template/next-i18next.config.js +6 -0
- package/template/nextjs/aptos-template/next.config.js +15 -0
- package/template/nextjs/aptos-template/package.json +82 -0
- package/template/nextjs/aptos-template/postcss.config.js +6 -0
- package/template/nextjs/aptos-template/public/discord.svg +9 -0
- package/template/nextjs/aptos-template/public/fail.svg +12 -0
- package/template/nextjs/aptos-template/public/favicon.ico +0 -0
- package/template/nextjs/aptos-template/public/locales/de/common.json +8 -0
- package/template/nextjs/aptos-template/public/locales/de/footer.json +3 -0
- package/template/nextjs/aptos-template/public/locales/de/second-page.json +5 -0
- package/template/nextjs/aptos-template/public/locales/en/common.json +8 -0
- package/template/nextjs/aptos-template/public/locales/en/footer.json +3 -0
- package/template/nextjs/aptos-template/public/locales/en/second-page.json +5 -0
- package/template/nextjs/aptos-template/public/locales/zn/common.json +8 -0
- package/template/nextjs/aptos-template/public/locales/zn/footer.json +3 -0
- package/template/nextjs/aptos-template/public/locales/zn/second-page.json +5 -0
- package/template/nextjs/aptos-template/public/logo.svg +1 -0
- package/template/nextjs/aptos-template/public/medium.svg +9 -0
- package/template/nextjs/aptos-template/public/successful.svg +11 -0
- package/template/nextjs/aptos-template/public/telegram.svg +9 -0
- package/template/nextjs/aptos-template/public/twitter.svg +9 -0
- package/template/nextjs/aptos-template/scripts/formatAccount.ts +35 -0
- package/template/nextjs/aptos-template/scripts/generateAccount.ts +25 -0
- package/template/nextjs/aptos-template/scripts/storeConfig.ts +54 -0
- package/template/nextjs/aptos-template/src/chain/config.ts +7 -0
- package/template/nextjs/aptos-template/src/components/Animation.tsx +80 -0
- package/template/nextjs/aptos-template/src/components/Container.tsx +11 -0
- package/template/nextjs/aptos-template/src/components/footer/index.tsx +138 -0
- package/template/nextjs/aptos-template/src/components/head/index.tsx +14 -0
- package/template/nextjs/aptos-template/src/components/header/index.tsx +173 -0
- package/template/nextjs/aptos-template/src/components/pop_up_box/index.tsx +149 -0
- package/template/nextjs/aptos-template/src/css/font-awesome.css +2337 -0
- package/template/nextjs/aptos-template/src/css/font-awesome.min.css +4 -0
- package/template/nextjs/aptos-template/src/fonts/FontAwesome.otf +0 -0
- package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.eot +0 -0
- package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.svg +2671 -0
- package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.ttf +0 -0
- package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.woff +0 -0
- package/template/nextjs/aptos-template/src/fonts/fontawesome-webfont.woff2 +0 -0
- package/template/nextjs/aptos-template/src/jotai/index.tsx +13 -0
- package/template/nextjs/aptos-template/src/pages/_app.tsx +32 -0
- package/template/nextjs/aptos-template/src/pages/home/index.tsx +112 -0
- package/template/nextjs/aptos-template/src/pages/index.tsx +15 -0
- package/template/nextjs/aptos-template/tailwind.config.js +59 -0
- package/template/nextjs/aptos-template/tsconfig.json +35 -0
- package/template/nextjs/sui-template/.dockerignore +7 -0
- package/template/nextjs/sui-template/.eslintrc.json +3 -0
- package/template/nextjs/sui-template/.prettierrc +8 -0
- package/template/nextjs/sui-template/Dockerfile +52 -0
- package/template/nextjs/sui-template/LICENSE +674 -0
- package/template/nextjs/sui-template/README.md +13 -0
- package/template/nextjs/sui-template/contracts/counter/Move.toml +13 -0
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp_key.move +16 -0
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/schemas/counter.move +50 -0
- package/template/nextjs/sui-template/contracts/counter/sources/script/deploy_hook.move +67 -0
- package/template/nextjs/sui-template/contracts/counter/sources/system/counter.move +11 -0
- package/template/nextjs/sui-template/docker-compose.yaml +29 -0
- package/template/nextjs/sui-template/dubhe.config.ts +14 -0
- package/template/nextjs/sui-template/jest.config.ts +17 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/Move.toml +39 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/README.md +18 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/access_control.move +35 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/events.move +23 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/resource_id.move +22 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/resource_types.move +18 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/schema.move +36 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/schemas/dapps/dapps.move +73 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/schemas/dapps/metadata.move +96 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/storages/double_map.move +156 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/storages/map.move +159 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/storages/value.move +100 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/systems/dapps.move +90 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/sources/world.move +81 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/tests/dapp.move +16 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/tests/init.move +6 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/tests/obelisk_framework_tests.move +19 -0
- package/template/nextjs/sui-template/localnet/dubhe-framework/tests/storage.move +398 -0
- package/template/nextjs/sui-template/next-env.d.ts +5 -0
- package/template/nextjs/sui-template/next-i18next.config.js +6 -0
- package/template/nextjs/sui-template/next.config.js +15 -0
- package/template/nextjs/sui-template/package.json +84 -0
- package/template/nextjs/sui-template/postcss.config.js +6 -0
- package/template/nextjs/sui-template/public/discord.svg +9 -0
- package/template/nextjs/sui-template/public/fail.svg +12 -0
- package/template/nextjs/sui-template/public/favicon.ico +0 -0
- package/template/nextjs/sui-template/public/locales/de/common.json +8 -0
- package/template/nextjs/sui-template/public/locales/de/footer.json +3 -0
- package/template/nextjs/sui-template/public/locales/de/second-page.json +5 -0
- package/template/nextjs/sui-template/public/locales/en/common.json +8 -0
- package/template/nextjs/sui-template/public/locales/en/footer.json +3 -0
- package/template/nextjs/sui-template/public/locales/en/second-page.json +5 -0
- package/template/nextjs/sui-template/public/locales/zn/common.json +8 -0
- package/template/nextjs/sui-template/public/locales/zn/footer.json +3 -0
- package/template/nextjs/sui-template/public/locales/zn/second-page.json +5 -0
- package/template/nextjs/sui-template/public/logo.svg +1 -0
- package/template/nextjs/sui-template/public/medium.svg +9 -0
- package/template/nextjs/sui-template/public/successful.svg +11 -0
- package/template/nextjs/sui-template/public/telegram.svg +9 -0
- package/template/nextjs/sui-template/public/twitter.svg +9 -0
- package/template/nextjs/sui-template/scripts/checkBalance.ts +40 -0
- package/template/nextjs/sui-template/scripts/deployment/common.ts +60 -0
- package/template/nextjs/sui-template/scripts/deployment/localnet/deploy.ts +42 -0
- package/template/nextjs/sui-template/scripts/deployment/testnet/deploy.ts +48 -0
- package/template/nextjs/sui-template/scripts/deployment/types.ts +13 -0
- package/template/nextjs/sui-template/scripts/framework/common.ts +17 -0
- package/template/nextjs/sui-template/scripts/framework/deploy.ts +199 -0
- package/template/nextjs/sui-template/scripts/framework/parse-history.ts +76 -0
- package/template/nextjs/sui-template/scripts/framework/types.ts +8 -0
- package/template/nextjs/sui-template/scripts/generateAccount.ts +55 -0
- package/template/nextjs/sui-template/scripts/storeConfig.ts +61 -0
- package/template/nextjs/sui-template/scripts/waitNode.ts +9 -0
- package/template/nextjs/sui-template/src/chain/config.ts +7 -0
- package/template/nextjs/sui-template/src/components/Animation.tsx +80 -0
- package/template/nextjs/sui-template/src/components/Container.tsx +11 -0
- package/template/nextjs/sui-template/src/components/footer/index.tsx +138 -0
- package/template/nextjs/sui-template/src/components/head/index.tsx +14 -0
- package/template/nextjs/sui-template/src/components/header/index.tsx +173 -0
- package/template/nextjs/sui-template/src/components/pop_up_box/index.tsx +149 -0
- package/template/nextjs/sui-template/src/css/font-awesome.css +2337 -0
- package/template/nextjs/sui-template/src/css/font-awesome.min.css +4 -0
- package/template/nextjs/sui-template/src/fonts/FontAwesome.otf +0 -0
- package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.eot +0 -0
- package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.svg +2671 -0
- package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.ttf +0 -0
- package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.woff +0 -0
- package/template/nextjs/sui-template/src/fonts/fontawesome-webfont.woff2 +0 -0
- package/template/nextjs/sui-template/src/jotai/index.tsx +13 -0
- package/template/nextjs/sui-template/src/pages/_app.tsx +32 -0
- package/template/nextjs/sui-template/src/pages/home/index.tsx +147 -0
- package/template/nextjs/sui-template/src/pages/index.tsx +15 -0
- package/template/nextjs/sui-template/tailwind.config.js +56 -0
- package/template/nextjs/sui-template/tsconfig.json +35 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { atom } from 'jotai';
|
|
2
|
+
|
|
3
|
+
const SellPopUpBoxState = atom(false);
|
|
4
|
+
const SellState = atom({
|
|
5
|
+
type: '',
|
|
6
|
+
hash: '',
|
|
7
|
+
state: false,
|
|
8
|
+
});
|
|
9
|
+
const OpenBoxState = atom(false);
|
|
10
|
+
const Value = atom('');
|
|
11
|
+
|
|
12
|
+
export { SellPopUpBoxState, SellState, OpenBoxState, Value };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { loadMetadata, Dubhe, Transaction, TransactionResult, DevInspectResults } from '@0xobelisk/sui-client';
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { useAtom } from 'jotai';
|
|
4
|
+
import { Value } from '../../jotai';
|
|
5
|
+
import { useRouter } from 'next/router';
|
|
6
|
+
import { Counter_Object_Id, NETWORK, PACKAGE_ID } from '../../chain/config';
|
|
7
|
+
import { PRIVATEKEY } from '../../chain/key';
|
|
8
|
+
|
|
9
|
+
const Home = () => {
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
const [value, setValue] = useAtom(Value);
|
|
12
|
+
const [loading, setLoading] = useState(false);
|
|
13
|
+
|
|
14
|
+
const query_counter_value = async () => {
|
|
15
|
+
const metadata = await loadMetadata(NETWORK, PACKAGE_ID);
|
|
16
|
+
const dubhe = new Dubhe({
|
|
17
|
+
networkType: NETWORK,
|
|
18
|
+
packageId: PACKAGE_ID,
|
|
19
|
+
metadata: metadata,
|
|
20
|
+
});
|
|
21
|
+
const tx = new Transaction();
|
|
22
|
+
console.log('counterObjectId:', Counter_Object_Id);
|
|
23
|
+
const query_value = (await dubhe.query.counter_system.get(tx, [
|
|
24
|
+
tx.object(Counter_Object_Id),
|
|
25
|
+
])) as DevInspectResults;
|
|
26
|
+
console.log(dubhe.view(query_value)[0]);
|
|
27
|
+
setValue(dubhe.view(query_value)[0]);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const counter = async () => {
|
|
31
|
+
setLoading(true);
|
|
32
|
+
try {
|
|
33
|
+
const metadata = await loadMetadata(NETWORK, PACKAGE_ID);
|
|
34
|
+
const dubhe = new Dubhe({
|
|
35
|
+
networkType: NETWORK,
|
|
36
|
+
packageId: PACKAGE_ID,
|
|
37
|
+
metadata: metadata,
|
|
38
|
+
secretKey: PRIVATEKEY,
|
|
39
|
+
});
|
|
40
|
+
const tx = new Transaction();
|
|
41
|
+
(await dubhe.tx.counter_system.inc(tx, [tx.object(Counter_Object_Id)], undefined, true)) as TransactionResult;
|
|
42
|
+
const response = await dubhe.signAndSendTxn(tx);
|
|
43
|
+
if (response.effects.status.status == 'success') {
|
|
44
|
+
setTimeout(async () => {
|
|
45
|
+
await query_counter_value();
|
|
46
|
+
setLoading(false);
|
|
47
|
+
}, 200);
|
|
48
|
+
}
|
|
49
|
+
} catch (error) {
|
|
50
|
+
setLoading(false);
|
|
51
|
+
console.error(error);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
if (router.isReady) {
|
|
57
|
+
query_counter_value();
|
|
58
|
+
}
|
|
59
|
+
}, [router.isReady]);
|
|
60
|
+
return (
|
|
61
|
+
<div className="max-w-7xl mx-auto text-center py-12 px-4 sm:px-6 lg:py-16 lg:px-8 flex-6">
|
|
62
|
+
<div className="flex flex-col gap-6 mt-12">
|
|
63
|
+
<div className="flex flex-col gap-4">
|
|
64
|
+
You account already have some sui from testnet
|
|
65
|
+
<div className="flex flex-col gap-6 text-2xl text-green-600 mt-6 ">Counter: {value}</div>
|
|
66
|
+
<div className="flex flex-col gap-6">
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
className="mx-auto px-5 py-3 border border-transparent text-base font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700"
|
|
70
|
+
onClick={() => counter()}
|
|
71
|
+
disabled={loading}
|
|
72
|
+
>
|
|
73
|
+
{loading ? 'Processing...' : 'Increment'}
|
|
74
|
+
</button>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default Home;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const defaultTheme = require('tailwindcss/defaultTheme')
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
|
|
5
|
+
content: ['./src/**/*.{js,ts,jsx,tsx}'],
|
|
6
|
+
darkMode: 'media', // or 'media' or 'class'
|
|
7
|
+
theme: {
|
|
8
|
+
extend: {
|
|
9
|
+
spacing: {
|
|
10
|
+
"70":"17rem",
|
|
11
|
+
'78':'18rem',
|
|
12
|
+
'82': '20rem',
|
|
13
|
+
'90': '22rem',
|
|
14
|
+
'93': '23rem',
|
|
15
|
+
'97': '25rem',
|
|
16
|
+
'98': '27rem',
|
|
17
|
+
'99': "30rem",
|
|
18
|
+
"new":"34rem",
|
|
19
|
+
"new-1":"39rem",
|
|
20
|
+
"100":"43rem",
|
|
21
|
+
"105":"46rem",
|
|
22
|
+
"106":"48rem",
|
|
23
|
+
},
|
|
24
|
+
colors: {
|
|
25
|
+
transparent: 'transparent',
|
|
26
|
+
current: 'currentColor',
|
|
27
|
+
custom:{
|
|
28
|
+
DEFAULT:'#8861D1',
|
|
29
|
+
light:"#8861D1",
|
|
30
|
+
dark:"#8861D1",
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
},
|
|
34
|
+
screens: {
|
|
35
|
+
'3xl': '1700px',
|
|
36
|
+
},
|
|
37
|
+
fontFamily: {
|
|
38
|
+
sans: ['Inter var', ...defaultTheme.fontFamily.sans],
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
},
|
|
46
|
+
plugins: [
|
|
47
|
+
|
|
48
|
+
require('@tailwindcss/line-clamp'),
|
|
49
|
+
require('tailwind-scrollbar'),
|
|
50
|
+
],
|
|
51
|
+
variants: {
|
|
52
|
+
scrollbar: ['rounded']
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ts-node": {
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "CommonJS"
|
|
5
|
+
}
|
|
6
|
+
},
|
|
7
|
+
"compilerOptions": {
|
|
8
|
+
"target": "es6",
|
|
9
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"strict": false,
|
|
13
|
+
"forceConsistentCasingInFileNames": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"module": "esnext",
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"isolatedModules": true,
|
|
20
|
+
"jsx": "preserve",
|
|
21
|
+
"incremental": true
|
|
22
|
+
},
|
|
23
|
+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
|
24
|
+
"exclude": ["node_modules"]
|
|
25
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
## How to use
|
|
2
|
+
```bash
|
|
3
|
+
|
|
4
|
+
1 install aptos <https://aptos.dev>
|
|
5
|
+
2 import project by cocos create IDE
|
|
6
|
+
3 pnpm i
|
|
7
|
+
4 pnpm run dev
|
|
8
|
+
5 start your cocos project
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
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,87 @@
|
|
|
1
|
+
import { _decorator, Component, find, LabelComponent, sys } from "cc";
|
|
2
|
+
import { dubheConfig } from "./dubhe.config";
|
|
3
|
+
import { NETWORK, PACKAGE_ID } from "./chain/config";
|
|
4
|
+
|
|
5
|
+
const { ccclass, property } = _decorator;
|
|
6
|
+
|
|
7
|
+
@ccclass("aptos")
|
|
8
|
+
export class aptos extends Component {
|
|
9
|
+
async start() {
|
|
10
|
+
this.aptos_account_create();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
async aptos_account_create() {
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
const dubhe_sdk = window.dubhe;
|
|
16
|
+
const decode = JSON.parse(sys.localStorage.getItem("userWalletData"));
|
|
17
|
+
if (decode == null) {
|
|
18
|
+
const keypair = new dubhe_sdk.AptosAccount();
|
|
19
|
+
const wallet = keypair.toPrivateKeyObject();
|
|
20
|
+
const code = JSON.stringify(wallet);
|
|
21
|
+
sys.localStorage.setItem("userWalletData", code);
|
|
22
|
+
const metadata = await dubhe_sdk.loadMetadata(NETWORK, PACKAGE_ID);
|
|
23
|
+
const dubhe = new dubhe_sdk.Dubhe({
|
|
24
|
+
networkType: NETWORK,
|
|
25
|
+
packageId: PACKAGE_ID,
|
|
26
|
+
metadata: metadata,
|
|
27
|
+
});
|
|
28
|
+
const address = keypair.address().toString();
|
|
29
|
+
await dubhe.requestFaucet(NETWORK, address);
|
|
30
|
+
const component_name = Object.keys(dubheConfig.schemas)[0];
|
|
31
|
+
const component_value = await dubhe.getEntity(component_name);
|
|
32
|
+
console.log(component_value);
|
|
33
|
+
} else {
|
|
34
|
+
const metadata = await dubhe_sdk.loadMetadata(NETWORK, PACKAGE_ID);
|
|
35
|
+
const dubhe = new dubhe_sdk.Dubhe({
|
|
36
|
+
networkType: NETWORK,
|
|
37
|
+
packageId: PACKAGE_ID,
|
|
38
|
+
metadata: metadata,
|
|
39
|
+
});
|
|
40
|
+
const component_name = Object.keys(dubheConfig.schemas)[0];
|
|
41
|
+
const component_value = await dubhe.getEntity(component_name);
|
|
42
|
+
const counter_node = find("Canvas/Camera/counter");
|
|
43
|
+
const label = counter_node.getComponent("cc.Label") as LabelComponent;
|
|
44
|
+
label.string = `Counter: ${component_value}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async export_wallet() {
|
|
49
|
+
const keypair = JSON.parse(sys.localStorage.getItem("userWalletData"));
|
|
50
|
+
|
|
51
|
+
return keypair.privateKeyHex;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
async gameStart() {
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
const dubhe_sdk = window.dubhe;
|
|
57
|
+
const metadata = await dubhe_sdk.loadMetadata(NETWORK, PACKAGE_ID);
|
|
58
|
+
console.log(metadata);
|
|
59
|
+
|
|
60
|
+
const privateKey = await this.export_wallet();
|
|
61
|
+
// new dubhe class
|
|
62
|
+
const dubhe = new dubhe_sdk.Dubhe({
|
|
63
|
+
networkType: NETWORK,
|
|
64
|
+
packageId: PACKAGE_ID,
|
|
65
|
+
metadata: metadata,
|
|
66
|
+
secretKey: privateKey,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const response = await dubhe.tx.counter_system.increase();
|
|
70
|
+
console.log(response);
|
|
71
|
+
setTimeout(async () => {
|
|
72
|
+
const metadata = await dubhe_sdk.loadMetadata(NETWORK, PACKAGE_ID);
|
|
73
|
+
const dubhe = new dubhe_sdk.Dubhe({
|
|
74
|
+
networkType: NETWORK,
|
|
75
|
+
packageId: PACKAGE_ID,
|
|
76
|
+
metadata: metadata,
|
|
77
|
+
});
|
|
78
|
+
const component_name = Object.keys(dubheConfig.schemas)[0];
|
|
79
|
+
const component_value = await dubhe.getEntity(component_name);
|
|
80
|
+
const counter_node = find("Canvas/Camera/counter");
|
|
81
|
+
const label = counter_node.getComponent("cc.Label") as LabelComponent;
|
|
82
|
+
label.string = `Counter: ${component_value}`;
|
|
83
|
+
}, 1000);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
update(deltaTime: number) {}
|
|
87
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
enum Network {
|
|
2
|
+
MAINNET = "mainnet",
|
|
3
|
+
TESTNET = "testnet",
|
|
4
|
+
DEVNET = "devnet",
|
|
5
|
+
LOCAL = "local"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const NETWORK: Network = Network.LOCAL;
|
|
9
|
+
|
|
10
|
+
const PACKAGE_ID = '0xb746e5bfe81fd621776778952421a36887edba8c7bdffa88ef09de55ae579a6d';
|
|
11
|
+
|
|
12
|
+
export { NETWORK, PACKAGE_ID };
|
|
@@ -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;
|