Compare commits
11 Commits
@0x/contra
...
protocol@9
Author | SHA1 | Date | |
---|---|---|---|
|
9ff77c1cd5 | ||
|
18a8351671 | ||
|
9a994dfcd3 | ||
|
b7adc5a889 | ||
|
10b0d7f363 | ||
|
e2c905a15f | ||
|
8589ba728c | ||
|
43512fd07a | ||
|
c090608d99 | ||
|
89817428ed | ||
|
fce3664258 |
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "3.3.22",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "3.3.21",
|
"version": "3.3.21",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v3.3.22 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v3.3.21 - _October 19, 2021_
|
## v3.3.21 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-erc20",
|
"name": "@0x/contracts-erc20",
|
||||||
"version": "3.3.21",
|
"version": "3.3.22",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.6.2",
|
"@0x/abi-gen": "^5.6.2",
|
||||||
"@0x/contracts-gen": "^2.0.40",
|
"@0x/contracts-gen": "^2.0.40",
|
||||||
"@0x/contracts-test-utils": "^5.4.12",
|
"@0x/contracts-test-utils": "^5.4.13",
|
||||||
"@0x/contracts-utils": "^4.8.2",
|
"@0x/contracts-utils": "^4.8.3",
|
||||||
"@0x/dev-utils": "^4.2.9",
|
"@0x/dev-utils": "^4.2.9",
|
||||||
"@0x/sol-compiler": "^4.7.5",
|
"@0x/sol-compiler": "^4.7.5",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "5.4.13",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "5.4.12",
|
"version": "5.4.12",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v5.4.13 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v5.4.12 - _October 19, 2021_
|
## v5.4.12 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-test-utils",
|
"name": "@0x/contracts-test-utils",
|
||||||
"version": "5.4.12",
|
"version": "5.4.13",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.29",
|
"@0x/assert": "^3.0.29",
|
||||||
"@0x/base-contract": "^6.4.2",
|
"@0x/base-contract": "^6.4.2",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/dev-utils": "^4.2.9",
|
"@0x/dev-utils": "^4.2.9",
|
||||||
"@0x/json-schemas": "^6.3.0",
|
"@0x/json-schemas": "^6.3.0",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "1.4.5",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "1.4.4",
|
"version": "1.4.4",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.4.5 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.4.4 - _October 19, 2021_
|
## v1.4.4 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-treasury",
|
"name": "@0x/contracts-treasury",
|
||||||
"version": "1.4.4",
|
"version": "1.4.5",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -47,12 +47,12 @@
|
|||||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.6.2",
|
"@0x/abi-gen": "^5.6.2",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/contracts-asset-proxy": "^3.7.19",
|
"@0x/contracts-asset-proxy": "^3.7.19",
|
||||||
"@0x/contracts-erc20": "^3.3.21",
|
"@0x/contracts-erc20": "^3.3.22",
|
||||||
"@0x/contracts-gen": "^2.0.40",
|
"@0x/contracts-gen": "^2.0.40",
|
||||||
"@0x/contracts-staking": "^2.0.45",
|
"@0x/contracts-staking": "^2.0.45",
|
||||||
"@0x/contracts-test-utils": "^5.4.12",
|
"@0x/contracts-test-utils": "^5.4.13",
|
||||||
"@0x/sol-compiler": "^4.7.5",
|
"@0x/sol-compiler": "^4.7.5",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
"@0x/tslint-config": "^4.1.4",
|
"@0x/tslint-config": "^4.1.4",
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^6.4.2",
|
"@0x/base-contract": "^6.4.2",
|
||||||
"@0x/protocol-utils": "^1.9.3",
|
"@0x/protocol-utils": "^1.9.4",
|
||||||
"@0x/subproviders": "^6.6.0",
|
"@0x/subproviders": "^6.6.0",
|
||||||
"@0x/types": "^3.3.4",
|
"@0x/types": "^3.3.4",
|
||||||
"@0x/typescript-typings": "^5.2.1",
|
"@0x/typescript-typings": "^5.2.1",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "4.8.3",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "4.8.2",
|
"version": "4.8.2",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v4.8.3 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v4.8.2 - _October 19, 2021_
|
## v4.8.2 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-utils",
|
"name": "@0x/contracts-utils",
|
||||||
"version": "4.8.2",
|
"version": "4.8.3",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.6.2",
|
"@0x/abi-gen": "^5.6.2",
|
||||||
"@0x/contracts-gen": "^2.0.40",
|
"@0x/contracts-gen": "^2.0.40",
|
||||||
"@0x/contracts-test-utils": "^5.4.12",
|
"@0x/contracts-test-utils": "^5.4.13",
|
||||||
"@0x/dev-utils": "^4.2.9",
|
"@0x/dev-utils": "^4.2.9",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
"@0x/sol-compiler": "^4.7.5",
|
"@0x/sol-compiler": "^4.7.5",
|
||||||
|
@@ -1,4 +1,18 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "0.29.3",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Register transformERC20() and remove transformERC20Staging()",
|
||||||
|
"pr": 355
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"note": "Add OtcOrders to FullMigration",
|
||||||
|
"pr": 350
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1635903615
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "0.29.2",
|
"version": "0.29.2",
|
||||||
|
@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v0.29.3 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Register transformERC20() and remove transformERC20Staging() (#355)
|
||||||
|
* Add OtcOrders to FullMigration (#350)
|
||||||
|
|
||||||
## v0.29.2 - _October 19, 2021_
|
## v0.29.2 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -75,7 +75,7 @@ contract TransformERC20Feature is
|
|||||||
_registerFeatureFunction(this.setTransformerDeployer.selector);
|
_registerFeatureFunction(this.setTransformerDeployer.selector);
|
||||||
_registerFeatureFunction(this.setQuoteSigner.selector);
|
_registerFeatureFunction(this.setQuoteSigner.selector);
|
||||||
_registerFeatureFunction(this.getQuoteSigner.selector);
|
_registerFeatureFunction(this.getQuoteSigner.selector);
|
||||||
_registerFeatureFunction(this.transformERC20Staging.selector);
|
_registerFeatureFunction(this.transformERC20.selector);
|
||||||
_registerFeatureFunction(this._transformERC20.selector);
|
_registerFeatureFunction(this._transformERC20.selector);
|
||||||
if (this.getTransformWallet() == IFlashWallet(address(0))) {
|
if (this.getTransformWallet() == IFlashWallet(address(0))) {
|
||||||
// Create the transform wallet if it doesn't exist.
|
// Create the transform wallet if it doesn't exist.
|
||||||
@@ -145,44 +145,6 @@ contract TransformERC20Feature is
|
|||||||
LibTransformERC20Storage.getStorage().wallet = wallet;
|
LibTransformERC20Storage.getStorage().wallet = wallet;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Wrapper for `transformERC20`. This selector will be temporarily
|
|
||||||
/// registered to the Exchange Proxy so that we can migrate 0x API
|
|
||||||
/// with no downtime. Once 0x API has been updated to point to this
|
|
||||||
/// function, we can safely re-register `transformERC20`, point
|
|
||||||
/// 0x API back to `transformERC20`, and deregister this function.
|
|
||||||
/// @param inputToken The token being provided by the sender.
|
|
||||||
/// If `0xeee...`, ETH is implied and should be provided with the call.`
|
|
||||||
/// @param outputToken The token to be acquired by the sender.
|
|
||||||
/// `0xeee...` implies ETH.
|
|
||||||
/// @param inputTokenAmount The amount of `inputToken` to take from the sender.
|
|
||||||
/// If set to `uint256(-1)`, the entire spendable balance of the taker
|
|
||||||
/// will be solt.
|
|
||||||
/// @param minOutputTokenAmount The minimum amount of `outputToken` the sender
|
|
||||||
/// must receive for the entire transformation to succeed. If set to zero,
|
|
||||||
/// the minimum output token transfer will not be asserted.
|
|
||||||
/// @param transformations The transformations to execute on the token balance(s)
|
|
||||||
/// in sequence.
|
|
||||||
/// @return outputTokenAmount The amount of `outputToken` received by the sender.
|
|
||||||
function transformERC20Staging(
|
|
||||||
IERC20TokenV06 inputToken,
|
|
||||||
IERC20TokenV06 outputToken,
|
|
||||||
uint256 inputTokenAmount,
|
|
||||||
uint256 minOutputTokenAmount,
|
|
||||||
Transformation[] memory transformations
|
|
||||||
)
|
|
||||||
public
|
|
||||||
payable
|
|
||||||
returns (uint256 outputTokenAmount)
|
|
||||||
{
|
|
||||||
return transformERC20(
|
|
||||||
inputToken,
|
|
||||||
outputToken,
|
|
||||||
inputTokenAmount,
|
|
||||||
minOutputTokenAmount,
|
|
||||||
transformations
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @dev Executes a series of transformations to convert an ERC20 `inputToken`
|
/// @dev Executes a series of transformations to convert an ERC20 `inputToken`
|
||||||
/// to an ERC20 `outputToken`.
|
/// to an ERC20 `outputToken`.
|
||||||
/// @param inputToken The token being provided by the sender.
|
/// @param inputToken The token being provided by the sender.
|
||||||
@@ -283,8 +245,8 @@ contract TransformERC20Feature is
|
|||||||
}
|
}
|
||||||
// Transfer output tokens from wallet to recipient
|
// Transfer output tokens from wallet to recipient
|
||||||
outputTokenAmount = _executeOutputTokenTransfer(
|
outputTokenAmount = _executeOutputTokenTransfer(
|
||||||
args.outputToken,
|
args.outputToken,
|
||||||
state.wallet,
|
state.wallet,
|
||||||
args.recipient
|
args.recipient
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -25,6 +25,7 @@ import "../features/interfaces/IOwnableFeature.sol";
|
|||||||
import "../features/TransformERC20Feature.sol";
|
import "../features/TransformERC20Feature.sol";
|
||||||
import "../features/MetaTransactionsFeature.sol";
|
import "../features/MetaTransactionsFeature.sol";
|
||||||
import "../features/NativeOrdersFeature.sol";
|
import "../features/NativeOrdersFeature.sol";
|
||||||
|
import "../features/OtcOrdersFeature.sol";
|
||||||
import "./InitialMigration.sol";
|
import "./InitialMigration.sol";
|
||||||
|
|
||||||
|
|
||||||
@@ -40,6 +41,7 @@ contract FullMigration {
|
|||||||
TransformERC20Feature transformERC20;
|
TransformERC20Feature transformERC20;
|
||||||
MetaTransactionsFeature metaTransactions;
|
MetaTransactionsFeature metaTransactions;
|
||||||
NativeOrdersFeature nativeOrders;
|
NativeOrdersFeature nativeOrders;
|
||||||
|
OtcOrdersFeature otcOrders;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @dev Parameters needed to initialize features.
|
/// @dev Parameters needed to initialize features.
|
||||||
@@ -173,5 +175,16 @@ contract FullMigration {
|
|||||||
address(this)
|
address(this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// OtcOrdersFeature
|
||||||
|
{
|
||||||
|
// Register the feature.
|
||||||
|
ownable.migrate(
|
||||||
|
address(features.otcOrders),
|
||||||
|
abi.encodeWithSelector(
|
||||||
|
OtcOrdersFeature.migrate.selector
|
||||||
|
),
|
||||||
|
address(this)
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contracts-zero-ex",
|
"name": "@0x/contracts-zero-ex",
|
||||||
"version": "0.29.2",
|
"version": "0.29.3",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -56,10 +56,10 @@
|
|||||||
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@0x/abi-gen": "^5.6.2",
|
"@0x/abi-gen": "^5.6.2",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/contracts-erc20": "^3.3.21",
|
"@0x/contracts-erc20": "^3.3.22",
|
||||||
"@0x/contracts-gen": "^2.0.40",
|
"@0x/contracts-gen": "^2.0.40",
|
||||||
"@0x/contracts-test-utils": "^5.4.12",
|
"@0x/contracts-test-utils": "^5.4.13",
|
||||||
"@0x/dev-utils": "^4.2.9",
|
"@0x/dev-utils": "^4.2.9",
|
||||||
"@0x/order-utils": "^10.4.28",
|
"@0x/order-utils": "^10.4.28",
|
||||||
"@0x/sol-compiler": "^4.7.5",
|
"@0x/sol-compiler": "^4.7.5",
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^6.4.2",
|
"@0x/base-contract": "^6.4.2",
|
||||||
"@0x/protocol-utils": "^1.9.3",
|
"@0x/protocol-utils": "^1.9.4",
|
||||||
"@0x/subproviders": "^6.6.0",
|
"@0x/subproviders": "^6.6.0",
|
||||||
"@0x/types": "^3.3.4",
|
"@0x/types": "^3.3.4",
|
||||||
"@0x/typescript-typings": "^5.2.1",
|
"@0x/typescript-typings": "^5.2.1",
|
||||||
|
@@ -12,6 +12,7 @@ import {
|
|||||||
IZeroExContract,
|
IZeroExContract,
|
||||||
MetaTransactionsFeatureContract,
|
MetaTransactionsFeatureContract,
|
||||||
NativeOrdersFeatureContract,
|
NativeOrdersFeatureContract,
|
||||||
|
OtcOrdersFeatureContract,
|
||||||
OwnableFeatureContract,
|
OwnableFeatureContract,
|
||||||
SimpleFunctionRegistryFeatureContract,
|
SimpleFunctionRegistryFeatureContract,
|
||||||
TransformERC20FeatureContract,
|
TransformERC20FeatureContract,
|
||||||
@@ -113,6 +114,7 @@ export interface FullFeatures extends BootstrapFeatures {
|
|||||||
transformERC20: string;
|
transformERC20: string;
|
||||||
metaTransactions: string;
|
metaTransactions: string;
|
||||||
nativeOrders: string;
|
nativeOrders: string;
|
||||||
|
otcOrders: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -123,6 +125,7 @@ export interface FullFeatureArtifacts extends BootstrapFeatureArtifacts {
|
|||||||
metaTransactions: SimpleContractArtifact;
|
metaTransactions: SimpleContractArtifact;
|
||||||
nativeOrders: SimpleContractArtifact;
|
nativeOrders: SimpleContractArtifact;
|
||||||
feeCollectorController: SimpleContractArtifact;
|
feeCollectorController: SimpleContractArtifact;
|
||||||
|
otcOrders: SimpleContractArtifact;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -155,6 +158,7 @@ const DEFAULT_FULL_FEATURES_ARTIFACTS = {
|
|||||||
metaTransactions: artifacts.MetaTransactionsFeature,
|
metaTransactions: artifacts.MetaTransactionsFeature,
|
||||||
nativeOrders: artifacts.NativeOrdersFeature,
|
nativeOrders: artifacts.NativeOrdersFeature,
|
||||||
feeCollectorController: artifacts.FeeCollectorController,
|
feeCollectorController: artifacts.FeeCollectorController,
|
||||||
|
otcOrders: artifacts.OtcOrdersFeature,
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -222,6 +226,18 @@ export async function deployFullFeaturesAsync(
|
|||||||
_config.protocolFeeMultiplier,
|
_config.protocolFeeMultiplier,
|
||||||
)
|
)
|
||||||
).address,
|
).address,
|
||||||
|
otcOrders:
|
||||||
|
features.otcOrders ||
|
||||||
|
(
|
||||||
|
await OtcOrdersFeatureContract.deployFrom0xArtifactAsync(
|
||||||
|
_featureArtifacts.otcOrders,
|
||||||
|
provider,
|
||||||
|
txDefaults,
|
||||||
|
artifacts,
|
||||||
|
_config.zeroExAddress,
|
||||||
|
_config.wethAddress,
|
||||||
|
)
|
||||||
|
).address,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,33 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "16.32.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Extended Quote Report",
|
||||||
|
"pr": 361
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1636480845
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "16.31.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Added `Curve`, `Curve_V2` and `KyberDmm` to Avalanche",
|
||||||
|
"pr": 363
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "16.30.1",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "16.30.0",
|
"version": "16.30.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -5,6 +5,18 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v16.32.0 - _November 9, 2021_
|
||||||
|
|
||||||
|
* Extended Quote Report (#361)
|
||||||
|
|
||||||
|
## v16.31.0 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Added `Curve`, `Curve_V2` and `KyberDmm` to Avalanche (#363)
|
||||||
|
|
||||||
|
## v16.30.1 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v16.30.0 - _October 19, 2021_
|
## v16.30.0 - _October 19, 2021_
|
||||||
|
|
||||||
* Fantom deployment (#347)
|
* Fantom deployment (#347)
|
||||||
|
@@ -159,8 +159,11 @@ contract KyberDmmSampler
|
|||||||
(path[i], path[i + 1])
|
(path[i], path[i + 1])
|
||||||
returns (address[] memory allPools)
|
returns (address[] memory allPools)
|
||||||
{
|
{
|
||||||
|
if (allPools.length == 0) {
|
||||||
|
return new address[](0);
|
||||||
|
}
|
||||||
|
|
||||||
uint256 maxSupply = 0;
|
uint256 maxSupply = 0;
|
||||||
require(allPools.length >= 1, "KyberDMMSampler/NO_POOLS_FOUND");
|
|
||||||
for (uint256 j = 0; j < allPools.length; j++) {
|
for (uint256 j = 0; j < allPools.length; j++) {
|
||||||
uint256 totalSupply = IKyberDmmPool(allPools[j]).totalSupply();
|
uint256 totalSupply = IKyberDmmPool(allPools[j]).totalSupply();
|
||||||
if (totalSupply > maxSupply) {
|
if (totalSupply > maxSupply) {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/asset-swapper",
|
"name": "@0x/asset-swapper",
|
||||||
"version": "16.30.0",
|
"version": "16.32.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -60,14 +60,14 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.29",
|
"@0x/assert": "^3.0.29",
|
||||||
"@0x/base-contract": "^6.4.2",
|
"@0x/base-contract": "^6.4.2",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/contract-wrappers": "^13.18.1",
|
"@0x/contract-wrappers": "^13.18.2",
|
||||||
"@0x/contracts-erc20": "^3.3.21",
|
"@0x/contracts-erc20": "^3.3.22",
|
||||||
"@0x/contracts-zero-ex": "^0.29.2",
|
"@0x/contracts-zero-ex": "^0.29.3",
|
||||||
"@0x/dev-utils": "^4.2.9",
|
"@0x/dev-utils": "^4.2.9",
|
||||||
"@0x/json-schemas": "^6.3.0",
|
"@0x/json-schemas": "^6.3.0",
|
||||||
"@0x/neon-router": "^0.2.1",
|
"@0x/neon-router": "^0.2.1",
|
||||||
"@0x/protocol-utils": "^1.9.3",
|
"@0x/protocol-utils": "^1.9.4",
|
||||||
"@0x/quote-server": "^6.0.6",
|
"@0x/quote-server": "^6.0.6",
|
||||||
"@0x/types": "^3.3.4",
|
"@0x/types": "^3.3.4",
|
||||||
"@0x/typescript-typings": "^5.2.1",
|
"@0x/typescript-typings": "^5.2.1",
|
||||||
@@ -98,10 +98,10 @@
|
|||||||
"@0x/contracts-exchange": "^3.2.38",
|
"@0x/contracts-exchange": "^3.2.38",
|
||||||
"@0x/contracts-exchange-libs": "^4.3.37",
|
"@0x/contracts-exchange-libs": "^4.3.37",
|
||||||
"@0x/contracts-gen": "^2.0.40",
|
"@0x/contracts-gen": "^2.0.40",
|
||||||
"@0x/contracts-test-utils": "^5.4.12",
|
"@0x/contracts-test-utils": "^5.4.13",
|
||||||
"@0x/contracts-utils": "^4.8.2",
|
"@0x/contracts-utils": "^4.8.3",
|
||||||
"@0x/mesh-rpc-client": "^9.4.2",
|
"@0x/mesh-rpc-client": "^9.4.2",
|
||||||
"@0x/migrations": "^8.1.9",
|
"@0x/migrations": "^8.1.10",
|
||||||
"@0x/sol-compiler": "^4.7.5",
|
"@0x/sol-compiler": "^4.7.5",
|
||||||
"@0x/subproviders": "^6.6.0",
|
"@0x/subproviders": "^6.6.0",
|
||||||
"@0x/ts-doc-gen": "^0.0.28",
|
"@0x/ts-doc-gen": "^0.0.28",
|
||||||
|
@@ -162,14 +162,20 @@ export {
|
|||||||
export { ProtocolFeeUtils } from './utils/protocol_fee_utils';
|
export { ProtocolFeeUtils } from './utils/protocol_fee_utils';
|
||||||
export {
|
export {
|
||||||
BridgeQuoteReportEntry,
|
BridgeQuoteReportEntry,
|
||||||
|
jsonifyFillData,
|
||||||
MultiHopQuoteReportEntry,
|
MultiHopQuoteReportEntry,
|
||||||
NativeLimitOrderQuoteReportEntry,
|
NativeLimitOrderQuoteReportEntry,
|
||||||
NativeRfqOrderQuoteReportEntry,
|
NativeRfqOrderQuoteReportEntry,
|
||||||
QuoteReport,
|
QuoteReport,
|
||||||
QuoteReportEntry,
|
QuoteReportEntry,
|
||||||
|
ExtendedQuoteReport,
|
||||||
|
ExtendedQuoteReportSources,
|
||||||
|
ExtendedQuoteReportEntry,
|
||||||
|
ExtendedQuoteReportIndexedEntry,
|
||||||
|
ExtendedQuoteReportIndexedEntryOutbound,
|
||||||
PriceComparisonsReport,
|
PriceComparisonsReport,
|
||||||
} from './utils/quote_report_generator';
|
} from './utils/quote_report_generator';
|
||||||
export { QuoteRequestor } from './utils/quote_requestor';
|
export { QuoteRequestor, V4RFQIndicativeQuoteMM } from './utils/quote_requestor';
|
||||||
export { ERC20BridgeSamplerContract, BalanceCheckerContract, FakeTakerContract } from './wrappers';
|
export { ERC20BridgeSamplerContract, BalanceCheckerContract, FakeTakerContract } from './wrappers';
|
||||||
import { ERC20BridgeSource } from './utils/market_operation_utils/types';
|
import { ERC20BridgeSource } from './utils/market_operation_utils/types';
|
||||||
export type Native = ERC20BridgeSource.Native;
|
export type Native = ERC20BridgeSource.Native;
|
||||||
|
@@ -505,6 +505,7 @@ function createSwapQuote(
|
|||||||
const {
|
const {
|
||||||
optimizedOrders,
|
optimizedOrders,
|
||||||
quoteReport,
|
quoteReport,
|
||||||
|
extendedQuoteReportSources,
|
||||||
sourceFlags,
|
sourceFlags,
|
||||||
takerAmountPerEth,
|
takerAmountPerEth,
|
||||||
makerAmountPerEth,
|
makerAmountPerEth,
|
||||||
@@ -532,6 +533,7 @@ function createSwapQuote(
|
|||||||
takerAmountPerEth,
|
takerAmountPerEth,
|
||||||
makerAmountPerEth,
|
makerAmountPerEth,
|
||||||
quoteReport,
|
quoteReport,
|
||||||
|
extendedQuoteReportSources,
|
||||||
isTwoHop,
|
isTwoHop,
|
||||||
priceComparisonsReport,
|
priceComparisonsReport,
|
||||||
};
|
};
|
||||||
|
@@ -19,7 +19,7 @@ import {
|
|||||||
OptimizedMarketOrder,
|
OptimizedMarketOrder,
|
||||||
TokenAdjacencyGraph,
|
TokenAdjacencyGraph,
|
||||||
} from './utils/market_operation_utils/types';
|
} from './utils/market_operation_utils/types';
|
||||||
import { PriceComparisonsReport, QuoteReport } from './utils/quote_report_generator';
|
import { ExtendedQuoteReportSources, PriceComparisonsReport, QuoteReport } from './utils/quote_report_generator';
|
||||||
import { MetricsProxy } from './utils/quote_requestor';
|
import { MetricsProxy } from './utils/quote_requestor';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,6 +171,7 @@ export interface SwapQuoteBase {
|
|||||||
worstCaseQuoteInfo: SwapQuoteInfo;
|
worstCaseQuoteInfo: SwapQuoteInfo;
|
||||||
sourceBreakdown: SwapQuoteOrdersBreakdown;
|
sourceBreakdown: SwapQuoteOrdersBreakdown;
|
||||||
quoteReport?: QuoteReport;
|
quoteReport?: QuoteReport;
|
||||||
|
extendedQuoteReportSources?: ExtendedQuoteReportSources;
|
||||||
priceComparisonsReport?: PriceComparisonsReport;
|
priceComparisonsReport?: PriceComparisonsReport;
|
||||||
isTwoHop: boolean;
|
isTwoHop: boolean;
|
||||||
makerTokenDecimals: number;
|
makerTokenDecimals: number;
|
||||||
|
@@ -11,9 +11,11 @@ import {
|
|||||||
COMETHSWAP_ROUTER_BY_CHAIN_ID,
|
COMETHSWAP_ROUTER_BY_CHAIN_ID,
|
||||||
COMPONENT_POOLS_BY_CHAIN_ID,
|
COMPONENT_POOLS_BY_CHAIN_ID,
|
||||||
CRYPTO_COM_ROUTER_BY_CHAIN_ID,
|
CRYPTO_COM_ROUTER_BY_CHAIN_ID,
|
||||||
|
CURVE_AVALANCHE_INFOS,
|
||||||
CURVE_FANTOM_INFOS,
|
CURVE_FANTOM_INFOS,
|
||||||
CURVE_MAINNET_INFOS,
|
CURVE_MAINNET_INFOS,
|
||||||
CURVE_POLYGON_INFOS,
|
CURVE_POLYGON_INFOS,
|
||||||
|
CURVE_V2_AVALANCHE_INFOS,
|
||||||
CURVE_V2_FANTOM_INFOS,
|
CURVE_V2_FANTOM_INFOS,
|
||||||
CURVE_V2_MAINNET_INFOS,
|
CURVE_V2_MAINNET_INFOS,
|
||||||
CURVE_V2_POLYGON_INFOS,
|
CURVE_V2_POLYGON_INFOS,
|
||||||
@@ -146,6 +148,15 @@ export function getCurveInfosForPair(chainId: ChainId, takerToken: string, maker
|
|||||||
[makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
|
[makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
case ChainId.Avalanche:
|
||||||
|
return Object.values(CURVE_AVALANCHE_INFOS).filter(c =>
|
||||||
|
[makerToken, takerToken].every(
|
||||||
|
t =>
|
||||||
|
(c.tokens.includes(t) && c.metaTokens === undefined) ||
|
||||||
|
(c.tokens.includes(t) &&
|
||||||
|
[makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
|
||||||
|
),
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
@@ -181,6 +192,15 @@ export function getCurveV2InfosForPair(chainId: ChainId, takerToken: string, mak
|
|||||||
[makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
|
[makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
case ChainId.Avalanche:
|
||||||
|
return Object.values(CURVE_V2_AVALANCHE_INFOS).filter(c =>
|
||||||
|
[makerToken, takerToken].every(
|
||||||
|
t =>
|
||||||
|
(c.tokens.includes(t) && c.metaTokens === undefined) ||
|
||||||
|
(c.tokens.includes(t) &&
|
||||||
|
[makerToken, takerToken].filter(v => c.metaTokens?.includes(v)).length > 0),
|
||||||
|
),
|
||||||
|
);
|
||||||
default:
|
default:
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@@ -136,6 +136,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.FirebirdOneSwap,
|
ERC20BridgeSource.FirebirdOneSwap,
|
||||||
ERC20BridgeSource.JetSwap,
|
ERC20BridgeSource.JetSwap,
|
||||||
ERC20BridgeSource.ACryptos,
|
ERC20BridgeSource.ACryptos,
|
||||||
|
ERC20BridgeSource.KyberDmm,
|
||||||
]),
|
]),
|
||||||
[ChainId.Polygon]: new SourceFilters([
|
[ChainId.Polygon]: new SourceFilters([
|
||||||
ERC20BridgeSource.SushiSwap,
|
ERC20BridgeSource.SushiSwap,
|
||||||
@@ -163,6 +164,9 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.Pangolin,
|
ERC20BridgeSource.Pangolin,
|
||||||
ERC20BridgeSource.TraderJoe,
|
ERC20BridgeSource.TraderJoe,
|
||||||
ERC20BridgeSource.SushiSwap,
|
ERC20BridgeSource.SushiSwap,
|
||||||
|
ERC20BridgeSource.Curve,
|
||||||
|
ERC20BridgeSource.CurveV2,
|
||||||
|
ERC20BridgeSource.KyberDmm,
|
||||||
]),
|
]),
|
||||||
[ChainId.Fantom]: new SourceFilters([
|
[ChainId.Fantom]: new SourceFilters([
|
||||||
ERC20BridgeSource.MultiHop,
|
ERC20BridgeSource.MultiHop,
|
||||||
@@ -250,6 +254,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.FirebirdOneSwap,
|
ERC20BridgeSource.FirebirdOneSwap,
|
||||||
ERC20BridgeSource.JetSwap,
|
ERC20BridgeSource.JetSwap,
|
||||||
ERC20BridgeSource.ACryptos,
|
ERC20BridgeSource.ACryptos,
|
||||||
|
ERC20BridgeSource.KyberDmm,
|
||||||
]),
|
]),
|
||||||
[ChainId.Polygon]: new SourceFilters([
|
[ChainId.Polygon]: new SourceFilters([
|
||||||
ERC20BridgeSource.SushiSwap,
|
ERC20BridgeSource.SushiSwap,
|
||||||
@@ -277,6 +282,9 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
|
|||||||
ERC20BridgeSource.Pangolin,
|
ERC20BridgeSource.Pangolin,
|
||||||
ERC20BridgeSource.TraderJoe,
|
ERC20BridgeSource.TraderJoe,
|
||||||
ERC20BridgeSource.SushiSwap,
|
ERC20BridgeSource.SushiSwap,
|
||||||
|
ERC20BridgeSource.Curve,
|
||||||
|
ERC20BridgeSource.CurveV2,
|
||||||
|
ERC20BridgeSource.KyberDmm,
|
||||||
]),
|
]),
|
||||||
[ChainId.Fantom]: new SourceFilters([
|
[ChainId.Fantom]: new SourceFilters([
|
||||||
ERC20BridgeSource.MultiHop,
|
ERC20BridgeSource.MultiHop,
|
||||||
@@ -449,8 +457,13 @@ export const POLYGON_TOKENS = {
|
|||||||
export const AVALANCHE_TOKENS = {
|
export const AVALANCHE_TOKENS = {
|
||||||
WAVAX: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
|
WAVAX: '0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7',
|
||||||
WETH: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
WETH: '0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab',
|
||||||
USDT: '0xc7198437980c041c805a1edcba50c1ce5db95118',
|
WBTC: '0x50b7545627a5162f82a992c33b87adc75187b218',
|
||||||
DAI: '0xd586e7f844cea2f87f50152665bcbc2c279d8d70',
|
DAI: '0xd586e7f844cea2f87f50152665bcbc2c279d8d70',
|
||||||
|
USDC: '0xa7d7079b0fead91f3e65f86e8915cb59c1a4c664',
|
||||||
|
USDT: '0xc7198437980c041c805a1edcba50c1ce5db95118',
|
||||||
|
aDAI: '0x47afa96cdc9fab46904a55a6ad4bf6660b53c38a',
|
||||||
|
aUSDC: '0x46a51127c3ce23fb7ab1de06226147f446e4a857',
|
||||||
|
aUSDT: '0x532e6537fea298397212f09a61e03311686f548e',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FANTOM_TOKENS = {
|
export const FANTOM_TOKENS = {
|
||||||
@@ -524,6 +537,14 @@ export const CURVE_V2_POLYGON_POOLS = {
|
|||||||
atricrypto3: '0x1d8b86e3d88cdb2d34688e87e72f388cb541b7c8',
|
atricrypto3: '0x1d8b86e3d88cdb2d34688e87e72f388cb541b7c8',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const CURVE_AVALANCHE_POOLS = {
|
||||||
|
aave: '0x7f90122bf0700f9e7e1f688fe926940e8839f353',
|
||||||
|
};
|
||||||
|
|
||||||
|
export const CURVE_V2_AVALANCHE_POOLS = {
|
||||||
|
atricrypto: '0x58e57ca18b7a47112b877e31929798cd3d703b0f',
|
||||||
|
};
|
||||||
|
|
||||||
export const CURVE_FANTOM_POOLS = {
|
export const CURVE_FANTOM_POOLS = {
|
||||||
fUSDT: '0x92d5ebf3593a92888c25c0abef126583d4b5312e',
|
fUSDT: '0x92d5ebf3593a92888c25c0abef126583d4b5312e',
|
||||||
twoPool: '0x27e611fd27b276acbd5ffd632e5eaebec9761e40',
|
twoPool: '0x27e611fd27b276acbd5ffd632e5eaebec9761e40',
|
||||||
@@ -631,6 +652,7 @@ export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
|
|||||||
AVALANCHE_TOKENS.WETH,
|
AVALANCHE_TOKENS.WETH,
|
||||||
AVALANCHE_TOKENS.DAI,
|
AVALANCHE_TOKENS.DAI,
|
||||||
AVALANCHE_TOKENS.USDT,
|
AVALANCHE_TOKENS.USDT,
|
||||||
|
AVALANCHE_TOKENS.USDC,
|
||||||
],
|
],
|
||||||
[ChainId.Fantom]: [FANTOM_TOKENS.WFTM, FANTOM_TOKENS.WETH, FANTOM_TOKENS.DAI, FANTOM_TOKENS.USDC],
|
[ChainId.Fantom]: [FANTOM_TOKENS.WFTM, FANTOM_TOKENS.WETH, FANTOM_TOKENS.DAI, FANTOM_TOKENS.USDC],
|
||||||
},
|
},
|
||||||
@@ -999,6 +1021,37 @@ export const CURVE_V2_POLYGON_INFOS: { [name: string]: CurveInfo } = {
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const CURVE_AVALANCHE_INFOS: { [name: string]: CurveInfo } = {
|
||||||
|
['aave_exchangeunderlying']: createCurveExchangeUnderlyingPool({
|
||||||
|
tokens: [AVALANCHE_TOKENS.DAI, AVALANCHE_TOKENS.USDC, AVALANCHE_TOKENS.USDT],
|
||||||
|
pool: CURVE_AVALANCHE_POOLS.aave,
|
||||||
|
gasSchedule: 850e3,
|
||||||
|
}),
|
||||||
|
['aave_exchange']: createCurveExchangePool({
|
||||||
|
tokens: [AVALANCHE_TOKENS.aDAI, AVALANCHE_TOKENS.aUSDC, AVALANCHE_TOKENS.aUSDT],
|
||||||
|
pool: CURVE_AVALANCHE_POOLS.aave,
|
||||||
|
gasSchedule: 150e3,
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const CURVE_V2_AVALANCHE_INFOS: { [name: string]: CurveInfo } = {
|
||||||
|
[CURVE_V2_AVALANCHE_POOLS.atricrypto]: {
|
||||||
|
exchangeFunctionSelector: CurveFunctionSelectors.exchange_underlying_v2,
|
||||||
|
sellQuoteFunctionSelector: CurveFunctionSelectors.get_dy_underlying_v2,
|
||||||
|
buyQuoteFunctionSelector: CurveFunctionSelectors.None,
|
||||||
|
tokens: [
|
||||||
|
AVALANCHE_TOKENS.DAI,
|
||||||
|
AVALANCHE_TOKENS.USDC,
|
||||||
|
AVALANCHE_TOKENS.USDT,
|
||||||
|
AVALANCHE_TOKENS.WBTC,
|
||||||
|
AVALANCHE_TOKENS.WETH,
|
||||||
|
],
|
||||||
|
metaTokens: undefined,
|
||||||
|
poolAddress: CURVE_V2_AVALANCHE_POOLS.atricrypto,
|
||||||
|
gasSchedule: 1300e3,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
// TODO: modify gasSchedule
|
// TODO: modify gasSchedule
|
||||||
export const CURVE_FANTOM_INFOS: { [name: string]: CurveInfo } = {
|
export const CURVE_FANTOM_INFOS: { [name: string]: CurveInfo } = {
|
||||||
[CURVE_FANTOM_POOLS.ren]: createCurveExchangePool({
|
[CURVE_FANTOM_POOLS.ren]: createCurveExchangePool({
|
||||||
@@ -1389,6 +1442,9 @@ export const KYBER_DMM_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
|
|||||||
{
|
{
|
||||||
[ChainId.Mainnet]: '0x1c87257f5e8609940bc751a07bb085bb7f8cdbe6',
|
[ChainId.Mainnet]: '0x1c87257f5e8609940bc751a07bb085bb7f8cdbe6',
|
||||||
[ChainId.Polygon]: '0x546c79662e028b661dfb4767664d0273184e4dd1',
|
[ChainId.Polygon]: '0x546c79662e028b661dfb4767664d0273184e4dd1',
|
||||||
|
[ChainId.BSC]: '0x78df70615ffc8066cc0887917f2cd72092c86409',
|
||||||
|
[ChainId.Avalanche]: '0x8efa5a9ad6d594cf76830267077b78ce0bc5a5f8',
|
||||||
|
[ChainId.Fantom]: '0x5d5a5a0a465129848c2549669e12cdc2f8de039a',
|
||||||
},
|
},
|
||||||
NULL_ADDRESS,
|
NULL_ADDRESS,
|
||||||
);
|
);
|
||||||
|
@@ -18,12 +18,15 @@ import {
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
dexSampleToReportSource,
|
dexSampleToReportSource,
|
||||||
|
ExtendedQuoteReportSources,
|
||||||
|
generateExtendedQuoteReportSources,
|
||||||
generateQuoteReport,
|
generateQuoteReport,
|
||||||
multiHopSampleToReportSource,
|
multiHopSampleToReportSource,
|
||||||
nativeOrderToReportEntry,
|
nativeOrderToReportEntry,
|
||||||
PriceComparisonsReport,
|
PriceComparisonsReport,
|
||||||
QuoteReport,
|
QuoteReport,
|
||||||
} from './../quote_report_generator';
|
} from './../quote_report_generator';
|
||||||
|
|
||||||
import { getComparisonPrices } from './comparison_price';
|
import { getComparisonPrices } from './comparison_price';
|
||||||
import {
|
import {
|
||||||
BUY_SOURCE_FILTER_BY_CHAIN_ID,
|
BUY_SOURCE_FILTER_BY_CHAIN_ID,
|
||||||
@@ -78,6 +81,25 @@ export class MarketOperationUtils {
|
|||||||
return generateQuoteReport(side, quotes.nativeOrders, liquidityDelivered, comparisonPrice, quoteRequestor);
|
return generateQuoteReport(side, quotes.nativeOrders, liquidityDelivered, comparisonPrice, quoteRequestor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static _computeExtendedQuoteReportSources(
|
||||||
|
quoteRequestor: QuoteRequestor | undefined,
|
||||||
|
marketSideLiquidity: MarketSideLiquidity,
|
||||||
|
amount: BigNumber,
|
||||||
|
optimizerResult: OptimizerResult,
|
||||||
|
comparisonPrice?: BigNumber | undefined,
|
||||||
|
): ExtendedQuoteReportSources {
|
||||||
|
const { side, quotes } = marketSideLiquidity;
|
||||||
|
const { liquidityDelivered } = optimizerResult;
|
||||||
|
return generateExtendedQuoteReportSources(
|
||||||
|
side,
|
||||||
|
quotes,
|
||||||
|
liquidityDelivered,
|
||||||
|
amount,
|
||||||
|
comparisonPrice,
|
||||||
|
quoteRequestor,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
private static _computePriceComparisonsReport(
|
private static _computePriceComparisonsReport(
|
||||||
quoteRequestor: QuoteRequestor | undefined,
|
quoteRequestor: QuoteRequestor | undefined,
|
||||||
marketSideLiquidity: MarketSideLiquidity,
|
marketSideLiquidity: MarketSideLiquidity,
|
||||||
@@ -702,6 +724,16 @@ export class MarketOperationUtils {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Always compute the Extended Quote Report
|
||||||
|
let extendedQuoteReportSources: ExtendedQuoteReportSources | undefined;
|
||||||
|
extendedQuoteReportSources = MarketOperationUtils._computeExtendedQuoteReportSources(
|
||||||
|
_opts.rfqt ? _opts.rfqt.quoteRequestor : undefined,
|
||||||
|
marketSideLiquidity,
|
||||||
|
amount,
|
||||||
|
optimizerResult,
|
||||||
|
wholeOrderPrice,
|
||||||
|
);
|
||||||
|
|
||||||
let priceComparisonsReport: PriceComparisonsReport | undefined;
|
let priceComparisonsReport: PriceComparisonsReport | undefined;
|
||||||
if (_opts.shouldIncludePriceComparisonsReport) {
|
if (_opts.shouldIncludePriceComparisonsReport) {
|
||||||
priceComparisonsReport = MarketOperationUtils._computePriceComparisonsReport(
|
priceComparisonsReport = MarketOperationUtils._computePriceComparisonsReport(
|
||||||
@@ -710,7 +742,7 @@ export class MarketOperationUtils {
|
|||||||
wholeOrderPrice,
|
wholeOrderPrice,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return { ...optimizerResult, quoteReport, priceComparisonsReport };
|
return { ...optimizerResult, quoteReport, extendedQuoteReportSources, priceComparisonsReport };
|
||||||
}
|
}
|
||||||
|
|
||||||
private async _refreshPoolCacheIfRequiredAsync(takerToken: string, makerToken: string): Promise<void> {
|
private async _refreshPoolCacheIfRequiredAsync(takerToken: string, makerToken: string): Promise<void> {
|
||||||
|
@@ -3,13 +3,12 @@ import {
|
|||||||
FillQuoteTransformerOrderType,
|
FillQuoteTransformerOrderType,
|
||||||
FillQuoteTransformerRfqOrderInfo,
|
FillQuoteTransformerRfqOrderInfo,
|
||||||
} from '@0x/protocol-utils';
|
} from '@0x/protocol-utils';
|
||||||
import { V4RFQIndicativeQuote } from '@0x/quote-server';
|
|
||||||
import { MarketOperation } from '@0x/types';
|
import { MarketOperation } from '@0x/types';
|
||||||
import { BigNumber } from '@0x/utils';
|
import { BigNumber } from '@0x/utils';
|
||||||
|
|
||||||
import { NativeOrderWithFillableAmounts, RfqFirmQuoteValidator, RfqRequestOpts } from '../../types';
|
import { NativeOrderWithFillableAmounts, RfqFirmQuoteValidator, RfqRequestOpts } from '../../types';
|
||||||
import { QuoteRequestor } from '../../utils/quote_requestor';
|
import { QuoteRequestor, V4RFQIndicativeQuoteMM } from '../../utils/quote_requestor';
|
||||||
import { PriceComparisonsReport, QuoteReport } from '../quote_report_generator';
|
import { ExtendedQuoteReportSources, PriceComparisonsReport, QuoteReport } from '../quote_report_generator';
|
||||||
|
|
||||||
import { CollapsedPath } from './path';
|
import { CollapsedPath } from './path';
|
||||||
import { SourceFilters } from './source_filters';
|
import { SourceFilters } from './source_filters';
|
||||||
@@ -491,6 +490,7 @@ export interface OptimizerResult {
|
|||||||
|
|
||||||
export interface OptimizerResultWithReport extends OptimizerResult {
|
export interface OptimizerResultWithReport extends OptimizerResult {
|
||||||
quoteReport?: QuoteReport;
|
quoteReport?: QuoteReport;
|
||||||
|
extendedQuoteReportSources?: ExtendedQuoteReportSources;
|
||||||
priceComparisonsReport?: PriceComparisonsReport;
|
priceComparisonsReport?: PriceComparisonsReport;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ export interface MarketSideLiquidity {
|
|||||||
|
|
||||||
export interface RawQuotes {
|
export interface RawQuotes {
|
||||||
nativeOrders: NativeOrderWithFillableAmounts[];
|
nativeOrders: NativeOrderWithFillableAmounts[];
|
||||||
rfqtIndicativeQuotes: V4RFQIndicativeQuote[];
|
rfqtIndicativeQuotes: V4RFQIndicativeQuoteMM[];
|
||||||
twoHopQuotes: Array<DexSample<MultiHopFillData>>;
|
twoHopQuotes: Array<DexSample<MultiHopFillData>>;
|
||||||
dexQuotes: Array<Array<DexSample<FillData>>>;
|
dexQuotes: Array<Array<DexSample<FillData>>>;
|
||||||
}
|
}
|
||||||
|
@@ -14,8 +14,9 @@ import {
|
|||||||
NativeFillData,
|
NativeFillData,
|
||||||
NativeLimitOrderFillData,
|
NativeLimitOrderFillData,
|
||||||
NativeRfqOrderFillData,
|
NativeRfqOrderFillData,
|
||||||
|
RawQuotes,
|
||||||
} from './market_operation_utils/types';
|
} from './market_operation_utils/types';
|
||||||
import { QuoteRequestor } from './quote_requestor';
|
import { QuoteRequestor, V4RFQIndicativeQuoteMM } from './quote_requestor';
|
||||||
|
|
||||||
export interface QuoteReportEntryBase {
|
export interface QuoteReportEntryBase {
|
||||||
liquiditySource: ERC20BridgeSource;
|
liquiditySource: ERC20BridgeSource;
|
||||||
@@ -36,30 +37,77 @@ export interface NativeLimitOrderQuoteReportEntry extends QuoteReportEntryBase {
|
|||||||
liquiditySource: ERC20BridgeSource.Native;
|
liquiditySource: ERC20BridgeSource.Native;
|
||||||
fillData: NativeFillData;
|
fillData: NativeFillData;
|
||||||
fillableTakerAmount: BigNumber;
|
fillableTakerAmount: BigNumber;
|
||||||
isRfqt: false;
|
isRFQ: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NativeRfqOrderQuoteReportEntry extends QuoteReportEntryBase {
|
export interface NativeRfqOrderQuoteReportEntry extends QuoteReportEntryBase {
|
||||||
liquiditySource: ERC20BridgeSource.Native;
|
liquiditySource: ERC20BridgeSource.Native;
|
||||||
fillData: NativeFillData;
|
fillData: NativeFillData;
|
||||||
fillableTakerAmount: BigNumber;
|
fillableTakerAmount: BigNumber;
|
||||||
isRfqt: true;
|
isRFQ: true;
|
||||||
nativeOrder: RfqOrderFields;
|
nativeOrder: RfqOrderFields;
|
||||||
makerUri: string;
|
makerUri: string;
|
||||||
comparisonPrice?: number;
|
comparisonPrice?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IndicativeRfqOrderQuoteReportEntry extends QuoteReportEntryBase {
|
||||||
|
liquiditySource: ERC20BridgeSource.Native;
|
||||||
|
fillableTakerAmount: BigNumber;
|
||||||
|
isRFQ: true;
|
||||||
|
makerUri?: string;
|
||||||
|
comparisonPrice?: number;
|
||||||
|
}
|
||||||
|
|
||||||
export type QuoteReportEntry =
|
export type QuoteReportEntry =
|
||||||
| BridgeQuoteReportEntry
|
| BridgeQuoteReportEntry
|
||||||
| MultiHopQuoteReportEntry
|
| MultiHopQuoteReportEntry
|
||||||
| NativeLimitOrderQuoteReportEntry
|
| NativeLimitOrderQuoteReportEntry
|
||||||
| NativeRfqOrderQuoteReportEntry;
|
| NativeRfqOrderQuoteReportEntry;
|
||||||
|
|
||||||
|
export type ExtendedQuoteReportEntry =
|
||||||
|
| BridgeQuoteReportEntry
|
||||||
|
| MultiHopQuoteReportEntry
|
||||||
|
| NativeLimitOrderQuoteReportEntry
|
||||||
|
| NativeRfqOrderQuoteReportEntry
|
||||||
|
| IndicativeRfqOrderQuoteReportEntry;
|
||||||
|
|
||||||
|
export type ExtendedQuoteReportIndexedEntry = ExtendedQuoteReportEntry & {
|
||||||
|
quoteEntryIndex: number;
|
||||||
|
isDelivered: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ExtendedQuoteReportIndexedEntryOutbound = Omit<ExtendedQuoteReportIndexedEntry, 'fillData'> & {
|
||||||
|
fillData?: string;
|
||||||
|
};
|
||||||
|
|
||||||
export interface QuoteReport {
|
export interface QuoteReport {
|
||||||
sourcesConsidered: QuoteReportEntry[];
|
sourcesConsidered: QuoteReportEntry[];
|
||||||
sourcesDelivered: QuoteReportEntry[];
|
sourcesDelivered: QuoteReportEntry[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ExtendedQuoteReportSources {
|
||||||
|
sourcesConsidered: ExtendedQuoteReportIndexedEntry[];
|
||||||
|
sourcesDelivered: ExtendedQuoteReportIndexedEntry[] | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExtendedQuoteReport {
|
||||||
|
quoteId?: string;
|
||||||
|
taker?: string;
|
||||||
|
timestamp: number;
|
||||||
|
firmQuoteReport: boolean;
|
||||||
|
submissionBy: 'taker' | 'metaTxn' | 'rfqm';
|
||||||
|
buyAmount?: string;
|
||||||
|
sellAmount?: string;
|
||||||
|
buyTokenAddress: string;
|
||||||
|
sellTokenAddress: string;
|
||||||
|
integratorId?: string;
|
||||||
|
slippageBips?: number;
|
||||||
|
zeroExTransactionHash?: string;
|
||||||
|
decodedUniqueId?: string;
|
||||||
|
sourcesConsidered: ExtendedQuoteReportIndexedEntryOutbound[];
|
||||||
|
sourcesDelivered: ExtendedQuoteReportIndexedEntryOutbound[] | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
export interface PriceComparisonsReport {
|
export interface PriceComparisonsReport {
|
||||||
dexSources: BridgeQuoteReportEntry[];
|
dexSources: BridgeQuoteReportEntry[];
|
||||||
multiHopSources: MultiHopQuoteReportEntry[];
|
multiHopSources: MultiHopQuoteReportEntry[];
|
||||||
@@ -80,7 +128,7 @@ export function generateQuoteReport(
|
|||||||
const nativeOrderSourcesConsidered = nativeOrders.map(order =>
|
const nativeOrderSourcesConsidered = nativeOrders.map(order =>
|
||||||
nativeOrderToReportEntry(order.type, order as any, order.fillableTakerAmount, comparisonPrice, quoteRequestor),
|
nativeOrderToReportEntry(order.type, order as any, order.fillableTakerAmount, comparisonPrice, quoteRequestor),
|
||||||
);
|
);
|
||||||
const sourcesConsidered = [...nativeOrderSourcesConsidered.filter(order => order.isRfqt)];
|
const sourcesConsidered = [...nativeOrderSourcesConsidered.filter(order => order.isRFQ)];
|
||||||
|
|
||||||
let sourcesDelivered;
|
let sourcesDelivered;
|
||||||
if (Array.isArray(liquidityDelivered)) {
|
if (Array.isArray(liquidityDelivered)) {
|
||||||
@@ -116,6 +164,105 @@ export function generateQuoteReport(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a report of sources considered while computing the optimized
|
||||||
|
* swap quote, the sources ultimately included in the computed quote. This
|
||||||
|
* extende version incudes all considered quotes, not only native liquidity.
|
||||||
|
*/
|
||||||
|
export function generateExtendedQuoteReportSources(
|
||||||
|
marketOperation: MarketOperation,
|
||||||
|
quotes: RawQuotes,
|
||||||
|
liquidityDelivered: ReadonlyArray<CollapsedFill> | DexSample<MultiHopFillData>,
|
||||||
|
amount: BigNumber,
|
||||||
|
comparisonPrice?: BigNumber | undefined,
|
||||||
|
quoteRequestor?: QuoteRequestor,
|
||||||
|
): ExtendedQuoteReportSources {
|
||||||
|
const sourcesConsidered: ExtendedQuoteReportEntry[] = [];
|
||||||
|
|
||||||
|
// NativeOrders
|
||||||
|
sourcesConsidered.push(
|
||||||
|
...quotes.nativeOrders.map(order =>
|
||||||
|
nativeOrderToReportEntry(
|
||||||
|
order.type,
|
||||||
|
order as any,
|
||||||
|
order.fillableTakerAmount,
|
||||||
|
comparisonPrice,
|
||||||
|
quoteRequestor,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
// IndicativeQuotes
|
||||||
|
sourcesConsidered.push(
|
||||||
|
...quotes.rfqtIndicativeQuotes.map(order => indicativeQuoteToReportEntry(order, comparisonPrice)),
|
||||||
|
);
|
||||||
|
|
||||||
|
// MultiHop
|
||||||
|
sourcesConsidered.push(...quotes.twoHopQuotes.map(quote => multiHopSampleToReportSource(quote, marketOperation)));
|
||||||
|
|
||||||
|
// Dex Quotes
|
||||||
|
sourcesConsidered.push(
|
||||||
|
..._.flatten(
|
||||||
|
quotes.dexQuotes.map(dex =>
|
||||||
|
dex
|
||||||
|
.filter(quote => isDexSampleForTotalAmount(quote, marketOperation, amount))
|
||||||
|
.map(quote => dexSampleToReportSource(quote, marketOperation)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
const sourcesConsideredIndexed = sourcesConsidered.map(
|
||||||
|
(quote, index): ExtendedQuoteReportIndexedEntry => {
|
||||||
|
return {
|
||||||
|
...quote,
|
||||||
|
quoteEntryIndex: index,
|
||||||
|
isDelivered: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
let sourcesDelivered;
|
||||||
|
if (Array.isArray(liquidityDelivered)) {
|
||||||
|
// create easy way to look up fillable amounts
|
||||||
|
const nativeOrderSignaturesToFillableAmounts = _.fromPairs(
|
||||||
|
quotes.nativeOrders.map(o => {
|
||||||
|
return [_nativeDataToId(o), o.fillableTakerAmount];
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
// map sources delivered
|
||||||
|
sourcesDelivered = liquidityDelivered.map(collapsedFill => {
|
||||||
|
if (_isNativeOrderFromCollapsedFill(collapsedFill)) {
|
||||||
|
return nativeOrderToReportEntry(
|
||||||
|
collapsedFill.type,
|
||||||
|
collapsedFill.fillData,
|
||||||
|
nativeOrderSignaturesToFillableAmounts[_nativeDataToId(collapsedFill.fillData)],
|
||||||
|
comparisonPrice,
|
||||||
|
quoteRequestor,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return dexSampleToReportSource(collapsedFill, marketOperation);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
sourcesDelivered = [
|
||||||
|
// tslint:disable-next-line: no-unnecessary-type-assertion
|
||||||
|
multiHopSampleToReportSource(liquidityDelivered as DexSample<MultiHopFillData>, marketOperation),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
const sourcesDeliveredIndexed = sourcesDelivered.map(
|
||||||
|
(quote, index): ExtendedQuoteReportIndexedEntry => {
|
||||||
|
return {
|
||||||
|
...quote,
|
||||||
|
quoteEntryIndex: index,
|
||||||
|
isDelivered: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return {
|
||||||
|
sourcesConsidered: sourcesConsideredIndexed,
|
||||||
|
sourcesDelivered: sourcesDeliveredIndexed,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function _nativeDataToId(data: { signature: Signature }): string {
|
function _nativeDataToId(data: { signature: Signature }): string {
|
||||||
const { v, r, s } = data.signature;
|
const { v, r, s } = data.signature;
|
||||||
return `${v}${r}${s}`;
|
return `${v}${r}${s}`;
|
||||||
@@ -153,6 +300,22 @@ export function dexSampleToReportSource(ds: DexSample, marketOperation: MarketOp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a DEX sample is the one that represents the whole amount requested by taker
|
||||||
|
* NOTE: this is used for the QuoteReport to filter samples
|
||||||
|
*/
|
||||||
|
function isDexSampleForTotalAmount(ds: DexSample, marketOperation: MarketOperation, amount: BigNumber): boolean {
|
||||||
|
// input and output map to different values
|
||||||
|
// based on the market operation
|
||||||
|
if (marketOperation === MarketOperation.Buy) {
|
||||||
|
return ds.input === amount;
|
||||||
|
} else if (marketOperation === MarketOperation.Sell) {
|
||||||
|
return ds.output === amount;
|
||||||
|
} else {
|
||||||
|
throw new Error(`Unexpected marketOperation ${marketOperation}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates a report sample for a MultiHop source
|
* Generates a report sample for a MultiHop source
|
||||||
* NOTE: this is used for the QuoteReport and quote price comparison data
|
* NOTE: this is used for the QuoteReport and quote price comparison data
|
||||||
@@ -208,17 +371,17 @@ export function nativeOrderToReportEntry(
|
|||||||
};
|
};
|
||||||
|
|
||||||
// if we find this is an rfqt order, label it as such and associate makerUri
|
// if we find this is an rfqt order, label it as such and associate makerUri
|
||||||
const isRfqt = type === FillQuoteTransformerOrderType.Rfq;
|
const isRFQ = type === FillQuoteTransformerOrderType.Rfq;
|
||||||
const rfqtMakerUri =
|
const rfqtMakerUri =
|
||||||
isRfqt && quoteRequestor ? quoteRequestor.getMakerUriForSignature(fillData.signature) : undefined;
|
isRFQ && quoteRequestor ? quoteRequestor.getMakerUriForSignature(fillData.signature) : undefined;
|
||||||
|
|
||||||
if (isRfqt) {
|
if (isRFQ) {
|
||||||
const nativeOrder = fillData.order as RfqOrderFields;
|
const nativeOrder = fillData.order as RfqOrderFields;
|
||||||
// tslint:disable-next-line: no-object-literal-type-assertion
|
// tslint:disable-next-line: no-object-literal-type-assertion
|
||||||
return {
|
return {
|
||||||
liquiditySource: ERC20BridgeSource.Native,
|
liquiditySource: ERC20BridgeSource.Native,
|
||||||
...nativeOrderBase,
|
...nativeOrderBase,
|
||||||
isRfqt: true,
|
isRFQ: true,
|
||||||
makerUri: rfqtMakerUri || '',
|
makerUri: rfqtMakerUri || '',
|
||||||
...(comparisonPrice ? { comparisonPrice: comparisonPrice.toNumber() } : {}),
|
...(comparisonPrice ? { comparisonPrice: comparisonPrice.toNumber() } : {}),
|
||||||
nativeOrder,
|
nativeOrder,
|
||||||
@@ -229,8 +392,49 @@ export function nativeOrderToReportEntry(
|
|||||||
return {
|
return {
|
||||||
liquiditySource: ERC20BridgeSource.Native,
|
liquiditySource: ERC20BridgeSource.Native,
|
||||||
...nativeOrderBase,
|
...nativeOrderBase,
|
||||||
isRfqt: false,
|
isRFQ: false,
|
||||||
fillData,
|
fillData,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates a report entry for an indicative RFQ Quote
|
||||||
|
* NOTE: this is used for the QuoteReport and quote price comparison data
|
||||||
|
*/
|
||||||
|
export function indicativeQuoteToReportEntry(
|
||||||
|
order: V4RFQIndicativeQuoteMM,
|
||||||
|
comparisonPrice?: BigNumber | undefined,
|
||||||
|
): IndicativeRfqOrderQuoteReportEntry {
|
||||||
|
const nativeOrderBase = {
|
||||||
|
makerAmount: order.makerAmount,
|
||||||
|
takerAmount: order.takerAmount,
|
||||||
|
fillableTakerAmount: order.takerAmount,
|
||||||
|
};
|
||||||
|
|
||||||
|
// tslint:disable-next-line: no-object-literal-type-assertion
|
||||||
|
return {
|
||||||
|
liquiditySource: ERC20BridgeSource.Native,
|
||||||
|
...nativeOrderBase,
|
||||||
|
isRFQ: true,
|
||||||
|
makerUri: order.makerUri,
|
||||||
|
fillData: {},
|
||||||
|
...(comparisonPrice ? { comparisonPrice: comparisonPrice.toNumber() } : {}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* For the extended quote report, we output the filldata as JSON
|
||||||
|
*/
|
||||||
|
export function jsonifyFillData(source: ExtendedQuoteReportIndexedEntry): ExtendedQuoteReportIndexedEntryOutbound {
|
||||||
|
return {
|
||||||
|
...source,
|
||||||
|
fillData: JSON.stringify(source.fillData, (key: string, value: any) => {
|
||||||
|
if (key === '_samplerContract') {
|
||||||
|
return {};
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
@@ -39,6 +39,10 @@ interface RfqQuote<T> {
|
|||||||
makerUri: string;
|
makerUri: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface V4RFQIndicativeQuoteMM extends V4RFQIndicativeQuote {
|
||||||
|
makerUri: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface MetricsProxy {
|
export interface MetricsProxy {
|
||||||
/**
|
/**
|
||||||
* Increments a counter that is tracking valid Firm Quotes that are dropped due to low expiration.
|
* Increments a counter that is tracking valid Firm Quotes that are dropped due to low expiration.
|
||||||
@@ -343,7 +347,7 @@ export class QuoteRequestor {
|
|||||||
marketOperation: MarketOperation,
|
marketOperation: MarketOperation,
|
||||||
comparisonPrice: BigNumber | undefined,
|
comparisonPrice: BigNumber | undefined,
|
||||||
options: RfqmRequestOptions,
|
options: RfqmRequestOptions,
|
||||||
): Promise<V4RFQIndicativeQuote[]> {
|
): Promise<V4RFQIndicativeQuoteMM[]> {
|
||||||
const _opts: RfqRequestOpts = {
|
const _opts: RfqRequestOpts = {
|
||||||
...constants.DEFAULT_RFQT_REQUEST_OPTS,
|
...constants.DEFAULT_RFQT_REQUEST_OPTS,
|
||||||
...options,
|
...options,
|
||||||
@@ -367,7 +371,7 @@ export class QuoteRequestor {
|
|||||||
marketOperation: MarketOperation,
|
marketOperation: MarketOperation,
|
||||||
comparisonPrice: BigNumber | undefined,
|
comparisonPrice: BigNumber | undefined,
|
||||||
options: RfqRequestOpts,
|
options: RfqRequestOpts,
|
||||||
): Promise<V4RFQIndicativeQuote[]> {
|
): Promise<V4RFQIndicativeQuoteMM[]> {
|
||||||
const _opts: RfqRequestOpts = { ...constants.DEFAULT_RFQT_REQUEST_OPTS, ...options };
|
const _opts: RfqRequestOpts = { ...constants.DEFAULT_RFQT_REQUEST_OPTS, ...options };
|
||||||
// Originally a takerAddress was required for indicative quotes, but
|
// Originally a takerAddress was required for indicative quotes, but
|
||||||
// now we've eliminated that requirement. @0x/quote-server, however,
|
// now we've eliminated that requirement. @0x/quote-server, however,
|
||||||
@@ -398,8 +402,8 @@ export class QuoteRequestor {
|
|||||||
return this._orderSignatureToMakerUri[nativeDataToId({ signature })];
|
return this._orderSignatureToMakerUri[nativeDataToId({ signature })];
|
||||||
}
|
}
|
||||||
|
|
||||||
private _isValidRfqtIndicativeQuoteResponse(response: V4RFQIndicativeQuote): boolean {
|
private _isValidRfqtIndicativeQuoteResponse(response: V4RFQIndicativeQuoteMM): boolean {
|
||||||
const requiredKeys: Array<keyof V4RFQIndicativeQuote> = [
|
const requiredKeys: Array<keyof V4RFQIndicativeQuoteMM> = [
|
||||||
'makerAmount',
|
'makerAmount',
|
||||||
'takerAmount',
|
'takerAmount',
|
||||||
'makerToken',
|
'makerToken',
|
||||||
@@ -545,7 +549,10 @@ export class QuoteRequestor {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
rfqMakerBlacklist.logTimeoutOrLackThereof(typedMakerUrl.url, latencyMs >= timeoutMs);
|
rfqMakerBlacklist.logTimeoutOrLackThereof(typedMakerUrl.url, latencyMs >= timeoutMs);
|
||||||
return { response: response.data, makerUri: typedMakerUrl.url };
|
return {
|
||||||
|
response: { ...response.data, makerUri: typedMakerUrl.url },
|
||||||
|
makerUri: typedMakerUrl.url,
|
||||||
|
};
|
||||||
} else {
|
} else {
|
||||||
if (this._altRfqCreds === undefined) {
|
if (this._altRfqCreds === undefined) {
|
||||||
throw new Error(`don't have credentials for alt MM`);
|
throw new Error(`don't have credentials for alt MM`);
|
||||||
@@ -694,7 +701,6 @@ export class QuoteRequestor {
|
|||||||
} else {
|
} else {
|
||||||
const secondsRemaining = msRemainingUntilExpiration.div(ONE_SECOND_MS);
|
const secondsRemaining = msRemainingUntilExpiration.div(ONE_SECOND_MS);
|
||||||
this._metrics?.measureExpirationForValidOrder(isLastLook, order.maker, secondsRemaining);
|
this._metrics?.measureExpirationForValidOrder(isLastLook, order.maker, secondsRemaining);
|
||||||
|
|
||||||
const takerAmount = new BigNumber(order.takerAmount);
|
const takerAmount = new BigNumber(order.takerAmount);
|
||||||
const fillRatio = takerAmount.div(assetFillAmount);
|
const fillRatio = takerAmount.div(assetFillAmount);
|
||||||
if (fillRatio.lt(1) && fillRatio.gte(FILL_RATIO_WARNING_LEVEL)) {
|
if (fillRatio.lt(1) && fillRatio.gte(FILL_RATIO_WARNING_LEVEL)) {
|
||||||
@@ -744,9 +750,9 @@ export class QuoteRequestor {
|
|||||||
comparisonPrice: BigNumber | undefined,
|
comparisonPrice: BigNumber | undefined,
|
||||||
options: RfqRequestOpts,
|
options: RfqRequestOpts,
|
||||||
assetOfferings: RfqMakerAssetOfferings,
|
assetOfferings: RfqMakerAssetOfferings,
|
||||||
): Promise<V4RFQIndicativeQuote[]> {
|
): Promise<V4RFQIndicativeQuoteMM[]> {
|
||||||
// fetch quotes
|
// fetch quotes
|
||||||
const rawQuotes = await this._getQuotesAsync<V4RFQIndicativeQuote>(
|
const rawQuotes = await this._getQuotesAsync<V4RFQIndicativeQuoteMM>(
|
||||||
makerToken,
|
makerToken,
|
||||||
takerToken,
|
takerToken,
|
||||||
assetFillAmount,
|
assetFillAmount,
|
||||||
@@ -758,7 +764,7 @@ export class QuoteRequestor {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// validate
|
// validate
|
||||||
const validationFunction = (o: V4RFQIndicativeQuote) => this._isValidRfqtIndicativeQuoteResponse(o);
|
const validationFunction = (o: V4RFQIndicativeQuoteMM) => this._isValidRfqtIndicativeQuoteResponse(o);
|
||||||
const validQuotes = rawQuotes.filter(result => {
|
const validQuotes = rawQuotes.filter(result => {
|
||||||
const order = result.response;
|
const order = result.response;
|
||||||
if (!validationFunction(order)) {
|
if (!validationFunction(order)) {
|
||||||
|
@@ -159,7 +159,11 @@ describe('MarketOperationUtils tests', () => {
|
|||||||
} else {
|
} else {
|
||||||
requestor
|
requestor
|
||||||
.setup(r => r.requestRfqtIndicativeQuotesAsync(...args))
|
.setup(r => r.requestRfqtIndicativeQuotesAsync(...args))
|
||||||
.returns(async () => results.map(r => r.order))
|
.returns(async () =>
|
||||||
|
results.map(r => {
|
||||||
|
return { ...r.order, makerUri: 'https://foo.bar/' };
|
||||||
|
}),
|
||||||
|
)
|
||||||
.verifiable(verifiable);
|
.verifiable(verifiable);
|
||||||
}
|
}
|
||||||
return requestor;
|
return requestor;
|
||||||
|
@@ -155,7 +155,7 @@ describe('generateQuoteReport', async () => {
|
|||||||
makerAmount: rfqtOrder1.order.makerAmount,
|
makerAmount: rfqtOrder1.order.makerAmount,
|
||||||
takerAmount: rfqtOrder1.order.takerAmount,
|
takerAmount: rfqtOrder1.order.takerAmount,
|
||||||
fillableTakerAmount: rfqtOrder1.fillableTakerAmount,
|
fillableTakerAmount: rfqtOrder1.fillableTakerAmount,
|
||||||
isRfqt: true,
|
isRFQ: true,
|
||||||
makerUri: 'https://rfqt1.provider.club',
|
makerUri: 'https://rfqt1.provider.club',
|
||||||
nativeOrder: rfqtOrder1.order,
|
nativeOrder: rfqtOrder1.order,
|
||||||
fillData: {
|
fillData: {
|
||||||
@@ -167,7 +167,7 @@ describe('generateQuoteReport', async () => {
|
|||||||
makerAmount: rfqtOrder2.order.makerAmount,
|
makerAmount: rfqtOrder2.order.makerAmount,
|
||||||
takerAmount: rfqtOrder2.order.takerAmount,
|
takerAmount: rfqtOrder2.order.takerAmount,
|
||||||
fillableTakerAmount: rfqtOrder2.fillableTakerAmount,
|
fillableTakerAmount: rfqtOrder2.fillableTakerAmount,
|
||||||
isRfqt: true,
|
isRFQ: true,
|
||||||
makerUri: 'https://rfqt2.provider.club',
|
makerUri: 'https://rfqt2.provider.club',
|
||||||
nativeOrder: rfqtOrder2.order,
|
nativeOrder: rfqtOrder2.order,
|
||||||
fillData: {
|
fillData: {
|
||||||
@@ -179,7 +179,7 @@ describe('generateQuoteReport', async () => {
|
|||||||
makerAmount: orderbookOrder2.order.makerAmount,
|
makerAmount: orderbookOrder2.order.makerAmount,
|
||||||
takerAmount: orderbookOrder2.order.takerAmount,
|
takerAmount: orderbookOrder2.order.takerAmount,
|
||||||
fillableTakerAmount: orderbookOrder2.fillableTakerAmount,
|
fillableTakerAmount: orderbookOrder2.fillableTakerAmount,
|
||||||
isRfqt: false,
|
isRFQ: false,
|
||||||
fillData: {
|
fillData: {
|
||||||
order: orderbookOrder2.order,
|
order: orderbookOrder2.order,
|
||||||
} as NativeLimitOrderFillData,
|
} as NativeLimitOrderFillData,
|
||||||
@@ -263,7 +263,7 @@ describe('generateQuoteReport', async () => {
|
|||||||
makerAmount: orderbookOrder1.order.makerAmount,
|
makerAmount: orderbookOrder1.order.makerAmount,
|
||||||
takerAmount: orderbookOrder1.order.takerAmount,
|
takerAmount: orderbookOrder1.order.takerAmount,
|
||||||
fillableTakerAmount: orderbookOrder1.fillableTakerAmount,
|
fillableTakerAmount: orderbookOrder1.fillableTakerAmount,
|
||||||
isRfqt: false,
|
isRFQ: false,
|
||||||
fillData: {
|
fillData: {
|
||||||
order: orderbookOrder1.order,
|
order: orderbookOrder1.order,
|
||||||
} as NativeLimitOrderFillData,
|
} as NativeLimitOrderFillData,
|
||||||
|
@@ -494,15 +494,18 @@ describe('QuoteRequestor', async () => {
|
|||||||
expiry: makeThreeMinuteExpiry(),
|
expiry: makeThreeMinuteExpiry(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const goodMMUri1 = 'https://1337.0.0.1';
|
||||||
|
const goodMMUri2 = 'https://37.0.0.1';
|
||||||
|
|
||||||
mockedRequests.push({
|
mockedRequests.push({
|
||||||
...mockedDefaults,
|
...mockedDefaults,
|
||||||
endpoint: 'https://1337.0.0.1',
|
endpoint: goodMMUri1,
|
||||||
responseData: successfulQuote1,
|
responseData: successfulQuote1,
|
||||||
});
|
});
|
||||||
// [GOOD] Another Successful response
|
// [GOOD] Another Successful response
|
||||||
mockedRequests.push({
|
mockedRequests.push({
|
||||||
...mockedDefaults,
|
...mockedDefaults,
|
||||||
endpoint: 'https://37.0.0.1',
|
endpoint: goodMMUri2,
|
||||||
responseData: successfulQuote1,
|
responseData: successfulQuote1,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -532,6 +535,16 @@ describe('QuoteRequestor', async () => {
|
|||||||
responseData: { ...successfulQuote1, takerToken: otherToken1 },
|
responseData: { ...successfulQuote1, takerToken: otherToken1 },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const assetOfferings: { [k: string]: [[string, string]] } = {
|
||||||
|
'https://420.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://421.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://422.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://423.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://424.0.0.1': [[makerToken, takerToken]],
|
||||||
|
};
|
||||||
|
assetOfferings[goodMMUri1] = [[makerToken, takerToken]];
|
||||||
|
assetOfferings[goodMMUri2] = [[makerToken, takerToken]];
|
||||||
|
|
||||||
return testHelpers.withMockedRfqQuotes(
|
return testHelpers.withMockedRfqQuotes(
|
||||||
mockedRequests,
|
mockedRequests,
|
||||||
[],
|
[],
|
||||||
@@ -539,15 +552,7 @@ describe('QuoteRequestor', async () => {
|
|||||||
async () => {
|
async () => {
|
||||||
const qr = new QuoteRequestor(
|
const qr = new QuoteRequestor(
|
||||||
{}, // No RFQ-T asset offerings
|
{}, // No RFQ-T asset offerings
|
||||||
{
|
assetOfferings,
|
||||||
'https://1337.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://37.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://420.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://421.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://422.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://423.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://424.0.0.1': [[makerToken, takerToken]],
|
|
||||||
},
|
|
||||||
quoteRequestorHttpClient,
|
quoteRequestorHttpClient,
|
||||||
);
|
);
|
||||||
const resp = await qr.requestRfqmIndicativeQuotesAsync(
|
const resp = await qr.requestRfqmIndicativeQuotesAsync(
|
||||||
@@ -572,7 +577,12 @@ describe('QuoteRequestor', async () => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
expect(resp.sort()).to.eql([successfulQuote1, successfulQuote1].sort());
|
expect(resp.sort()).to.eql(
|
||||||
|
[
|
||||||
|
{ ...successfulQuote1, makerUri: goodMMUri1 },
|
||||||
|
{ ...successfulQuote1, makerUri: goodMMUri2 },
|
||||||
|
].sort(),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
quoteRequestorHttpClient,
|
quoteRequestorHttpClient,
|
||||||
);
|
);
|
||||||
@@ -622,9 +632,12 @@ describe('QuoteRequestor', async () => {
|
|||||||
expiry: makeThreeMinuteExpiry(),
|
expiry: makeThreeMinuteExpiry(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const goodMMUri1 = 'https://1337.0.0.1';
|
||||||
|
const goodMMUri2 = 'https://37.0.0.1';
|
||||||
|
|
||||||
mockedRequests.push({
|
mockedRequests.push({
|
||||||
...mockedDefaults,
|
...mockedDefaults,
|
||||||
endpoint: 'https://1337.0.0.1',
|
endpoint: goodMMUri1,
|
||||||
responseData: successfulQuote1,
|
responseData: successfulQuote1,
|
||||||
});
|
});
|
||||||
// Test out a bad response code, ensure it doesnt cause throw
|
// Test out a bad response code, ensure it doesnt cause throw
|
||||||
@@ -655,28 +668,26 @@ describe('QuoteRequestor', async () => {
|
|||||||
// Another Successful response
|
// Another Successful response
|
||||||
mockedRequests.push({
|
mockedRequests.push({
|
||||||
...mockedDefaults,
|
...mockedDefaults,
|
||||||
endpoint: 'https://37.0.0.1',
|
endpoint: goodMMUri2,
|
||||||
responseData: successfulQuote1,
|
responseData: successfulQuote1,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const assetOfferings: { [k: string]: [[string, string]] } = {
|
||||||
|
'https://420.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://421.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://422.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://423.0.0.1': [[makerToken, takerToken]],
|
||||||
|
'https://424.0.0.1': [[makerToken, takerToken]],
|
||||||
|
};
|
||||||
|
assetOfferings[goodMMUri1] = [[makerToken, takerToken]];
|
||||||
|
assetOfferings[goodMMUri2] = [[makerToken, takerToken]];
|
||||||
|
|
||||||
return testHelpers.withMockedRfqQuotes(
|
return testHelpers.withMockedRfqQuotes(
|
||||||
mockedRequests,
|
mockedRequests,
|
||||||
[],
|
[],
|
||||||
RfqQuoteEndpoint.Indicative,
|
RfqQuoteEndpoint.Indicative,
|
||||||
async () => {
|
async () => {
|
||||||
const qr = new QuoteRequestor(
|
const qr = new QuoteRequestor(assetOfferings, {}, quoteRequestorHttpClient);
|
||||||
{
|
|
||||||
'https://1337.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://420.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://421.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://422.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://423.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://424.0.0.1': [[makerToken, takerToken]],
|
|
||||||
'https://37.0.0.1': [[makerToken, takerToken]],
|
|
||||||
},
|
|
||||||
{},
|
|
||||||
quoteRequestorHttpClient,
|
|
||||||
);
|
|
||||||
const resp = await qr.requestRfqtIndicativeQuotesAsync(
|
const resp = await qr.requestRfqtIndicativeQuotesAsync(
|
||||||
makerToken,
|
makerToken,
|
||||||
takerToken,
|
takerToken,
|
||||||
@@ -693,7 +704,12 @@ describe('QuoteRequestor', async () => {
|
|||||||
intentOnFilling: true,
|
intentOnFilling: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
expect(resp.sort()).to.eql([successfulQuote1, successfulQuote1].sort());
|
expect(resp.sort()).to.eql(
|
||||||
|
[
|
||||||
|
{ ...successfulQuote1, makerUri: goodMMUri1 },
|
||||||
|
{ ...successfulQuote1, makerUri: goodMMUri2 },
|
||||||
|
].sort(),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
quoteRequestorHttpClient,
|
quoteRequestorHttpClient,
|
||||||
);
|
);
|
||||||
@@ -784,7 +800,7 @@ describe('QuoteRequestor', async () => {
|
|||||||
makerEndpointMaxResponseTimeMs: maxTimeoutMs,
|
makerEndpointMaxResponseTimeMs: maxTimeoutMs,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
expect(resp.sort()).to.eql([successfulQuote1].sort()); // notice only one result, despite two requests made
|
expect(resp.sort()).to.eql([{ ...successfulQuote1, makerUri: 'https://1337.0.0.1' }].sort()); // notice only one result, despite two requests made
|
||||||
},
|
},
|
||||||
quoteRequestorHttpClient,
|
quoteRequestorHttpClient,
|
||||||
);
|
);
|
||||||
@@ -847,7 +863,7 @@ describe('QuoteRequestor', async () => {
|
|||||||
intentOnFilling: true,
|
intentOnFilling: true,
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
expect(resp.sort()).to.eql([successfulQuote1].sort());
|
expect(resp.sort()).to.eql([{ ...successfulQuote1, makerUri: 'https://1337.0.0.1' }].sort());
|
||||||
},
|
},
|
||||||
quoteRequestorHttpClient,
|
quoteRequestorHttpClient,
|
||||||
);
|
);
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "6.8.1",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "6.8.0",
|
"version": "6.8.0",
|
||||||
"changes": [
|
"changes": [
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v6.8.1 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v6.8.0 - _October 19, 2021_
|
## v6.8.0 - _October 19, 2021_
|
||||||
|
|
||||||
* Fantom deployment (#347)
|
* Fantom deployment (#347)
|
||||||
|
@@ -244,11 +244,11 @@
|
|||||||
"exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000",
|
"exchangeProxyLiquidityProviderSandbox": "0x0000000000000000000000000000000000000000",
|
||||||
"zrxTreasury": "0x0000000000000000000000000000000000000000",
|
"zrxTreasury": "0x0000000000000000000000000000000000000000",
|
||||||
"transformers": {
|
"transformers": {
|
||||||
"wethTransformer": "0xc6b0d3c45a6b5092808196cb00df5c357d55e1d5",
|
"wethTransformer": "0x7209185959d7227fb77274e1e88151d7c4c368d3",
|
||||||
"payTakerTransformer": "0x7209185959d7227fb77274e1e88151d7c4c368d3",
|
"payTakerTransformer": "0x3f16ca81691dab9184cb4606c361d73c4fd2510a",
|
||||||
"affiliateFeeTransformer": "0x3f16ca81691dab9184cb4606c361d73c4fd2510a",
|
"affiliateFeeTransformer": "0x99356167edba8fbdc36959e3f5d0c43d1ba9c6db",
|
||||||
"fillQuoteTransformer": "0x99356167edba8fbdc36959e3f5d0c43d1ba9c6db",
|
"fillQuoteTransformer": "0x45b3a72221e571017c0f0ec42189e11d149d0ace",
|
||||||
"positiveSlippageFeeTransformer": "0x45b3a72221e571017c0f0ec42189e11d149d0ace"
|
"positiveSlippageFeeTransformer": "0xdd66c23e07b4d6925b6089b5fe6fc9e62941afe8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"137": {
|
"137": {
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-addresses",
|
"name": "@0x/contract-addresses",
|
||||||
"version": "6.8.0",
|
"version": "6.8.1",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "13.18.2",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "13.18.1",
|
"version": "13.18.1",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v13.18.2 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v13.18.1 - _October 19, 2021_
|
## v13.18.1 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/contract-wrappers",
|
"name": "@0x/contract-wrappers",
|
||||||
"version": "13.18.1",
|
"version": "13.18.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.29",
|
"@0x/assert": "^3.0.29",
|
||||||
"@0x/base-contract": "^6.4.2",
|
"@0x/base-contract": "^6.4.2",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/json-schemas": "^6.3.0",
|
"@0x/json-schemas": "^6.3.0",
|
||||||
"@0x/types": "^3.3.4",
|
"@0x/types": "^3.3.4",
|
||||||
"@0x/utils": "^6.4.4",
|
"@0x/utils": "^6.4.4",
|
||||||
|
@@ -1,4 +1,14 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "8.1.10",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Add OtcOrders to fullMigrateAsync",
|
||||||
|
"pr": 350
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1635903615
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "8.1.9",
|
"version": "8.1.9",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v8.1.10 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Add OtcOrders to fullMigrateAsync (#350)
|
||||||
|
|
||||||
## v8.1.9 - _October 19, 2021_
|
## v8.1.9 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/migrations",
|
"name": "@0x/migrations",
|
||||||
"version": "8.1.9",
|
"version": "8.1.10",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -68,20 +68,20 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^6.4.2",
|
"@0x/base-contract": "^6.4.2",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/contracts-asset-proxy": "^3.7.19",
|
"@0x/contracts-asset-proxy": "^3.7.19",
|
||||||
"@0x/contracts-coordinator": "^3.1.38",
|
"@0x/contracts-coordinator": "^3.1.38",
|
||||||
"@0x/contracts-dev-utils": "^1.3.36",
|
"@0x/contracts-dev-utils": "^1.3.36",
|
||||||
"@0x/contracts-erc1155": "^2.1.37",
|
"@0x/contracts-erc1155": "^2.1.37",
|
||||||
"@0x/contracts-erc20": "^3.3.21",
|
"@0x/contracts-erc20": "^3.3.22",
|
||||||
"@0x/contracts-erc721": "^3.1.37",
|
"@0x/contracts-erc721": "^3.1.37",
|
||||||
"@0x/contracts-exchange": "^3.2.38",
|
"@0x/contracts-exchange": "^3.2.38",
|
||||||
"@0x/contracts-exchange-forwarder": "^4.2.38",
|
"@0x/contracts-exchange-forwarder": "^4.2.38",
|
||||||
"@0x/contracts-extensions": "^6.2.32",
|
"@0x/contracts-extensions": "^6.2.32",
|
||||||
"@0x/contracts-multisig": "^4.1.38",
|
"@0x/contracts-multisig": "^4.1.38",
|
||||||
"@0x/contracts-staking": "^2.0.45",
|
"@0x/contracts-staking": "^2.0.45",
|
||||||
"@0x/contracts-utils": "^4.8.2",
|
"@0x/contracts-utils": "^4.8.3",
|
||||||
"@0x/contracts-zero-ex": "^0.29.2",
|
"@0x/contracts-zero-ex": "^0.29.3",
|
||||||
"@0x/sol-compiler": "^4.7.5",
|
"@0x/sol-compiler": "^4.7.5",
|
||||||
"@0x/subproviders": "^6.6.0",
|
"@0x/subproviders": "^6.6.0",
|
||||||
"@0x/typescript-typings": "^5.2.1",
|
"@0x/typescript-typings": "^5.2.1",
|
||||||
|
@@ -1,4 +1,13 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"timestamp": 1635903615,
|
||||||
|
"version": "1.9.4",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Dependencies updated"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1634668033,
|
"timestamp": 1634668033,
|
||||||
"version": "1.9.3",
|
"version": "1.9.3",
|
||||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
|||||||
|
|
||||||
CHANGELOG
|
CHANGELOG
|
||||||
|
|
||||||
|
## v1.9.4 - _November 3, 2021_
|
||||||
|
|
||||||
|
* Dependencies updated
|
||||||
|
|
||||||
## v1.9.3 - _October 19, 2021_
|
## v1.9.3 - _October 19, 2021_
|
||||||
|
|
||||||
* Dependencies updated
|
* Dependencies updated
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@0x/protocol-utils",
|
"name": "@0x/protocol-utils",
|
||||||
"version": "1.9.3",
|
"version": "1.9.4",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6.12"
|
"node": ">=6.12"
|
||||||
},
|
},
|
||||||
@@ -63,8 +63,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/assert": "^3.0.29",
|
"@0x/assert": "^3.0.29",
|
||||||
"@0x/contract-addresses": "^6.8.0",
|
"@0x/contract-addresses": "^6.8.1",
|
||||||
"@0x/contract-wrappers": "^13.18.1",
|
"@0x/contract-wrappers": "^13.18.2",
|
||||||
"@0x/json-schemas": "^6.3.0",
|
"@0x/json-schemas": "^6.3.0",
|
||||||
"@0x/subproviders": "^6.6.0",
|
"@0x/subproviders": "^6.6.0",
|
||||||
"@0x/utils": "^6.4.4",
|
"@0x/utils": "^6.4.4",
|
||||||
|
@@ -6402,6 +6402,7 @@ fake-merkle-patricia-tree@^1.0.1:
|
|||||||
fast-abi@^0.0.2:
|
fast-abi@^0.0.2:
|
||||||
version "0.0.2"
|
version "0.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/fast-abi/-/fast-abi-0.0.2.tgz#da5f796fd7c7b0c966d916ee21daae3eca61c07c"
|
resolved "https://registry.yarnpkg.com/fast-abi/-/fast-abi-0.0.2.tgz#da5f796fd7c7b0c966d916ee21daae3eca61c07c"
|
||||||
|
integrity sha512-k/2s63SkFf6jU2LyF6oQC5/N+L90q6VD1wkp2NXo+DSHoTeOJD2Q6Egpcs+bTPODik0CHxjb7lORgsG+QCRq/Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@mapbox/node-pre-gyp" "^1.0.4"
|
"@mapbox/node-pre-gyp" "^1.0.4"
|
||||||
neon-cli "^0.8.0"
|
neon-cli "^0.8.0"
|
||||||
|
Reference in New Issue
Block a user