diff --git a/contracts/zero-ex/CHANGELOG.json b/contracts/zero-ex/CHANGELOG.json index 7c9f8250e9..70b485ac97 100644 --- a/contracts/zero-ex/CHANGELOG.json +++ b/contracts/zero-ex/CHANGELOG.json @@ -5,6 +5,10 @@ { "note": "Register transformERC20() and remove transformERC20Staging()", "pr": 355 + }, + { + "note": "Add OtcOrders to FullMigration", + "pr": 350 } ] }, diff --git a/contracts/zero-ex/contracts/src/migrations/FullMigration.sol b/contracts/zero-ex/contracts/src/migrations/FullMigration.sol index 45fc93721f..661cf0c8ff 100644 --- a/contracts/zero-ex/contracts/src/migrations/FullMigration.sol +++ b/contracts/zero-ex/contracts/src/migrations/FullMigration.sol @@ -25,6 +25,7 @@ import "../features/interfaces/IOwnableFeature.sol"; import "../features/TransformERC20Feature.sol"; import "../features/MetaTransactionsFeature.sol"; import "../features/NativeOrdersFeature.sol"; +import "../features/OtcOrdersFeature.sol"; import "./InitialMigration.sol"; @@ -40,6 +41,7 @@ contract FullMigration { TransformERC20Feature transformERC20; MetaTransactionsFeature metaTransactions; NativeOrdersFeature nativeOrders; + OtcOrdersFeature otcOrders; } /// @dev Parameters needed to initialize features. @@ -173,5 +175,16 @@ contract FullMigration { address(this) ); } + // OtcOrdersFeature + { + // Register the feature. + ownable.migrate( + address(features.otcOrders), + abi.encodeWithSelector( + OtcOrdersFeature.migrate.selector + ), + address(this) + ); + } } } diff --git a/contracts/zero-ex/src/migration.ts b/contracts/zero-ex/src/migration.ts index 11f982163f..c785fc7be3 100644 --- a/contracts/zero-ex/src/migration.ts +++ b/contracts/zero-ex/src/migration.ts @@ -12,6 +12,7 @@ import { IZeroExContract, MetaTransactionsFeatureContract, NativeOrdersFeatureContract, + OtcOrdersFeatureContract, OwnableFeatureContract, SimpleFunctionRegistryFeatureContract, TransformERC20FeatureContract, @@ -113,6 +114,7 @@ export interface FullFeatures extends BootstrapFeatures { transformERC20: string; metaTransactions: string; nativeOrders: string; + otcOrders: string; } /** @@ -123,6 +125,7 @@ export interface FullFeatureArtifacts extends BootstrapFeatureArtifacts { metaTransactions: SimpleContractArtifact; nativeOrders: SimpleContractArtifact; feeCollectorController: SimpleContractArtifact; + otcOrders: SimpleContractArtifact; } /** @@ -155,6 +158,7 @@ const DEFAULT_FULL_FEATURES_ARTIFACTS = { metaTransactions: artifacts.MetaTransactionsFeature, nativeOrders: artifacts.NativeOrdersFeature, feeCollectorController: artifacts.FeeCollectorController, + otcOrders: artifacts.OtcOrdersFeature, }; /** @@ -222,6 +226,18 @@ export async function deployFullFeaturesAsync( _config.protocolFeeMultiplier, ) ).address, + otcOrders: + features.otcOrders || + ( + await OtcOrdersFeatureContract.deployFrom0xArtifactAsync( + _featureArtifacts.otcOrders, + provider, + txDefaults, + artifacts, + _config.zeroExAddress, + _config.wethAddress, + ) + ).address, }; } diff --git a/packages/contract-addresses/addresses.json b/packages/contract-addresses/addresses.json index 004e574781..4f3b7e217a 100644 --- a/packages/contract-addresses/addresses.json +++ b/packages/contract-addresses/addresses.json @@ -244,11 +244,11 @@ "exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000", "zrxTreasury": "0x0000000000000000000000000000000000000000", "transformers": { - "wethTransformer": "0xc6b0d3c45a6b5092808196cb00df5c357d55e1d5", - "payTakerTransformer": "0x7209185959d7227fb77274e1e88151d7c4c368d3", - "affiliateFeeTransformer": "0x3f16ca81691dab9184cb4606c361d73c4fd2510a", - "fillQuoteTransformer": "0x99356167edba8fbdc36959e3f5d0c43d1ba9c6db", - "positiveSlippageFeeTransformer": "0x45b3a72221e571017c0f0ec42189e11d149d0ace" + "wethTransformer": "0x7209185959d7227fb77274e1e88151d7c4c368d3", + "payTakerTransformer": "0x3f16ca81691dab9184cb4606c361d73c4fd2510a", + "affiliateFeeTransformer": "0x99356167edba8fbdc36959e3f5d0c43d1ba9c6db", + "fillQuoteTransformer": "0x45b3a72221e571017c0f0ec42189e11d149d0ace", + "positiveSlippageFeeTransformer": "0xdd66c23e07b4d6925b6089b5fe6fc9e62941afe8" } }, "137": { diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index b248259ba1..52940dbf14 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "8.1.10", + "changes": [ + { + "note": "Add OtcOrders to fullMigrateAsync", + "pr": 350 + } + ] + }, { "timestamp": 1634668033, "version": "8.1.9",