@0xobelisk/sui-common 0.5.14 → 0.5.16

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,19 +1,28 @@
1
- import { ObeliskConfig } from "../../types";
2
- import { formatAndWriteMove } from "../formatAndWrite";
1
+ import { ObeliskConfig } from '../../types';
2
+ import { formatAndWriteMove } from '../formatAndWrite';
3
3
 
4
- export async function generateDappKey(config: ObeliskConfig, srcPrefix: string) {
5
- let code = `module ${config.name}::dapp_key {
6
- /// Authorization token for the app.
7
- public struct DappKey has drop {}
4
+ export async function generateDappKey(
5
+ config: ObeliskConfig,
6
+ srcPrefix: string
7
+ ) {
8
+ console.log('\nšŸ”‘ Starting DappKey Generation...');
9
+ console.log(
10
+ ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/codegen/dapp_key.move`
11
+ );
8
12
 
9
- public(package) fun new(): DappKey {
10
- DappKey { }
11
- }
13
+ let code = `module ${config.name}::dapp_key {
14
+ \t/// Authorization token for the app.
15
+ \tpublic struct DappKey has drop {}
16
+
17
+ \tpublic(package) fun new(): DappKey {
18
+ \t\tDappKey { }
19
+ \t}
12
20
  }
13
21
  `;
14
- await formatAndWriteMove(
15
- code,
16
- `${srcPrefix}/contracts/${config.name}/sources/codegen/dapp_key.move`,
17
- "formatAndWriteMove"
18
- );
22
+ await formatAndWriteMove(
23
+ code,
24
+ `${srcPrefix}/contracts/${config.name}/sources/codegen/dapp_key.move`,
25
+ 'formatAndWriteMove'
26
+ );
27
+ console.log('āœ… DappKey Generation Complete\n');
19
28
  }
@@ -1,109 +1,142 @@
1
+ import { BaseType, SchemaType } from '../../types';
2
+ import { formatAndWriteMove } from '../formatAndWrite';
1
3
  import {
2
- BaseType, SchemaType,
3
- } from "../../types";
4
- import { formatAndWriteMove } from "../formatAndWrite";
5
- import {
6
- getStructAttrsWithType,
7
- getStructAttrs,
8
- getStructTypes, getStructAttrsQuery,
9
- } from "./common";
4
+ getStructAttrsWithType,
5
+ getStructAttrs,
6
+ getStructTypes,
7
+ getStructAttrsQuery,
8
+ } from './common';
10
9
 
11
10
  function capitalizeAndRemoveUnderscores(input: string): string {
12
- return input
13
- .split('_')
14
- .map((word, index) => {
15
- return index === 0
16
- ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
17
- : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
18
- })
19
- .join('');
11
+ return input
12
+ .split('_')
13
+ .map((word, index) => {
14
+ return index === 0
15
+ ? word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
16
+ : word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
17
+ })
18
+ .join('');
20
19
  }
21
20
 
22
21
  export function renderSetAttrsFunc(
23
- schemaName: string,
24
- fields: BaseType | Record<string, BaseType>
22
+ schemaName: string,
23
+ fields: BaseType | Record<string, BaseType>
25
24
  ): string {
26
- return Object.entries(fields)
27
- .map(
28
- ([key, type]) =>
29
- `public(package) fun set_${key}(self: &mut ${schemaName}, ${key}: ${type}) {
25
+ return Object.entries(fields)
26
+ .map(
27
+ ([key, type]) =>
28
+ `public(package) fun set_${key}(self: &mut ${schemaName}, ${key}: ${type}) {
30
29
  self.${key} = ${key};
31
30
  }`
32
- ).join("\n");
31
+ )
32
+ .join('\n');
33
33
  }
34
34
 
35
35
  export function renderSetFunc(
36
- schemaName: string,
37
- fields: Record<string, string>
36
+ schemaName: string,
37
+ fields: Record<string, string>
38
38
  ): string {
39
- return `public(package) fun set(self: &mut ${schemaName}, ${getStructAttrsWithType(fields)}) {
39
+ return `public(package) fun set(self: &mut ${schemaName}, ${getStructAttrsWithType(
40
+ fields
41
+ )}) {
40
42
  ${Object.entries(fields)
41
- .map(([fieldName]) => `self.${fieldName} = ${fieldName};`)
42
- .join('\n')}
43
+ .map(([fieldName]) => `self.${fieldName} = ${fieldName};`)
44
+ .join('\n')}
43
45
  }`;
44
46
  }
45
47
 
46
48
  export function renderGetAllFunc(
47
- schemaName: string,
48
- fields: BaseType | Record<string, BaseType>
49
+ schemaName: string,
50
+ fields: BaseType | Record<string, BaseType>
49
51
  ): string {
50
- return `public fun get(self: &${schemaName}): ${getStructTypes(fields)} {
51
- (${getStructAttrsQuery(fields, "")})
52
+ return `public fun get(self: &${schemaName}): ${getStructTypes(fields)} {
53
+ (${getStructAttrsQuery(fields, '')})
52
54
  }`;
53
55
  }
54
56
 
55
57
  export function renderGetAttrsFunc(
56
- schemaName: string,
57
- fields: BaseType | Record<string, BaseType>
58
+ schemaName: string,
59
+ fields: BaseType | Record<string, BaseType>
58
60
  ): string {
59
- return Object.entries(fields)
60
- .map(
61
- ([key, type]) => `public fun get_${key}(self: &${schemaName}): ${type} {
61
+ return Object.entries(fields)
62
+ .map(
63
+ ([
64
+ key,
65
+ type,
66
+ ]) => `public fun get_${key}(self: &${schemaName}): ${type} {
62
67
  self.${key}
63
68
  }`
64
- ).join("\n");
69
+ )
70
+ .join('\n');
65
71
  }
66
72
 
67
73
  function convertToSnakeCase(input: string): string {
68
- return input
69
- .replace(/([A-Z])/g, '_$1')
70
- .toLowerCase()
71
- .replace(/^_/, '');
74
+ return input
75
+ .replace(/([A-Z])/g, '_$1')
76
+ .toLowerCase()
77
+ .replace(/^_/, '');
72
78
  }
73
79
 
74
- export async function generateSchemaData(projectName: string, schemas: Record<string, SchemaType>, path: string) {
75
- for (const schemaName in schemas) {
76
- const schema = schemas[schemaName];
77
- if (schema.data) {
78
- for (const item of schema.data) {
79
- let code = "";
80
+ export async function generateSchemaData(
81
+ projectName: string,
82
+ schemas: Record<string, SchemaType>,
83
+ path: string
84
+ ) {
85
+ console.log('\nšŸ“¦ Starting Schema Data Generation...');
86
+ for (const schemaName in schemas) {
87
+ const schema = schemas[schemaName];
88
+ if (schema.data) {
89
+ console.log(` ā”œā”€ Processing schema: ${schemaName}`);
90
+ for (const item of schema.data) {
91
+ console.log(
92
+ ` └─ Generating ${item.name} ${
93
+ Array.isArray(item.fields) ? '(enum)' : '(struct)'
94
+ }`
95
+ );
96
+ let code = '';
80
97
 
81
- const enumNames = schema.data
82
- .filter(item => Array.isArray(item.fields))
83
- .map(item => item.name);
98
+ const enumNames = schema.data
99
+ .filter(item => Array.isArray(item.fields))
100
+ .map(item => item.name);
84
101
 
85
- if (Array.isArray(item.fields)) {
86
- code = `module ${projectName}::${schemaName}_${convertToSnakeCase(item.name)} {
102
+ if (Array.isArray(item.fields)) {
103
+ code = `module ${projectName}::${schemaName}_${convertToSnakeCase(
104
+ item.name
105
+ )} {
87
106
  public enum ${item.name} has copy, drop , store {
88
107
  ${item.fields}
89
108
  }
90
109
 
91
- ${item.fields.map((field: string) => {
92
- return `public fun new_${convertToSnakeCase(field)}(): ${item.name} {
110
+ ${item.fields
111
+ .map((field: string) => {
112
+ return `public fun new_${convertToSnakeCase(
113
+ field
114
+ )}(): ${item.name} {
93
115
  ${item.name}::${field}
94
- }`
95
- }).join("")
96
- }`
97
- } else {
98
- code = `module ${projectName}::${schemaName}_${convertToSnakeCase(item.name)} {
116
+ }`;
117
+ })
118
+ .join('')}`;
119
+ } else {
120
+ code = `module ${projectName}::${schemaName}_${convertToSnakeCase(
121
+ item.name
122
+ )} {
99
123
  use std::ascii::String;
100
- ${enumNames.map(name => `use ${projectName}::${schemaName}_${convertToSnakeCase(name)}::${name};`).join('\n')}
124
+ ${enumNames
125
+ .map(
126
+ name =>
127
+ `use ${projectName}::${schemaName}_${convertToSnakeCase(
128
+ name
129
+ )}::${name};`
130
+ )
131
+ .join('\n')}
101
132
 
102
133
  public struct ${item.name} has copy, drop , store {
103
134
  ${getStructAttrsWithType(item.fields)}
104
135
  }
105
136
 
106
- public fun new(${getStructAttrsWithType(item.fields)}): ${item.name} {
137
+ public fun new(${getStructAttrsWithType(
138
+ item.fields
139
+ )}): ${item.name} {
107
140
  ${item.name} {
108
141
  ${getStructAttrs(item.fields)}
109
142
  }
@@ -114,36 +147,59 @@ export async function generateSchemaData(projectName: string, schemas: Record<st
114
147
  ${renderSetAttrsFunc(item.name, item.fields)}
115
148
  ${renderSetFunc(item.name, item.fields)}
116
149
  }`;
117
- }
150
+ }
118
151
 
119
- await formatAndWriteMove(
120
- code,
121
- `${path}/contracts/${projectName}/sources/codegen/schemas/${schemaName}_${convertToSnakeCase(item.name)}.move`,
122
- "formatAndWriteMove"
123
- );
124
- }
125
- }
126
- }
152
+ await formatAndWriteMove(
153
+ code,
154
+ `${path}/contracts/${projectName}/sources/codegen/schemas/${schemaName}_${convertToSnakeCase(
155
+ item.name
156
+ )}.move`,
157
+ 'formatAndWriteMove'
158
+ );
159
+ }
160
+ }
161
+ }
162
+ console.log('āœ… Schema Data Generation Complete\n');
127
163
  }
128
164
 
129
- function generateImport(projectName: string, schemaName: string, schema: SchemaType) {
130
- if (schema.data) {
131
- return schema.data.map(item => {
132
- return `use ${projectName}::${schemaName}_${convertToSnakeCase(item.name)}::${item.name};`
133
- }).join('\n');
134
- } else {
135
- return ""
136
- }
165
+ function generateImport(
166
+ projectName: string,
167
+ schemaName: string,
168
+ schema: SchemaType
169
+ ) {
170
+ if (schema.data) {
171
+ return schema.data
172
+ .map(item => {
173
+ return `use ${projectName}::${schemaName}_${convertToSnakeCase(
174
+ item.name
175
+ )}::${item.name};`;
176
+ })
177
+ .join('\n');
178
+ } else {
179
+ return '';
180
+ }
137
181
  }
138
182
 
139
- export async function generateSchemaStructure(projectName: string, schemas: Record<string, SchemaType>, path: string) {
140
- for (const schemaName in schemas) {
141
- console.log(`Schema: ${schemaName}`);
142
- const schema = schemas[schemaName];
143
- const schemaMoudle = `module ${projectName}::${schemaName}_schema {
183
+ export async function generateSchemaStructure(
184
+ projectName: string,
185
+ schemas: Record<string, SchemaType>,
186
+ path: string
187
+ ) {
188
+ console.log('\nšŸ”Ø Starting Schema Structure Generation...');
189
+ for (const schemaName in schemas) {
190
+ console.log(` ā”œā”€ Generating schema: ${schemaName}`);
191
+ console.log(
192
+ ` ā”œā”€ Output path: ${path}/contracts/${projectName}/sources/codegen/schemas/${schemaName}.move`
193
+ );
194
+ console.log(
195
+ ` └─ Structure fields: ${
196
+ Object.keys(schemas[schemaName].structure).length
197
+ }`
198
+ );
199
+ const schema = schemas[schemaName];
200
+ const schemaMoudle = `module ${projectName}::${schemaName}_schema {
144
201
  use std::ascii::String;
145
202
  use std::type_name;
146
- use sui::transfer::{public_share_object};
147
203
  use obelisk::dapps_system;
148
204
  use obelisk::dapps_schema::Dapps;
149
205
  use obelisk::storage_value::{Self, StorageValue};
@@ -152,53 +208,69 @@ export async function generateSchemaStructure(projectName: string, schemas: Reco
152
208
  use ${projectName}::dapp_key::DappKey;
153
209
  ${generateImport(projectName, schemaName, schema)}
154
210
 
155
- public struct ${capitalizeAndRemoveUnderscores(schemaName)} has key, store {
211
+ public struct ${capitalizeAndRemoveUnderscores(
212
+ schemaName
213
+ )} has key, store {
156
214
  id: UID,
157
215
  ${getStructAttrsWithType(schema.structure)}
158
216
  }
159
217
 
160
- ${Object.entries(schema.structure).map(([key, value]) => {
161
- return `public fun borrow_${key}(self: &${capitalizeAndRemoveUnderscores(schemaName)}) : &${value} {
218
+ ${Object.entries(schema.structure)
219
+ .map(([key, value]) => {
220
+ return `public fun borrow_${key}(self: &${capitalizeAndRemoveUnderscores(
221
+ schemaName
222
+ )}) : &${value} {
162
223
  &self.${key}
163
224
  }
164
225
 
165
- public(package) fun borrow_mut_${key}(self: &mut ${capitalizeAndRemoveUnderscores(schemaName)}): &mut ${value} {
226
+ public(package) fun borrow_mut_${key}(self: &mut ${capitalizeAndRemoveUnderscores(
227
+ schemaName
228
+ )}): &mut ${value} {
166
229
  &mut self.${key}
167
230
  }
168
- `
169
- }).join('')}
231
+ `;
232
+ })
233
+ .join('')}
170
234
 
171
- public entry fun register(dapps: &mut Dapps, ctx: &mut TxContext) {
235
+ public fun register(dapps: &mut Dapps, ctx: &mut TxContext): ${capitalizeAndRemoveUnderscores(
236
+ schemaName
237
+ )} {
172
238
  let package_id = dapps_system::current_package_id<DappKey>();
173
239
  assert!(dapps.borrow_metadata().contains_key(package_id), 0);
174
240
  assert!(dapps.borrow_admin().get(package_id) == ctx.sender(), 0);
175
- let schema = type_name::get<${capitalizeAndRemoveUnderscores(schemaName)}>().into_string();
241
+ let schema = type_name::get<${capitalizeAndRemoveUnderscores(
242
+ schemaName
243
+ )}>().into_string();
176
244
  assert!(!dapps.borrow_schemas().get(package_id).contains(&schema), 0);
177
-
178
- public_share_object(${capitalizeAndRemoveUnderscores(schemaName)} {
245
+ dapps_system::add_schema<${capitalizeAndRemoveUnderscores(
246
+ schemaName
247
+ )}>(dapps, package_id, ctx);
248
+ ${capitalizeAndRemoveUnderscores(schemaName)} {
179
249
  id: object::new(ctx),
180
- ${Object.entries(schema.structure).map(([key, value]) => {
181
- let storage_type = ""
182
- if (value.includes("StorageValue")) {
183
- storage_type = `storage_value::new()`
184
- } else if (value.includes("StorageMap")) {
185
- storage_type = `storage_map::new()`
186
- } else if (value.includes("StorageDoubleMap")) {
187
- storage_type = `storage_double_map::new()`
188
- }
189
- return `${key}: ${storage_type},`
190
- }).join(' ')
191
- }
192
- });
193
-
194
- dapps_system::add_schema<${capitalizeAndRemoveUnderscores(schemaName)}>(dapps, package_id, ctx);
250
+ ${Object.entries(schema.structure)
251
+ .map(([key, value]) => {
252
+ let storage_type = '';
253
+ if (value.includes('StorageValue')) {
254
+ storage_type = `storage_value::new()`;
255
+ } else if (value.includes('StorageMap')) {
256
+ storage_type = `storage_map::new()`;
257
+ } else if (
258
+ value.includes('StorageDoubleMap')
259
+ ) {
260
+ storage_type = `storage_double_map::new()`;
261
+ }
262
+ return `${key}: ${storage_type},`;
263
+ })
264
+ .join(' ')}
265
+ }
195
266
  }
196
267
 
197
268
  }`;
198
- await formatAndWriteMove(
199
- schemaMoudle,
200
- `${path}/contracts/${projectName}/sources/codegen/schemas/${schemaName}.move`,
201
- "formatAndWriteMove"
202
- );
203
- }
204
- }
269
+ await formatAndWriteMove(
270
+ schemaMoudle,
271
+ `${path}/contracts/${projectName}/sources/codegen/schemas/${schemaName}.move`,
272
+ 'formatAndWriteMove'
273
+ );
274
+ }
275
+ console.log('āœ… Schema Structure Generation Complete\n');
276
+ }
@@ -1,19 +1,28 @@
1
- import { ObeliskConfig } from "../../types";
2
- import { formatAndWriteMove } from "../formatAndWrite";
3
- import { existsSync } from "fs";
1
+ import { ObeliskConfig } from '../../types';
2
+ import { formatAndWriteMove } from '../formatAndWrite';
3
+ import { existsSync } from 'fs';
4
4
 
5
- export async function generateDeployHook(config: ObeliskConfig, srcPrefix: string) {
6
- if (
7
- !existsSync(
8
- `${srcPrefix}/contracts/${config.name}/sources/script/deploy_hook.move`
9
- )
10
- ) {
11
- let code = `module ${config.name}::deploy_hook {
5
+ export async function generateDeployHook(
6
+ config: ObeliskConfig,
7
+ srcPrefix: string
8
+ ) {
9
+ console.log('\nšŸ“ Starting Deploy Hook Generation...');
10
+ console.log(
11
+ ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/script/deploy_hook.move`
12
+ );
13
+
14
+ if (
15
+ !existsSync(
16
+ `${srcPrefix}/contracts/${config.name}/sources/script/deploy_hook.move`
17
+ )
18
+ ) {
19
+ let code = `module ${config.name}::deploy_hook {
12
20
  use obelisk::dapps_schema::Dapps;
13
21
  use obelisk::dapps_system;
14
22
  use ${config.name}::dapp_key::DappKey;
15
23
  use std::ascii;
16
24
  use sui::clock::Clock;
25
+ use sui::transfer::public_share_object;
17
26
  #[test_only]
18
27
  use obelisk::dapps_schema;
19
28
  #[test_only]
@@ -32,12 +41,20 @@ export async function generateDeployHook(config: ObeliskConfig, srcPrefix: strin
32
41
  clock,
33
42
  ctx
34
43
  );
35
- ${Object.keys(config.schemas).map(schemaName => {
36
- return `${config.name}::${schemaName}_schema::register(dapps, ctx);`
37
- }).join("\n")}
38
-
44
+ ${Object.keys(config.schemas)
45
+ .map(schemaName => {
46
+ return `let ${schemaName} = ${config.name}::${schemaName}_schema::register(dapps, ctx);`;
47
+ })
48
+ .join('\n')}
39
49
  // Logic that needs to be automated once the contract is deployed
40
50
 
51
+
52
+ // Share the dapp object with the public
53
+ ${Object.keys(config.schemas)
54
+ .map(schemaName => {
55
+ return `public_share_object(${schemaName});`;
56
+ })
57
+ .join('\n')}
41
58
  }
42
59
 
43
60
  #[test_only]
@@ -58,21 +75,22 @@ export async function generateDeployHook(config: ObeliskConfig, srcPrefix: strin
58
75
  }
59
76
  }
60
77
  `;
61
- await formatAndWriteMove(
62
- code,
63
- `${srcPrefix}/contracts/${config.name}/sources/script/deploy_hook.move`,
64
- "formatAndWriteMove"
65
- );
66
- }
78
+ await formatAndWriteMove(
79
+ code,
80
+ `${srcPrefix}/contracts/${config.name}/sources/script/deploy_hook.move`,
81
+ 'formatAndWriteMove'
82
+ );
83
+ }
84
+ console.log('āœ… Deploy Hook Generation Complete\n');
67
85
  }
68
86
 
69
87
  export function generateMigrate(config: ObeliskConfig, srcPrefix: string) {
70
- if (
71
- !existsSync(
72
- `${srcPrefix}/contracts/${config.name}/sources/script/migrate.move`
73
- )
74
- ) {
75
- let code = `module ${config.name}::migrate {
88
+ if (
89
+ !existsSync(
90
+ `${srcPrefix}/contracts/${config.name}/sources/script/migrate.move`
91
+ )
92
+ ) {
93
+ let code = `module ${config.name}::migrate {
76
94
  use obelisk::world::{World, AdminCap};
77
95
 
78
96
  /// Not the right admin for this world
@@ -92,11 +110,10 @@ export function generateMigrate(config: ObeliskConfig, srcPrefix: string) {
92
110
  }
93
111
  }
94
112
  `;
95
- formatAndWriteMove(
96
- code,
97
- `${srcPrefix}/contracts/${config.name}/sources/script/migrate.move`,
98
- "formatAndWriteMove"
99
- );
100
- }
113
+ formatAndWriteMove(
114
+ code,
115
+ `${srcPrefix}/contracts/${config.name}/sources/script/migrate.move`,
116
+ 'formatAndWriteMove'
117
+ );
118
+ }
101
119
  }
102
-
@@ -1,23 +1,30 @@
1
- import { ObeliskConfig } from "../../types";
2
- import { formatAndWriteMove } from "../formatAndWrite";
3
- import { existsSync } from "fs";
1
+ import { ObeliskConfig } from '../../types';
2
+ import { formatAndWriteMove } from '../formatAndWrite';
3
+ import { existsSync } from 'fs';
4
4
 
5
5
  export async function generateSystem(config: ObeliskConfig, srcPrefix: string) {
6
- config.systems.map(async (systemName) => {
7
- if (
8
- !existsSync(
9
- `${srcPrefix}/contracts/${config.name}/sources/system/${systemName}.move`
10
- )
11
- ) {
12
- let code = `module ${config.name}::${systemName}_system {
6
+ console.log('\nāš™ļø Starting System Generation...');
7
+ config.systems.map(async systemName => {
8
+ console.log(` ā”œā”€ Generating system: ${systemName}`);
9
+ console.log(
10
+ ` └─ Output path: ${srcPrefix}/contracts/${config.name}/sources/system/${systemName}.move`
11
+ );
12
+
13
+ if (
14
+ !existsSync(
15
+ `${srcPrefix}/contracts/${config.name}/sources/system/${systemName}.move`
16
+ )
17
+ ) {
18
+ let code = `module ${config.name}::${systemName}_system {
13
19
 
14
20
  }
15
21
  `;
16
- await formatAndWriteMove(
17
- code,
18
- `${srcPrefix}/contracts/${config.name}/sources/system/${systemName}.move`,
19
- "formatAndWriteMove"
20
- );
21
- }
22
- });
22
+ await formatAndWriteMove(
23
+ code,
24
+ `${srcPrefix}/contracts/${config.name}/sources/system/${systemName}.move`,
25
+ 'formatAndWriteMove'
26
+ );
27
+ }
28
+ });
29
+ console.log('āœ… System Generation Complete\n');
23
30
  }
@@ -1,7 +1,16 @@
1
1
  import { ObeliskConfig } from '../../types';
2
2
  import { formatAndWriteMove } from '../formatAndWrite';
3
3
 
4
- export async function generateToml(config: ObeliskConfig, srcPrefix: string) {
4
+ export async function generateToml(
5
+ config: ObeliskConfig,
6
+ srcPrefix: string,
7
+ frameworkId: string
8
+ ) {
9
+ console.log('\nšŸ“„ Starting Move.toml Generation...');
10
+ console.log(
11
+ ` └─ Output path: ${srcPrefix}/contracts/${config.name}/Move.toml`
12
+ );
13
+
5
14
  let code = `[package]
6
15
  name = "${config.name}"
7
16
  version = "0.0.1"
@@ -12,8 +21,8 @@ Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-fram
12
21
  Obelisk = { git = "https://github.com/0xobelisk/obelisk-engine.git", subdir = "packages/obelisk-framework", rev = "main" }
13
22
 
14
23
  [addresses]
15
- sui = "0x2"
16
- obelisk = "0x3dc2d6239eed38c9798444afbf4bada0998ec98edc365713864405fe64203256"
24
+ sui = "0x2"
25
+ obelisk = "${frameworkId}"
17
26
  ${config.name} = "0x0"
18
27
  `;
19
28
  await formatAndWriteMove(
@@ -21,4 +30,5 @@ ${config.name} = "0x0"
21
30
  `${srcPrefix}/contracts/${config.name}/Move.toml`,
22
31
  'formatAndWriteMove'
23
32
  );
33
+ console.log('āœ… Move.toml Generation Complete\n');
24
34
  }