Commit ca26505
authored
Support optional fields in EventFilter typespecs (#144)
The current typespec generator emits a dialyzer warning when nil values are set for the indexed topics of an `EventFilter`:
```elixir
The function call will not succeed.
Ethers.Contracts.ERC20.EventFilters.transfer(nil, nil)
breaks the contract
(Ethers.Types.t_address(), Ethers.Types.t_address()) :: Ethers.EventFilter.t()
```
This can be fixed by making the arguments nullable for events.1 parent c474546 commit ca26505
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| |||
0 commit comments