From 07701796d5822360c899fe4c5873c9d01ab369aa Mon Sep 17 00:00:00 2001
From: Soham Zemse <22412996+zemse@users.noreply.github.com>
Date: Fri, 17 Feb 2023 03:46:57 +0000
Subject: [PATCH] Update readme
---
packages/target-ethers-v6/README.md | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/packages/target-ethers-v6/README.md b/packages/target-ethers-v6/README.md
index eec14c06c..2bf6e7bb1 100644
--- a/packages/target-ethers-v6/README.md
+++ b/packages/target-ethers-v6/README.md
@@ -3,7 +3,7 @@
TypeChain target Ethers-v6
- 🔌 TypeScript bindings for Ethers 5.x.x smartcontracts
+ 🔌 TypeScript bindings for Ethers 6.x.x smartcontracts
@@ -17,8 +17,7 @@
-This package requires TypeScript >= 4.0. If you need support for earlier TS versions check out: 1.0 version of this
-package.
+This package requires TypeScript >= 4.7 and `moduleResolution` to be set as `node16` or `nodenext`.
## [TypeChain readme](https://github.com/ethereum-ts/TypeChain)
@@ -27,10 +26,12 @@ package.
The main files generated by this target are `.ts`. They declare typesafe interfaces for your contracts on
top of ethers `Contract` instances:
-- typed contract's methods, available both at `contract.someMethod(...)` and `contract.functions.someMethod(...)`
+- typed contract's methods, available both at `contract.someMethod(...)`, `contract.someMethod.call(...)`,
+ `contract.someMethod.staticcall(...)` and `contract.someMethod.send(...)`
- typed events in `contract.interface.events.AnEvent` and filters in `contract.filters.AnEvent`
-- typed method gas estimates in `contract.estimateGas.someMethod`
+- typed method gas estimates in `contract.someMethod.estimateGas(...)`
- overrides for the event listener methods (`on`, `once`, etc) that return the same contract type.
+- address argument types are `AddressLike`, meaning you can pass a signer or contract.
Note: these are just _type declarations_ to help you call the blockchain properly, so they're not available at runtime,
and all of the contracts are still instances of the same `Contract` class.
@@ -53,7 +54,6 @@ so you can easily connect to a deployed instance without having to pass the ABI
Suppose you have an `Erc20Token.sol` solidity interface and a `DummyToken.sol` contract implementing it.
```typescript
-import { BigNumber } from 'ethers';
import { Wallet } from 'ethers';
import { DummyTokenFactory } from 'typechain-out-dir/DummyTokenFactory';
@@ -70,7 +70,7 @@ async function deployTestToken(ownerPK: string): Promise {
// to call existing contracts, a factory for both the concrete contract and for the interface
// can be used since the ABI is the same
-async function getTokenBalance(walletAddress: string, tokenAddress: string): Promise {
+async function getTokenBalance(walletAddress: string, tokenAddress: string): Promise {
const token = Erc20TokenFactory.connect(tokenAddress, provider);
return token.balanceOf(walletAddress);
}