chore: add OtcOrder feature to fullMigrateAsync (#350)

This commit is contained in:
phil-ociraptor 2021-11-02 20:19:27 -05:00 committed by GitHub
parent fce3664258
commit 89817428ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 5 deletions

View File

@ -5,6 +5,10 @@
{
"note": "Register transformERC20() and remove transformERC20Staging()",
"pr": 355
},
{
"note": "Add OtcOrders to FullMigration",
"pr": 350
}
]
},

View File

@ -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)
);
}
}
}

View File

@ -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,
};
}

View File

@ -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": {

View File

@ -1,4 +1,13 @@
[
{
"version": "8.1.10",
"changes": [
{
"note": "Add OtcOrders to fullMigrateAsync",
"pr": 350
}
]
},
{
"timestamp": 1634668033,
"version": "8.1.9",