From 8a2d0d1e6b6275cd3b597ea6d1f1e8fc9a12b772 Mon Sep 17 00:00:00 2001 From: alvrs Date: Wed, 19 Jul 2023 12:22:27 +0100 Subject: [PATCH] refactor(cli): integrate changes --- packages/cli/src/utils/deploy.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/cli/src/utils/deploy.ts b/packages/cli/src/utils/deploy.ts index f50a15dc30..6d57d65f29 100644 --- a/packages/cli/src/utils/deploy.ts +++ b/packages/cli/src/utils/deploy.ts @@ -163,16 +163,15 @@ export async function deploy( await fastTxExecute( WorldContract, - "registerTable", - [toBytes16(namespace), toBytes16(name), encodeSchema(schemaTypes), encodeSchema(keyTypes)], - confirmations - ); - - // Register table metadata - await fastTxExecute( - WorldContract, - "setMetadata(bytes16,bytes16,string,string[])", - [toBytes16(namespace), toBytes16(name), tableName, Object.keys(schema)], + "registerTable(bytes16,bytes16,bytes32,bytes32,string[],string[])", + [ + toBytes16(namespace), + toBytes16(name), + encodeSchema(keyTypes), + encodeSchema(schemaTypes), + Object.keys(keySchema), + Object.keys(schema), + ], confirmations );