Avoid using logs in example

This commit is contained in:
Simon Warta 2024-02-29 16:56:05 +01:00
parent add1898de6
commit 5478dc2ecd

View File

@ -46,7 +46,7 @@ async function main(hackatomWasmPath: string) {
// Execute contract
const executeFee = calculateFee(300_000, gasPrice);
const result = await client.execute(alice.address0, contractAddress, { release: {} }, executeFee);
const wasmEvent = result.logs[0].events.find((e) => e.type === "wasm");
const wasmEvent = result.events.find((e) => e.type === "wasm");
console.info("The `wasm` event emitted by the contract execution:", wasmEvent);
}