Merge pull request #2649 from 0xProject/feat/contract-wrappers/exchangeProxy

Add `exchangeProxy` to `ContractWrappers`
This commit is contained in:
Lawrence Forman 2020-07-30 20:43:33 -04:00 committed by GitHub
commit eedfc64a8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 0 deletions

View File

@ -9,6 +9,10 @@
{
"note": "Update `ERC20BridgeSampler` wrapper",
"pr": 2633
},
{
"note": "Add `exchangeProxy` to `ContractWrappers` type.",
"pr": 2649
}
]
},

View File

@ -11,6 +11,7 @@ import { ERC20TokenContract } from './generated-wrappers/erc20_token';
import { ERC721TokenContract } from './generated-wrappers/erc721_token';
import { ExchangeContract } from './generated-wrappers/exchange';
import { ForwarderContract } from './generated-wrappers/forwarder';
import { IZeroExContract } from './generated-wrappers/i_zero_ex';
import { StakingContract } from './generated-wrappers/staking';
import { WETH9Contract } from './generated-wrappers/weth9';
import { ContractWrappersConfig } from './types';
@ -49,6 +50,10 @@ export class ContractWrappers {
* An instance of the StakingContract class containing methods for interacting with the Staking contracts.
*/
public staking: StakingContract;
/**
* An instance of the IZeroExContract class containing methods for interacting with the Exchange Proxy.
*/
public exchangeProxy: IZeroExContract;
private readonly _web3Wrapper: Web3Wrapper;
/**
@ -73,6 +78,7 @@ export class ContractWrappers {
ForwarderContract,
StakingContract,
WETH9Contract,
IZeroExContract,
];
contractsArray.forEach(contract => {
this._web3Wrapper.abiDecoder.addABI(contract.ABI(), contract.contractName);
@ -87,6 +93,7 @@ export class ContractWrappers {
this.staking = new StakingContract(contractAddresses.stakingProxy, this.getProvider());
this.devUtils = new DevUtilsContract(contractAddresses.devUtils, this.getProvider());
this.coordinator = new CoordinatorContract(contractAddresses.coordinator, this.getProvider());
this.exchangeProxy = new IZeroExContract(contractAddresses.exchangeProxy, this.getProvider());
this.contractAddresses = contractAddresses;
}
/**

View File

@ -1,4 +1,13 @@
[
{
"version": "10.3.1",
"changes": [
{
"note": "Add gitpkg.",
"pr": 2649
}
]
},
{
"version": "10.3.0",
"changes": [

View File

@ -10,6 +10,7 @@
"scripts": {
"build": "yarn tsc -b",
"build:ci": "yarn build",
"publish:private": "yarn clean && yarn build && gitpkg publish",
"test": "yarn run_mocha",
"rebuild_and_test": "run-s build test",
"test:circleci": "yarn test:coverage",
@ -29,6 +30,9 @@
"assets": []
}
},
"gitpkg": {
"registry": "git@github.com:0xProject/gitpkg-registry.git"
},
"license": "Apache-2.0",
"repository": {
"type": "git",
@ -52,6 +56,7 @@
"@types/web3-provider-engine": "^14.0.0",
"chai": "^4.0.1",
"ethereum-types": "^3.2.0",
"gitpkg": "https://github.com/0xProject/gitpkg.git",
"make-promises-safe": "^1.1.0",
"mocha": "^6.2.0",
"npm-run-all": "^4.1.2",