@0x/migrations
: Update EP migration
This commit is contained in:
parent
e7ad7c3af7
commit
3cd03ed0f1
@ -9,6 +9,10 @@
|
||||
{
|
||||
"note": "Refactor `migration.ts` a little",
|
||||
"pr": 2656
|
||||
},
|
||||
{
|
||||
"note": "Update EP migration.",
|
||||
"pr": "TODO"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user