From b41457c827cc0b23e9e484ca84425d5a7aaeb467 Mon Sep 17 00:00:00 2001 From: vladilen11 Date: Sat, 23 Sep 2023 14:48:42 +0800 Subject: [PATCH] Some nits. --- packages/common/src/codegen/utils/renderMove/common.ts | 2 +- .../common/src/codegen/utils/renderMove/generateComponent.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/common/src/codegen/utils/renderMove/common.ts b/packages/common/src/codegen/utils/renderMove/common.ts index 2c81617c..250a9acc 100644 --- a/packages/common/src/codegen/utils/renderMove/common.ts +++ b/packages/common/src/codegen/utils/renderMove/common.ts @@ -198,7 +198,7 @@ export function renderStruct(values: ComponentMapType | SingletonType): string { map = singleValue.type; } - return `\tpublic fun field_types() : vector { + return `\tpublic fun field_types(): vector { \t\tvector[string(b"u64")] \t} diff --git a/packages/common/src/codegen/utils/renderMove/generateComponent.ts b/packages/common/src/codegen/utils/renderMove/generateComponent.ts index 42960604..ef83c30d 100644 --- a/packages/common/src/codegen/utils/renderMove/generateComponent.ts +++ b/packages/common/src/codegen/utils/renderMove/generateComponent.ts @@ -36,7 +36,7 @@ export function generateComponent(config: ObeliskConfig, srcPrefix: string) { // Systems ${getFriendSystem(config.name, config.systems)} -\tpublic fun id() : address { +\tpublic fun id(): address { \t\tentity_key::from_bytes(b"${capitalizeFirstLetter(componentName)} Comp") \t} @@ -77,7 +77,7 @@ export function generateSingletonComponent( // Systems ${getFriendSystem(config.name, config.systems)} -\tpublic fun id() : address { +\tpublic fun id(): address { \t\tentity_key::from_bytes(b"${capitalizeFirstLetter(componentName)} Comp") \t}