From eac6b566b814e4621e685ebbbe6db0e2b40fa334 Mon Sep 17 00:00:00 2001 From: Seth Date: Wed, 24 Jan 2024 17:08:46 +0800 Subject: [PATCH] fix: update docs --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7709643..4cc0057 100644 --- a/README.md +++ b/README.md @@ -98,7 +98,7 @@ try { const tx = await WETH.transfer('0x0', amount) await tx.wait() } catch (err) { - const { reason } = errorDecoder.decode(err) + const { reason } = await errorDecoder.decode(err) // Prints "ERC20: transfer to the zero address" console.log('Revert reason:', reason) } @@ -116,7 +116,7 @@ try { const tx = await OverflowContract.add(123) await tx.wait() } catch (err) { - const { reason } = errorDecoder.decode(err) + const { reason } = await errorDecoder.decode(err) // Prints "Arithmetic operation underflowed or overflowed outside of an unchecked block" console.log('Panic message:', reason) }