create-dubhe 0.1.6 → 0.1.8

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 (177) hide show
  1. package/index.js +1 -1
  2. package/package.json +11 -3
  3. package/template/101/aptos-template/.prettierignore +1 -0
  4. package/template/101/aptos-template/.prettierrc +7 -7
  5. package/template/101/aptos-template/.prettierrc.json +8 -0
  6. package/template/101/aptos-template/README.md +3 -2
  7. package/template/101/aptos-template/jest.config.ts +3 -3
  8. package/template/101/aptos-template/next-i18next.config.js +4 -4
  9. package/template/101/aptos-template/next.config.js +11 -12
  10. package/template/101/aptos-template/package.json +10 -5
  11. package/template/101/aptos-template/postcss.config.js +1 -1
  12. package/template/101/aptos-template/public/locales/de/common.json +1 -1
  13. package/template/101/aptos-template/public/locales/de/footer.json +1 -1
  14. package/template/101/aptos-template/public/locales/de/second-page.json +1 -1
  15. package/template/101/aptos-template/public/locales/en/footer.json +1 -1
  16. package/template/101/aptos-template/public/locales/en/second-page.json +1 -1
  17. package/template/101/aptos-template/public/locales/zn/common.json +1 -1
  18. package/template/101/aptos-template/public/locales/zn/footer.json +1 -1
  19. package/template/101/aptos-template/public/locales/zn/second-page.json +1 -1
  20. package/template/101/aptos-template/scripts/checkBalance.ts +1 -1
  21. package/template/101/aptos-template/src/css/font-awesome.css +692 -687
  22. package/template/101/aptos-template/src/css/font-awesome.min.css +2333 -1
  23. package/template/101/aptos-template/tailwind.config.js +40 -52
  24. package/template/101/initia-template/.prettierignore +1 -0
  25. package/template/101/initia-template/.prettierrc +7 -7
  26. package/template/101/initia-template/.prettierrc.json +8 -0
  27. package/template/101/initia-template/README.md +3 -2
  28. package/template/101/initia-template/jest.config.ts +3 -3
  29. package/template/101/initia-template/next-i18next.config.js +4 -4
  30. package/template/101/initia-template/next.config.js +11 -12
  31. package/template/101/initia-template/package.json +8 -3
  32. package/template/101/initia-template/postcss.config.js +1 -1
  33. package/template/101/initia-template/public/locales/de/common.json +1 -1
  34. package/template/101/initia-template/public/locales/de/footer.json +1 -1
  35. package/template/101/initia-template/public/locales/de/second-page.json +1 -1
  36. package/template/101/initia-template/public/locales/en/footer.json +1 -1
  37. package/template/101/initia-template/public/locales/en/second-page.json +1 -1
  38. package/template/101/initia-template/public/locales/zn/common.json +1 -1
  39. package/template/101/initia-template/public/locales/zn/footer.json +1 -1
  40. package/template/101/initia-template/public/locales/zn/second-page.json +1 -1
  41. package/template/101/initia-template/src/chain/config.ts +1 -1
  42. package/template/101/initia-template/src/css/font-awesome.css +692 -687
  43. package/template/101/initia-template/src/css/font-awesome.min.css +2333 -1
  44. package/template/101/initia-template/src/pages/index.tsx +7 -9
  45. package/template/101/initia-template/tailwind.config.js +40 -52
  46. package/template/101/movement-template/.prettierignore +1 -0
  47. package/template/101/movement-template/.prettierrc +7 -7
  48. package/template/101/movement-template/.prettierrc.json +8 -0
  49. package/template/101/movement-template/README.md +3 -2
  50. package/template/101/movement-template/jest.config.ts +3 -3
  51. package/template/101/movement-template/next-i18next.config.js +4 -4
  52. package/template/101/movement-template/next.config.js +11 -12
  53. package/template/101/movement-template/package.json +10 -5
  54. package/template/101/movement-template/postcss.config.js +1 -1
  55. package/template/101/movement-template/public/locales/de/common.json +1 -1
  56. package/template/101/movement-template/public/locales/de/footer.json +1 -1
  57. package/template/101/movement-template/public/locales/de/second-page.json +1 -1
  58. package/template/101/movement-template/public/locales/en/footer.json +1 -1
  59. package/template/101/movement-template/public/locales/en/second-page.json +1 -1
  60. package/template/101/movement-template/public/locales/zn/common.json +1 -1
  61. package/template/101/movement-template/public/locales/zn/footer.json +1 -1
  62. package/template/101/movement-template/public/locales/zn/second-page.json +1 -1
  63. package/template/101/movement-template/src/css/font-awesome.css +692 -687
  64. package/template/101/movement-template/src/css/font-awesome.min.css +2333 -1
  65. package/template/101/movement-template/tailwind.config.js +40 -52
  66. package/template/101/rooch-template/.prettierignore +1 -0
  67. package/template/101/rooch-template/.prettierrc +7 -7
  68. package/template/101/rooch-template/.prettierrc.json +8 -0
  69. package/template/101/rooch-template/README.md +3 -2
  70. package/template/101/rooch-template/jest.config.ts +3 -3
  71. package/template/101/rooch-template/next-i18next.config.js +4 -4
  72. package/template/101/rooch-template/next.config.js +11 -12
  73. package/template/101/rooch-template/package.json +8 -3
  74. package/template/101/rooch-template/postcss.config.js +1 -1
  75. package/template/101/rooch-template/public/locales/de/common.json +1 -1
  76. package/template/101/rooch-template/public/locales/de/footer.json +1 -1
  77. package/template/101/rooch-template/public/locales/de/second-page.json +1 -1
  78. package/template/101/rooch-template/public/locales/en/footer.json +1 -1
  79. package/template/101/rooch-template/public/locales/en/second-page.json +1 -1
  80. package/template/101/rooch-template/public/locales/zn/common.json +1 -1
  81. package/template/101/rooch-template/public/locales/zn/footer.json +1 -1
  82. package/template/101/rooch-template/public/locales/zn/second-page.json +1 -1
  83. package/template/101/rooch-template/src/chain/config.ts +1 -1
  84. package/template/101/rooch-template/src/css/font-awesome.css +692 -687
  85. package/template/101/rooch-template/src/css/font-awesome.min.css +2333 -1
  86. package/template/101/rooch-template/src/pages/index.tsx +7 -9
  87. package/template/101/rooch-template/tailwind.config.js +40 -52
  88. package/template/101/sui-template/.prettierignore +1 -0
  89. package/template/101/sui-template/.prettierrc.json +8 -0
  90. package/template/101/sui-template/README.md +4 -2
  91. package/template/101/sui-template/contracts/counter/sources/codegen/dapp/metadata.move +1 -1
  92. package/template/101/sui-template/contracts/counter/sources/codegen/dapp/schema.move +2 -2
  93. package/template/101/sui-template/contracts/counter/sources/codegen/dapp/system.move +7 -7
  94. package/template/101/sui-template/contracts/counter/sources/codegen/data/increment_event.move +1 -1
  95. package/template/101/sui-template/contracts/counter/sources/codegen/errors.move +3 -3
  96. package/template/101/sui-template/contracts/counter/sources/codegen/events.move +4 -4
  97. package/template/101/sui-template/contracts/counter/sources/codegen/genesis.move +5 -5
  98. package/template/101/sui-template/contracts/counter/sources/codegen/schema.move +9 -1
  99. package/template/101/sui-template/contracts/counter/sources/scripts/deploy_hook.move +2 -2
  100. package/template/101/sui-template/contracts/counter/sources/scripts/migrate.move +1 -1
  101. package/template/101/sui-template/contracts/counter/sources/systems/counter.move +3 -3
  102. package/template/101/sui-template/contracts/counter/sources/tests/counter.move +3 -3
  103. package/template/101/sui-template/contracts/counter/sources/tests/init.move +3 -3
  104. package/template/101/sui-template/dubhe.config.ts +4 -4
  105. package/template/101/sui-template/package.json +8 -7
  106. package/template/cocos/aptos-template/README.md +2 -1
  107. package/template/cocos/aptos-template/assets/Scripts/aptos.ts +15 -15
  108. package/template/cocos/aptos-template/assets/Scripts/chain/config.ts +5 -5
  109. package/template/cocos/aptos-template/assets/Scripts/dubhe.config.ts +8 -8
  110. package/template/cocos/aptos-template/assets/lib/obelisk.js +23107 -19762
  111. package/template/cocos/aptos-template/package.json +37 -37
  112. package/template/cocos/aptos-template/scripts/formatAccount.ts +18 -18
  113. package/template/cocos/aptos-template/scripts/generateAccount.ts +2 -2
  114. package/template/cocos/aptos-template/scripts/storeConfig.ts +37 -37
  115. package/template/cocos/aptos-template/tsconfig.json +2 -2
  116. package/template/cocos/sui-template/README.md +2 -1
  117. package/template/cocos/sui-template/assets/Scripts/chain/config.ts +3 -7
  118. package/template/cocos/sui-template/assets/Scripts/dubhe.config.ts +9 -9
  119. package/template/cocos/sui-template/assets/Scripts/sui.ts +87 -103
  120. package/template/cocos/sui-template/docker-compose.yaml +10 -4
  121. package/template/cocos/sui-template/package.json +25 -25
  122. package/template/cocos/sui-template/scripts/generateAccount.ts +38 -38
  123. package/template/cocos/sui-template/scripts/storeConfig.ts +36 -41
  124. package/template/cocos/sui-template/tsconfig.json +3 -10
  125. package/template/contract/sui-template/dubhe.config.ts +3 -3
  126. package/template/contract/sui-template/package.json +28 -28
  127. package/template/contract/sui-template/tsconfig.json +3 -13
  128. package/template/nextjs/aptos-template/.prettierignore +1 -0
  129. package/template/nextjs/aptos-template/.prettierrc +7 -7
  130. package/template/nextjs/aptos-template/.prettierrc.json +8 -0
  131. package/template/nextjs/aptos-template/README.md +2 -1
  132. package/template/nextjs/aptos-template/jest.config.ts +3 -3
  133. package/template/nextjs/aptos-template/next-i18next.config.js +4 -4
  134. package/template/nextjs/aptos-template/next.config.js +11 -12
  135. package/template/nextjs/aptos-template/package.json +11 -8
  136. package/template/nextjs/aptos-template/postcss.config.js +1 -1
  137. package/template/nextjs/aptos-template/public/locales/de/common.json +1 -1
  138. package/template/nextjs/aptos-template/public/locales/de/footer.json +1 -1
  139. package/template/nextjs/aptos-template/public/locales/de/second-page.json +1 -1
  140. package/template/nextjs/aptos-template/public/locales/en/footer.json +1 -1
  141. package/template/nextjs/aptos-template/public/locales/en/second-page.json +1 -1
  142. package/template/nextjs/aptos-template/public/locales/zn/common.json +1 -1
  143. package/template/nextjs/aptos-template/public/locales/zn/footer.json +1 -1
  144. package/template/nextjs/aptos-template/public/locales/zn/second-page.json +1 -1
  145. package/template/nextjs/aptos-template/src/components/Animation.tsx +60 -70
  146. package/template/nextjs/aptos-template/src/components/Container.tsx +2 -8
  147. package/template/nextjs/aptos-template/src/components/footer/index.tsx +124 -135
  148. package/template/nextjs/aptos-template/src/components/head/index.tsx +14 -14
  149. package/template/nextjs/aptos-template/src/components/header/index.tsx +143 -157
  150. package/template/nextjs/aptos-template/src/components/pop_up_box/index.tsx +150 -138
  151. package/template/nextjs/aptos-template/src/css/font-awesome.css +692 -687
  152. package/template/nextjs/aptos-template/src/css/font-awesome.min.css +2333 -1
  153. package/template/nextjs/aptos-template/src/jotai/index.tsx +9 -10
  154. package/template/nextjs/aptos-template/src/pages/_app.tsx +16 -16
  155. package/template/nextjs/aptos-template/src/pages/index.tsx +7 -10
  156. package/template/nextjs/aptos-template/tailwind.config.js +44 -55
  157. package/template/nextjs/aptos-template/tsconfig.json +3 -13
  158. package/template/nextjs/sui-template/.prettierignore +1 -0
  159. package/template/nextjs/sui-template/.prettierrc.json +8 -0
  160. package/template/nextjs/sui-template/README.md +4 -2
  161. package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp/metadata.move +1 -1
  162. package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp/schema.move +2 -2
  163. package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp/system.move +7 -7
  164. package/template/nextjs/sui-template/contracts/counter/sources/codegen/data/increment_event.move +1 -1
  165. package/template/nextjs/sui-template/contracts/counter/sources/codegen/errors.move +3 -3
  166. package/template/nextjs/sui-template/contracts/counter/sources/codegen/events.move +4 -4
  167. package/template/nextjs/sui-template/contracts/counter/sources/codegen/genesis.move +5 -5
  168. package/template/nextjs/sui-template/contracts/counter/sources/codegen/schema.move +9 -1
  169. package/template/nextjs/sui-template/contracts/counter/sources/scripts/deploy_hook.move +2 -2
  170. package/template/nextjs/sui-template/contracts/counter/sources/scripts/migrate.move +1 -1
  171. package/template/nextjs/sui-template/contracts/counter/sources/systems/counter.move +3 -3
  172. package/template/nextjs/sui-template/contracts/counter/sources/tests/counter.move +3 -3
  173. package/template/nextjs/sui-template/contracts/counter/sources/tests/init.move +3 -3
  174. package/template/nextjs/sui-template/dubhe.config.ts +4 -4
  175. package/template/nextjs/sui-template/next.config.mjs +1 -2
  176. package/template/nextjs/sui-template/package.json +9 -8
  177. package/template/nextjs/sui-template/src/chain/config.ts +2 -2
@@ -2,54 +2,54 @@ import { Dubhe } from '@0xobelisk/sui-client';
2
2
  import * as fs from 'fs';
3
3
 
4
4
  async function generateAccount() {
5
- const path = process.cwd();
6
-
7
- // Check if .env file exists and has content
8
- let privateKey: string;
9
- try {
10
- const envContent = fs.readFileSync(`${path}/.env`, 'utf8');
11
- const match = envContent.match(/PRIVATE_KEY=(.+)/);
12
- if (match && match[1]) {
13
- privateKey = match[1];
14
- const dubhe = new Dubhe({ secretKey: privateKey });
15
- const keypair = dubhe.getKeypair();
16
-
17
- // Only update key.ts file
18
- const chainFolderPath = `${path}/src/chain`;
19
- fs.mkdirSync(chainFolderPath, { recursive: true });
20
-
21
- fs.writeFileSync(
22
- `${path}/src/chain/key.ts`,
23
- `export const PRIVATEKEY = '${privateKey}';
5
+ const path = process.cwd();
6
+
7
+ // Check if .env file exists and has content
8
+ let privateKey: string;
9
+ try {
10
+ const envContent = fs.readFileSync(`${path}/.env`, 'utf8');
11
+ const match = envContent.match(/PRIVATE_KEY=(.+)/);
12
+ if (match && match[1]) {
13
+ privateKey = match[1];
14
+ const dubhe = new Dubhe({ secretKey: privateKey });
15
+ const keypair = dubhe.getKeypair();
16
+
17
+ // Only update key.ts file
18
+ const chainFolderPath = `${path}/src/chain`;
19
+ fs.mkdirSync(chainFolderPath, { recursive: true });
20
+
21
+ fs.writeFileSync(
22
+ `${path}/src/chain/key.ts`,
23
+ `export const PRIVATEKEY = '${privateKey}';
24
24
  export const ACCOUNT = '${keypair.toSuiAddress()}';
25
25
  `
26
- );
26
+ );
27
27
 
28
- console.log(`Using existing Account: ${keypair.toSuiAddress()}`);
29
- return;
30
- }
31
- } catch (error) {
32
- // .env file doesn't exist or failed to read, continue to generate new account
33
- }
28
+ console.log(`Using existing Account: ${keypair.toSuiAddress()}`);
29
+ return;
30
+ }
31
+ } catch (error) {
32
+ // .env file doesn't exist or failed to read, continue to generate new account
33
+ }
34
34
 
35
- // If no existing private key, generate new account
36
- const dubhe = new Dubhe();
37
- const keypair = dubhe.getKeypair();
38
- privateKey = keypair.getSecretKey();
35
+ // If no existing private key, generate new account
36
+ const dubhe = new Dubhe();
37
+ const keypair = dubhe.getKeypair();
38
+ privateKey = keypair.getSecretKey();
39
39
 
40
- const chainFolderPath = `${path}/src/chain`;
41
- fs.mkdirSync(chainFolderPath, { recursive: true });
40
+ const chainFolderPath = `${path}/src/chain`;
41
+ fs.mkdirSync(chainFolderPath, { recursive: true });
42
42
 
43
- fs.writeFileSync(`${path}/.env`, `PRIVATE_KEY=${privateKey}`);
43
+ fs.writeFileSync(`${path}/.env`, `PRIVATE_KEY=${privateKey}`);
44
44
 
45
- fs.writeFileSync(
46
- `${path}/src/chain/key.ts`,
47
- `export const PRIVATEKEY = '${privateKey}';
45
+ fs.writeFileSync(
46
+ `${path}/src/chain/key.ts`,
47
+ `export const PRIVATEKEY = '${privateKey}';
48
48
  export const ACCOUNT = '${keypair.toSuiAddress()}';
49
49
  `
50
- );
50
+ );
51
51
 
52
- console.log(`Generate new Account: ${keypair.toSuiAddress()}`);
52
+ console.log(`Generate new Account: ${keypair.toSuiAddress()}`);
53
53
  }
54
54
 
55
55
  generateAccount();
@@ -5,71 +5,66 @@ import { dubheConfig } from '../assets/Scripts/dubhe.config';
5
5
  import { dirname } from 'path';
6
6
 
7
7
  export type schema = {
8
- name: string;
9
- objectId: string;
8
+ name: string;
9
+ objectId: string;
10
10
  };
11
11
 
12
12
  type DeploymentJsonType = {
13
- projectName: string;
14
- network: 'mainnet' | 'testnet' | 'devnet' | 'localnet';
15
- packageId: string;
16
- schemas: schema[];
17
- upgradeCap: string;
18
- version: number;
13
+ projectName: string;
14
+ network: 'mainnet' | 'testnet' | 'devnet' | 'localnet';
15
+ packageId: string;
16
+ schemas: schema[];
17
+ upgradeCap: string;
18
+ version: number;
19
19
  };
20
20
 
21
21
  async function getDeploymentJson(projectPath: string, network: string) {
22
- try {
23
- const data = await fsAsync.readFile(
24
- `${projectPath}/.history/sui_${network}/latest.json`,
25
- 'utf8'
26
- );
27
- return JSON.parse(data) as DeploymentJsonType;
28
- } catch {
29
- console.log('store config failed.');
30
- exit;
31
- }
22
+ try {
23
+ const data = await fsAsync.readFile(
24
+ `${projectPath}/.history/sui_${network}/latest.json`,
25
+ 'utf8'
26
+ );
27
+ return JSON.parse(data) as DeploymentJsonType;
28
+ } catch {
29
+ console.log('store config failed.');
30
+ exit;
31
+ }
32
32
  }
33
33
 
34
34
  function storeConfig(network: string, packageId: string, schemas: schema[]) {
35
- let code = `type NetworkType = 'testnet' | 'mainnet' | 'devnet' | 'localnet';
35
+ let code = `type NetworkType = 'testnet' | 'mainnet' | 'devnet' | 'localnet';
36
36
 
37
37
  export const NETWORK: NetworkType = '${network}';
38
38
 
39
39
  export const PACKAGE_ID = '${packageId}'
40
40
 
41
41
  ${schemas
42
- .map(
43
- schema =>
44
- `export const ${schema.name.split('::')[2]}_Object_Id = '${
45
- schema.objectId
46
- }'`
47
- )
48
- .join('\n')}
42
+ .map((schema) => `export const ${schema.name.split('::')[2]}_Object_Id = '${schema.objectId}'`)
43
+ .join('\n')}
49
44
  `;
50
- const path = process.cwd();
51
- writeOutput(code, `${path}/assets/Scripts/chain/config.ts`, 'storeConfig');
45
+ const path = process.cwd();
46
+ writeOutput(code, `${path}/assets/Scripts/chain/config.ts`, 'storeConfig');
52
47
  }
53
48
 
54
49
  async function writeOutput(
55
- output: string,
56
- fullOutputPath: string,
57
- logPrefix?: string
50
+ output: string,
51
+ fullOutputPath: string,
52
+ logPrefix?: string
58
53
  ): Promise<void> {
59
- mkdirSync(dirname(fullOutputPath), { recursive: true });
54
+ mkdirSync(dirname(fullOutputPath), { recursive: true });
60
55
 
61
- writeFileSync(fullOutputPath, output);
62
- if (logPrefix !== undefined) {
63
- console.log(`${logPrefix}: ${fullOutputPath}`);
64
- }
56
+ writeFileSync(fullOutputPath, output);
57
+ if (logPrefix !== undefined) {
58
+ console.log(`${logPrefix}: ${fullOutputPath}`);
59
+ }
65
60
  }
66
61
 
67
62
  async function main() {
68
- const path = process.cwd();
69
- const network = process.argv[2];
70
- const contractPath = `${path}/contracts/${dubheConfig.name}`;
71
- const deployment = await getDeploymentJson(contractPath, network);
72
- storeConfig(deployment.network, deployment.packageId, deployment.schemas);
63
+ const path = process.cwd();
64
+ const network = process.argv[2];
65
+ const contractPath = `${path}/contracts/${dubheConfig.name}`;
66
+ const deployment = await getDeploymentJson(contractPath, network);
67
+ storeConfig(deployment.network, deployment.packageId, deployment.schemas);
73
68
  }
74
69
 
75
70
  main();
@@ -1,19 +1,12 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "module": "commonjs",
4
- "lib": [ "es2015", "es2017", "dom" ],
4
+ "lib": ["es2015", "es2017", "dom"],
5
5
  "target": "es2015",
6
6
  "allowJs": true,
7
7
  "experimentalDecorators": true,
8
8
  "skipLibCheck": true,
9
- "resolveJsonModule": true,
9
+ "resolveJsonModule": true
10
10
  },
11
- "exclude": [
12
- "node_modules",
13
- "library",
14
- "local",
15
- "temp",
16
- "build",
17
- "settings"
18
- ]
11
+ "exclude": ["node_modules", "library", "local", "temp", "build", "settings"]
19
12
  }
@@ -1,7 +1,7 @@
1
1
  import { DubheConfig } from '@0xobelisk/sui-common';
2
2
 
3
3
  export const dubheConfig = {
4
- name: 'template',
5
- description: 'template',
6
- schemas: {},
4
+ name: 'template',
5
+ description: 'template',
6
+ schemas: {}
7
7
  } as DubheConfig;
@@ -1,30 +1,30 @@
1
1
  {
2
- "name": "dubhe-contract-template",
3
- "version": "1.0.0",
4
- "description": "Simple starter template",
5
- "license": "Apache-2.0",
6
- "scripts": {
7
- "// Utility Commands": "----------------",
8
- "start:localnet": "pnpm dubhe node",
9
- "faucet": "pnpm dubhe faucet --network",
10
- "deploy": "pnpm dubhe publish --network",
11
- "upgrade": "pnpm dubhe upgrade --network",
12
- "schema:gen": "pnpm dubhe schemagen",
13
- "account:gen": "pnpm dubhe generate-key",
14
- "check-balance": "pnpm dubhe check-balance --network",
15
- "indexer:sqlite": "pnpm sqlite-indexer --force-regenesis --network"
16
- },
17
- "dependencies": {
18
- "@0xobelisk/sui-cli": "^1.1.0",
19
- "@0xobelisk/sui-client": "^1.1.2",
20
- "@0xobelisk/sui-common": "^1.1.0",
21
- "@0xobelisk/sui-indexer": "^1.1.3",
22
- "dotenv": "^16.4.5",
23
- "chalk": "^4.1.2"
24
- },
25
- "devDependencies": {
26
- "@types/node": "18.16.16",
27
- "ts-node": "^10.9.1",
28
- "typescript": "5.1.6"
29
- }
2
+ "name": "dubhe-contract-template",
3
+ "version": "1.0.0",
4
+ "description": "Simple starter template",
5
+ "license": "Apache-2.0",
6
+ "scripts": {
7
+ "// Utility Commands": "----------------",
8
+ "start:localnet": "pnpm dubhe node",
9
+ "faucet": "pnpm dubhe faucet --network",
10
+ "deploy": "pnpm dubhe publish --network",
11
+ "upgrade": "pnpm dubhe upgrade --network",
12
+ "schema:gen": "pnpm dubhe schemagen",
13
+ "account:gen": "pnpm dubhe generate-key",
14
+ "check-balance": "pnpm dubhe check-balance --network",
15
+ "indexer:sqlite": "pnpm sqlite-indexer --force-regenesis --network"
16
+ },
17
+ "dependencies": {
18
+ "@0xobelisk/sui-cli": "^1.1.6",
19
+ "@0xobelisk/sui-client": "^1.1.10",
20
+ "@0xobelisk/sui-common": "^1.1.7",
21
+ "@0xobelisk/sui-indexer": "^1.1.13",
22
+ "dotenv": "^16.4.5",
23
+ "chalk": "^4.1.2"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "18.16.16",
27
+ "ts-node": "^10.9.1",
28
+ "typescript": "5.1.6"
29
+ }
30
30
  }
@@ -6,11 +6,7 @@
6
6
  },
7
7
  "compilerOptions": {
8
8
  "target": "es6",
9
- "lib": [
10
- "dom",
11
- "dom.iterable",
12
- "esnext"
13
- ],
9
+ "lib": ["dom", "dom.iterable", "esnext"],
14
10
  "allowJs": true,
15
11
  "skipLibCheck": true,
16
12
  "strict": false,
@@ -24,12 +20,6 @@
24
20
  "jsx": "preserve",
25
21
  "incremental": true
26
22
  },
27
- "include": [
28
- "next-env.d.ts",
29
- "**/*.ts",
30
- "**/*.tsx"
31
- ],
32
- "exclude": [
33
- "node_modules"
34
- ]
23
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
24
+ "exclude": ["node_modules"]
35
25
  }
@@ -0,0 +1 @@
1
+ pnpm-lock.yaml
@@ -1,8 +1,8 @@
1
1
  {
2
- "printWidth": 120,
3
- "tabWidth": 2,
4
- "singleQuote": true,
5
- "trailingComma": "all",
6
- "semi": true,
7
- "arrowParens": "avoid"
8
- }
2
+ "printWidth": 120,
3
+ "tabWidth": 2,
4
+ "singleQuote": true,
5
+ "trailingComma": "all",
6
+ "semi": true,
7
+ "arrowParens": "avoid"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/prettierrc",
3
+ "semi": true,
4
+ "tabWidth": 2,
5
+ "singleQuote": true,
6
+ "printWidth": 100,
7
+ "trailingComma": "none"
8
+ }
@@ -1,7 +1,8 @@
1
1
  ## How to use
2
+
2
3
  ```bash
3
4
  1 install aptos <https://aptos.dev>
4
- 2 cd dubhe-nextjs-template folder
5
+ 2 cd dubhe-nextjs-template folder
5
6
  3 pnpm install
6
7
  4 open new window && npm run localnode
7
8
  4 open new window && npm run start-template
@@ -1,4 +1,4 @@
1
- import type { InitialOptionsTsJest } from 'ts-jest/dist/types'
1
+ import type { InitialOptionsTsJest } from 'ts-jest/dist/types';
2
2
 
3
3
  const config: InitialOptionsTsJest = {
4
4
  preset: 'ts-jest',
@@ -12,6 +12,6 @@ const config: InitialOptionsTsJest = {
12
12
  tsconfig: 'tsconfig.test.json',
13
13
  },
14
14
  },
15
- }
15
+ };
16
16
 
17
- export default config
17
+ export default config;
@@ -1,6 +1,6 @@
1
1
  module.exports = {
2
- i18n: {
3
- defaultLocale: 'cn',
4
- locales: ['en','cn'],
5
- },
2
+ i18n: {
3
+ defaultLocale: 'cn',
4
+ locales: ['en', 'cn'],
5
+ },
6
6
  };
@@ -1,15 +1,14 @@
1
- "use strict";
1
+ 'use strict';
2
2
  const { i18n } = require('./next-i18next.config');
3
3
 
4
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
-
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
+ };
@@ -5,6 +5,10 @@
5
5
  "author": "team@0xobelisk.com",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
+ "format": "prettier --write .",
9
+ "format:check": "prettier --check .",
10
+ "type-check": "tsc --noEmit",
11
+ "validate": "pnpm format:check && pnpm type-check",
8
12
  "dev": "pnpm dubhe hello && pnpm run start-template",
9
13
  "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",
10
14
  "dev:movement": "pnpm dubhe hello && pnpm run start-movement-template",
@@ -12,9 +16,7 @@
12
16
  "next": "next",
13
17
  "build": "next build",
14
18
  "start": "next start",
15
- "type-check": "tsc",
16
19
  "test": "jest",
17
- "format": "prettier --write 'src/**/*ts'",
18
20
  "lint": "next lint",
19
21
  "faucet-localnet": "pnpm dubhe faucet --network local",
20
22
  "faucet-devnet": "pnpm dubhe faucet --network devnet",
@@ -33,9 +35,9 @@
33
35
  "generateAccount": "ts-node scripts/generateAccount.ts"
34
36
  },
35
37
  "dependencies": {
36
- "@0xobelisk/aptos-common": "^0.0.7",
37
- "@0xobelisk/aptos-client": "^0.0.13",
38
- "@0xobelisk/aptos-cli": "^0.0.10",
38
+ "@0xobelisk/aptos-common": "^0.0.8",
39
+ "@0xobelisk/aptos-client": "^0.0.19",
40
+ "@0xobelisk/aptos-cli": "^0.0.16",
39
41
  "@aptos-labs/wallet-adapter-mui-design": "^1.0.7",
40
42
  "@aptos-labs/wallet-adapter-react": "^1.4.0",
41
43
  "aptos": "^1.20.0",
@@ -66,17 +68,18 @@
66
68
  "@types/react": "18.2.8",
67
69
  "@types/react-dom": "18.2.4",
68
70
  "autoprefixer": "^10.4.14",
69
- "eslint": "^8.41.0",
70
71
  "eslint-config-next": "13.4.4",
71
72
  "jest": "^29.5.0",
72
73
  "jest-css-modules-transform": "^4.4.2",
73
74
  "postcss": "^8.4.24",
74
- "prettier": "^2.8.8",
75
75
  "prop-types": "^15.8.1",
76
76
  "tailwind-scrollbar": "^2.1.0",
77
77
  "tailwindcss": "^3.2.4",
78
78
  "ts-jest": "^29.1.0",
79
79
  "ts-node": "^10.9.1",
80
- "typescript": "5.1.6"
80
+ "typescript": "5.1.6",
81
+ "eslint": "^8.56.0",
82
+ "eslint-config-prettier": "^9.1.0",
83
+ "prettier": "3.3.3"
81
84
  }
82
85
  }
@@ -3,4 +3,4 @@ module.exports = {
3
3
  tailwindcss: {},
4
4
  autoprefixer: {},
5
5
  },
6
- }
6
+ };
@@ -5,4 +5,4 @@
5
5
  "error-with-status": "Auf dem Server ist ein Fehler ({{statusCode}}) aufgetreten",
6
6
  "error-without-status": "Auf dem Server ist ein Fehler aufgetreten",
7
7
  "title": "Hauptseite | next-i18next"
8
- }
8
+ }
@@ -1,3 +1,3 @@
1
1
  {
2
2
  "description": "Dies ist eine Nicht-Seitenkomponente, die einen eigenen Namespace erfordert"
3
- }
3
+ }
@@ -2,4 +2,4 @@
2
2
  "h1": "Eine zweite Seite, um das Routing zu demonstrieren",
3
3
  "back-to-home": "Zurück zur Hauptseite",
4
4
  "title": "Zweite Seite | next-i18next"
5
- }
5
+ }
@@ -1,3 +1,3 @@
1
1
  {
2
2
  "description": "This is a non-page component that requires its own namespace"
3
- }
3
+ }
@@ -2,4 +2,4 @@
2
2
  "h1": "A second page, to demonstrate routing",
3
3
  "back-to-home": "Back to home",
4
4
  "title": "Second page | next-i18next"
5
- }
5
+ }
@@ -5,4 +5,4 @@
5
5
  "error-with-status": "Auf dem Server ist ein Fehler ({{statusCode}}) aufgetreten",
6
6
  "error-without-status": "Auf dem Server ist ein Fehler aufgetreten",
7
7
  "title": "Hauptseite | next-i18next"
8
- }
8
+ }
@@ -1,3 +1,3 @@
1
1
  {
2
2
  "description": "11"
3
- }
3
+ }
@@ -2,4 +2,4 @@
2
2
  "h1": "Eine zweite Seite, um das Routing zu demonstrieren",
3
3
  "back-to-home": "Zurück zur Hauptseite",
4
4
  "title": "Zweite Seite | next-i18next"
5
- }
5
+ }