@0xobelisk/sui-common 1.1.6 → 1.1.7

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.
@@ -1,162 +1,138 @@
1
- import {BaseType, SchemaData, SchemaType} from '../../types';
1
+ import { BaseType, SchemaData, SchemaType } from '../../types';
2
2
  import { formatAndWriteMove } from '../formatAndWrite';
3
3
  import {
4
- getStructAttrsWithType,
5
- getStructAttrs,
6
- getStructTypes,
7
- getStructAttrsQuery, containsString,
4
+ getStructAttrsWithType,
5
+ getStructAttrs,
6
+ getStructTypes,
7
+ getStructAttrsQuery,
8
+ containsString
8
9
  } from './common';
9
10
 
10
11
  function sortByFirstLetter(arr: string[]): string[] {
11
- return arr.sort((a, b) => {
12
- const firstLetterA = a.charAt(0).toLowerCase();
13
- const firstLetterB = b.charAt(0).toLowerCase();
12
+ return arr.sort((a, b) => {
13
+ const firstLetterA = a.charAt(0).toLowerCase();
14
+ const firstLetterB = b.charAt(0).toLowerCase();
14
15
 
15
- if (firstLetterA < firstLetterB) {
16
- return -1;
17
- }
18
- if (firstLetterA > firstLetterB) {
19
- return 1;
20
- }
21
- return 0;
22
- });
16
+ if (firstLetterA < firstLetterB) {
17
+ return -1;
18
+ }
19
+ if (firstLetterA > firstLetterB) {
20
+ return 1;
21
+ }
22
+ return 0;
23
+ });
23
24
  }
24
25
 
25
26
  export function capitalizeAndRemoveUnderscores(input: string): string {
26
- return input
27
- .split('_')
28
- .map((word, index) => {
29
- return index === 0
30
- ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
31
- : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
32
- })
33
- .join('');
27
+ return input
28
+ .split('_')
29
+ .map((word, index) => {
30
+ return index === 0
31
+ ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
32
+ : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
33
+ })
34
+ .join('');
34
35
  }
35
36
 
36
37
  export function renderSetAttrsFunc(
37
- schemaName: string,
38
- fields: BaseType | Record<string, BaseType>,
38
+ schemaName: string,
39
+ fields: BaseType | Record<string, BaseType>
39
40
  ): string {
40
- return Object.entries(fields)
41
- .map(
42
- ([key, type]) =>
43
- `public(package) fun set_${key}(self: &mut ${schemaName}, ${key}: ${type}) {
41
+ return Object.entries(fields)
42
+ .map(
43
+ ([key, type]) =>
44
+ `public(package) fun set_${key}(self: &mut ${schemaName}, ${key}: ${type}) {
44
45
  self.${key} = ${key};
45
- }`,
46
- )
47
- .join('\n');
46
+ }`
47
+ )
48
+ .join('\n');
48
49
  }
49
50
 
50
- export function renderSetFunc(
51
- schemaName: string,
52
- fields: Record<string, string>,
53
- ): string {
54
- return `public(package) fun set(self: &mut ${schemaName}, ${getStructAttrsWithType(
55
- fields,
56
- )}) {
51
+ export function renderSetFunc(schemaName: string, fields: Record<string, string>): string {
52
+ return `public(package) fun set(self: &mut ${schemaName}, ${getStructAttrsWithType(fields)}) {
57
53
  ${Object.entries(fields)
58
- .map(([fieldName]) => `self.${fieldName} = ${fieldName};`)
59
- .join('\n')}
54
+ .map(([fieldName]) => `self.${fieldName} = ${fieldName};`)
55
+ .join('\n')}
60
56
  }`;
61
57
  }
62
58
 
63
- export function renderGetAllFunc(
64
- schemaName: string,
65
- fields: Record<string, string>,
66
- ): string {
67
- return `public fun get(self: &${schemaName}): ${getStructTypes(fields)} {
59
+ export function renderGetAllFunc(schemaName: string, fields: Record<string, string>): string {
60
+ return `public fun get(self: &${schemaName}): ${getStructTypes(fields)} {
68
61
  (${getStructAttrsQuery(fields)})
69
62
  }`;
70
63
  }
71
64
 
72
65
  export function renderGetAttrsFunc(
73
- schemaName: string,
74
- fields: BaseType | Record<string, BaseType>,
66
+ schemaName: string,
67
+ fields: BaseType | Record<string, BaseType>
75
68
  ): string {
76
- return Object.entries(fields)
77
- .map(
78
- ([
79
- key,
80
- type,
81
- ]) => `public fun get_${key}(self: &${schemaName}): ${type} {
69
+ return Object.entries(fields)
70
+ .map(
71
+ ([key, type]) => `public fun get_${key}(self: &${schemaName}): ${type} {
82
72
  self.${key}
83
- }`,
84
- )
85
- .join('\n');
73
+ }`
74
+ )
75
+ .join('\n');
86
76
  }
87
77
 
88
78
  function convertToSnakeCase(input: string): string {
89
- return input
90
- .replace(/([A-Z])/g, '_$1')
91
- .toLowerCase()
92
- .replace(/^_/, '');
79
+ return input
80
+ .replace(/([A-Z])/g, '_$1')
81
+ .toLowerCase()
82
+ .replace(/^_/, '');
93
83
  }
94
84
 
95
85
  export async function generateSchemaData(
96
- projectName: string,
97
- data: Record<string, SchemaData>,
98
- path: string,
86
+ projectName: string,
87
+ data: Record<string, SchemaData>,
88
+ path: string
99
89
  ) {
100
- console.log('\n📦 Starting Schema Data Generation...');
101
- for (const key of Object.keys(data)) {
102
- const name = key;
103
- const fields = data[key];
104
- console.log(
105
- ` └─ Generating ${name} ${
106
- Array.isArray(fields) ? '(enum)' : '(struct)'
107
- }`,
108
- );
109
- let code = '';
90
+ console.log('\n📦 Starting Schema Data Generation...');
91
+ for (const key of Object.keys(data)) {
92
+ const name = key;
93
+ const fields = data[key];
94
+ console.log(` └─ Generating ${name} ${Array.isArray(fields) ? '(enum)' : '(struct)'}`);
95
+ let code = '';
110
96
 
111
- const enumNames = Object.keys(data)
112
- .filter(item => Array.isArray(data[item]))
113
- .map(item => item);
97
+ const enumNames = Object.keys(data)
98
+ .filter((item) => Array.isArray(data[item]))
99
+ .map((item) => item);
114
100
 
115
- console.log(enumNames)
101
+ console.log(enumNames);
116
102
 
117
- if (Array.isArray(fields)) {
118
- const sortByFirstLetterFields = sortByFirstLetter(fields);
119
- code = `module ${projectName}::${projectName}_${convertToSnakeCase(
120
- name,
121
- )} {
103
+ if (Array.isArray(fields)) {
104
+ const sortByFirstLetterFields = sortByFirstLetter(fields);
105
+ code = `module ${projectName}::${projectName}_${convertToSnakeCase(name)} {
122
106
  public enum ${name} has copy, drop , store {
123
107
  ${sortByFirstLetterFields}
124
108
  }
125
109
 
126
110
  ${sortByFirstLetterFields
127
- .map((field: string) => {
128
- return `public fun new_${convertToSnakeCase(
129
- field,
130
- )}(): ${name} {
111
+ .map((field: string) => {
112
+ return `public fun new_${convertToSnakeCase(field)}(): ${name} {
131
113
  ${name}::${field}
132
114
  }`;
133
- })
134
- .join('')}`;
135
- } else {
136
- code = `module ${projectName}::${projectName}_${convertToSnakeCase(
137
- name,
138
- )} {
115
+ })
116
+ .join('')}`;
117
+ } else {
118
+ code = `module ${projectName}::${projectName}_${convertToSnakeCase(name)} {
139
119
  use std::ascii::String;
140
120
 
141
- ${
142
- Object.keys(data)
143
- .map(name => {
144
- if (containsString(fields, name)) {
145
- return `use ${projectName}::${projectName}_${convertToSnakeCase(name)}::${name};`;
146
- }
147
- return undefined;
148
- })
149
- .filter(Boolean)
150
- .join('\n')
151
- }
121
+ ${Object.keys(data)
122
+ .map((name) => {
123
+ if (containsString(fields, name)) {
124
+ return `use ${projectName}::${projectName}_${convertToSnakeCase(name)}::${name};`;
125
+ }
126
+ return undefined;
127
+ })
128
+ .filter(Boolean)
129
+ .join('\n')}
152
130
 
153
131
  public struct ${name} has copy, drop , store {
154
132
  ${getStructAttrsWithType(fields)}
155
133
  }
156
134
 
157
- public fun new(${getStructAttrsWithType(
158
- fields,
159
- )}): ${name} {
135
+ public fun new(${getStructAttrsWithType(fields)}): ${name} {
160
136
  ${name} {
161
137
  ${getStructAttrs(fields)}
162
138
  }
@@ -167,53 +143,40 @@ export async function generateSchemaData(
167
143
  ${renderSetAttrsFunc(name, fields)}
168
144
  ${renderSetFunc(name, fields)}
169
145
  }`;
170
- }
146
+ }
171
147
 
172
- await formatAndWriteMove(
173
- code,
174
- `${path}/contracts/${projectName}/sources/codegen/data/${convertToSnakeCase(
175
- name,
176
- )}.move`,
177
- 'formatAndWriteMove',
178
- );
179
- }
180
- console.log('✅ Schema Data Generation Complete\n');
148
+ await formatAndWriteMove(
149
+ code,
150
+ `${path}/contracts/${projectName}/sources/codegen/data/${convertToSnakeCase(name)}.move`,
151
+ 'formatAndWriteMove'
152
+ );
153
+ }
154
+ console.log('✅ Schema Data Generation Complete\n');
181
155
  }
182
156
 
183
- function generateImport(
184
- projectName: string,
185
- data: Record<string, SchemaData> | null,
186
- ) {
187
- if (data != null) {
188
- const names = Object.keys(data);
189
- return names
190
- .map(name => {
191
- return `use ${projectName}::${projectName}_${convertToSnakeCase(
192
- name,
193
- )}::${name};`;
194
- })
195
- .join('\n');
196
- } else {
197
- return '';
198
- }
157
+ function generateImport(projectName: string, data: Record<string, SchemaData> | null) {
158
+ if (data != null) {
159
+ const names = Object.keys(data);
160
+ return names
161
+ .map((name) => {
162
+ return `use ${projectName}::${projectName}_${convertToSnakeCase(name)}::${name};`;
163
+ })
164
+ .join('\n');
165
+ } else {
166
+ return '';
167
+ }
199
168
  }
200
169
 
201
170
  export async function generateSchemaStructure(
202
- projectName: string,
203
- data: Record<string, SchemaData> | null,
204
- schemas: Record<string, SchemaType>,
205
- path: string,
171
+ projectName: string,
172
+ data: Record<string, SchemaData> | null,
173
+ schemas: Record<string, SchemaType>,
174
+ path: string
206
175
  ) {
207
- console.log('\n🔨 Starting Schema Structure Generation...');
208
- console.log(
209
- ` ├─ Output path: ${path}/contracts/${projectName}/sources/codegen/schema.move`,
210
- );
211
- console.log(
212
- ` └─ Structure fields: ${
213
- Object.values(schemas).length
214
- }`,
215
- );
216
- const schemaMoudle = `module ${projectName}::${projectName}_schema {
176
+ console.log('\n🔨 Starting Schema Structure Generation...');
177
+ console.log(` ├─ Output path: ${path}/contracts/${projectName}/sources/codegen/schema.move`);
178
+ console.log(` └─ Structure fields: ${Object.values(schemas).length}`);
179
+ const schemaMoudle = `module ${projectName}::${projectName}_schema {
217
180
  use std::ascii::String;
218
181
  use std::ascii::string;
219
182
  use sui::package::UpgradeCap;
@@ -229,8 +192,8 @@ export async function generateSchemaStructure(
229
192
  public struct Schema has key, store { id: UID }
230
193
 
231
194
  ${Object.entries(schemas)
232
- .map(([key, value]) => {
233
- return `public fun borrow_${key}(self: &Schema) : &${value} {
195
+ .map(([key, value]) => {
196
+ return `public fun borrow_${key}(self: &Schema) : &${value} {
234
197
  storage::borrow_field(&self.id, b"${key}")
235
198
  }
236
199
 
@@ -238,27 +201,25 @@ export async function generateSchemaStructure(
238
201
  storage::borrow_mut_field(&mut self.id, b"${key}")
239
202
  }
240
203
  `;
241
- })
242
- .join('')}
204
+ })
205
+ .join('')}
243
206
 
244
207
 
245
208
  public(package) fun create(ctx: &mut TxContext): Schema {
246
209
  let mut id = object::new(ctx);
247
210
  ${Object.entries(schemas)
248
- .map(([key, value]) => {
249
- let storage_type = '';
250
- if (value.includes('StorageValue')) {
251
- storage_type = `storage_value::new(b"${key}", ctx)`;
252
- } else if (value.includes('StorageMap')) {
253
- storage_type = `storage_map::new(b"${key}", ctx)`;
254
- } else if (
255
- value.includes('StorageDoubleMap')
256
- ) {
257
- storage_type = `storage_double_map::new(b"${key}", ctx)`;
258
- }
259
- return `storage::add_field<${value}>(&mut id, b"${key}", ${storage_type});`;
260
- })
261
- .join('\n')}
211
+ .map(([key, value]) => {
212
+ let storage_type = '';
213
+ if (value.includes('StorageValue')) {
214
+ storage_type = `storage_value::new(b"${key}", ctx)`;
215
+ } else if (value.includes('StorageMap')) {
216
+ storage_type = `storage_map::new(b"${key}", ctx)`;
217
+ } else if (value.includes('StorageDoubleMap')) {
218
+ storage_type = `storage_double_map::new(b"${key}", ctx)`;
219
+ }
220
+ return `storage::add_field<${value}>(&mut id, b"${key}", ${storage_type});`;
221
+ })
222
+ .join('\n')}
262
223
 
263
224
  Schema { id }
264
225
  }
@@ -276,36 +237,39 @@ export async function generateSchemaStructure(
276
237
 
277
238
  // ======================================== View Functions ========================================
278
239
  ${Object.entries(schemas)
279
- .map(([key, value]) => {
280
- // @ts-ignore
281
- let all_types = value.match(/<(.+)>/)[1].split(',').map(type => type.trim());
282
- let para_key: string[] = [];
283
- let para_value = '';
284
- let borrow_key = '';
285
- if (value.includes('StorageValue')) {
286
- para_key = [];
287
- para_value = `${all_types[0]}`;
288
- borrow_key = 'get()';
289
- } else if (value.includes('StorageMap')) {
290
- para_key = [`key: ${all_types[0]}`];
291
- para_value = `${all_types[1]}`;
292
- borrow_key = 'get(key)';
293
- } else if (value.includes('StorageDoubleMap')) {
294
- para_key = [`key1: ${all_types[0]}`, `key2: ${all_types[1]}`];
295
- para_value = `${all_types[2]}`;
296
- borrow_key = 'get(key1, key2)';
297
- }
298
- return `public fun get_${key}(self: &Schema, ${para_key}) : &${para_value} {
240
+ .map(([key, value]) => {
241
+ // @ts-ignore
242
+ let all_types = value
243
+ .match(/<(.+)>/)[1]
244
+ .split(',')
245
+ .map((type) => type.trim());
246
+ let para_key: string[] = [];
247
+ let para_value = '';
248
+ let borrow_key = '';
249
+ if (value.includes('StorageValue')) {
250
+ para_key = [];
251
+ para_value = `${all_types[0]}`;
252
+ borrow_key = 'get()';
253
+ } else if (value.includes('StorageMap')) {
254
+ para_key = [`key: ${all_types[0]}`];
255
+ para_value = `${all_types[1]}`;
256
+ borrow_key = 'get(key)';
257
+ } else if (value.includes('StorageDoubleMap')) {
258
+ para_key = [`key1: ${all_types[0]}`, `key2: ${all_types[1]}`];
259
+ para_value = `${all_types[2]}`;
260
+ borrow_key = 'get(key1, key2)';
261
+ }
262
+ return `public fun get_${key}(self: &Schema, ${para_key}) : &${para_value} {
299
263
  self.borrow_${key}().${borrow_key}
300
- }`
301
- }).join('\n')}
264
+ }`;
265
+ })
266
+ .join('\n')}
302
267
  // =========================================================================================================
303
- }`
304
- await formatAndWriteMove(
305
- schemaMoudle,
306
- `${path}/contracts/${projectName}/sources/codegen/schema.move`,
307
- 'formatAndWriteMove',
308
- );
309
- console.log('✅ Schema Structure Generation Complete\n');
268
+ }`;
269
+ await formatAndWriteMove(
270
+ schemaMoudle,
271
+ `${path}/contracts/${projectName}/sources/codegen/schema.move`,
272
+ 'formatAndWriteMove'
273
+ );
274
+ console.log('✅ Schema Structure Generation Complete\n');
310
275
  }
311
-
@@ -1,16 +1,13 @@
1
1
  import { DubheConfig } from '../../types';
2
2
  import { formatAndWriteMove } from '../formatAndWrite';
3
3
 
4
- export async function generateSchemaHub(
5
- config: DubheConfig,
6
- srcPrefix: string
7
- ) {
8
- console.log('\n🔑 Starting DappKey Generation...');
9
- console.log(
10
- ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/codegen/schema_hub.move`
11
- );
4
+ export async function generateSchemaHub(config: DubheConfig, srcPrefix: string) {
5
+ console.log('\n🔑 Starting DappKey Generation...');
6
+ console.log(
7
+ ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/codegen/schema_hub.move`
8
+ );
12
9
 
13
- let code = `module ${config.name}::${config.name}_schema_hub {
10
+ let code = `module ${config.name}::${config.name}_schema_hub {
14
11
  use sui::transfer::public_share_object;
15
12
  use sui::dynamic_field as df;
16
13
 
@@ -56,10 +53,10 @@ export async function generateSchemaHub(
56
53
  }
57
54
  }
58
55
  `;
59
- await formatAndWriteMove(
60
- code,
61
- `${srcPrefix}/contracts/${config.name}/sources/codegen/schema_hub.move`,
62
- 'formatAndWriteMove'
63
- );
64
- console.log('✅ DappKey Generation Complete\n');
56
+ await formatAndWriteMove(
57
+ code,
58
+ `${srcPrefix}/contracts/${config.name}/sources/codegen/schema_hub.move`,
59
+ 'formatAndWriteMove'
60
+ );
61
+ console.log('✅ DappKey Generation Complete\n');
65
62
  }
@@ -5,40 +5,29 @@ import { capitalizeAndRemoveUnderscores } from './generateSchema';
5
5
 
6
6
  import { readFileSync } from 'fs';
7
7
 
8
- export async function generateDeployHook(
9
- config: DubheConfig,
10
- srcPrefix: string
11
- ) {
12
- console.log('\n📝 Starting Deploy Hook Generation...');
13
- console.log(
14
- ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/scripts/deploy_hook.move`
15
- );
8
+ export async function generateDeployHook(config: DubheConfig, srcPrefix: string) {
9
+ console.log('\n📝 Starting Deploy Hook Generation...');
10
+ console.log(
11
+ ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/scripts/deploy_hook.move`
12
+ );
16
13
 
17
- const path = `${srcPrefix}/contracts/${config.name}/sources/scripts/deploy_hook.move`;
18
- if (!existsSync(path)) {
19
- const code = `module ${config.name}::${config.name}_deploy_hook {
14
+ const path = `${srcPrefix}/contracts/${config.name}/sources/scripts/deploy_hook.move`;
15
+ if (!existsSync(path)) {
16
+ const code = `module ${config.name}::${config.name}_deploy_hook {
20
17
  use ${config.name}::${config.name}_schema::Schema;
21
18
 
22
19
  public(package) fun run(_schema: &mut Schema, _ctx: &mut TxContext) {
23
20
 
24
21
  }
25
- }`
26
- await formatAndWriteMove(
27
- code,
28
- path,
29
- 'formatAndWriteMove'
30
- );
31
- }
32
- console.log('✅ Deploy Hook Generation Complete\n');
22
+ }`;
23
+ await formatAndWriteMove(code, path, 'formatAndWriteMove');
24
+ }
25
+ console.log('✅ Deploy Hook Generation Complete\n');
33
26
  }
34
27
 
35
28
  export async function generateMigrate(config: DubheConfig, srcPrefix: string) {
36
- if (
37
- !existsSync(
38
- `${srcPrefix}/contracts/${config.name}/sources/scripts/migrate.move`
39
- )
40
- ) {
41
- let code = `module ${config.name}::${config.name}_migrate {
29
+ if (!existsSync(`${srcPrefix}/contracts/${config.name}/sources/scripts/migrate.move`)) {
30
+ let code = `module ${config.name}::${config.name}_migrate {
42
31
  const ON_CHAIN_VERSION: u32 = 1;
43
32
 
44
33
  public fun on_chain_version(): u32 {
@@ -46,10 +35,10 @@ export async function generateMigrate(config: DubheConfig, srcPrefix: string) {
46
35
  }
47
36
  }
48
37
  `;
49
- await formatAndWriteMove(
50
- code,
51
- `${srcPrefix}/contracts/${config.name}/sources/scripts/migrate.move`,
52
- 'formatAndWriteMove'
53
- );
54
- }
38
+ await formatAndWriteMove(
39
+ code,
40
+ `${srcPrefix}/contracts/${config.name}/sources/scripts/migrate.move`,
41
+ 'formatAndWriteMove'
42
+ );
43
+ }
55
44
  }
@@ -5,18 +5,12 @@ import fs from 'node:fs/promises';
5
5
  import path from 'node:path';
6
6
 
7
7
  export async function generateSystem(config: DubheConfig, srcPrefix: string) {
8
- console.log('\n⚙️ Starting System Generation...');
9
- console.log(` ├─ Generating systems`);
10
- console.log(
11
- ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/systems`
12
- );
8
+ console.log('\n⚙️ Starting System Generation...');
9
+ console.log(` ├─ Generating systems`);
10
+ console.log(` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/systems`);
13
11
 
14
- if (
15
- !existsSync(
16
- `${srcPrefix}/contracts/${config.name}/sources/systems`
17
- )
18
- ) {
19
- await fs.mkdir(`${srcPrefix}/contracts/${config.name}/sources/systems`, { recursive: true })
20
- }
21
- console.log('✅ System Generation Complete\n');
12
+ if (!existsSync(`${srcPrefix}/contracts/${config.name}/sources/systems`)) {
13
+ await fs.mkdir(`${srcPrefix}/contracts/${config.name}/sources/systems`, { recursive: true });
14
+ }
15
+ console.log('✅ System Generation Complete\n');
22
16
  }
@@ -1,16 +1,11 @@
1
1
  import { DubheConfig } from '../../types';
2
2
  import { formatAndWriteMove } from '../formatAndWrite';
3
3
 
4
- export async function generateToml(
5
- config: DubheConfig,
6
- srcPrefix: string,
7
- ) {
8
- console.log('\n📄 Starting Move.toml Generation...');
9
- console.log(
10
- ` └─ Output path: ${srcPrefix}/contracts/${config.name}/Move.toml`
11
- );
4
+ export async function generateToml(config: DubheConfig, srcPrefix: string) {
5
+ console.log('\n📄 Starting Move.toml Generation...');
6
+ console.log(` └─ Output path: ${srcPrefix}/contracts/${config.name}/Move.toml`);
12
7
 
13
- let code = `[package]
8
+ let code = `[package]
14
9
  name = "${config.name}"
15
10
  version = "1.0.0"
16
11
  edition = "2024"
@@ -23,10 +18,10 @@ Dubhe = { git = "https://github.com/0xobelisk/dubhe-framework.git", rev = "dubhe
23
18
  sui = "0x2"
24
19
  ${config.name} = "0x0"
25
20
  `;
26
- await formatAndWriteMove(
27
- code,
28
- `${srcPrefix}/contracts/${config.name}/Move.toml`,
29
- 'formatAndWriteMove'
30
- );
31
- console.log('✅ Move.toml Generation Complete\n');
21
+ await formatAndWriteMove(
22
+ code,
23
+ `${srcPrefix}/contracts/${config.name}/Move.toml`,
24
+ 'formatAndWriteMove'
25
+ );
26
+ console.log('✅ Move.toml Generation Complete\n');
32
27
  }