Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
Update Contract types (#150)
Browse files Browse the repository at this point in the history
* update dependencies

* regenerate types

* more hacks for ExtendedContract

* 0.3.1-RC.0

* fix subscription return type

* export contract events as a map for ease of use

* 0.3.1-RC.1
  • Loading branch information
Velenir committed May 25, 2020
1 parent 6b8a099 commit 7d80801
Show file tree
Hide file tree
Showing 13 changed files with 820 additions and 525 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gnosis.pm/dex-js",
"version": "0.3.0",
"version": "0.3.1-RC.1",
"description": "Gnosis Protocol JS integration: utils, contracts and other goodies",
"license": "MIT",
"bugs": {
Expand Down Expand Up @@ -51,6 +51,7 @@
"bignumber.js": "^9.0.0"
},
"devDependencies": {
"@typechain/web3-v1": "^1.0.0",
"@types/bignumber.js": "^5.0.0",
"@types/debug": "^4.1.5",
"@types/dotenv": "^8.2.0",
Expand Down Expand Up @@ -78,11 +79,10 @@
"ts-jest": "^25.2.0",
"ts-node": "^8.4.1",
"tsconfig-paths": "^3.9.0",
"ttypescript": "^1.5.8",
"typechain": "^1.0.3",
"typechain-target-web3-v1": "^1.0.4",
"typescript": "^3.7.3",
"typescript-transform-paths": "^1.1.13",
"web3": "^1.2.4"
"ttypescript": "^1.5.10",
"typechain": "^2.0.0",
"typescript": "^3.9.3",
"typescript-transform-paths": "^1.1.14",
"web3": "^1.2.8"
}
}
3 changes: 2 additions & 1 deletion src/contracts/BatchExchangeContract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Doesn't use ContractEvent on purpose since the mapping of events in typechain is broken
// TODO: Update when typechain fix the issue
import { BatchExchange } from './gen/BatchExchange'
import { ExtendedContract } from './types'
import { ExtendedContract, EventMap } from './types'

export type BatchExchangeContract = ExtendedContract<BatchExchange>
export type BatchExchangeEvents = EventMap<BatchExchange>
3 changes: 2 additions & 1 deletion src/contracts/Erc20Contract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Doesn't use ContractEvent on purpose since the mapping of events in typechain is broken
// TODO: Update when typechain fix the issue
import { Erc20 } from './gen/Erc20.d'
import { ExtendedContract } from './types'
import { ExtendedContract, EventMap } from './types'

export type Erc20Contract = ExtendedContract<Erc20>
export type Erc20Events = EventMap<Erc20>
3 changes: 2 additions & 1 deletion src/contracts/TcrContract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Doesn't use ContractEvent on purpose since the mapping of events in typechain is broken
// TODO: Update when typechain fix the issue
import { Tcr } from './gen/Tcr'
import { ExtendedContract } from './types'
import { ExtendedContract, EventMap } from './types'

export type TcrContract = ExtendedContract<Tcr>
export type TcrEvents = EventMap<Tcr>
3 changes: 2 additions & 1 deletion src/contracts/WethContract.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Doesn't use ContractEvent on purpose since the mapping of events in typechain is broken
// TODO: Update when typechain fix the issue
import { Weth } from './gen/Weth'
import { ExtendedContract } from './types'
import { ExtendedContract, EventMap } from './types'

export type WethContract = ExtendedContract<Weth>
export type WethEvents = EventMap<Weth>

0 comments on commit 7d80801

Please sign in to comment.