@0x/migrations
: Update EP migration
This commit is contained in:
parent
e7ad7c3af7
commit
3cd03ed0f1
@ -9,6 +9,10 @@
|
|||||||
{
|
{
|
||||||
"note": "Refactor `migration.ts` a little",
|
"note": "Refactor `migration.ts` a little",
|
||||||
"pr": 2656
|
"pr": 2656
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "Update EP migration.",
|
||||||
|
"pr": "TODO"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -31,11 +31,9 @@ import {
|
|||||||
artifacts as exchangeProxyArtifacts,
|
artifacts as exchangeProxyArtifacts,
|
||||||
FillQuoteTransformerContract,
|
FillQuoteTransformerContract,
|
||||||
fullMigrateAsync as fullMigrateExchangeProxyAsync,
|
fullMigrateAsync as fullMigrateExchangeProxyAsync,
|
||||||
ITokenSpenderContract,
|
IZeroExContract,
|
||||||
ITransformERC20Contract,
|
|
||||||
PayTakerTransformerContract,
|
PayTakerTransformerContract,
|
||||||
WethTransformerContract,
|
WethTransformerContract,
|
||||||
ZeroExContract,
|
|
||||||
} from '@0x/contracts-zero-ex';
|
} from '@0x/contracts-zero-ex';
|
||||||
import { Web3ProviderEngine, ZeroExProvider } from '@0x/subproviders';
|
import { Web3ProviderEngine, ZeroExProvider } from '@0x/subproviders';
|
||||||
import { BigNumber, providerUtils } from '@0x/utils';
|
import { BigNumber, providerUtils } from '@0x/utils';
|
||||||
@ -400,7 +398,7 @@ async function _migrateExchangeProxyAsync(
|
|||||||
txDefaults: TxData,
|
txDefaults: TxData,
|
||||||
): Promise<
|
): Promise<
|
||||||
[
|
[
|
||||||
ZeroExContract,
|
IZeroExContract,
|
||||||
FillQuoteTransformerContract,
|
FillQuoteTransformerContract,
|
||||||
PayTakerTransformerContract,
|
PayTakerTransformerContract,
|
||||||
WethTransformerContract,
|
WethTransformerContract,
|
||||||
@ -410,16 +408,8 @@ async function _migrateExchangeProxyAsync(
|
|||||||
]
|
]
|
||||||
> {
|
> {
|
||||||
const exchangeProxy = await fullMigrateExchangeProxyAsync(txDefaults.from, provider, txDefaults);
|
const exchangeProxy = await fullMigrateExchangeProxyAsync(txDefaults.from, provider, txDefaults);
|
||||||
const exchangeProxyAllowanceTargetAddress = await new ITokenSpenderContract(
|
const exchangeProxyAllowanceTargetAddress = await exchangeProxy.getAllowanceTarget().callAsync();
|
||||||
exchangeProxy.address,
|
const exchangeProxyFlashWalletAddress = await exchangeProxy.getTransformWallet().callAsync();
|
||||||
provider,
|
|
||||||
txDefaults,
|
|
||||||
)
|
|
||||||
.getAllowanceTarget()
|
|
||||||
.callAsync();
|
|
||||||
const exchangeProxyFlashWalletAddress = await new ITransformERC20Contract(exchangeProxy.address, provider)
|
|
||||||
.getTransformWallet()
|
|
||||||
.callAsync();
|
|
||||||
|
|
||||||
// Deploy transformers.
|
// Deploy transformers.
|
||||||
const fillQuoteTransformer = await FillQuoteTransformerContract.deployFrom0xArtifactAsync(
|
const fillQuoteTransformer = await FillQuoteTransformerContract.deployFrom0xArtifactAsync(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user