From 138026991326f43ab8981a7ff1b8ec6051c71a38 Mon Sep 17 00:00:00 2001 From: Chad Ostrowski <221614+chadoh@users.noreply.github.com> Date: Fri, 2 Aug 2024 14:06:35 -0400 Subject: [PATCH] fix: contract client version needs signAndSend Otherwise no Diagnostic Event is created, and the tests for Diagnostic Events fail. This also fixes some alignment issues in the feature table. --- features/dapp_develop/dapp_develop.feature | 4 ++-- invoke.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/features/dapp_develop/dapp_develop.feature b/features/dapp_develop/dapp_develop.feature index c5f3524..489f009 100644 --- a/features/dapp_develop/dapp_develop.feature +++ b/features/dapp_develop/dapp_develop.feature @@ -12,7 +12,7 @@ Scenario Outline: DApp developer compiles, installs, deploys and invokes a contr Examples: | Tool | ContractExampleSubPath | ContractName | ContractCompiledFileName | FunctionName | FunctionParams | Result | - | NODEJS | hello_world | soroban-hello-world-contract | soroban_hello_world_contract.wasm | hello | to:Aloha | ["Hello","Aloha"] | + | NODEJS | hello_world | soroban-hello-world-contract | soroban_hello_world_contract.wasm | hello | to:Aloha | ["Hello","Aloha"] | | CLI | hello_world | soroban-hello-world-contract | soroban_hello_world_contract.wasm | hello | --to=Aloha | ["Hello","Aloha"] | | NODEJS | increment | soroban-increment-contract | soroban_increment_contract.wasm | increment | | 1 | | CLI | increment | soroban-increment-contract | soroban_increment_contract.wasm | increment | | 1 | @@ -30,7 +30,7 @@ Scenario Outline: DApp developer compiles, deploys and invokes a contract Examples: | Tool | ContractExampleSubPath | ContractName | ContractCompiledFileName | FunctionName | FunctionParams | Result | EventCount | DiagEventCount | - | NODEJS | hello_world | soroban-hello-world-contract | soroban_hello_world_contract.wasm | hello | to:Aloha | ["Hello","Aloha"] | 0 | 1 | + | NODEJS | hello_world | soroban-hello-world-contract | soroban_hello_world_contract.wasm | hello | to:Aloha | ["Hello","Aloha"] | 0 | 1 | | CLI | hello_world | soroban-hello-world-contract | soroban_hello_world_contract.wasm | hello | --to=Aloha | ["Hello","Aloha"] | 0 | 1 | | NODEJS | increment | soroban-increment-contract | soroban_increment_contract.wasm | increment | | 1 | 0 | 1 | | CLI | increment | soroban-increment-contract | soroban_increment_contract.wasm | increment | | 1 | 0 | 1 | diff --git a/invoke.ts b/invoke.ts index e295c59..590ee61 100755 --- a/invoke.ts +++ b/invoke.ts @@ -56,7 +56,8 @@ async function main() { }); } // @ts-ignore client[functionName] is defined dynamically - const { result } = await client[functionName](args); + const tx = await client[functionName](args); + const { result } = await tx.signAndSend({ force: true }); console.log(JSON.stringify(result)); return; } else {