@0x/migrations: Update EP migration

This commit is contained in:
Lawrence Forman 2020-08-20 16:55:47 -04:00
parent e7ad7c3af7
commit 3cd03ed0f1
2 changed files with 8 additions and 14 deletions

View File

@ -9,6 +9,10 @@
{
"note": "Refactor `migration.ts` a little",
"pr": 2656
},
{
"note": "Update EP migration.",
"pr": "TODO"
}
]
},

View File

@ -31,11 +31,9 @@ import {
artifacts as exchangeProxyArtifacts,
FillQuoteTransformerContract,
fullMigrateAsync as fullMigrateExchangeProxyAsync,
ITokenSpenderContract,
ITransformERC20Contract,
IZeroExContract,
PayTakerTransformerContract,
WethTransformerContract,
ZeroExContract,
} from '@0x/contracts-zero-ex';
import { Web3ProviderEngine, ZeroExProvider } from '@0x/subproviders';
import { BigNumber, providerUtils } from '@0x/utils';
@ -400,7 +398,7 @@ async function _migrateExchangeProxyAsync(
txDefaults: TxData,
): Promise<
[
ZeroExContract,
IZeroExContract,
FillQuoteTransformerContract,
PayTakerTransformerContract,
WethTransformerContract,
@ -410,16 +408,8 @@ async function _migrateExchangeProxyAsync(
]
> {
const exchangeProxy = await fullMigrateExchangeProxyAsync(txDefaults.from, provider, txDefaults);
const exchangeProxyAllowanceTargetAddress = await new ITokenSpenderContract(
exchangeProxy.address,
provider,
txDefaults,
)
.getAllowanceTarget()
.callAsync();
const exchangeProxyFlashWalletAddress = await new ITransformERC20Contract(exchangeProxy.address, provider)
.getTransformWallet()
.callAsync();
const exchangeProxyAllowanceTargetAddress = await exchangeProxy.getAllowanceTarget().callAsync();
const exchangeProxyFlashWalletAddress = await exchangeProxy.getTransformWallet().callAsync();
// Deploy transformers.
const fillQuoteTransformer = await FillQuoteTransformerContract.deployFrom0xArtifactAsync(