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.
- package/index.js +1 -1
- package/package.json +11 -3
- package/template/101/aptos-template/.prettierignore +1 -0
- package/template/101/aptos-template/.prettierrc +7 -7
- package/template/101/aptos-template/.prettierrc.json +8 -0
- package/template/101/aptos-template/README.md +3 -2
- package/template/101/aptos-template/jest.config.ts +3 -3
- package/template/101/aptos-template/next-i18next.config.js +4 -4
- package/template/101/aptos-template/next.config.js +11 -12
- package/template/101/aptos-template/package.json +10 -5
- package/template/101/aptos-template/postcss.config.js +1 -1
- package/template/101/aptos-template/public/locales/de/common.json +1 -1
- package/template/101/aptos-template/public/locales/de/footer.json +1 -1
- package/template/101/aptos-template/public/locales/de/second-page.json +1 -1
- package/template/101/aptos-template/public/locales/en/footer.json +1 -1
- package/template/101/aptos-template/public/locales/en/second-page.json +1 -1
- package/template/101/aptos-template/public/locales/zn/common.json +1 -1
- package/template/101/aptos-template/public/locales/zn/footer.json +1 -1
- package/template/101/aptos-template/public/locales/zn/second-page.json +1 -1
- package/template/101/aptos-template/scripts/checkBalance.ts +1 -1
- package/template/101/aptos-template/src/css/font-awesome.css +692 -687
- package/template/101/aptos-template/src/css/font-awesome.min.css +2333 -1
- package/template/101/aptos-template/tailwind.config.js +40 -52
- package/template/101/initia-template/.prettierignore +1 -0
- package/template/101/initia-template/.prettierrc +7 -7
- package/template/101/initia-template/.prettierrc.json +8 -0
- package/template/101/initia-template/README.md +3 -2
- package/template/101/initia-template/jest.config.ts +3 -3
- package/template/101/initia-template/next-i18next.config.js +4 -4
- package/template/101/initia-template/next.config.js +11 -12
- package/template/101/initia-template/package.json +8 -3
- package/template/101/initia-template/postcss.config.js +1 -1
- package/template/101/initia-template/public/locales/de/common.json +1 -1
- package/template/101/initia-template/public/locales/de/footer.json +1 -1
- package/template/101/initia-template/public/locales/de/second-page.json +1 -1
- package/template/101/initia-template/public/locales/en/footer.json +1 -1
- package/template/101/initia-template/public/locales/en/second-page.json +1 -1
- package/template/101/initia-template/public/locales/zn/common.json +1 -1
- package/template/101/initia-template/public/locales/zn/footer.json +1 -1
- package/template/101/initia-template/public/locales/zn/second-page.json +1 -1
- package/template/101/initia-template/src/chain/config.ts +1 -1
- package/template/101/initia-template/src/css/font-awesome.css +692 -687
- package/template/101/initia-template/src/css/font-awesome.min.css +2333 -1
- package/template/101/initia-template/src/pages/index.tsx +7 -9
- package/template/101/initia-template/tailwind.config.js +40 -52
- package/template/101/movement-template/.prettierignore +1 -0
- package/template/101/movement-template/.prettierrc +7 -7
- package/template/101/movement-template/.prettierrc.json +8 -0
- package/template/101/movement-template/README.md +3 -2
- package/template/101/movement-template/jest.config.ts +3 -3
- package/template/101/movement-template/next-i18next.config.js +4 -4
- package/template/101/movement-template/next.config.js +11 -12
- package/template/101/movement-template/package.json +10 -5
- package/template/101/movement-template/postcss.config.js +1 -1
- package/template/101/movement-template/public/locales/de/common.json +1 -1
- package/template/101/movement-template/public/locales/de/footer.json +1 -1
- package/template/101/movement-template/public/locales/de/second-page.json +1 -1
- package/template/101/movement-template/public/locales/en/footer.json +1 -1
- package/template/101/movement-template/public/locales/en/second-page.json +1 -1
- package/template/101/movement-template/public/locales/zn/common.json +1 -1
- package/template/101/movement-template/public/locales/zn/footer.json +1 -1
- package/template/101/movement-template/public/locales/zn/second-page.json +1 -1
- package/template/101/movement-template/src/css/font-awesome.css +692 -687
- package/template/101/movement-template/src/css/font-awesome.min.css +2333 -1
- package/template/101/movement-template/tailwind.config.js +40 -52
- package/template/101/rooch-template/.prettierignore +1 -0
- package/template/101/rooch-template/.prettierrc +7 -7
- package/template/101/rooch-template/.prettierrc.json +8 -0
- package/template/101/rooch-template/README.md +3 -2
- package/template/101/rooch-template/jest.config.ts +3 -3
- package/template/101/rooch-template/next-i18next.config.js +4 -4
- package/template/101/rooch-template/next.config.js +11 -12
- package/template/101/rooch-template/package.json +8 -3
- package/template/101/rooch-template/postcss.config.js +1 -1
- package/template/101/rooch-template/public/locales/de/common.json +1 -1
- package/template/101/rooch-template/public/locales/de/footer.json +1 -1
- package/template/101/rooch-template/public/locales/de/second-page.json +1 -1
- package/template/101/rooch-template/public/locales/en/footer.json +1 -1
- package/template/101/rooch-template/public/locales/en/second-page.json +1 -1
- package/template/101/rooch-template/public/locales/zn/common.json +1 -1
- package/template/101/rooch-template/public/locales/zn/footer.json +1 -1
- package/template/101/rooch-template/public/locales/zn/second-page.json +1 -1
- package/template/101/rooch-template/src/chain/config.ts +1 -1
- package/template/101/rooch-template/src/css/font-awesome.css +692 -687
- package/template/101/rooch-template/src/css/font-awesome.min.css +2333 -1
- package/template/101/rooch-template/src/pages/index.tsx +7 -9
- package/template/101/rooch-template/tailwind.config.js +40 -52
- package/template/101/sui-template/.prettierignore +1 -0
- package/template/101/sui-template/.prettierrc.json +8 -0
- package/template/101/sui-template/README.md +4 -2
- package/template/101/sui-template/contracts/counter/sources/codegen/dapp/metadata.move +1 -1
- package/template/101/sui-template/contracts/counter/sources/codegen/dapp/schema.move +2 -2
- package/template/101/sui-template/contracts/counter/sources/codegen/dapp/system.move +7 -7
- package/template/101/sui-template/contracts/counter/sources/codegen/data/increment_event.move +1 -1
- package/template/101/sui-template/contracts/counter/sources/codegen/errors.move +3 -3
- package/template/101/sui-template/contracts/counter/sources/codegen/events.move +4 -4
- package/template/101/sui-template/contracts/counter/sources/codegen/genesis.move +5 -5
- package/template/101/sui-template/contracts/counter/sources/codegen/schema.move +9 -1
- package/template/101/sui-template/contracts/counter/sources/scripts/deploy_hook.move +2 -2
- package/template/101/sui-template/contracts/counter/sources/scripts/migrate.move +1 -1
- package/template/101/sui-template/contracts/counter/sources/systems/counter.move +3 -3
- package/template/101/sui-template/contracts/counter/sources/tests/counter.move +3 -3
- package/template/101/sui-template/contracts/counter/sources/tests/init.move +3 -3
- package/template/101/sui-template/dubhe.config.ts +4 -4
- package/template/101/sui-template/package.json +8 -7
- package/template/cocos/aptos-template/README.md +2 -1
- package/template/cocos/aptos-template/assets/Scripts/aptos.ts +15 -15
- package/template/cocos/aptos-template/assets/Scripts/chain/config.ts +5 -5
- package/template/cocos/aptos-template/assets/Scripts/dubhe.config.ts +8 -8
- package/template/cocos/aptos-template/assets/lib/obelisk.js +23107 -19762
- package/template/cocos/aptos-template/package.json +37 -37
- package/template/cocos/aptos-template/scripts/formatAccount.ts +18 -18
- package/template/cocos/aptos-template/scripts/generateAccount.ts +2 -2
- package/template/cocos/aptos-template/scripts/storeConfig.ts +37 -37
- package/template/cocos/aptos-template/tsconfig.json +2 -2
- package/template/cocos/sui-template/README.md +2 -1
- package/template/cocos/sui-template/assets/Scripts/chain/config.ts +3 -7
- package/template/cocos/sui-template/assets/Scripts/dubhe.config.ts +9 -9
- package/template/cocos/sui-template/assets/Scripts/sui.ts +87 -103
- package/template/cocos/sui-template/docker-compose.yaml +10 -4
- package/template/cocos/sui-template/package.json +25 -25
- package/template/cocos/sui-template/scripts/generateAccount.ts +38 -38
- package/template/cocos/sui-template/scripts/storeConfig.ts +36 -41
- package/template/cocos/sui-template/tsconfig.json +3 -10
- package/template/contract/sui-template/dubhe.config.ts +3 -3
- package/template/contract/sui-template/package.json +28 -28
- package/template/contract/sui-template/tsconfig.json +3 -13
- package/template/nextjs/aptos-template/.prettierignore +1 -0
- package/template/nextjs/aptos-template/.prettierrc +7 -7
- package/template/nextjs/aptos-template/.prettierrc.json +8 -0
- package/template/nextjs/aptos-template/README.md +2 -1
- package/template/nextjs/aptos-template/jest.config.ts +3 -3
- package/template/nextjs/aptos-template/next-i18next.config.js +4 -4
- package/template/nextjs/aptos-template/next.config.js +11 -12
- package/template/nextjs/aptos-template/package.json +11 -8
- package/template/nextjs/aptos-template/postcss.config.js +1 -1
- package/template/nextjs/aptos-template/public/locales/de/common.json +1 -1
- package/template/nextjs/aptos-template/public/locales/de/footer.json +1 -1
- package/template/nextjs/aptos-template/public/locales/de/second-page.json +1 -1
- package/template/nextjs/aptos-template/public/locales/en/footer.json +1 -1
- package/template/nextjs/aptos-template/public/locales/en/second-page.json +1 -1
- package/template/nextjs/aptos-template/public/locales/zn/common.json +1 -1
- package/template/nextjs/aptos-template/public/locales/zn/footer.json +1 -1
- package/template/nextjs/aptos-template/public/locales/zn/second-page.json +1 -1
- package/template/nextjs/aptos-template/src/components/Animation.tsx +60 -70
- package/template/nextjs/aptos-template/src/components/Container.tsx +2 -8
- package/template/nextjs/aptos-template/src/components/footer/index.tsx +124 -135
- package/template/nextjs/aptos-template/src/components/head/index.tsx +14 -14
- package/template/nextjs/aptos-template/src/components/header/index.tsx +143 -157
- package/template/nextjs/aptos-template/src/components/pop_up_box/index.tsx +150 -138
- package/template/nextjs/aptos-template/src/css/font-awesome.css +692 -687
- package/template/nextjs/aptos-template/src/css/font-awesome.min.css +2333 -1
- package/template/nextjs/aptos-template/src/jotai/index.tsx +9 -10
- package/template/nextjs/aptos-template/src/pages/_app.tsx +16 -16
- package/template/nextjs/aptos-template/src/pages/index.tsx +7 -10
- package/template/nextjs/aptos-template/tailwind.config.js +44 -55
- package/template/nextjs/aptos-template/tsconfig.json +3 -13
- package/template/nextjs/sui-template/.prettierignore +1 -0
- package/template/nextjs/sui-template/.prettierrc.json +8 -0
- package/template/nextjs/sui-template/README.md +4 -2
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp/metadata.move +1 -1
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp/schema.move +2 -2
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/dapp/system.move +7 -7
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/data/increment_event.move +1 -1
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/errors.move +3 -3
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/events.move +4 -4
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/genesis.move +5 -5
- package/template/nextjs/sui-template/contracts/counter/sources/codegen/schema.move +9 -1
- package/template/nextjs/sui-template/contracts/counter/sources/scripts/deploy_hook.move +2 -2
- package/template/nextjs/sui-template/contracts/counter/sources/scripts/migrate.move +1 -1
- package/template/nextjs/sui-template/contracts/counter/sources/systems/counter.move +3 -3
- package/template/nextjs/sui-template/contracts/counter/sources/tests/counter.move +3 -3
- package/template/nextjs/sui-template/contracts/counter/sources/tests/init.move +3 -3
- package/template/nextjs/sui-template/dubhe.config.ts +4 -4
- package/template/nextjs/sui-template/next.config.mjs +1 -2
- package/template/nextjs/sui-template/package.json +9 -8
- 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
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
41
|
-
|
|
40
|
+
const chainFolderPath = `${path}/src/chain`;
|
|
41
|
+
fs.mkdirSync(chainFolderPath, { recursive: true });
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
fs.writeFileSync(`${path}/.env`, `PRIVATE_KEY=${privateKey}`);
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
9
|
-
|
|
8
|
+
name: string;
|
|
9
|
+
objectId: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
type DeploymentJsonType = {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
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
|
-
|
|
43
|
-
|
|
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
|
-
|
|
51
|
-
|
|
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
|
-
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
output: string,
|
|
51
|
+
fullOutputPath: string,
|
|
52
|
+
logPrefix?: string
|
|
58
53
|
): Promise<void> {
|
|
59
|
-
|
|
54
|
+
mkdirSync(dirname(fullOutputPath), { recursive: true });
|
|
60
55
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
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": [
|
|
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,30 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
"printWidth": 120,
|
|
3
|
+
"tabWidth": 2,
|
|
4
|
+
"singleQuote": true,
|
|
5
|
+
"trailingComma": "all",
|
|
6
|
+
"semi": true,
|
|
7
|
+
"arrowParens": "avoid"
|
|
8
|
+
}
|
|
@@ -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,15 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
2
|
const { i18n } = require('./next-i18next.config');
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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.
|
|
37
|
-
"@0xobelisk/aptos-client": "^0.0.
|
|
38
|
-
"@0xobelisk/aptos-cli": "^0.0.
|
|
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
|
}
|