From ca02a43cbd8ef8e0cb0a0d8a717a987d9a94407c Mon Sep 17 00:00:00 2001 From: Juuso Takalainen Date: Tue, 25 Jun 2019 11:44:55 +0300 Subject: [PATCH] Fixed some errors Fixes are based on actually running the code, see https://github.com/jtakalai/ethers-cookbook/blob/master/non-constant-return.js The "runnable form" cookbook could be good also in that it could be tested against actual ethers.js deployments. Maybe cookbook code should become tests in ethers.js? --- source/ethers.js/source/cookbook-contracts.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ethers.js/source/cookbook-contracts.rst b/source/ethers.js/source/cookbook-contracts.rst index 290ccb0..6bac888 100644 --- a/source/ethers.js/source/cookbook-contracts.rst +++ b/source/ethers.js/source/cookbook-contracts.rst @@ -24,7 +24,7 @@ Using events, we can simulate a return value from a non-constant function. function increment() returns (uint256 sum) { _accum++; - Returns(_accum); + Return(_accum); } } @@ -50,7 +50,7 @@ Using events, we can simulate a return value from a non-constant function. const contractAddress = "0x..." - const contract = new Contract(contractAddress, abi) + const contract = new Contract(contractAddress, abi, wallet) async function increment() {