aboutsummaryrefslogtreecommitdiffstats
path: root/packages/migrations/src/2.0.0/migration.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/migrations/src/2.0.0/migration.ts')
-rw-r--r--packages/migrations/src/2.0.0/migration.ts18
1 files changed, 16 insertions, 2 deletions
diff --git a/packages/migrations/src/2.0.0/migration.ts b/packages/migrations/src/2.0.0/migration.ts
index 75e60d3e2..f51c236de 100644
--- a/packages/migrations/src/2.0.0/migration.ts
+++ b/packages/migrations/src/2.0.0/migration.ts
@@ -1,4 +1,4 @@
-import { assetProxyUtils } from '@0xproject/order-utils';
+import { assetDataUtils } from '@0xproject/order-utils';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Provider, TxData } from 'ethereum-types';
@@ -13,6 +13,7 @@ import { DummyERC721TokenContract } from './contract_wrappers/dummy_erc721_token
import { ERC20ProxyContract } from './contract_wrappers/erc20_proxy';
import { ERC721ProxyContract } from './contract_wrappers/erc721_proxy';
import { ExchangeContract } from './contract_wrappers/exchange';
+import { ForwarderContract } from './contract_wrappers/forwarder';
import { WETH9Contract } from './contract_wrappers/weth9';
import { ZRXTokenContract } from './contract_wrappers/zrx_token';
@@ -52,7 +53,7 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
artifacts.Exchange,
provider,
txDefaults,
- assetProxyUtils.encodeERC20AssetData(zrxToken.address),
+ assetDataUtils.encodeERC20AssetData(zrxToken.address),
);
artifactsWriter.saveArtifact(exchange);
@@ -127,4 +128,17 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
erc721TokenInfo[0].name,
erc721TokenInfo[0].symbol,
);
+
+ // Forwarder
+ const forwarder = await ForwarderContract.deployFrom0xArtifactAsync(
+ artifacts.Forwarder,
+ provider,
+ txDefaults,
+ exchange.address,
+ etherToken.address,
+ zrxToken.address,
+ assetDataUtils.encodeERC20AssetData(zrxToken.address),
+ assetDataUtils.encodeERC20AssetData(etherToken.address),
+ );
+ artifactsWriter.saveArtifact(forwarder);
};