From 2661767babaeecd7c1f9a0f5f18fd7421031b5b3 Mon Sep 17 00:00:00 2001 From: FabijanC Date: Mon, 11 Jul 2022 15:36:28 +0200 Subject: [PATCH] Update docs [skip ci] --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fed6fcbf..21f90488 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you've used Hardhat 👷‍♀️👷‍♂️ and want to develop for Starkn ## Install ``` -npm install @shardlabs/starknet-hardhat-plugin --save-dev +npm i @shardlabs/starknet-hardhat-plugin --save-dev ``` Add the following line to the top of your `hardhat.config.ts` (or `hardhat.config.js`): @@ -348,7 +348,9 @@ it("should return transaction data and transaction receipt", async function () { const txHash = await contract.invoke("increase_balance", { amount: 10 }); const receipt = await starknet.getTransactionReceipt(txHash); - console.log(receipt.events); + const decodedEvents = contract.decodeEvents(receipt.events); + // decodedEvents contains hex data array converted to a structured object + // { name: "increase_balance_called", data: { current_balance: 0n, amount: 10n } } }); ``` @@ -698,4 +700,4 @@ An example Hardhat project using this plugin can be found [here](https://github. ## Contribute -If you're a developer willing to contribute, go through the [development readme](/README-dev.md). +If you're a developer willing to contribute, go through [the development readme](/README-dev.md).