Compare commits

...

18 Commits

Author SHA1 Message Date
Github Actions
d5ae971f1c Publish
- @0x/contracts-asset-proxy@3.7.12
 - @0x/contracts-broker@1.1.30
 - @0x/contracts-coordinator@3.1.31
 - @0x/contracts-dev-utils@1.3.29
 - @0x/contracts-erc1155@2.1.30
 - @0x/contracts-erc20@3.3.9
 - @0x/contracts-erc721@3.1.30
 - @0x/contracts-exchange-forwarder@4.2.31
 - @0x/contracts-exchange-libs@4.3.30
 - @0x/contracts-exchange@3.2.31
 - @0x/contracts-extensions@6.2.25
 - @0x/contracts-integrations@2.7.45
 - @0x/contracts-multisig@4.1.31
 - @0x/contracts-staking@2.0.38
 - @0x/contracts-test-utils@5.4.1
 - @0x/contracts-treasury@1.1.7
 - @0x/contracts-utils@4.7.9
 - @0x/contracts-zero-ex@0.24.0
 - @0x/asset-swapper@6.15.0
 - @0x/contract-addresses@6.2.0
 - @0x/contract-wrappers-test@12.2.46
 - @0x/contract-wrappers@13.16.2
 - @0x/migrations@8.0.7
 - @0x/order-utils@10.4.22
 - @0x/protocol-utils@1.6.1
2021-05-21 12:37:26 +00:00
Github Actions
5a2f5f9a42 Updated CHANGELOGS & MD docs 2021-05-21 12:37:22 +00:00
Jacob Evans
75a3b70cef chore: Temporarily disable a LiquidityProvider (#248) 2021-05-21 22:08:55 +10:00
Jacob Evans
803cf65ba1 fix: Deploy FQT for KyberDmm/Mstable (#247) 2021-05-19 08:34:26 +10:00
Jacob Evans
5d3947b838 fix prettier 2021-05-18 09:10:29 +10:00
mzhu25
4397a59008 Add Huobi Token to liquidity provider tokens (#246) 2021-05-17 15:21:53 -07:00
Jacob Evans
966d54c935 fix: KyberDmm (#236)
* fix: KyberDmm

* fix: pass buyToken to kyberDmm and require that path ends with buyToken

* Pass BigNumber down to FastABI

* Address Feedback

Co-authored-by: Kim Persson <kimpersson88@gmail.com>
2021-05-18 08:12:28 +10:00
Romain Butteaud
234ddb495d fix: mStable USD Sampler and Mixin fix (#238)
* fix: mStable USD Sampler and Mixin fix

* chore: adding mBTC (mStable) pool

* fix linter
2021-05-16 19:43:06 -07:00
mzhu25
a744acc7bc Add special selectors to selector collision test (#243) 2021-05-14 10:50:58 -07:00
Lawrence Forman
27c624633c fix repo scripts that use PKG= env var (#242)
Co-authored-by: Lawrence Forman <me@merklejerk.com>
2021-05-12 18:53:06 -04:00
Github Actions
7ef75101b4 Publish
- @0x/contracts-integrations@2.7.44
 - @0x/asset-swapper@6.14.0
2021-05-12 09:13:31 +00:00
Github Actions
6f8aace00d Updated CHANGELOGS & MD docs 2021-05-12 09:13:23 +00:00
Kim Persson
6c264b2f18 feat: add DAI and USDC as intermediate tokens on Ropsten [TKR-93] (#231)
* feat: add DAI and USDC as intermediate tokens on Ropsten

* chore: add changelog entry
2021-05-11 19:36:46 +02:00
Daniel Pyrathon
df055e1958 fix: Added fee parameter to Quote Requestor (#235)
* Added changes

* Fixes

* Applied PR feedback

* lint fix
2021-05-11 12:57:51 -04:00
Github Actions
70d2117470 Publish
- @0x/contracts-integrations@2.7.43
 - @0x/asset-swapper@6.13.0
2021-05-11 03:18:25 +00:00
Github Actions
2c173ccaf3 Updated CHANGELOGS & MD docs 2021-05-11 03:18:20 +00:00
mzhu25
d2f4a0c5f3 Updated config.yml 2021-05-10 19:51:12 -07:00
mzhu25
0d6021e5e3 Add LiquidityProvider to BSC sources (#234) 2021-05-10 18:27:52 -07:00
104 changed files with 1046 additions and 263 deletions

View File

@@ -2,11 +2,11 @@ version: 2.1
jobs:
build:
resource_class: large
resource_class: xlarge
docker:
- image: node:12
environment:
NODE_OPTIONS: '--max-old-space-size=6442'
NODE_OPTIONS: '--max-old-space-size=16384'
working_directory: ~/repo
steps:
- checkout

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "3.7.12",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "3.7.11",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.7.12 - _May 21, 2021_
* Dependencies updated
## v3.7.11 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "3.7.11",
"version": "3.7.12",
"engines": {
"node": ">=6.12"
},
@@ -52,10 +52,10 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/protocol",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contract-wrappers": "^13.16.1",
"@0x/contract-wrappers": "^13.16.2",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
@@ -80,11 +80,11 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-erc1155": "^2.1.29",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/order-utils": "^10.4.21",
"@0x/contracts-erc1155": "^2.1.30",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/order-utils": "^10.4.22",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "1.1.30",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "1.1.29",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.1.30 - _May 21, 2021_
* Dependencies updated
## v1.1.29 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-broker",
"version": "1.1.29",
"version": "1.1.30",
"engines": {
"node": ">=6.12"
},
@@ -52,14 +52,14 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/extensions",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -85,7 +85,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0"

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "3.1.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "3.1.30",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.31 - _May 21, 2021_
* Dependencies updated
## v3.1.30 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-coordinator",
"version": "3.1.30",
"version": "3.1.31",
"engines": {
"node": ">=6.12"
},
@@ -53,12 +53,12 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/extensions",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-gen": "^2.0.38",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -84,10 +84,10 @@
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contract-addresses": "^6.2.0",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/json-schemas": "^6.1.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "1.3.29",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "1.3.28",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.3.29 - _May 21, 2021_
* Dependencies updated
## v1.3.28 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-dev-utils",
"version": "1.3.28",
"version": "1.3.29",
"engines": {
"node": ">=6.12"
},
@@ -43,10 +43,10 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/assert": "^3.0.27",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "2.1.30",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "2.1.29",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.1.30 - _May 21, 2021_
* Dependencies updated
## v2.1.29 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc1155",
"version": "2.1.29",
"version": "2.1.30",
"engines": {
"node": ">=6.12"
},
@@ -54,7 +54,7 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
@@ -81,7 +81,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",
"lodash": "^4.17.11"

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "3.3.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "3.3.8",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.3.9 - _May 21, 2021_
* Dependencies updated
## v3.3.8 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "3.3.8",
"version": "3.3.9",
"engines": {
"node": ">=6.12"
},
@@ -53,8 +53,8 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "3.1.30",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "3.1.29",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.1.30 - _May 21, 2021_
* Dependencies updated
## v3.1.29 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "3.1.29",
"version": "3.1.30",
"engines": {
"node": ">=6.12"
},
@@ -54,8 +54,8 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "4.2.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "4.2.30",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.2.31 - _May 21, 2021_
* Dependencies updated
## v4.2.30 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "4.2.30",
"version": "4.2.31",
"engines": {
"node": ">=6.12"
},
@@ -53,18 +53,18 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/extensions",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-erc1155": "^2.1.29",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc1155": "^2.1.30",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "4.3.30",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "4.3.29",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.3.30 - _May 21, 2021_
* Dependencies updated
## v4.3.29 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-libs",
"version": "4.3.29",
"version": "4.3.30",
"engines": {
"node": ">=6.12"
},
@@ -81,9 +81,9 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/order-utils": "^10.4.21",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/order-utils": "^10.4.22",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "3.2.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "3.2.30",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v3.2.31 - _May 21, 2021_
* Dependencies updated
## v3.2.30 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "3.2.30",
"version": "3.2.31",
"engines": {
"node": ">=6.12"
},
@@ -53,13 +53,13 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/protocol",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-multisig": "^4.1.30",
"@0x/contracts-staking": "^2.0.37",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-multisig": "^4.1.31",
"@0x/contracts-staking": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
@@ -89,11 +89,11 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-erc1155": "^2.1.29",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/order-utils": "^10.4.21",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc1155": "^2.1.30",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/order-utils": "^10.4.22",
"@0x/utils": "^6.4.3",
"lodash": "^4.17.11"
},

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "6.2.25",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "6.2.24",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.2.25 - _May 21, 2021_
* Dependencies updated
## v6.2.24 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "6.2.24",
"version": "6.2.25",
"engines": {
"node": ">=6.12"
},
@@ -53,16 +53,16 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/extensions",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -91,7 +91,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/typescript-typings": "^5.2.0",
"ethereum-types": "^3.5.0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-integrations",
"version": "2.7.42",
"version": "2.7.45",
"private": true,
"engines": {
"node": ">=6.12"
@@ -53,21 +53,21 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/extensions",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contract-wrappers": "^13.16.1",
"@0x/contracts-broker": "^1.1.29",
"@0x/contracts-coordinator": "^3.1.30",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-exchange-forwarder": "^4.2.30",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-extensions": "^6.2.24",
"@0x/contract-addresses": "^6.2.0",
"@0x/contract-wrappers": "^13.16.2",
"@0x/contracts-broker": "^1.1.30",
"@0x/contracts-coordinator": "^3.1.31",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-exchange-forwarder": "^4.2.31",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-extensions": "^6.2.25",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-utils": "^4.7.9",
"@0x/coordinator-server": "^1.0.5",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.6",
"@0x/order-utils": "^10.4.21",
"@0x/protocol-utils": "^1.6.0",
"@0x/migrations": "^8.0.7",
"@0x/order-utils": "^10.4.22",
"@0x/protocol-utils": "^1.6.1",
"@0x/sol-compiler": "^4.7.3",
"@0x/tslint-config": "^4.1.4",
"@0x/web3-wrapper": "^7.5.3",
@@ -93,17 +93,17 @@
"typescript": "4.2.2"
},
"dependencies": {
"@0x/asset-swapper": "^6.12.0",
"@0x/asset-swapper": "^6.15.0",
"@0x/base-contract": "^6.4.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-erc1155": "^2.1.29",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-multisig": "^4.1.30",
"@0x/contracts-staking": "^2.0.37",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-zero-ex": "^0.23.0",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-erc1155": "^2.1.30",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-multisig": "^4.1.31",
"@0x/contracts-staking": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-zero-ex": "^0.24.0",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "4.1.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "4.1.30",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.1.31 - _May 21, 2021_
* Dependencies updated
## v4.1.30 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "4.1.30",
"version": "4.1.31",
"engines": {
"node": ">=6.12"
},
@@ -50,11 +50,11 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/multisig",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/tslint-config": "^4.1.4",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "2.0.38",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "2.0.37",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.0.38 - _May 21, 2021_
* Dependencies updated
## v2.0.37 - _May 5, 2021_
* Patch epoch finalization issue (#221)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-staking",
"version": "2.0.37",
"version": "2.0.38",
"engines": {
"node": ">=6.12"
},
@@ -54,14 +54,14 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/tokens",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-utils": "^4.7.9",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -88,7 +88,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "5.4.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "5.4.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v5.4.1 - _May 21, 2021_
* Dependencies updated
## v5.4.0 - _May 5, 2021_
* Set default ganache gas limit to 100e6 (#197)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-test-utils",
"version": "5.4.0",
"version": "5.4.1",
"engines": {
"node": ">=6.12"
},
@@ -44,10 +44,10 @@
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contract-addresses": "^6.2.0",
"@0x/dev-utils": "^4.2.7",
"@0x/json-schemas": "^6.1.3",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-coverage": "^4.0.37",
"@0x/sol-profiler": "^4.1.27",
"@0x/sol-trace": "^3.0.37",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "1.1.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "1.1.6",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.1.7 - _May 21, 2021_
* Dependencies updated
## v1.1.6 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-treasury",
"version": "1.1.6",
"version": "1.1.7",
"engines": {
"node": ">=6.12"
},
@@ -47,12 +47,12 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/treasury",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contract-addresses": "^6.2.0",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-staking": "^2.0.37",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-staking": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -73,7 +73,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/protocol-utils": "^1.6.0",
"@0x/protocol-utils": "^1.6.1",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "4.7.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "4.7.8",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v4.7.9 - _May 21, 2021_
* Dependencies updated
## v4.7.8 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
"version": "4.7.8",
"version": "4.7.9",
"engines": {
"node": ">=6.12"
},
@@ -52,9 +52,9 @@
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-compiler": "^4.7.3",
"@0x/tslint-config": "^4.1.4",
"@0x/types": "^3.3.3",

View File

@@ -1,4 +1,14 @@
[
{
"version": "0.24.0",
"changes": [
{
"note": "Add special selectors to selector collision test",
"pr": 243
}
],
"timestamp": 1621600614
},
{
"version": "0.23.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.24.0 - _May 21, 2021_
* Add special selectors to selector collision test (#243)
## v0.23.0 - _May 5, 2021_
* Added ETH support to `MixinCurve` (#220)

View File

@@ -31,6 +31,7 @@ import "./mixins/MixinCryptoCom.sol";
import "./mixins/MixinDodo.sol";
import "./mixins/MixinDodoV2.sol";
import "./mixins/MixinKyber.sol";
import "./mixins/MixinKyberDmm.sol";
import "./mixins/MixinMakerPSM.sol";
import "./mixins/MixinMooniswap.sol";
import "./mixins/MixinMStable.sol";
@@ -53,6 +54,7 @@ contract BridgeAdapter is
MixinDodo,
MixinDodoV2,
MixinKyber,
MixinKyberDmm,
MixinMakerPSM,
MixinMooniswap,
MixinMStable,
@@ -217,6 +219,12 @@ contract BridgeAdapter is
sellAmount,
order.bridgeData
);
} else if (protocolId == BridgeProtocols.KYBERDMM) {
boughtAmount = _tradeKyberDmm(
buyToken,
sellAmount,
order.bridgeData
);
} else {
boughtAmount = _tradeZeroExBridge(
sellToken,

View File

@@ -46,4 +46,5 @@ library BridgeProtocols {
uint128 internal constant MAKERPSM = 16;
uint128 internal constant BALANCERV2 = 17;
uint128 internal constant UNISWAPV3 = 18;
uint128 internal constant KYBERDMM = 19;
}

View File

@@ -0,0 +1,94 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright 2021 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.6.5;
pragma experimental ABIEncoderV2;
import "@0x/contracts-erc20/contracts/src/v06/LibERC20TokenV06.sol";
import "@0x/contracts-erc20/contracts/src/v06/IERC20TokenV06.sol";
import "../IBridgeAdapter.sol";
/*
KyberDmm Router
*/
interface IKyberDmmRouter {
/// @dev Swaps an exact amount of input tokens for as many output tokens as possible, along the route determined by the path.
/// The first element of path is the input token, the last is the output token, and any intermediate elements represent
/// intermediate pairs to trade through (if, for example, a direct pair does not exist).
/// @param amountIn The amount of input tokens to send.
/// @param amountOutMin The minimum amount of output tokens that must be received for the transaction not to revert.
/// @param pools An array of pool addresses. pools.length must be >= 1.
/// @param path An array of token addresses. path.length must be >= 2. Pools for each consecutive pair of addresses must exist and have liquidity.
/// @param to Recipient of the output tokens.
/// @param deadline Unix timestamp after which the transaction will revert.
/// @return amounts The input token amount and all subsequent output token amounts.
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata pools,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
}
contract MixinKyberDmm {
using LibERC20TokenV06 for IERC20TokenV06;
function _tradeKyberDmm(
IERC20TokenV06 buyToken,
uint256 sellAmount,
bytes memory bridgeData
)
internal
returns (uint256 boughtAmount)
{
address router;
address[] memory pools;
address[] memory path;
(router, pools, path) = abi.decode(bridgeData, (address, address[], address[]));
require(pools.length >= 1, "MixinKyberDmm/POOLS_LENGTH_MUST_BE_AT_LEAST_ONE");
require(path.length == pools.length + 1, "MixinKyberDmm/ARRAY_LENGTH_MISMATCH");
require(
path[path.length - 1] == address(buyToken),
"MixinKyberDmm/LAST_ELEMENT_OF_PATH_MUST_MATCH_OUTPUT_TOKEN"
);
// Grant the KyberDmm router an allowance to sell the first token.
IERC20TokenV06(path[0]).approveIfBelow(address(router), sellAmount);
uint[] memory amounts = IKyberDmmRouter(router).swapExactTokensForTokens(
// Sell all tokens we hold.
sellAmount,
// Minimum buy amount.
1,
pools,
// Convert to `buyToken` along this path.
path,
// Recipient is `this`.
address(this),
// Expires after this block.
block.timestamp
);
return amounts[amounts.length-1];
}
}

View File

@@ -31,6 +31,7 @@ interface IMStable {
IERC20TokenV06 sellToken,
IERC20TokenV06 buyToken,
uint256 sellAmount,
uint256 minBoughtAmount,
address recipient
)
external
@@ -59,6 +60,8 @@ contract MixinMStable {
sellToken,
buyToken,
sellAmount,
// Minimum buy amount.
1,
address(this)
);
}

View File

@@ -69,7 +69,7 @@ contract MixinUniswapV2 {
assembly { path := _path }
}
require(path.length >= 2, "MixinUniswapV3/PATH_LENGTH_MUST_BE_AT_LEAST_TWO");
require(path.length >= 2, "MixinUniswapV2/PATH_LENGTH_MUST_BE_AT_LEAST_TWO");
require(
path[path.length - 1] == buyToken,
"MixinUniswapV2/LAST_ELEMENT_OF_PATH_MUST_MATCH_OUTPUT_TOKEN"

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-zero-ex",
"version": "0.23.0",
"version": "0.24.0",
"engines": {
"node": ">=6.12"
},
@@ -43,7 +43,7 @@
"config": {
"publicInterfaceContracts": "IZeroEx,ZeroEx,FullMigration,InitialMigration,IFlashWallet,IERC20Transformer,IOwnableFeature,ISimpleFunctionRegistryFeature,ITransformERC20Feature,FillQuoteTransformer,PayTakerTransformer,PositiveSlippageFeeTransformer,WethTransformer,OwnableFeature,SimpleFunctionRegistryFeature,TransformERC20Feature,AffiliateFeeTransformer,MetaTransactionsFeature,LogMetadataTransformer,BridgeAdapter,LiquidityProviderFeature,ILiquidityProviderFeature,NativeOrdersFeature,INativeOrdersFeature,FeeCollectorController,FeeCollector,CurveLiquidityProvider,BatchFillNativeOrdersFeature,IBatchFillNativeOrdersFeature,MultiplexFeature,IMultiplexFeature",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
"abis": "./test/generated-artifacts/@(AffiliateFeeTransformer|BatchFillNativeOrdersFeature|BootstrapFeature|BridgeAdapter|BridgeProtocols|CurveLiquidityProvider|FeeCollector|FeeCollectorController|FillQuoteTransformer|FixinCommon|FixinEIP712|FixinProtocolFees|FixinReentrancyGuard|FixinTokenSpender|FlashWallet|FullMigration|IBatchFillNativeOrdersFeature|IBootstrapFeature|IBridgeAdapter|IERC20Bridge|IERC20Transformer|IFeature|IFlashWallet|ILiquidityProvider|ILiquidityProviderFeature|ILiquidityProviderSandbox|IMetaTransactionsFeature|IMooniswapPool|IMultiplexFeature|INativeOrdersEvents|INativeOrdersFeature|IOwnableFeature|IPancakeSwapFeature|ISimpleFunctionRegistryFeature|IStaking|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC20Transformer|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MixinBalancer|MixinBalancerV2|MixinBancor|MixinCoFiX|MixinCryptoCom|MixinCurve|MixinDodo|MixinDodoV2|MixinKyber|MixinMStable|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinOasis|MixinShell|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OwnableFeature|PancakeSwapFeature|PayTakerTransformer|PermissionlessTransformerDeployer|PositiveSlippageFeeTransformer|SimpleFunctionRegistryFeature|TestBridge|TestCallTarget|TestCurve|TestDelegateCaller|TestFeeCollectorController|TestFillQuoteTransformerBridge|TestFillQuoteTransformerExchange|TestFillQuoteTransformerHost|TestFixinProtocolFees|TestFixinTokenSpender|TestFullMigration|TestInitialMigration|TestLibNativeOrder|TestLibSignature|TestLiquidityProvider|TestMetaTransactionsNativeOrdersFeature|TestMetaTransactionsTransformERC20Feature|TestMigrator|TestMintTokenERC20Transformer|TestMintableERC20Token|TestMooniswap|TestNativeOrdersFeature|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestWeth|TestWethTransformerHost|TestZeroExFeature|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|WethTransformer|ZeroEx|ZeroExOptimized).json"
"abis": "./test/generated-artifacts/@(AffiliateFeeTransformer|BatchFillNativeOrdersFeature|BootstrapFeature|BridgeAdapter|BridgeProtocols|CurveLiquidityProvider|FeeCollector|FeeCollectorController|FillQuoteTransformer|FixinCommon|FixinEIP712|FixinProtocolFees|FixinReentrancyGuard|FixinTokenSpender|FlashWallet|FullMigration|IBatchFillNativeOrdersFeature|IBootstrapFeature|IBridgeAdapter|IERC20Bridge|IERC20Transformer|IFeature|IFlashWallet|ILiquidityProvider|ILiquidityProviderFeature|ILiquidityProviderSandbox|IMetaTransactionsFeature|IMooniswapPool|IMultiplexFeature|INativeOrdersEvents|INativeOrdersFeature|IOwnableFeature|IPancakeSwapFeature|ISimpleFunctionRegistryFeature|IStaking|ITestSimpleFunctionRegistryFeature|ITokenSpenderFeature|ITransformERC20Feature|IUniswapFeature|IUniswapV2Pair|IZeroEx|InitialMigration|LibBootstrap|LibCommonRichErrors|LibERC20Transformer|LibFeeCollector|LibLiquidityProviderRichErrors|LibMetaTransactionsRichErrors|LibMetaTransactionsStorage|LibMigrate|LibNativeOrder|LibNativeOrdersRichErrors|LibNativeOrdersStorage|LibOwnableRichErrors|LibOwnableStorage|LibProxyRichErrors|LibProxyStorage|LibReentrancyGuardStorage|LibSignature|LibSignatureRichErrors|LibSimpleFunctionRegistryRichErrors|LibSimpleFunctionRegistryStorage|LibStorage|LibTransformERC20RichErrors|LibTransformERC20Storage|LibWalletRichErrors|LiquidityProviderFeature|LiquidityProviderSandbox|LogMetadataTransformer|MetaTransactionsFeature|MixinBalancer|MixinBalancerV2|MixinBancor|MixinCoFiX|MixinCryptoCom|MixinCurve|MixinDodo|MixinDodoV2|MixinKyber|MixinKyberDmm|MixinMStable|MixinMakerPSM|MixinMooniswap|MixinNerve|MixinOasis|MixinShell|MixinUniswap|MixinUniswapV2|MixinUniswapV3|MixinZeroExBridge|MooniswapLiquidityProvider|MultiplexFeature|NativeOrdersCancellation|NativeOrdersFeature|NativeOrdersInfo|NativeOrdersProtocolFees|NativeOrdersSettlement|OwnableFeature|PancakeSwapFeature|PayTakerTransformer|PermissionlessTransformerDeployer|PositiveSlippageFeeTransformer|SimpleFunctionRegistryFeature|TestBridge|TestCallTarget|TestCurve|TestDelegateCaller|TestFeeCollectorController|TestFillQuoteTransformerBridge|TestFillQuoteTransformerExchange|TestFillQuoteTransformerHost|TestFixinProtocolFees|TestFixinTokenSpender|TestFullMigration|TestInitialMigration|TestLibNativeOrder|TestLibSignature|TestLiquidityProvider|TestMetaTransactionsNativeOrdersFeature|TestMetaTransactionsTransformERC20Feature|TestMigrator|TestMintTokenERC20Transformer|TestMintableERC20Token|TestMooniswap|TestNativeOrdersFeature|TestOrderSignerRegistryWithContractWallet|TestPermissionlessTransformerDeployerSuicidal|TestPermissionlessTransformerDeployerTransformer|TestRfqOriginRegistration|TestSimpleFunctionRegistryFeatureImpl1|TestSimpleFunctionRegistryFeatureImpl2|TestStaking|TestTokenSpenderERC20Token|TestTransformERC20|TestTransformerBase|TestTransformerDeployerTransformer|TestTransformerHost|TestWeth|TestWethTransformerHost|TestZeroExFeature|TransformERC20Feature|Transformer|TransformerDeployer|UniswapFeature|WethTransformer|ZeroEx|ZeroExOptimized).json"
},
"repository": {
"type": "git",
@@ -56,12 +56,12 @@
"homepage": "https://github.com/0xProject/protocol/tree/main/contracts/zero-ex",
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contract-addresses": "^6.2.0",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.21",
"@0x/order-utils": "^10.4.22",
"@0x/sol-compiler": "^4.7.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",
@@ -83,7 +83,7 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/protocol-utils": "^1.6.0",
"@0x/protocol-utils": "^1.6.1",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -84,6 +84,7 @@ import * as MixinCurve from '../test/generated-artifacts/MixinCurve.json';
import * as MixinDodo from '../test/generated-artifacts/MixinDodo.json';
import * as MixinDodoV2 from '../test/generated-artifacts/MixinDodoV2.json';
import * as MixinKyber from '../test/generated-artifacts/MixinKyber.json';
import * as MixinKyberDmm from '../test/generated-artifacts/MixinKyberDmm.json';
import * as MixinMakerPSM from '../test/generated-artifacts/MixinMakerPSM.json';
import * as MixinMooniswap from '../test/generated-artifacts/MixinMooniswap.json';
import * as MixinMStable from '../test/generated-artifacts/MixinMStable.json';
@@ -245,6 +246,7 @@ export const artifacts = {
MixinDodo: MixinDodo as ContractArtifact,
MixinDodoV2: MixinDodoV2 as ContractArtifact,
MixinKyber: MixinKyber as ContractArtifact,
MixinKyberDmm: MixinKyberDmm as ContractArtifact,
MixinMStable: MixinMStable as ContractArtifact,
MixinMakerPSM: MixinMakerPSM as ContractArtifact,
MixinMooniswap: MixinMooniswap as ContractArtifact,

View File

@@ -3,9 +3,14 @@ import { MethodAbi } from 'ethereum-types';
import * as wrappers from '../../src/wrappers';
// tslint:disable:no-string-literal
blockchainTests('Selector collision test', env => {
it('Function selectors do not collide', () => {
const selectorToSignature: { [selector: string]: string } = {};
selectorToSignature['bca8c7b5'] = 'executeCall(address,bytes)'; // legacy allowance target
selectorToSignature['a9059cbb'] = 'transfer(address,uint256)'; // ERC20Token transfer
selectorToSignature['23b872dd'] = 'transferFrom(address,address,uint256)'; // ERC20Token transferFrom
for (const wrapper of Object.values(wrappers)) {
if (typeof wrapper === 'function') {
const contract = new wrapper(constants.NULL_ADDRESS, env.provider, env.txDefaults);

View File

@@ -82,6 +82,7 @@ export * from '../test/generated-wrappers/mixin_curve';
export * from '../test/generated-wrappers/mixin_dodo';
export * from '../test/generated-wrappers/mixin_dodo_v2';
export * from '../test/generated-wrappers/mixin_kyber';
export * from '../test/generated-wrappers/mixin_kyber_dmm';
export * from '../test/generated-wrappers/mixin_m_stable';
export * from '../test/generated-wrappers/mixin_maker_p_s_m';
export * from '../test/generated-wrappers/mixin_mooniswap';

View File

@@ -113,6 +113,7 @@
"test/generated-artifacts/MixinDodo.json",
"test/generated-artifacts/MixinDodoV2.json",
"test/generated-artifacts/MixinKyber.json",
"test/generated-artifacts/MixinKyberDmm.json",
"test/generated-artifacts/MixinMStable.json",
"test/generated-artifacts/MixinMakerPSM.json",
"test/generated-artifacts/MixinMooniswap.json",

View File

@@ -10,7 +10,7 @@
],
"scripts": {
"deps_versions:ci": "node ./node_modules/@0x/monorepo-scripts/lib/deps_versions.js",
"fix": "wsrun --fast-exit --parallel --exclude-missing -c fix $PKG",
"fix": "wsrun --fast-exit --parallel --exclude-missing -p $PKG -c fix",
"ganache": "ganache-cli -p 8545 --gasLimit 10000000 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc",
"prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc",
@@ -27,17 +27,17 @@
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna": "lerna",
"build": "lerna link && wsrun -r --stages --fast-exit --exclude-missing -c build $PKG",
"build:ci": "lerna link && wsrun --fast-exit -r --stages --exclude-missing -c build:ci $PKG",
"build": "lerna link && wsrun -r --stages --fast-exit --exclude-missing -p $PKG -c build",
"build:ci": "lerna link && wsrun --fast-exit -r --stages --exclude-missing -p $PKG -c build:ci",
"build:contracts": "lerna link && wsrun -p ${npm_package_config_contractsPackages} --fast-exit -r --stages --exclude-missing -c build",
"build:ts": "tsc -b",
"watch:ts": "tsc -b -w",
"clean": "wsrun --fast-exit -r --parallel --exclude-missing clean -c $PKG",
"contracts:watch": "wsrun --parallel --exclude-missing watch -c $PKG",
"clean": "wsrun --fast-exit -r --parallel --exclude-missing -p $PKG -c clean",
"contracts:watch": "wsrun --parallel --exclude-missing -p $PKG -c watch",
"remove_node_modules": "lerna clean --yes; rm -rf node_modules",
"rebuild": "run-s clean build",
"test": "wsrun --fast-exit --serial --exclude-missing -p $(echo $(echo ${npm_package_config_contractsPackages} ${npm_package_config_nonContractPackages} | tr ' ' '\n' | sort | uniq) ${npm_package_config_ignoreTestsForPackages} | tr ' ' '\n' | sort | uniq -u | tr '\n' ' ') -c test",
"test:all": "wsrun --fast-exit --serial --exclude-missing -c test $PKG",
"test:all": "wsrun --fast-exit --serial --exclude-missing -p $PKG -c test",
"test:contracts": "wsrun --serial -p $(echo ${npm_package_config_contractsPackages} ${npm_package_config_ignoreTestsForPackages} | tr ' ' '\n' | sort | uniq -u | tr '\n' ' ') --fast-exit --exclude-missing -c test",
"test:contracts:all": "wsrun --serial -p ${npm_package_config_contractsPackages} --fast-exit --exclude-missing -c test",
"generate_doc": "node ./node_modules/@0x/monorepo-scripts/lib/doc_generate.js --config ./doc-gen-config.json",
@@ -45,7 +45,7 @@
"diff_md_docs:ci": "wsrun --exclude-missing -c diff_docs",
"test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i || break -1; done;",
"bundlewatch": "bundlewatch",
"lint": "wsrun --fast-exit --parallel --exclude-missing -c lint $PKG",
"lint": "wsrun --fast-exit --parallel --exclude-missing -p $PKG -c lint",
"upgrade_org_deps": "node node_modules/@0x/monorepo-scripts/lib/upgrade_deps.js -p '@0x|ethereum-types'",
"upgrade_deps": "node node_modules/@0x/monorepo-scripts/lib/upgrade_deps.js",
"verdaccio": "docker run --rm -i -p 4873:4873 0xorg/verdaccio"

View File

@@ -1,4 +1,45 @@
[
{
"version": "6.15.0",
"changes": [
{
"note": "Fix KyberDmm",
"pr": 236
},
{
"note": "Re-enable KyberDmm",
"pr": 247
},
{
"note": "Add Huobi Token to liquidity provider tokens",
"pr": 246
},
{
"note": "Temporarily disable specific LiquidityProvider"
}
],
"timestamp": 1621600614
},
{
"version": "6.14.0",
"changes": [
{
"note": "Add support for additional sources and intermediate tokens on Ropsten",
"pr": 231
}
],
"timestamp": 1620810800
},
{
"version": "6.13.0",
"changes": [
{
"note": "Add LiquidityProvider to BSC sources",
"pr": 234
}
],
"timestamp": 1620703098
},
{
"version": "6.12.0",
"changes": [

View File

@@ -5,6 +5,21 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.15.0 - _May 21, 2021_
* Fix KyberDmm (#236)
* Re-enable KyberDmm (#247)
* Add Huobi Token to liquidity provider tokens (#246)
* Temporarily disable specific LiquidityProvider
## v6.14.0 - _May 12, 2021_
* Add support for additional sources and intermediate tokens on Ropsten (#231)
## v6.13.0 - _May 11, 2021_
* Add LiquidityProvider to BSC sources (#234)
## v6.12.0 - _May 10, 2021_
* `TwoHopSampler` to use `call` over `staticcall` in order to support sources like `Uniswap_V3` and `Balancer_V2` (#233)

View File

@@ -28,6 +28,7 @@ import "./DODOSampler.sol";
import "./DODOV2Sampler.sol";
import "./Eth2DaiSampler.sol";
import "./KyberSampler.sol";
import "./KyberDmmSampler.sol";
import "./LiquidityProviderSampler.sol";
import "./MakerPSMSampler.sol";
import "./MultiBridgeSampler.sol";
@@ -52,6 +53,7 @@ contract ERC20BridgeSampler is
DODOV2Sampler,
Eth2DaiSampler,
KyberSampler,
KyberDmmSampler,
LiquidityProviderSampler,
MakerPSMSampler,
MStableSampler,

View File

@@ -0,0 +1,159 @@
// SPDX-License-Identifier: Apache-2.0
/*
Copyright 2020 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.6;
pragma experimental ABIEncoderV2;
interface IKyberDmmFactory {
function getPoolAtIndex(address token0, address token1, uint256 index)
external
view
returns (address);
}
interface IKyberDmmRouter {
function factory() external view returns (address);
function getAmountsOut(uint256 amountIn, address[] calldata pools, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata pools, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
contract KyberDmmSampler
{
/// @dev Gas limit for KyberDmm calls.
uint256 constant private KYBER_DMM_CALL_GAS = 150e3; // 150k
/// @dev Sample sell quotes from KyberDmm.
/// @param router Router to look up tokens and amounts
/// @param path Token route. Should be takerToken -> makerToken
/// @param takerTokenAmounts Taker token sell amount for each sample.
/// @return pools The pool addresses involved in the multi path trade
/// @return makerTokenAmounts Maker amounts bought at each taker token
/// amount.
function sampleSellsFromKyberDmm(
address router,
address[] memory path,
uint256[] memory takerTokenAmounts
)
public
view
returns (address[] memory pools, uint256[] memory makerTokenAmounts)
{
uint256 numSamples = takerTokenAmounts.length;
makerTokenAmounts = new uint256[](numSamples);
pools = _getKyberDmmPools(router, path);
if (pools.length == 0) {
return (pools, makerTokenAmounts);
}
for (uint256 i = 0; i < numSamples; i++) {
try
IKyberDmmRouter(router).getAmountsOut
{gas: KYBER_DMM_CALL_GAS}
(takerTokenAmounts[i], pools, path)
returns (uint256[] memory amounts)
{
makerTokenAmounts[i] = amounts[path.length - 1];
// Break early if there are 0 amounts
if (makerTokenAmounts[i] == 0) {
break;
}
} catch (bytes memory) {
// Swallow failures, leaving all results as zero.
break;
}
}
}
/// @dev Sample buy quotes from KyberDmm.
/// @param router Router to look up tokens and amounts
/// @param path Token route. Should be takerToken -> makerToken.
/// @param makerTokenAmounts Maker token buy amount for each sample.
/// @return pools The pool addresses involved in the multi path trade
/// @return takerTokenAmounts Taker amounts sold at each maker token
/// amount.
function sampleBuysFromKyberDmm(
address router,
address[] memory path,
uint256[] memory makerTokenAmounts
)
public
view
returns (address[] memory pools, uint256[] memory takerTokenAmounts)
{
uint256 numSamples = makerTokenAmounts.length;
takerTokenAmounts = new uint256[](numSamples);
pools = _getKyberDmmPools(router, path);
if (pools.length == 0) {
return (pools, takerTokenAmounts);
}
for (uint256 i = 0; i < numSamples; i++) {
try
IKyberDmmRouter(router).getAmountsIn
{gas: KYBER_DMM_CALL_GAS}
(makerTokenAmounts[i], pools, path)
returns (uint256[] memory amounts)
{
takerTokenAmounts[i] = amounts[0];
// Break early if there are 0 amounts
if (takerTokenAmounts[i] == 0) {
break;
}
} catch (bytes memory) {
// Swallow failures, leaving all results as zero.
break;
}
}
}
function _getKyberDmmPools(
address router,
address[] memory path
)
private
view
returns (address[] memory pools)
{
pools = new address[](path.length - 1);
IKyberDmmFactory factory = IKyberDmmFactory(IKyberDmmRouter(router).factory());
for (uint256 i = 0; i < pools.length; i++) {
// Currently only supporting the first pool found at the index
try
factory.getPoolAtIndex
{gas: KYBER_DMM_CALL_GAS}
(path[i], path[i + 1], 0)
returns (address pool)
{
pools[i] = pool;
} catch (bytes memory) {
return new address[](0);
}
}
}
}

View File

@@ -49,6 +49,7 @@ contract MStableSampler is
view
returns (uint256[] memory makerTokenAmounts)
{
_assertValidPair(makerToken, takerToken);
// Initialize array of maker token amounts.
uint256 numSamples = takerTokenAmounts.length;
makerTokenAmounts = new uint256[](numSamples);
@@ -58,7 +59,7 @@ contract MStableSampler is
IMStable(router).getSwapOutput
{gas: DEFAULT_CALL_GAS}
(takerToken, makerToken, takerTokenAmounts[i])
returns (bool, string memory, uint256 amount)
returns (uint256 amount)
{
makerTokenAmounts[i] = amount;
// Break early if there are 0 amounts

View File

@@ -29,5 +29,5 @@ interface IMStable {
)
external
view
returns (bool, string memory, uint256 output);
returns (uint256 swapOutput);
}

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "6.12.0",
"version": "6.15.0",
"engines": {
"node": ">=6.12"
},
@@ -39,7 +39,7 @@
"config": {
"publicInterfaceContracts": "ERC20BridgeSampler,BalanceChecker,FakeTaker",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually.",
"abis": "./test/generated-artifacts/@(ApproximateBuys|BalanceChecker|BalancerSampler|BalancerV2Sampler|BancorSampler|CurveSampler|DODOSampler|DODOV2Sampler|DummyLiquidityProvider|ERC20BridgeSampler|Eth2DaiSampler|FakeTaker|IBalancer|IBancor|ICurve|IEth2Dai|IKyberNetwork|IMStable|IMooniswap|IMultiBridge|IShell|ISmoothy|IUniswapExchangeQuotes|IUniswapV2Router01|KyberSampler|LiquidityProviderSampler|MStableSampler|MakerPSMSampler|MooniswapSampler|MultiBridgeSampler|NativeOrderSampler|SamplerUtils|ShellSampler|SmoothySampler|TestERC20BridgeSampler|TestNativeOrderSampler|TwoHopSampler|UniswapSampler|UniswapV2Sampler|UniswapV3Sampler|UtilitySampler).json",
"abis": "./test/generated-artifacts/@(ApproximateBuys|BalanceChecker|BalancerSampler|BalancerV2Sampler|BancorSampler|CurveSampler|DODOSampler|DODOV2Sampler|DummyLiquidityProvider|ERC20BridgeSampler|Eth2DaiSampler|FakeTaker|IBalancer|IBancor|ICurve|IEth2Dai|IKyberNetwork|IMStable|IMooniswap|IMultiBridge|IShell|ISmoothy|IUniswapExchangeQuotes|IUniswapV2Router01|KyberDmmSampler|KyberSampler|LiquidityProviderSampler|MStableSampler|MakerPSMSampler|MooniswapSampler|MultiBridgeSampler|NativeOrderSampler|SamplerUtils|ShellSampler|SmoothySampler|TestERC20BridgeSampler|TestNativeOrderSampler|TwoHopSampler|UniswapSampler|UniswapV2Sampler|UniswapV3Sampler|UtilitySampler).json",
"postpublish": {
"assets": []
}
@@ -60,14 +60,14 @@
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contract-wrappers": "^13.16.1",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-zero-ex": "^0.23.0",
"@0x/contract-addresses": "^6.2.0",
"@0x/contract-wrappers": "^13.16.2",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-zero-ex": "^0.24.0",
"@0x/dev-utils": "^4.2.7",
"@0x/json-schemas": "^6.1.3",
"@0x/protocol-utils": "^1.6.0",
"@0x/quote-server": "^5.0.0",
"@0x/protocol-utils": "^1.6.1",
"@0x/quote-server": "^6.0.2",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
@@ -93,14 +93,14 @@
},
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-exchange-libs": "^4.3.29",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/mesh-rpc-client": "^9.4.2",
"@0x/migrations": "^8.0.6",
"@0x/migrations": "^8.0.7",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -5,7 +5,12 @@ export {
SendTransactionOpts,
} from '@0x/base-contract';
export { ContractAddresses } from '@0x/contract-addresses';
export { V4RFQFirmQuote, V4RFQIndicativeQuote, V4SignedRfqOrder, TakerRequestQueryParams } from '@0x/quote-server';
export {
V4RFQFirmQuote,
V4RFQIndicativeQuote,
V4SignedRfqOrder,
TakerRequestQueryParamsUnnested as TakerRequestQueryParams,
} from '@0x/quote-server';
export { Asset, AssetPairsItem, DecodedLogEvent, EventCallback, IndexedFilterValues } from '@0x/types';
export { BigNumber } from '@0x/utils';
export {

View File

@@ -125,7 +125,7 @@ export class SwapQuoter {
{ block: BlockParamLiteral.Latest, overrides: defaultCodeOverrides },
options.samplerOverrides,
);
const fastAbi = new FastABI(ERC20BridgeSamplerContract.ABI() as MethodAbi[]);
const fastAbi = new FastABI(ERC20BridgeSamplerContract.ABI() as MethodAbi[], { BigNumber });
const samplerContract = new ERC20BridgeSamplerContract(
samplerAddress,
this.provider,

View File

@@ -7,7 +7,8 @@ import {
RfqOrderFields,
Signature,
} from '@0x/protocol-utils';
import { TakerRequestQueryParams, V4SignedRfqOrder } from '@0x/quote-server';
import { TakerRequestQueryParamsUnnested, V4SignedRfqOrder } from '@0x/quote-server';
import { Fee } from '@0x/quote-server/lib/src/types';
import { BigNumber } from '@0x/utils';
import { AxiosRequestConfig } from 'axios';
@@ -232,6 +233,12 @@ export type SwapQuoteOrdersBreakdown = Partial<
* If set to `true` and `ERC20BridgeSource.Native` is part of the `excludedSources`
* array in `SwapQuoteRequestOpts`, an Error will be raised.
*/
export interface RfqmRequestOptions extends RfqRequestOpts {
isLastLook: true;
fee: Fee;
}
export interface RfqRequestOpts {
takerAddress: string;
txOrigin: string;
@@ -242,6 +249,7 @@ export interface RfqRequestOpts {
nativeExclusivelyRFQ?: boolean;
altRfqAssetOfferings?: AltRfqMakerAssetOfferings;
isLastLook?: boolean;
fee?: Fee;
}
/**
@@ -366,7 +374,7 @@ export enum OrderPrunerPermittedFeeTypes {
export interface MockedRfqQuoteResponse {
endpoint: string;
requestApiKey: string;
requestParams: TakerRequestQueryParams;
requestParams: TakerRequestQueryParamsUnnested;
responseData: any;
responseCode: number;
callback?: (config: any) => Promise<any>;

View File

@@ -1,5 +1,5 @@
import { Web3Wrapper } from '@0x/dev-utils';
import { TakerRequestQueryParams, V4RFQFirmQuote, V4RFQIndicativeQuote } from '@0x/quote-server';
import { TakerRequestQueryParamsUnnested, V4RFQFirmQuote, V4RFQIndicativeQuote } from '@0x/quote-server';
import { BigNumber } from '@0x/utils';
import { AxiosInstance, CancelToken } from 'axios';
@@ -123,7 +123,7 @@ export async function returnQuoteFromAltMMAsync<ResponseT>(
takerToken: string,
maxResponseTimeMs: number,
altRfqAssetOfferings: AltRfqMakerAssetOfferings,
takerRequestQueryParams: TakerRequestQueryParams,
takerRequestQueryParams: TakerRequestQueryParamsUnnested,
axiosInstance: AxiosInstance,
warningLogger: LogFunction,
cancelToken: CancelToken,

View File

@@ -14,9 +14,9 @@ import {
JULSWAP_ROUTER_BY_CHAIN_ID,
KYBER_BANNED_RESERVES,
KYBER_BRIDGED_LIQUIDITY_PREFIX,
KYBER_DMM_ROUTER_BY_CHAIN_ID,
MAX_DODOV2_POOLS_QUERIED,
MAX_KYBER_RESERVES_QUERIED,
MSTABLE_POOLS_BY_CHAIN_ID,
NERVE_BSC_INFOS,
NULL_ADDRESS,
PANCAKESWAP_ROUTER_BY_CHAIN_ID,
@@ -86,6 +86,16 @@ export function getComponentForPair(chainId: ChainId, takerToken: string, makerT
.map(i => i.poolAddress);
}
// tslint:disable completed-docs
export function getMStableForPair(chainId: ChainId, takerToken: string, makerToken: string): string[] {
if (chainId !== ChainId.Mainnet) {
return [];
}
return Object.values(MSTABLE_POOLS_BY_CHAIN_ID[chainId])
.filter(c => [makerToken, takerToken].every(t => c.tokens.includes(t)))
.map(i => i.poolAddress);
}
// tslint:disable completed-docs
export function getCurveInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId !== ChainId.Mainnet) {
@@ -221,13 +231,15 @@ export function getShellLikeInfosForPair(
chainId: ChainId,
takerToken: string,
makerToken: string,
source: ERC20BridgeSource.Shell | ERC20BridgeSource.Component,
source: ERC20BridgeSource.Shell | ERC20BridgeSource.Component | ERC20BridgeSource.MStable,
): string[] {
switch (source) {
case ERC20BridgeSource.Shell:
return getShellsForPair(chainId, takerToken, makerToken);
case ERC20BridgeSource.Component:
return getComponentForPair(chainId, takerToken, makerToken);
case ERC20BridgeSource.MStable:
return getMStableForPair(chainId, takerToken, makerToken);
default:
throw new Error(`Unknown Shell like source ${source}`);
}
@@ -301,7 +313,6 @@ export function uniswapV2LikeRouterAddress(
| ERC20BridgeSource.PancakeSwap
| ERC20BridgeSource.PancakeSwapV2
| ERC20BridgeSource.BakerySwap
| ERC20BridgeSource.KyberDmm
| ERC20BridgeSource.ApeSwap
| ERC20BridgeSource.CafeSwap
| ERC20BridgeSource.CheeseSwap
@@ -320,8 +331,6 @@ export function uniswapV2LikeRouterAddress(
return PANCAKESWAPV2_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.BakerySwap:
return BAKERYSWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.KyberDmm:
return KYBER_DMM_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.ApeSwap:
return APESWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.CafeSwap:

View File

@@ -99,6 +99,8 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.Uniswap,
ERC20BridgeSource.UniswapV2,
ERC20BridgeSource.UniswapV3,
ERC20BridgeSource.Curve,
ERC20BridgeSource.Mooniswap,
]),
[ChainId.Rinkeby]: new SourceFilters([ERC20BridgeSource.Native]),
[ChainId.Kovan]: new SourceFilters([ERC20BridgeSource.Native]),
@@ -120,6 +122,7 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.CafeSwap,
ERC20BridgeSource.CheeseSwap,
ERC20BridgeSource.JulSwap,
ERC20BridgeSource.LiquidityProvider,
]),
},
@@ -169,6 +172,8 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.Uniswap,
ERC20BridgeSource.UniswapV2,
ERC20BridgeSource.UniswapV3,
ERC20BridgeSource.Curve,
ERC20BridgeSource.Mooniswap,
]),
[ChainId.Rinkeby]: new SourceFilters([ERC20BridgeSource.Native]),
[ChainId.Kovan]: new SourceFilters([ERC20BridgeSource.Native]),
@@ -190,6 +195,7 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.CafeSwap,
ERC20BridgeSource.CheeseSwap,
ERC20BridgeSource.JulSwap,
ERC20BridgeSource.LiquidityProvider,
]),
},
new SourceFilters([]),
@@ -295,6 +301,7 @@ export const MAINNET_TOKENS = {
crETH: '0xcbc1065255cbc3ab41a6868c22d1f1c573ab89fd',
ankrETH: '0xe95a203b1a91a908f9b9ce46459d101078c2c3cb',
vETH: '0x898bad2774eb97cf6b94605677f43b41871410b1',
HT: '0x6f259637dcD74C767781E37Bc6133cd6A68aa161',
// Mirror Protocol
UST: '0xa47c8bf37f92abed4a126bda807a7b7498661acd',
MIR: '0x09a3ecafa817268f77be1283176b946c4ff2e608',
@@ -414,7 +421,11 @@ export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
'0x2170ed0880ac9a755fd29b2688956bd959f933f8', // ETH
'0x55d398326f99059ff775485246999027b3197955', // BUSD-T
],
[ChainId.Ropsten]: [getContractAddressesForChainOrThrow(ChainId.Ropsten).etherToken],
[ChainId.Ropsten]: [
getContractAddressesForChainOrThrow(ChainId.Ropsten).etherToken,
'0xad6d458402f60fd3bd25163575031acdce07538d', // DAI
'0x07865c6e87b9f70255377e024ace6630c1eaa37f', // USDC
],
},
[],
);
@@ -840,17 +851,21 @@ export const LIQUIDITY_PROVIDER_REGISTRY_BY_CHAIN_ID = valueByChainId<LiquidityP
[ChainId.Mainnet]: {
['0x1d0d407c5af8c86f0a6494de86e56ae21e46a951']: {
tokens: [
MAINNET_TOKENS.WETH,
MAINNET_TOKENS.USDC,
MAINNET_TOKENS.USDT,
MAINNET_TOKENS.WBTC,
MAINNET_TOKENS.PAX,
MAINNET_TOKENS.LINK,
MAINNET_TOKENS.KNC,
MAINNET_TOKENS.MANA,
MAINNET_TOKENS.DAI,
MAINNET_TOKENS.BUSD,
MAINNET_TOKENS.AAVE,
// Disabled temporarily as the swap function requires
// gas price to be provided. Making it difficult to get
// a gas estimate
// MAINNET_TOKENS.WETH,
// MAINNET_TOKENS.USDC,
// MAINNET_TOKENS.USDT,
// MAINNET_TOKENS.WBTC,
// MAINNET_TOKENS.PAX,
// MAINNET_TOKENS.LINK,
// MAINNET_TOKENS.KNC,
// MAINNET_TOKENS.MANA,
// MAINNET_TOKENS.DAI,
// MAINNET_TOKENS.BUSD,
// MAINNET_TOKENS.AAVE,
// MAINNET_TOKENS.HT,
],
gasCost: (takerToken: string, makerToken: string) =>
[takerToken, makerToken].includes(MAINNET_TOKENS.WETH) ? 160e3 : 280e3,
@@ -897,11 +912,29 @@ export const LINKSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
NULL_ADDRESS,
);
export const MSTABLE_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
export const MSTABLE_POOLS_BY_CHAIN_ID = valueByChainId(
{
[ChainId.Mainnet]: '0xe2f2a5c287993345a840db3b0845fbc70f5935a5',
[ChainId.Mainnet]: {
mUSD: {
poolAddress: '0xe2f2a5c287993345a840db3b0845fbc70f5935a5',
tokens: [MAINNET_TOKENS.DAI, MAINNET_TOKENS.USDC, MAINNET_TOKENS.USDT],
},
mBTC: {
poolAddress: '0x945facb997494cc2570096c74b5f66a3507330a1',
tokens: [MAINNET_TOKENS.WBTC, MAINNET_TOKENS.RenBTC, MAINNET_TOKENS.sBTC],
},
},
},
{
mUSD: {
poolAddress: NULL_ADDRESS,
tokens: [] as string[],
},
mBTC: {
poolAddress: NULL_ADDRESS,
tokens: [] as string[],
},
},
NULL_ADDRESS,
);
export const OASIS_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
@@ -913,7 +946,7 @@ export const OASIS_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
export const KYBER_DMM_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.Mainnet]: '0x12807818B584a3Fa65D38B6C25B13983fE888D6E',
[ChainId.Mainnet]: '0x1c87257f5e8609940bc751a07bb085bb7f8cdbe6',
},
NULL_ADDRESS,
);
@@ -1198,7 +1231,7 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
[ERC20BridgeSource.Balancer]: () => 120e3,
[ERC20BridgeSource.BalancerV2]: () => 100e3,
[ERC20BridgeSource.Cream]: () => 120e3,
[ERC20BridgeSource.MStable]: () => 700e3,
[ERC20BridgeSource.MStable]: () => 200e3,
[ERC20BridgeSource.MakerPsm]: (fillData?: FillData) => {
const psmFillData = fillData as MakerPsmFillData;
return psmFillData.takerToken === psmFillData.gemTokenAddress ? 210e3 : 290e3;

View File

@@ -16,6 +16,7 @@ import {
ERC20BridgeSource,
FillData,
GenericRouterFillData,
KyberDmmFillData,
KyberFillData,
LiquidityProviderFillData,
MakerPsmFillData,
@@ -99,8 +100,6 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
return encodeBridgeSourceId(BridgeProtocol.Dodo, 'Dodo');
case ERC20BridgeSource.Kyber:
return encodeBridgeSourceId(BridgeProtocol.Kyber, 'Kyber');
case ERC20BridgeSource.KyberDmm:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'KyberDmm');
case ERC20BridgeSource.LiquidityProvider:
// "LiquidityProvider" is too long to encode (17 characters).
return encodeBridgeSourceId(BridgeProtocol.Unknown, 'LP');
@@ -158,6 +157,8 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'JulSwap');
case ERC20BridgeSource.UniswapV3:
return encodeBridgeSourceId(BridgeProtocol.UniswapV3, 'UniswapV3');
case ERC20BridgeSource.KyberDmm:
return encodeBridgeSourceId(BridgeProtocol.KyberDmm, 'KyberDmm');
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -217,7 +218,6 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
case ERC20BridgeSource.PancakeSwap:
case ERC20BridgeSource.PancakeSwapV2:
case ERC20BridgeSource.BakerySwap:
case ERC20BridgeSource.KyberDmm:
case ERC20BridgeSource.ApeSwap:
case ERC20BridgeSource.CafeSwap:
case ERC20BridgeSource.CheeseSwap:
@@ -274,6 +274,14 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
const uniswapV3FillData = (order as OptimizedMarketBridgeOrder<FinalUniswapV3FillData>).fillData;
bridgeData = encoder.encode([uniswapV3FillData.router, uniswapV3FillData.uniswapPath]);
break;
case ERC20BridgeSource.KyberDmm:
const kyberDmmFillData = (order as OptimizedMarketBridgeOrder<KyberDmmFillData>).fillData;
bridgeData = encoder.encode([
kyberDmmFillData.router,
kyberDmmFillData.poolsPath,
kyberDmmFillData.tokenAddressPath,
]);
break;
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -390,7 +398,6 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.SushiSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.CryptoCom]: routerAddressPathEncoder,
[ERC20BridgeSource.Linkswap]: routerAddressPathEncoder,
[ERC20BridgeSource.KyberDmm]: routerAddressPathEncoder,
// BSC
[ERC20BridgeSource.PancakeSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.PancakeSwapV2]: routerAddressPathEncoder,
@@ -415,6 +422,7 @@ export const BRIDGE_ENCODERS: {
{ name: 'router', type: 'address' },
{ name: 'path', type: 'bytes' },
]),
[ERC20BridgeSource.KyberDmm]: AbiEncoder.create('(address,address[],address[])'),
};
function getFillTokenAmounts(fill: CollapsedFill, side: MarketOperation): [BigNumber, BigNumber] {

View File

@@ -23,13 +23,13 @@ import {
DODO_CONFIG_BY_CHAIN_ID,
DODOV2_FACTORIES_BY_CHAIN_ID,
KYBER_CONFIG_BY_CHAIN_ID,
KYBER_DMM_ROUTER_BY_CHAIN_ID,
LINKSWAP_ROUTER_BY_CHAIN_ID,
LIQUIDITY_PROVIDER_REGISTRY_BY_CHAIN_ID,
MAINNET_TOKENS,
MAKER_PSM_INFO_BY_CHAIN_ID,
MAX_UINT256,
MOONISWAP_REGISTRIES_BY_CHAIN_ID,
MSTABLE_ROUTER_BY_CHAIN_ID,
NATIVE_FEE_TOKEN_BY_CHAIN_ID,
NULL_ADDRESS,
NULL_BYTES,
@@ -57,6 +57,7 @@ import {
ERC20BridgeSource,
GenericRouterFillData,
HopInfo,
KyberDmmFillData,
KyberFillData,
KyberSamplerOpts,
LiquidityProviderFillData,
@@ -237,6 +238,52 @@ export class SamplerOperations {
});
}
public getKyberDmmSellQuotes(
router: string,
tokenAddressPath: string[],
takerFillAmounts: BigNumber[],
): SourceQuoteOperation<KyberDmmFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.KyberDmm,
contract: this._samplerContract,
function: this._samplerContract.sampleSellsFromKyberDmm,
params: [router, tokenAddressPath, takerFillAmounts],
callback: (callResults: string, fillData: KyberDmmFillData): BigNumber[] => {
const [pools, samples] = this._samplerContract.getABIDecodedReturnData<[string[], BigNumber[]]>(
'sampleSellsFromKyberDmm',
callResults,
);
fillData.poolsPath = pools;
fillData.router = router;
fillData.tokenAddressPath = tokenAddressPath;
return samples;
},
});
}
public getKyberDmmBuyQuotes(
router: string,
tokenAddressPath: string[],
makerFillAmounts: BigNumber[],
): SourceQuoteOperation<KyberDmmFillData> {
return new SamplerContractOperation({
source: ERC20BridgeSource.KyberDmm,
contract: this._samplerContract,
function: this._samplerContract.sampleBuysFromKyberDmm,
params: [router, tokenAddressPath, makerFillAmounts],
callback: (callResults: string, fillData: KyberDmmFillData): BigNumber[] => {
const [pools, samples] = this._samplerContract.getABIDecodedReturnData<[string[], BigNumber[]]>(
'sampleBuysFromKyberDmm',
callResults,
);
fillData.poolsPath = pools;
fillData.router = router;
fillData.tokenAddressPath = tokenAddressPath;
return samples;
},
});
}
public getUniswapSellQuotes(
router: string,
makerToken: string,
@@ -1135,7 +1182,6 @@ export class SamplerOperations {
case ERC20BridgeSource.PancakeSwap:
case ERC20BridgeSource.PancakeSwapV2:
case ERC20BridgeSource.BakerySwap:
case ERC20BridgeSource.KyberDmm:
case ERC20BridgeSource.ApeSwap:
case ERC20BridgeSource.CafeSwap:
case ERC20BridgeSource.CheeseSwap:
@@ -1148,6 +1194,16 @@ export class SamplerOperations {
[takerToken, makerToken],
...intermediateTokens.map(t => [takerToken, t, makerToken]),
].map(path => this.getUniswapV2SellQuotes(uniLikeRouter, path, takerFillAmounts, source));
case ERC20BridgeSource.KyberDmm:
const kyberDmmRouter = KYBER_DMM_ROUTER_BY_CHAIN_ID[this.chainId];
if (!isValidAddress(kyberDmmRouter)) {
return [];
}
return this.getKyberDmmSellQuotes(
kyberDmmRouter,
[takerToken, makerToken],
takerFillAmounts,
);
case ERC20BridgeSource.Kyber:
return getKyberOffsets().map(offset =>
this.getKyberSellQuotes(
@@ -1204,14 +1260,9 @@ export class SamplerOperations {
),
);
case ERC20BridgeSource.MStable:
return isValidAddress(MSTABLE_ROUTER_BY_CHAIN_ID[this.chainId])
? this.getMStableSellQuotes(
MSTABLE_ROUTER_BY_CHAIN_ID[this.chainId],
makerToken,
takerToken,
takerFillAmounts,
)
: [];
return getShellLikeInfosForPair(this.chainId, takerToken, makerToken, source).map(pool =>
this.getMStableSellQuotes(pool, makerToken, takerToken, takerFillAmounts),
);
case ERC20BridgeSource.Mooniswap:
return [
...MOONISWAP_REGISTRIES_BY_CHAIN_ID[this.chainId]
@@ -1387,7 +1438,6 @@ export class SamplerOperations {
case ERC20BridgeSource.PancakeSwap:
case ERC20BridgeSource.PancakeSwapV2:
case ERC20BridgeSource.BakerySwap:
case ERC20BridgeSource.KyberDmm:
case ERC20BridgeSource.ApeSwap:
case ERC20BridgeSource.CafeSwap:
case ERC20BridgeSource.CheeseSwap:
@@ -1400,6 +1450,16 @@ export class SamplerOperations {
[takerToken, makerToken],
...intermediateTokens.map(t => [takerToken, t, makerToken]),
].map(path => this.getUniswapV2BuyQuotes(uniLikeRouter, path, makerFillAmounts, source));
case ERC20BridgeSource.KyberDmm:
const kyberDmmRouter = KYBER_DMM_ROUTER_BY_CHAIN_ID[this.chainId];
if (!isValidAddress(kyberDmmRouter)) {
return [];
}
return this.getKyberDmmBuyQuotes(
kyberDmmRouter,
[takerToken, makerToken],
makerFillAmounts,
);
case ERC20BridgeSource.Kyber:
return getKyberOffsets().map(offset =>
this.getKyberBuyQuotes(
@@ -1456,14 +1516,9 @@ export class SamplerOperations {
),
);
case ERC20BridgeSource.MStable:
return isValidAddress(MSTABLE_ROUTER_BY_CHAIN_ID[this.chainId])
? this.getMStableBuyQuotes(
MSTABLE_ROUTER_BY_CHAIN_ID[this.chainId],
makerToken,
takerToken,
makerFillAmounts,
)
: [];
return getShellLikeInfosForPair(this.chainId, takerToken, makerToken, source).map(pool =>
this.getMStableBuyQuotes(pool, makerToken, takerToken, makerFillAmounts),
);
case ERC20BridgeSource.Mooniswap:
return [
...MOONISWAP_REGISTRIES_BY_CHAIN_ID[this.chainId]

View File

@@ -224,6 +224,10 @@ export interface UniswapV3FillData extends FillData {
pathAmounts: Array<{ uniswapPath: string; inputAmount: BigNumber }>;
}
export interface KyberDmmFillData extends UniswapV2FillData {
poolsPath: string[];
}
/**
* Represents a node on a fill path.
*/

View File

@@ -1,6 +1,12 @@
import { schemas, SchemaValidator } from '@0x/json-schemas';
import { FillQuoteTransformerOrderType, Signature } from '@0x/protocol-utils';
import { TakerRequestQueryParams, V4RFQFirmQuote, V4RFQIndicativeQuote, V4SignedRfqOrder } from '@0x/quote-server';
import {
TakerRequestQueryParamsUnnested,
V4RFQFirmQuote,
V4RFQIndicativeQuote,
V4SignedRfqOrder,
} from '@0x/quote-server';
import { Fee } from '@0x/quote-server/lib/src/types';
import { BigNumber, NULL_ADDRESS } from '@0x/utils';
import axios, { AxiosInstance } from 'axios';
@@ -11,6 +17,7 @@ import {
LogFunction,
MarketOperation,
RfqMakerAssetOfferings,
RfqmRequestOptions,
RfqPairType,
RfqRequestOpts,
SignedNativeOrder,
@@ -84,7 +91,8 @@ export class QuoteRequestor {
assetFillAmount: BigNumber,
comparisonPrice?: BigNumber,
isLastLook?: boolean | undefined,
): TakerRequestQueryParams {
fee?: Fee | undefined,
): TakerRequestQueryParamsUnnested {
const { buyAmountBaseUnits, sellAmountBaseUnits } =
marketOperation === MarketOperation.Buy
? {
@@ -97,7 +105,7 @@ export class QuoteRequestor {
};
const requestParamsWithBigNumbers: Pick<
TakerRequestQueryParams,
TakerRequestQueryParamsUnnested,
| 'txOrigin'
| 'takerAddress'
| 'buyTokenAddress'
@@ -105,6 +113,9 @@ export class QuoteRequestor {
| 'comparisonPrice'
| 'isLastLook'
| 'protocolVersion'
| 'feeAmount'
| 'feeToken'
| 'feeType'
> = {
txOrigin,
takerAddress,
@@ -114,7 +125,13 @@ export class QuoteRequestor {
protocolVersion: '4',
};
if (isLastLook) {
if (fee === undefined) {
throw new Error(`isLastLook cannot be passed without a fee parameter`);
}
requestParamsWithBigNumbers.isLastLook = isLastLook.toString();
requestParamsWithBigNumbers.feeAmount = fee.amount.toString();
requestParamsWithBigNumbers.feeToken = fee.token;
requestParamsWithBigNumbers.feeType = fee.type;
}
// convert BigNumbers to strings
@@ -181,12 +198,11 @@ export class QuoteRequestor {
assetFillAmount: BigNumber,
marketOperation: MarketOperation,
comparisonPrice: BigNumber | undefined,
options: RfqRequestOpts,
options: RfqmRequestOptions,
): Promise<SignedNativeOrder[]> {
const _opts: RfqRequestOpts = {
...constants.DEFAULT_RFQT_REQUEST_OPTS,
...options,
isLastLook: true,
};
return this._fetchAndValidateFirmQuotesAsync(
@@ -230,12 +246,11 @@ export class QuoteRequestor {
assetFillAmount: BigNumber,
marketOperation: MarketOperation,
comparisonPrice: BigNumber | undefined,
options: RfqRequestOpts,
options: RfqmRequestOptions,
): Promise<V4RFQIndicativeQuote[]> {
const _opts: RfqRequestOpts = {
...constants.DEFAULT_RFQT_REQUEST_OPTS,
...options,
isLastLook: true,
};
return this._fetchAndValidateIndicativeQuotesAsync(
@@ -344,6 +359,7 @@ export class QuoteRequestor {
assetFillAmount,
comparisonPrice,
options.isLastLook,
options.fee,
);
const quotePath = (() => {

View File

@@ -29,6 +29,7 @@ import * as IShell from '../test/generated-artifacts/IShell.json';
import * as ISmoothy from '../test/generated-artifacts/ISmoothy.json';
import * as IUniswapExchangeQuotes from '../test/generated-artifacts/IUniswapExchangeQuotes.json';
import * as IUniswapV2Router01 from '../test/generated-artifacts/IUniswapV2Router01.json';
import * as KyberDmmSampler from '../test/generated-artifacts/KyberDmmSampler.json';
import * as KyberSampler from '../test/generated-artifacts/KyberSampler.json';
import * as LiquidityProviderSampler from '../test/generated-artifacts/LiquidityProviderSampler.json';
import * as MakerPSMSampler from '../test/generated-artifacts/MakerPSMSampler.json';
@@ -58,6 +59,7 @@ export const artifacts = {
ERC20BridgeSampler: ERC20BridgeSampler as ContractArtifact,
Eth2DaiSampler: Eth2DaiSampler as ContractArtifact,
FakeTaker: FakeTaker as ContractArtifact,
KyberDmmSampler: KyberDmmSampler as ContractArtifact,
KyberSampler: KyberSampler as ContractArtifact,
LiquidityProviderSampler: LiquidityProviderSampler as ContractArtifact,
MStableSampler: MStableSampler as ContractArtifact,

View File

@@ -395,7 +395,7 @@ describe('MarketOperationUtils tests', () => {
[ERC20BridgeSource.Uniswap]: { router: randomAddress() },
[ERC20BridgeSource.Eth2Dai]: { router: randomAddress() },
[ERC20BridgeSource.MakerPsm]: {},
[ERC20BridgeSource.KyberDmm]: { tokenAddressPath: [] },
[ERC20BridgeSource.KyberDmm]: { tokenAddressPath: [], router: randomAddress(), poolsPath: [] },
};
const DEFAULT_OPS = {

View File

@@ -1,6 +1,6 @@
import { tokenUtils } from '@0x/dev-utils';
import { FillQuoteTransformerOrderType, SignatureType } from '@0x/protocol-utils';
import { TakerRequestQueryParams, V4RFQIndicativeQuote } from '@0x/quote-server';
import { ETH_TOKEN_ADDRESS, FillQuoteTransformerOrderType, SignatureType } from '@0x/protocol-utils';
import { TakerRequestQueryParamsUnnested, V4RFQIndicativeQuote } from '@0x/quote-server';
import { StatusCodes } from '@0x/types';
import { BigNumber, logUtils } from '@0x/utils';
import Axios from 'axios';
@@ -75,7 +75,7 @@ describe('QuoteRequestor', async () => {
const mockedRequests: MockedRfqQuoteResponse[] = [];
const altMockedRequests: AltMockedRfqQuoteResponse[] = [];
const expectedParams: TakerRequestQueryParams = {
const expectedParams: TakerRequestQueryParamsUnnested = {
sellTokenAddress: takerToken,
buyTokenAddress: makerToken,
sellAmountBaseUnits: '10000',
@@ -84,6 +84,9 @@ describe('QuoteRequestor', async () => {
txOrigin,
isLastLook: 'true', // the major difference between RFQ-T and RFQ-M
protocolVersion: '4',
feeAmount: '1000000000',
feeToken: ETH_TOKEN_ADDRESS,
feeType: 'fixed',
};
const mockedDefaults = {
requestApiKey: apiKey,
@@ -242,6 +245,12 @@ describe('QuoteRequestor', async () => {
txOrigin: takerAddress,
intentOnFilling: true,
altRfqAssetOfferings,
isLastLook: true,
fee: {
amount: new BigNumber('1000000000'),
token: ETH_TOKEN_ADDRESS,
type: 'fixed',
},
},
);
expect(resp).to.deep.eq([
@@ -265,7 +274,7 @@ describe('QuoteRequestor', async () => {
const mockedRequests: MockedRfqQuoteResponse[] = [];
const altMockedRequests: AltMockedRfqQuoteResponse[] = [];
const expectedParams: TakerRequestQueryParams = {
const expectedParams: TakerRequestQueryParamsUnnested = {
sellTokenAddress: takerToken,
buyTokenAddress: makerToken,
sellAmountBaseUnits: '10000',
@@ -451,7 +460,7 @@ describe('QuoteRequestor', async () => {
// Set up RFQ responses
// tslint:disable-next-line:array-type
const mockedRequests: MockedRfqQuoteResponse[] = [];
const expectedParams: TakerRequestQueryParams = {
const expectedParams: TakerRequestQueryParamsUnnested = {
sellTokenAddress: takerToken,
buyTokenAddress: makerToken,
sellAmountBaseUnits: '10000',
@@ -460,6 +469,9 @@ describe('QuoteRequestor', async () => {
txOrigin: takerAddress,
isLastLook: 'true', // the major difference between RFQ-T and RFQ-M
protocolVersion: '4',
feeAmount: '1000000000',
feeToken: ETH_TOKEN_ADDRESS,
feeType: 'fixed',
};
const mockedDefaults = {
requestApiKey: apiKey,
@@ -543,6 +555,12 @@ describe('QuoteRequestor', async () => {
takerAddress,
txOrigin: takerAddress,
intentOnFilling: true,
isLastLook: true,
fee: {
type: 'fixed',
token: ETH_TOKEN_ADDRESS,
amount: new BigNumber('1000000000'),
},
},
);
expect(resp.sort()).to.eql([successfulQuote1, successfulQuote1].sort());
@@ -571,7 +589,7 @@ describe('QuoteRequestor', async () => {
// Set up RFQT responses
// tslint:disable-next-line:array-type
const mockedRequests: MockedRfqQuoteResponse[] = [];
const expectedParams: TakerRequestQueryParams = {
const expectedParams: TakerRequestQueryParamsUnnested = {
sellTokenAddress: takerToken,
buyTokenAddress: makerToken,
sellAmountBaseUnits: '10000',
@@ -678,7 +696,7 @@ describe('QuoteRequestor', async () => {
// Set up RFQT responses
// tslint:disable-next-line:array-type
const mockedRequests: MockedRfqQuoteResponse[] = [];
const expectedParams: TakerRequestQueryParams = {
const expectedParams: TakerRequestQueryParamsUnnested = {
sellTokenAddress: takerToken,
buyTokenAddress: makerToken,
sellAmountBaseUnits: '10000',
@@ -763,7 +781,7 @@ describe('QuoteRequestor', async () => {
// Set up RFQT responses
// tslint:disable-next-line:array-type
const mockedRequests: MockedRfqQuoteResponse[] = [];
const expectedParams: TakerRequestQueryParams = {
const expectedParams: TakerRequestQueryParamsUnnested = {
sellTokenAddress: takerToken,
buyTokenAddress: makerToken,
buyAmountBaseUnits: '10000',

View File

@@ -27,6 +27,7 @@ export * from '../test/generated-wrappers/i_shell';
export * from '../test/generated-wrappers/i_smoothy';
export * from '../test/generated-wrappers/i_uniswap_exchange_quotes';
export * from '../test/generated-wrappers/i_uniswap_v2_router01';
export * from '../test/generated-wrappers/kyber_dmm_sampler';
export * from '../test/generated-wrappers/kyber_sampler';
export * from '../test/generated-wrappers/liquidity_provider_sampler';
export * from '../test/generated-wrappers/m_stable_sampler';

View File

@@ -30,6 +30,7 @@
"test/generated-artifacts/ISmoothy.json",
"test/generated-artifacts/IUniswapExchangeQuotes.json",
"test/generated-artifacts/IUniswapV2Router01.json",
"test/generated-artifacts/KyberDmmSampler.json",
"test/generated-artifacts/KyberSampler.json",
"test/generated-artifacts/LiquidityProviderSampler.json",
"test/generated-artifacts/MStableSampler.json",

View File

@@ -1,4 +1,14 @@
[
{
"version": "6.2.0",
"changes": [
{
"note": "Deployed FQT on mainnet and ropsten for `KyberDMM`",
"pr": 247
}
],
"timestamp": 1621600614
},
{
"version": "6.1.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.2.0 - _May 21, 2021_
* Deployed FQT on mainnet and ropsten for `KyberDMM` (#247)
## v6.1.0 - _May 5, 2021_
* Deployed FQT on mainnet and ropsten for `Balancer_V2` (#225)

View File

@@ -36,7 +36,7 @@
"wethTransformer": "0xb2bc06a4efb20fc6553a69dbfa49b7be938034a7",
"payTakerTransformer": "0x4638a7ebe75b911b995d0ec73a81e4f85f41f24e",
"affiliateFeeTransformer": "0xda6d9fc5998f550a094585cf9171f0e8ee3ac59f",
"fillQuoteTransformer": "0x2bbb4abc672bc92821c99c7204afe8f25bdbc9e1",
"fillQuoteTransformer": "0xd12a34076a4d9eac4cb82d87411d958641d0db9b",
"positiveSlippageFeeTransformer": "0xa9416ce1dbde8d331210c07b5c253d94ee4cc3fd"
}
},
@@ -77,7 +77,7 @@
"wethTransformer": "0x05ad19aa3826e0609a19568ffbd1dfe86c6c7184",
"payTakerTransformer": "0x6d0ebf2bcd9cc93ec553b60ad201943dcca4e291",
"affiliateFeeTransformer": "0x6588256778ca4432fa43983ac685c45efb2379e2",
"fillQuoteTransformer": "0xb5c0603014989c4dc4feda01b7bc763953aff02a",
"fillQuoteTransformer": "0xfdabf2a405034fd9034ddc51ba1189cbed6bd651",
"positiveSlippageFeeTransformer": "0x8b332f700fd37e71c5c5b26c4d78b5ca63dd33b2"
}
},

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-addresses",
"version": "6.1.0",
"version": "6.2.0",
"engines": {
"node": ">=6.12"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers-test",
"version": "12.2.45",
"version": "12.2.46",
"engines": {
"node": ">=6.12"
},
@@ -31,11 +31,11 @@
},
"homepage": "https://github.com/0xProject/protocol/tree/main/packages/contract-wrappers-test",
"devDependencies": {
"@0x/contract-wrappers": "^13.16.1",
"@0x/contracts-test-utils": "^5.4.0",
"@0x/contract-wrappers": "^13.16.2",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.6",
"@0x/order-utils": "^10.4.21",
"@0x/migrations": "^8.0.7",
"@0x/order-utils": "^10.4.22",
"@0x/subproviders": "^6.5.3",
"@0x/ts-doc-gen": "^0.0.28",
"@0x/tslint-config": "^4.1.4",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "13.16.2",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "13.16.1",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v13.16.2 - _May 21, 2021_
* Dependencies updated
## v13.16.1 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers",
"version": "13.16.1",
"version": "13.16.2",
"engines": {
"node": ">=6.12"
},
@@ -57,7 +57,7 @@
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contract-addresses": "^6.2.0",
"@0x/json-schemas": "^6.1.3",
"@0x/types": "^3.3.3",
"@0x/utils": "^6.4.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "8.0.7",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "8.0.6",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v8.0.7 - _May 21, 2021_
* Dependencies updated
## v8.0.6 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/migrations",
"version": "8.0.6",
"version": "8.0.7",
"engines": {
"node": ">=6.12"
},
@@ -68,20 +68,20 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.0",
"@0x/contract-addresses": "^6.1.0",
"@0x/contracts-asset-proxy": "^3.7.11",
"@0x/contracts-coordinator": "^3.1.30",
"@0x/contracts-dev-utils": "^1.3.28",
"@0x/contracts-erc1155": "^2.1.29",
"@0x/contracts-erc20": "^3.3.8",
"@0x/contracts-erc721": "^3.1.29",
"@0x/contracts-exchange": "^3.2.30",
"@0x/contracts-exchange-forwarder": "^4.2.30",
"@0x/contracts-extensions": "^6.2.24",
"@0x/contracts-multisig": "^4.1.30",
"@0x/contracts-staking": "^2.0.37",
"@0x/contracts-utils": "^4.7.8",
"@0x/contracts-zero-ex": "^0.23.0",
"@0x/contract-addresses": "^6.2.0",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-coordinator": "^3.1.31",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc1155": "^2.1.30",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-erc721": "^3.1.30",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-exchange-forwarder": "^4.2.31",
"@0x/contracts-extensions": "^6.2.25",
"@0x/contracts-multisig": "^4.1.31",
"@0x/contracts-staking": "^2.0.38",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-zero-ex": "^0.24.0",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "10.4.22",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1620214333,
"version": "10.4.21",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v10.4.22 - _May 21, 2021_
* Dependencies updated
## v10.4.21 - _May 5, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/order-utils",
"version": "10.4.21",
"version": "10.4.22",
"engines": {
"node": ">=6.12"
},
@@ -69,8 +69,8 @@
},
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/contract-addresses": "^6.1.0",
"@0x/contract-wrappers": "^13.16.1",
"@0x/contract-addresses": "^6.2.0",
"@0x/contract-wrappers": "^13.16.2",
"@0x/json-schemas": "^6.1.3",
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621600614,
"version": "1.6.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "1.6.0",
"changes": [

Some files were not shown because too many files have changed in this diff Show More