Skip to content

Commit 2824b63

Browse files
authored
Merge pull request #322 from ethereum-ts/changeset-release/master
2 parents 55427cc + 0961496 commit 2824b63

File tree

6 files changed

+46
-41
lines changed

6 files changed

+46
-41
lines changed

.changeset/short-actors-exercise.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

.changeset/yellow-guests-clean.md

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,58 @@
11
# @typechain/ethers-v5
22

3+
## 6.0.0
4+
5+
### Major Changes
6+
7+
- cd73777: Improve typings for events. Generate types for `queryFilter` for events.
8+
9+
Note: This is a breaking change as it requires using TypeScript >= 4.0.0 (previously 3.9 was fine.)
10+
11+
Example:
12+
13+
```typescript
14+
const filter = contract.filters.Transfer() // TypedEventFilter<>
15+
const result = await contract.queryFilter(filter) // TypedEvent<>
16+
17+
result[0].args.from // type support for named event parameters
18+
result[0].args[0] // type support by index
19+
20+
contract.on(filter, (from, to, value, event) => {
21+
from // string
22+
to // string
23+
value // BigNumber
24+
event // TypedEvent<>
25+
})
26+
```
27+
328
## 5.0.0
29+
430
### Major Changes
531

6-
- 0d4b293: Changed return type of functions from a object with number indexes, to an array merged with object containing named
7-
outputs.
8-
32+
- 0d4b293: Changed return type of functions from a object with number indexes, to an array merged with object containing
33+
named outputs.
34+
935
Before, solidity function like this:
10-
36+
1137
```
1238
function x() public pure returns (uint256)
1339
```
14-
40+
1541
Generated such method signature:
16-
42+
1743
```typescript
1844
x(overrides?: CallOverrides): Promise<{0: BigNumber}>;
1945
```
20-
46+
2147
New output is:
22-
48+
2349
```typescript
2450
x(overrides?: CallOverrides): Promise<[BigNumber]>;
2551
```
26-
52+
2753
The difference is that now you can use standard array destructuring while working with output types.
2854

2955
### Patch Changes
3056

31-
- db5baa5: Do not generate typings in contract type itself for reserved keywords that would collide with ethers internals
57+
- db5baa5: Do not generate typings in contract type itself for reserved keywords that would collide with ethers
58+
internals

packages/target-ethers-v5/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"TypeChain",
99
"TypeScript"
1010
],
11-
"version": "5.0.0",
11+
"version": "6.0.0",
1212
"license": "MIT",
1313
"repository": "https://github.com/ethereum-ts/Typechain",
1414
"main": "./dist/index.js",

packages/typechain/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# typechain
22

3+
## 4.0.2
4+
5+
### Patch Changes
6+
7+
- d07ae43: Fix signature of overloaded methods with struct in arguments
8+
39
## 4.0.1
10+
411
### Patch Changes
512

613
- 82633bb: Do not ship tests and original source files with the npm package

packages/typechain/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"smartcontract",
99
"blockchain"
1010
],
11-
"version": "4.0.1",
11+
"version": "4.0.2",
1212
"license": "MIT",
1313
"repository": "https://github.com/ethereum-ts/Typechain",
1414
"main": "./dist/index.js",

0 commit comments

Comments
 (0)