Compare commits

..

7 Commits

Author SHA1 Message Date
Github Actions
289474e2ce Publish
- @0x/contracts-integrations@2.7.47
 - @0x/contracts-treasury@1.2.0
 - @0x/asset-swapper@6.17.0
2021-05-27 22:22:14 +00:00
Github Actions
407ca21168 Updated CHANGELOGS & MD docs 2021-05-27 22:22:09 +00:00
mzhu25
5c68fc24d2 Miscellaneous Liquidity Provider changes (#253)
* Update KNC address and reenable PLP

* Enable PLP VIP on BSC
2021-05-25 14:01:07 -07:00
mzhu25
548800e0a9 Add proposal 0 params and mainnet fork test (#252) 2021-05-25 13:48:34 -07:00
Github Actions
bde3d6dc6a Publish
- @0x/contracts-asset-proxy@3.7.13
 - @0x/contracts-broker@1.1.31
 - @0x/contracts-coordinator@3.1.32
 - @0x/contracts-dev-utils@1.3.30
 - @0x/contracts-erc1155@2.1.31
 - @0x/contracts-erc20@3.3.10
 - @0x/contracts-erc721@3.1.31
 - @0x/contracts-exchange-forwarder@4.2.32
 - @0x/contracts-exchange-libs@4.3.31
 - @0x/contracts-exchange@3.2.32
 - @0x/contracts-extensions@6.2.26
 - @0x/contracts-integrations@2.7.46
 - @0x/contracts-multisig@4.1.32
 - @0x/contracts-staking@2.0.39
 - @0x/contracts-test-utils@5.4.2
 - @0x/contracts-treasury@1.1.8
 - @0x/contracts-utils@4.7.10
 - @0x/contracts-zero-ex@0.24.1
 - @0x/asset-swapper@6.16.0
 - @0x/contract-addresses@6.3.0
 - @0x/contract-wrappers-test@12.2.47
 - @0x/contract-wrappers@13.16.3
 - @0x/migrations@8.0.8
 - @0x/order-utils@10.4.23
 - @0x/protocol-utils@1.6.2
2021-05-25 12:13:43 +00:00
Github Actions
56550a6acc Updated CHANGELOGS & MD docs 2021-05-25 12:13:38 +00:00
Kim Persson
e51b83accc Polygon support (#240)
* feat: Polygon deployed

* Updated polygon FQT address

* feat: add SushiSwap on Polygon WIP

* fix: add Matic as a native token

* refactor: import valueByChainId from token-metadata to consolidate impl

* refactor: use same gas schedule fn for all uni v2 clones

* feat: Add QuickSwap Polygon integration

* fix: add Polygon tokens to initial TokenAdjacencyGraph

* feat: ComethSwap Polygon integration

* feat: Add Curve, Dfyn, mStable for Polygon

* fix: temporarily private publish contract-addresses, token-metadata

* feat: Add DODO V2 support for polygon, stability pool on mainnet, bsc

* chore: fix linting

* fix: incorrect Curve Polygon gas schedule

Co-authored-by: Jacob Evans <jacob@dekz.net>

* refator: consolidate Polygon token addresses in POLYGON_TOKENS

* feat: Polygon DODO V1 integration

* fix: remove dependency on @0x/token-metadata

* chore: remove private publish dependencies and add changelog entry

Co-authored-by: Jacob Evans <jacob@dekz.net>
Co-authored-by: Romain Butteaud <romain.butteaud@gmail.com>
2021-05-25 13:40:52 +02:00
81 changed files with 999 additions and 310 deletions

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-asset-proxy",
"version": "3.7.12",
"version": "3.7.13",
"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.2",
"@0x/contract-wrappers": "^13.16.3",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@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.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/contracts-erc1155": "^2.1.31",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/order-utils": "^10.4.23",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-broker",
"version": "1.1.30",
"version": "1.1.31",
"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.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-asset-proxy": "^3.7.13",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@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.22",
"@0x/order-utils": "^10.4.23",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0"

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-coordinator",
"version": "3.1.31",
"version": "3.1.32",
"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.12",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-dev-utils": "^1.3.30",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-gen": "^2.0.38",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.22",
"@0x/order-utils": "^10.4.23",
"@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.2.0",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contract-addresses": "^6.3.0",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@0x/json-schemas": "^6.1.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-dev-utils",
"version": "1.3.29",
"version": "1.3.30",
"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.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-test-utils": "^5.4.2",
"@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": 1621944788,
"version": "2.1.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "2.1.30",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc1155",
"version": "2.1.30",
"version": "2.1.31",
"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.9",
"@0x/contracts-utils": "^4.7.10",
"@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.1",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/utils": "^6.4.3",
"@0x/web3-wrapper": "^7.5.3",
"lodash": "^4.17.11"

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc20",
"version": "3.3.9",
"version": "3.3.10",
"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.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@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": 1621944788,
"version": "3.1.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "3.1.30",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-erc721",
"version": "3.1.30",
"version": "3.1.31",
"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.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@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": 1621944788,
"version": "4.2.32",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "4.2.31",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange-forwarder",
"version": "4.2.31",
"version": "4.2.32",
"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.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-asset-proxy": "^3.7.13",
"@0x/contracts-dev-utils": "^1.3.30",
"@0x/contracts-erc1155": "^2.1.31",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.22",
"@0x/order-utils": "^10.4.23",
"@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": 1621944788,
"version": "4.3.31",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "4.3.30",

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-exchange",
"version": "3.2.31",
"version": "3.2.32",
"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.12",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-gen": "^2.0.38",
"@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/contracts-multisig": "^4.1.32",
"@0x/contracts-staking": "^2.0.39",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@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.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/contracts-dev-utils": "^1.3.30",
"@0x/contracts-erc1155": "^2.1.31",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/order-utils": "^10.4.23",
"@0x/utils": "^6.4.3",
"lodash": "^4.17.11"
},

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-extensions",
"version": "6.2.25",
"version": "6.2.26",
"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.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-asset-proxy": "^3.7.13",
"@0x/contracts-dev-utils": "^1.3.30",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-utils": "^4.7.10",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.22",
"@0x/order-utils": "^10.4.23",
"@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.1",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/typescript-typings": "^5.2.0",
"ethereum-types": "^3.5.0"
},

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-integrations",
"version": "2.7.45",
"version": "2.7.47",
"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.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/contract-addresses": "^6.3.0",
"@0x/contract-wrappers": "^13.16.3",
"@0x/contracts-broker": "^1.1.31",
"@0x/contracts-coordinator": "^3.1.32",
"@0x/contracts-dev-utils": "^1.3.30",
"@0x/contracts-exchange-forwarder": "^4.2.32",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-extensions": "^6.2.26",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-utils": "^4.7.10",
"@0x/coordinator-server": "^1.0.5",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.7",
"@0x/order-utils": "^10.4.22",
"@0x/protocol-utils": "^1.6.1",
"@0x/migrations": "^8.0.8",
"@0x/order-utils": "^10.4.23",
"@0x/protocol-utils": "^1.6.2",
"@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.15.0",
"@0x/asset-swapper": "^6.17.0",
"@0x/base-contract": "^6.4.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/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-erc1155": "^2.1.31",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-multisig": "^4.1.32",
"@0x/contracts-staking": "^2.0.39",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-zero-ex": "^0.24.1",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-multisig",
"version": "4.1.31",
"version": "4.1.32",
"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.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@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": 1621944788,
"version": "2.0.39",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "2.0.38",

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-staking",
"version": "2.0.38",
"version": "2.0.39",
"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.12",
"@0x/contracts-dev-utils": "^1.3.29",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-dev-utils": "^1.3.30",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-utils": "^4.7.10",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.22",
"@0x/order-utils": "^10.4.23",
"@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.1",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/typescript-typings": "^5.2.0",
"@0x/utils": "^6.4.3",
"ethereum-types": "^3.5.0",

View File

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

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v5.4.2 - _May 25, 2021_
* Dependencies updated
## v5.4.1 - _May 21, 2021_
* Dependencies updated

View File

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

View File

@@ -1,4 +1,23 @@
[
{
"version": "1.2.0",
"changes": [
{
"note": "Added proposal 0 params and test",
"pr": 252
}
],
"timestamp": 1622154125
},
{
"timestamp": 1621944788,
"version": "1.1.8",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "1.1.7",

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v1.2.0 - _May 27, 2021_
* Added proposal 0 params and test (#252)
## v1.1.8 - _May 25, 2021_
* Dependencies updated
## v1.1.7 - _May 21, 2021_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-treasury",
"version": "1.1.7",
"version": "1.2.0",
"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.2.0",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contract-addresses": "^6.3.0",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-staking": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-staking": "^2.0.39",
"@0x/contracts-test-utils": "^5.4.2",
"@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.1",
"@0x/protocol-utils": "^1.6.2",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,154 @@
import { artifacts as erc20Artifacts, ERC20TokenEvents } from '@0x/contracts-erc20';
import { StakingContract, StakingProxyContract } from '@0x/contracts-staking';
import { blockchainTests, constants, verifyEventsFromLogs } from '@0x/contracts-test-utils';
import { BigNumber, hexUtils, logUtils } from '@0x/utils';
import * as _ from 'lodash';
import { proposals } from '../src/proposals';
import { artifacts } from './artifacts';
import { ZrxTreasuryContract, ZrxTreasuryEvents } from './wrappers';
const SUBGRAPH_URL = 'https://api.thegraph.com/subgraphs/name/mzhu25/zeroex-staking';
const STAKING_PROXY_ADDRESS = '0xa26e80e7dea86279c6d778d702cc413e6cffa777';
const TREASURY_ADDRESS = '0x0bb1810061c2f5b2088054ee184e6c79e1591101';
const PROPOSER = process.env.PROPOSER || constants.NULL_ADDRESS;
const VOTER = '0xba4f44e774158408e2dc6c5cb65bc995f0a89180';
const VOTER_OPERATED_POOLS = ['0x0000000000000000000000000000000000000000000000000000000000000017'];
blockchainTests.configure({
fork: {
unlockedAccounts: [PROPOSER, VOTER],
},
});
async function querySubgraphAsync(operatorAddress: string): Promise<string[]> {
const query = `
{
stakingActor(id: "${operatorAddress}") {
operatedPools {
id
}
}
}
`;
const response = await fetch(SUBGRAPH_URL, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
query,
}),
});
const {
data: { stakingActor },
} = await response.json();
if (stakingActor) {
return stakingActor.operatedPools.map((pool: { id: string }) => hexUtils.leftPad(pool.id));
} else {
return [];
}
}
blockchainTests.fork.skip('Treasury proposal mainnet fork tests', env => {
let staking: StakingContract;
let stakingProxy: StakingProxyContract;
let treasury: ZrxTreasuryContract;
let votingPeriod: BigNumber;
async function fastForwardToNextEpochAsync(): Promise<void> {
const epochEndTime = await staking.getCurrentEpochEarliestEndTimeInSeconds().callAsync();
const lastBlockTime = await env.web3Wrapper.getBlockTimestampAsync('latest');
const dt = Math.max(0, epochEndTime.minus(lastBlockTime).toNumber());
await env.web3Wrapper.increaseTimeAsync(dt);
// mine next block
await env.web3Wrapper.mineBlockAsync();
const lastPoolId = new BigNumber(await staking.lastPoolId().callAsync(), 16);
const batchExecuteCalldata = [
...[...new Array(lastPoolId.toNumber())].map((_x, i) =>
staking.finalizePool(hexUtils.leftPad(i + 1)).getABIEncodedTransactionData(),
),
staking.endEpoch().getABIEncodedTransactionData(),
...[...new Array(lastPoolId.toNumber())].map((_x, i) =>
staking.finalizePool(hexUtils.leftPad(i + 1)).getABIEncodedTransactionData(),
),
...[...new Array(lastPoolId.toNumber())].map((_x, i) =>
staking.finalizePool(hexUtils.leftPad(i + 1)).getABIEncodedTransactionData(),
),
];
await stakingProxy.batchExecute(batchExecuteCalldata).awaitTransactionSuccessAsync();
}
before(async () => {
const abis = _.mapValues({ ...artifacts, ...erc20Artifacts }, v => v.compilerOutput.abi);
treasury = new ZrxTreasuryContract(TREASURY_ADDRESS, env.provider, env.txDefaults, abis);
votingPeriod = await treasury.votingPeriod().callAsync();
staking = new StakingContract(STAKING_PROXY_ADDRESS, env.provider, env.txDefaults);
stakingProxy = new StakingProxyContract(STAKING_PROXY_ADDRESS, env.provider, env.txDefaults);
});
describe('Proposal 0', () => {
it('works', async () => {
const proposal = proposals[0];
let executionEpoch: BigNumber;
if (proposal.executionEpoch) {
executionEpoch = proposal.executionEpoch;
} else {
const currentEpoch = await staking.currentEpoch().callAsync();
executionEpoch = currentEpoch.plus(2);
}
const pools = await querySubgraphAsync(PROPOSER);
const proposeTx = treasury.propose(proposal.actions, executionEpoch, proposal.description, pools);
const calldata = proposeTx.getABIEncodedTransactionData();
logUtils.log('ZrxTreasury.propose calldata:');
logUtils.log(calldata);
const proposalId = await proposeTx.callAsync({ from: PROPOSER });
const receipt = await proposeTx.awaitTransactionSuccessAsync({ from: PROPOSER });
verifyEventsFromLogs(
receipt.logs,
[
{
...proposal,
proposalId,
executionEpoch,
proposer: PROPOSER,
operatedPoolIds: pools,
},
],
ZrxTreasuryEvents.ProposalCreated,
);
await fastForwardToNextEpochAsync();
await fastForwardToNextEpochAsync();
await treasury
.castVote(proposalId, true, VOTER_OPERATED_POOLS)
.awaitTransactionSuccessAsync({ from: VOTER });
await env.web3Wrapper.increaseTimeAsync(votingPeriod.plus(1).toNumber());
await env.web3Wrapper.mineBlockAsync();
const executeTx = await treasury.execute(proposalId, proposal.actions).awaitTransactionSuccessAsync();
verifyEventsFromLogs(
executeTx.logs,
[
{
proposalId,
},
],
ZrxTreasuryEvents.ProposalExecuted,
);
const recipient = '0xf9347f751a6a1467abc722ec7d80ba2698dd9d6c';
verifyEventsFromLogs(
executeTx.logs,
[
{
_from: TREASURY_ADDRESS,
_to: recipient,
_value: new BigNumber(400_000).times('1e18'),
},
],
ERC20TokenEvents.Transfer,
);
});
});
});

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-utils",
"version": "4.7.9",
"version": "4.7.10",
"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.1",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.22",
"@0x/order-utils": "^10.4.23",
"@0x/sol-compiler": "^4.7.3",
"@0x/tslint-config": "^4.1.4",
"@0x/types": "^3.3.3",

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1621944788,
"version": "0.24.1",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"version": "0.24.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v0.24.1 - _May 25, 2021_
* Dependencies updated
## v0.24.0 - _May 21, 2021_
* Add special selectors to selector collision test (#243)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-zero-ex",
"version": "0.24.0",
"version": "0.24.1",
"engines": {
"node": ">=6.12"
},
@@ -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.2.0",
"@0x/contracts-erc20": "^3.3.9",
"@0x/contract-addresses": "^6.3.0",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/dev-utils": "^4.2.7",
"@0x/order-utils": "^10.4.22",
"@0x/order-utils": "^10.4.23",
"@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.1",
"@0x/protocol-utils": "^1.6.2",
"@0x/subproviders": "^6.5.3",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",

View File

@@ -1,4 +1,24 @@
[
{
"version": "6.17.0",
"changes": [
{
"note": "Re-enable liquidity provider and update KNC address",
"pr": 253
}
],
"timestamp": 1622154125
},
{
"version": "6.16.0",
"changes": [
{
"note": "Add support for the Polygon chain",
"pr": 240
}
],
"timestamp": 1621944788
},
{
"version": "6.15.0",
"changes": [

View File

@@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v6.17.0 - _May 27, 2021_
* Re-enable liquidity provider and update KNC address (#253)
## v6.16.0 - _May 25, 2021_
* Add support for the Polygon chain (#240)
## v6.15.0 - _May 21, 2021_
* Fix KyberDmm (#236)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "6.15.0",
"version": "6.17.0",
"engines": {
"node": ">=6.12"
},
@@ -60,13 +60,13 @@
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/base-contract": "^6.4.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/contract-addresses": "^6.3.0",
"@0x/contract-wrappers": "^13.16.3",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-zero-ex": "^0.24.1",
"@0x/dev-utils": "^4.2.7",
"@0x/json-schemas": "^6.1.3",
"@0x/protocol-utils": "^1.6.1",
"@0x/protocol-utils": "^1.6.2",
"@0x/quote-server": "^6.0.2",
"@0x/types": "^3.3.3",
"@0x/typescript-typings": "^5.2.0",
@@ -93,14 +93,14 @@
},
"devDependencies": {
"@0x/abi-gen": "^5.6.0",
"@0x/contracts-asset-proxy": "^3.7.12",
"@0x/contracts-exchange": "^3.2.31",
"@0x/contracts-exchange-libs": "^4.3.30",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-exchange-libs": "^4.3.31",
"@0x/contracts-gen": "^2.0.38",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contracts-utils": "^4.7.9",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/contracts-utils": "^4.7.10",
"@0x/mesh-rpc-client": "^9.4.2",
"@0x/migrations": "^8.0.7",
"@0x/migrations": "^8.0.8",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/ts-doc-gen": "^0.0.28",

View File

@@ -226,7 +226,7 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase {
}
if (
this.chainId === ChainId.Mainnet &&
[ChainId.Mainnet, ChainId.BSC].includes(this.chainId) &&
isDirectSwapCompatible(quote, optsWithDefaults, [ERC20BridgeSource.LiquidityProvider])
) {
const fillData = (slippedOrders[0] as OptimizedMarketBridgeOrder<LiquidityProviderFillData>).fillData;

View File

@@ -7,9 +7,12 @@ import {
BELT_BSC_INFOS,
CAFESWAP_ROUTER_BY_CHAIN_ID,
CHEESESWAP_ROUTER_BY_CHAIN_ID,
COMETHSWAP_ROUTER_BY_CHAIN_ID,
COMPONENT_POOLS_BY_CHAIN_ID,
CRYPTO_COM_ROUTER_BY_CHAIN_ID,
CURVE_MAINNET_INFOS,
CURVE_POLYGON_INFOS,
DFYN_ROUTER_BY_CHAIN_ID,
ELLIPSIS_BSC_INFOS,
JULSWAP_ROUTER_BY_CHAIN_ID,
KYBER_BANNED_RESERVES,
@@ -21,6 +24,7 @@ import {
NULL_ADDRESS,
PANCAKESWAP_ROUTER_BY_CHAIN_ID,
PANCAKESWAPV2_ROUTER_BY_CHAIN_ID,
QUICKSWAP_ROUTER_BY_CHAIN_ID,
SADDLE_MAINNET_INFOS,
SHELL_POOLS_BY_CHAIN_ID,
SMOOTHY_BSC_INFOS,
@@ -88,7 +92,7 @@ export function getComponentForPair(chainId: ChainId, takerToken: string, makerT
// tslint:disable completed-docs
export function getMStableForPair(chainId: ChainId, takerToken: string, makerToken: string): string[] {
if (chainId !== ChainId.Mainnet) {
if (chainId !== ChainId.Mainnet && chainId !== ChainId.Polygon) {
return [];
}
return Object.values(MSTABLE_POOLS_BY_CHAIN_ID[chainId])
@@ -98,16 +102,30 @@ export function getMStableForPair(chainId: ChainId, takerToken: string, makerTok
// tslint:disable completed-docs
export function getCurveInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
if (chainId !== ChainId.Mainnet) {
return [];
switch (chainId) {
case ChainId.Mainnet:
return Object.values(CURVE_MAINNET_INFOS).filter(c =>
[makerToken, takerToken].every(
t =>
(c.tokens.includes(t) && c.metaToken === undefined) ||
(c.tokens.includes(t) &&
c.metaToken !== undefined &&
[makerToken, takerToken].includes(c.metaToken)),
),
);
case ChainId.Polygon:
return Object.values(CURVE_POLYGON_INFOS).filter(c =>
[makerToken, takerToken].every(
t =>
(c.tokens.includes(t) && c.metaToken === undefined) ||
(c.tokens.includes(t) &&
c.metaToken !== undefined &&
[makerToken, takerToken].includes(c.metaToken)),
),
);
default:
return [];
}
return Object.values(CURVE_MAINNET_INFOS).filter(c =>
[makerToken, takerToken].every(
t =>
(c.tokens.includes(t) && c.metaToken === undefined) ||
(c.tokens.includes(t) && c.metaToken !== undefined && [makerToken, takerToken].includes(c.metaToken)),
),
);
}
export function getSwerveInfosForPair(chainId: ChainId, takerToken: string, makerToken: string): CurveInfo[] {
@@ -316,7 +334,10 @@ export function uniswapV2LikeRouterAddress(
| ERC20BridgeSource.ApeSwap
| ERC20BridgeSource.CafeSwap
| ERC20BridgeSource.CheeseSwap
| ERC20BridgeSource.JulSwap,
| ERC20BridgeSource.JulSwap
| ERC20BridgeSource.QuickSwap
| ERC20BridgeSource.ComethSwap
| ERC20BridgeSource.Dfyn,
): string {
switch (source) {
case ERC20BridgeSource.UniswapV2:
@@ -339,6 +360,12 @@ export function uniswapV2LikeRouterAddress(
return CHEESESWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.JulSwap:
return JULSWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.QuickSwap:
return QUICKSWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.ComethSwap:
return COMETHSWAP_ROUTER_BY_CHAIN_ID[chainId];
case ERC20BridgeSource.Dfyn:
return DFYN_ROUTER_BY_CHAIN_ID[chainId];
default:
throw new Error(`Unknown UniswapV2 like source ${source}`);
}

View File

@@ -43,6 +43,7 @@ export const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
export const SAMPLER_ADDRESS = '0x5555555555555555555555555555555555555555';
export const COMPARISON_PRICE_DECIMALS = 10;
// TODO(kimpers): Consolidate this implementation with the one in @0x/token-metadata
function valueByChainId<T>(rest: Partial<{ [key in ChainId]: T }>, defaultValue: T): { [key in ChainId]: T } {
// TODO I don't like this but iterating through enums is weird
return {
@@ -52,6 +53,8 @@ function valueByChainId<T>(rest: Partial<{ [key in ChainId]: T }>, defaultValue:
[ChainId.Kovan]: defaultValue,
[ChainId.Ganache]: defaultValue,
[ChainId.BSC]: defaultValue,
[ChainId.Polygon]: defaultValue,
[ChainId.PolygonMumbai]: defaultValue,
...(rest || {}),
};
}
@@ -124,8 +127,17 @@ export const SELL_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.JulSwap,
ERC20BridgeSource.LiquidityProvider,
]),
[ChainId.Polygon]: new SourceFilters([
ERC20BridgeSource.SushiSwap,
ERC20BridgeSource.QuickSwap,
ERC20BridgeSource.ComethSwap,
ERC20BridgeSource.Dfyn,
ERC20BridgeSource.MStable,
ERC20BridgeSource.Curve,
ERC20BridgeSource.DodoV2,
ERC20BridgeSource.Dodo,
]),
},
new SourceFilters([]),
);
@@ -197,6 +209,16 @@ export const BUY_SOURCE_FILTER_BY_CHAIN_ID = valueByChainId<SourceFilters>(
ERC20BridgeSource.JulSwap,
ERC20BridgeSource.LiquidityProvider,
]),
[ChainId.Polygon]: new SourceFilters([
ERC20BridgeSource.SushiSwap,
ERC20BridgeSource.QuickSwap,
ERC20BridgeSource.ComethSwap,
ERC20BridgeSource.Dfyn,
ERC20BridgeSource.MStable,
ERC20BridgeSource.Curve,
ERC20BridgeSource.DodoV2,
ERC20BridgeSource.Dodo,
]),
},
new SourceFilters([]),
);
@@ -214,6 +236,7 @@ export const FEE_QUOTE_SOURCES_BY_CHAIN_ID = valueByChainId<ERC20BridgeSource[]>
[ChainId.Mainnet]: [ERC20BridgeSource.UniswapV2, ERC20BridgeSource.SushiSwap],
[ChainId.BSC]: [ERC20BridgeSource.PancakeSwap, ERC20BridgeSource.Mooniswap, ERC20BridgeSource.SushiSwap],
[ChainId.Ropsten]: [ERC20BridgeSource.UniswapV2, ERC20BridgeSource.SushiSwap],
[ChainId.Polygon]: [ERC20BridgeSource.QuickSwap, ERC20BridgeSource.SushiSwap],
},
[],
);
@@ -287,7 +310,7 @@ export const MAINNET_TOKENS = {
stETH: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',
LINK: '0x514910771af9ca656af840dff83e8264ecf986ca',
MANA: '0x0f5d2fb29fb7d3cfee444a200298f468908cc942',
KNC: '0xdd974d5c2e2928dea5f71b9825b8b646686bd200',
KNC: '0xdefa4e8a7bcba345f687a2f1456f5edd9ce97202',
AAVE: '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9',
sLINK: '0xbbc455cb4f1b9e4bfc4b73970d360c8f032efee6',
yUSD: '0x5dbcf33d8c2e976c6b560249878e6f1491bca25c',
@@ -322,6 +345,18 @@ export const BSC_TOKENS = {
UST: '0x23396cf899ca06c4472205fc903bdb4de249d6fc',
};
export const POLYGON_TOKENS = {
DAI: '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
USDC: '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
USDT: '0xc2132d05d31c914a87c6611c10748aeb04b58e8f',
amDAI: '0x27f8d03b3a2196956ed754badc28d73be8830a6e',
amUSDC: '0x1a13f4ca1d028320a707d99520abfefca3998b7f',
amUSDT: '0x60d55f02a771d515e077c9c2403a1ef324885cec',
WBTC: '0x1bfd67037b42cf73acf2047067bd4f2c47d9bfd6',
WMATIC: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270',
WETH: '0x7ceb23fd6bc0add59e62ac25578270cff1b9f619',
};
export const CURVE_POOLS = {
compound: '0xa2b47e3d5c44877cca798226b7b8118f9bfb7a56', // 0.Compound
// 1.USDT is dead
@@ -364,6 +399,10 @@ export const CURVE_POOLS = {
BUSD: '0x4807862aa8b2bf68830e4c8dc86d0e9a998e085a',
};
export const CURVE_POLYGON_POOLS = {
aave: '0x445fe580ef8d70ff569ab36e80c647af338db351',
};
export const SWERVE_POOLS = {
y: '0x329239599afb305da0a2ec69c58f8a6697f9f88d',
};
@@ -426,6 +465,14 @@ export const DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID = valueByChainId<string[]>(
'0xad6d458402f60fd3bd25163575031acdce07538d', // DAI
'0x07865c6e87b9f70255377e024ace6630c1eaa37f', // USDC
],
[ChainId.Polygon]: [
POLYGON_TOKENS.WMATIC,
POLYGON_TOKENS.WETH,
POLYGON_TOKENS.USDC,
POLYGON_TOKENS.DAI,
POLYGON_TOKENS.USDT,
POLYGON_TOKENS.WBTC,
],
},
[],
);
@@ -448,6 +495,9 @@ export const DEFAULT_TOKEN_ADJACENCY_GRAPH_BY_CHAIN_ID = valueByChainId<TokenAdj
[ChainId.BSC]: new TokenAdjacencyGraphBuilder({
default: DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID[ChainId.BSC],
}).build(),
[ChainId.Polygon]: new TokenAdjacencyGraphBuilder({
default: DEFAULT_INTERMEDIATE_TOKENS_BY_CHAIN_ID[ChainId.Polygon],
}).build(),
},
new TokenAdjacencyGraphBuilder({ default: [] }).build(),
);
@@ -460,6 +510,7 @@ export const NATIVE_FEE_TOKEN_BY_CHAIN_ID = valueByChainId<string>(
[ChainId.Ropsten]: getContractAddressesForChainOrThrow(ChainId.Ropsten).etherToken,
[ChainId.Rinkeby]: getContractAddressesForChainOrThrow(ChainId.Rinkeby).etherToken,
[ChainId.Kovan]: getContractAddressesForChainOrThrow(ChainId.Kovan).etherToken,
[ChainId.Polygon]: getContractAddressesForChainOrThrow(ChainId.Polygon).etherToken,
},
NULL_ADDRESS,
);
@@ -694,6 +745,19 @@ export const CURVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
}),
};
export const CURVE_POLYGON_INFOS: { [name: string]: CurveInfo } = {
['aave_exchangeunderlying']: createCurveExchangeUnderlyingPool({
tokens: [POLYGON_TOKENS.DAI, POLYGON_TOKENS.USDC, POLYGON_TOKENS.USDT],
pool: CURVE_POLYGON_POOLS.aave,
gasSchedule: 300e3,
}),
['aave_exchange']: createCurveExchangePool({
tokens: [POLYGON_TOKENS.amDAI, POLYGON_TOKENS.amUSDC, POLYGON_TOKENS.amUSDT],
pool: CURVE_POLYGON_POOLS.aave,
gasSchedule: 150e3,
}),
};
export const SWERVE_MAINNET_INFOS: { [name: string]: CurveInfo } = {
[SWERVE_POOLS.y]: createCurveExchangePool({
tokens: [MAINNET_TOKENS.DAI, MAINNET_TOKENS.USDC, MAINNET_TOKENS.USDT, MAINNET_TOKENS.TUSD],
@@ -851,21 +915,18 @@ export const LIQUIDITY_PROVIDER_REGISTRY_BY_CHAIN_ID = valueByChainId<LiquidityP
[ChainId.Mainnet]: {
['0x1d0d407c5af8c86f0a6494de86e56ae21e46a951']: {
tokens: [
// 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,
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,
@@ -896,6 +957,7 @@ export const SUSHISWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
[ChainId.Mainnet]: '0xd9e1ce17f2641f24ae83637ab66a2cca9c378b9f',
[ChainId.BSC]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
[ChainId.Ropsten]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
[ChainId.Polygon]: '0x1b02da8cb0d097eb8d57a175b88c7d8b47997506',
},
NULL_ADDRESS,
);
@@ -924,6 +986,16 @@ export const MSTABLE_POOLS_BY_CHAIN_ID = valueByChainId(
tokens: [MAINNET_TOKENS.WBTC, MAINNET_TOKENS.RenBTC, MAINNET_TOKENS.sBTC],
},
},
[ChainId.Polygon]: {
mUSD: {
poolAddress: '0xe840b73e5287865eec17d250bfb1536704b43b21',
tokens: [POLYGON_TOKENS.DAI, POLYGON_TOKENS.USDC, POLYGON_TOKENS.USDT],
},
mBTC: {
poolAddress: NULL_ADDRESS,
tokens: [] as string[],
},
},
},
{
mUSD: {
@@ -963,7 +1035,7 @@ export const MOONISWAP_REGISTRIES_BY_CHAIN_ID = valueByChainId(
[] as string[],
);
export const DODO_CONFIG_BY_CHAIN_ID = valueByChainId(
export const DODOV1_CONFIG_BY_CHAIN_ID = valueByChainId(
{
[ChainId.Mainnet]: {
helper: '0x533da777aedce766ceae696bf90f8541a4ba80eb',
@@ -973,6 +1045,10 @@ export const DODO_CONFIG_BY_CHAIN_ID = valueByChainId(
helper: '0x0f859706aee7fcf61d5a8939e8cb9dbb6c1eda33',
registry: '0xca459456a45e300aa7ef447dbb60f87cccb42828',
},
[ChainId.Polygon]: {
helper: '0xdfaf9584f5d229a9dbe5978523317820a8897c5a',
registry: '0x357c5e9cfa8b834edcef7c7aabd8f9db09119d11',
},
},
{ helper: NULL_ADDRESS, registry: NULL_ADDRESS },
);
@@ -982,10 +1058,17 @@ export const DODOV2_FACTORIES_BY_CHAIN_ID = valueByChainId<string[]>(
[ChainId.Mainnet]: [
'0x6b4fa0bc61eddc928e0df9c7f01e407bfcd3e5ef', // Private Pool
'0x72d220ce168c4f361dd4dee5d826a01ad8598f6c', // Vending Machine
'0x6fddb76c93299d985f4d3fc7ac468f9a168577a4', // Stability Pool
],
[ChainId.BSC]: [
'0xafe0a75dffb395eaabd0a7e1bbbd0b11f8609eef', // Private Pool
'0x790b4a80fb1094589a3c0efc8740aa9b0c1733fb', // Vending Machine
'0x0fb9815938ad069bf90e14fe6c596c514bede767', // Stability Pool
],
[ChainId.Polygon]: [
'0x95e887adf9eaa22cc1c6e3cb7f07adc95b4b25a8', // Private Pool
'0x79887f65f83bdf15bcc8736b5e5bcdb48fb8fe13', // Vending Machine
'0x43c49f8dd240e1545f147211ec9f917376ac1e87', // Stability Pool
],
},
[] as string[],
@@ -1159,6 +1242,40 @@ export const JULSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
NULL_ADDRESS,
);
//
// Polygon
//
export const QUICKSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.Polygon]: '0xa5e0829caced8ffdd4de3c43696c57f7d7a678ff',
},
NULL_ADDRESS,
);
export const COMETHSWAP_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.Polygon]: '0x93bcdc45f7e62f89a8e901dc4a0e2c6c427d9f25',
},
NULL_ADDRESS,
);
export const DFYN_ROUTER_BY_CHAIN_ID = valueByChainId<string>(
{
[ChainId.Polygon]: '0xa102072a4c07f06ec3b4900fdc4c7b80b6c57429',
},
NULL_ADDRESS,
);
const uniswapV2CloneGasSchedule = (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
};
/**
* Calculated gross gas cost of the underlying exchange.
* The cost of switching from one source to another, assuming
@@ -1192,42 +1309,10 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
[ERC20BridgeSource.Saddle]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.XSigma]: fillData => (fillData as CurveFillData).pool.gasSchedule,
[ERC20BridgeSource.MultiBridge]: () => 350e3,
[ERC20BridgeSource.UniswapV2]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.SushiSwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.CryptoCom]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.Linkswap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.UniswapV2]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.SushiSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.CryptoCom]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.Linkswap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.Balancer]: () => 120e3,
[ERC20BridgeSource.BalancerV2]: () => 100e3,
[ERC20BridgeSource.Cream]: () => 120e3,
@@ -1273,72 +1358,6 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
}
return gas;
},
//
// BSC
//
[ERC20BridgeSource.PancakeSwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.PancakeSwapV2]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.BakerySwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.ApeSwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.CafeSwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.CheeseSwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.JulSwap]: (fillData?: FillData) => {
// TODO: Different base cost if to/from ETH.
let gas = 90e3;
const path = (fillData as UniswapV2FillData).tokenAddressPath;
if (path.length > 2) {
gas += (path.length - 2) * 60e3; // +60k for each hop.
}
return gas;
},
[ERC20BridgeSource.UniswapV3]: (fillData?: FillData) => {
let gas = 160e3;
const path = (fillData as UniswapV3FillData).tokenAddressPath;
@@ -1347,6 +1366,24 @@ export const DEFAULT_GAS_SCHEDULE: Required<FeeSchedule> = {
}
return gas;
},
//
// BSC
//
[ERC20BridgeSource.PancakeSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.PancakeSwapV2]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.BakerySwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.ApeSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.CafeSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.CheeseSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.JulSwap]: uniswapV2CloneGasSchedule,
//
// Polygon
//
[ERC20BridgeSource.QuickSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.ComethSwap]: uniswapV2CloneGasSchedule,
[ERC20BridgeSource.Dfyn]: uniswapV2CloneGasSchedule,
};
export const DEFAULT_FEE_SCHEDULE: Required<FeeSchedule> = { ...DEFAULT_GAS_SCHEDULE };

View File

@@ -159,6 +159,12 @@ export function getErc20BridgeSourceToBridgeSource(source: ERC20BridgeSource): s
return encodeBridgeSourceId(BridgeProtocol.UniswapV3, 'UniswapV3');
case ERC20BridgeSource.KyberDmm:
return encodeBridgeSourceId(BridgeProtocol.KyberDmm, 'KyberDmm');
case ERC20BridgeSource.QuickSwap:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'QuickSwap');
case ERC20BridgeSource.ComethSwap:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'ComethSwap');
case ERC20BridgeSource.Dfyn:
return encodeBridgeSourceId(BridgeProtocol.UniswapV2, 'Dfyn');
default:
throw new Error(AggregationError.NoBridgeForSource);
}
@@ -222,6 +228,9 @@ export function createBridgeDataForBridgeOrder(order: OptimizedMarketBridgeOrder
case ERC20BridgeSource.CafeSwap:
case ERC20BridgeSource.CheeseSwap:
case ERC20BridgeSource.JulSwap:
case ERC20BridgeSource.QuickSwap:
case ERC20BridgeSource.ComethSwap:
case ERC20BridgeSource.Dfyn:
const uniswapV2FillData = (order as OptimizedMarketBridgeOrder<UniswapV2FillData>).fillData;
bridgeData = encoder.encode([uniswapV2FillData.router, uniswapV2FillData.tokenAddressPath]);
break;
@@ -406,6 +415,10 @@ export const BRIDGE_ENCODERS: {
[ERC20BridgeSource.CafeSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.CheeseSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.JulSwap]: routerAddressPathEncoder,
// Polygon
[ERC20BridgeSource.QuickSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.ComethSwap]: routerAddressPathEncoder,
[ERC20BridgeSource.Dfyn]: routerAddressPathEncoder,
// Generic pools
[ERC20BridgeSource.Shell]: poolEncoder,
[ERC20BridgeSource.Component]: poolEncoder,

View File

@@ -20,7 +20,7 @@ import {
import {
BALANCER_V2_VAULT_ADDRESS_BY_CHAIN,
BANCOR_REGISTRY_BY_CHAIN_ID,
DODO_CONFIG_BY_CHAIN_ID,
DODOV1_CONFIG_BY_CHAIN_ID,
DODOV2_FACTORIES_BY_CHAIN_ID,
KYBER_CONFIG_BY_CHAIN_ID,
KYBER_DMM_ROUTER_BY_CHAIN_ID,
@@ -1186,6 +1186,9 @@ export class SamplerOperations {
case ERC20BridgeSource.CafeSwap:
case ERC20BridgeSource.CheeseSwap:
case ERC20BridgeSource.JulSwap:
case ERC20BridgeSource.QuickSwap:
case ERC20BridgeSource.ComethSwap:
case ERC20BridgeSource.Dfyn:
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
if (!isValidAddress(uniLikeRouter)) {
return [];
@@ -1323,11 +1326,11 @@ export class SamplerOperations {
),
);
case ERC20BridgeSource.Dodo:
if (!isValidAddress(DODO_CONFIG_BY_CHAIN_ID[this.chainId].registry)) {
if (!isValidAddress(DODOV1_CONFIG_BY_CHAIN_ID[this.chainId].registry)) {
return [];
}
return this.getDODOSellQuotes(
DODO_CONFIG_BY_CHAIN_ID[this.chainId],
DODOV1_CONFIG_BY_CHAIN_ID[this.chainId],
makerToken,
takerToken,
takerFillAmounts,
@@ -1442,6 +1445,9 @@ export class SamplerOperations {
case ERC20BridgeSource.CafeSwap:
case ERC20BridgeSource.CheeseSwap:
case ERC20BridgeSource.JulSwap:
case ERC20BridgeSource.QuickSwap:
case ERC20BridgeSource.ComethSwap:
case ERC20BridgeSource.Dfyn:
const uniLikeRouter = uniswapV2LikeRouterAddress(this.chainId, source);
if (!isValidAddress(uniLikeRouter)) {
return [];
@@ -1578,11 +1584,11 @@ export class SamplerOperations {
),
);
case ERC20BridgeSource.Dodo:
if (!isValidAddress(DODO_CONFIG_BY_CHAIN_ID[this.chainId].registry)) {
if (!isValidAddress(DODOV1_CONFIG_BY_CHAIN_ID[this.chainId].registry)) {
return [];
}
return this.getDODOBuyQuotes(
DODO_CONFIG_BY_CHAIN_ID[this.chainId],
DODOV1_CONFIG_BY_CHAIN_ID[this.chainId],
makerToken,
takerToken,
makerFillAmounts,

View File

@@ -77,6 +77,10 @@ export enum ERC20BridgeSource {
CafeSwap = 'CafeSwap',
CheeseSwap = 'CheeseSwap',
JulSwap = 'JulSwap',
// Polygon only
QuickSwap = 'QuickSwap',
ComethSwap = 'ComethSwap',
Dfyn = 'Dfyn',
}
export type SourcesWithPoolsCache = ERC20BridgeSource.Balancer | ERC20BridgeSource.BalancerV2 | ERC20BridgeSource.Cream;

View File

@@ -1,4 +1,14 @@
[
{
"version": "6.3.0",
"changes": [
{
"note": "Deployed contracts on `Polygon`",
"pr": 240
}
],
"timestamp": 1621944788
},
{
"version": "6.2.0",
"changes": [

View File

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

View File

@@ -244,5 +244,87 @@
"fillQuoteTransformer": "0x99356167edba8fbdc36959e3f5d0c43d1ba9c6db",
"positiveSlippageFeeTransformer": "0x45b3a72221e571017c0f0ec42189e11d149d0ace"
}
},
"137": {
"erc20Proxy": "0x0000000000000000000000000000000000000000",
"erc721Proxy": "0x0000000000000000000000000000000000000000",
"zrxToken": "0x0000000000000000000000000000000000000000",
"etherToken": "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
"exchangeV2": "0x0000000000000000000000000000000000000000",
"exchange": "0x0000000000000000000000000000000000000000",
"assetProxyOwner": "0x0000000000000000000000000000000000000000",
"zeroExGovernor": "0x0000000000000000000000000000000000000000",
"forwarder": "0x0000000000000000000000000000000000000000",
"coordinatorRegistry": "0x0000000000000000000000000000000000000000",
"coordinator": "0x0000000000000000000000000000000000000000",
"multiAssetProxy": "0x0000000000000000000000000000000000000000",
"staticCallProxy": "0x0000000000000000000000000000000000000000",
"erc1155Proxy": "0x0000000000000000000000000000000000000000",
"devUtils": "0x0000000000000000000000000000000000000000",
"zrxVault": "0x0000000000000000000000000000000000000000",
"staking": "0x0000000000000000000000000000000000000000",
"stakingProxy": "0x0000000000000000000000000000000000000000",
"erc20BridgeProxy": "0x0000000000000000000000000000000000000000",
"erc20BridgeSampler": "0x0000000000000000000000000000000000000000",
"chaiBridge": "0x0000000000000000000000000000000000000000",
"dydxBridge": "0x0000000000000000000000000000000000000000",
"godsUnchainedValidator": "0x0000000000000000000000000000000000000000",
"broker": "0x0000000000000000000000000000000000000000",
"chainlinkStopLimit": "0x0000000000000000000000000000000000000000",
"maximumGasPrice": "0x0000000000000000000000000000000000000000",
"dexForwarderBridge": "0x0000000000000000000000000000000000000000",
"exchangeProxyGovernor": "0x4d3e56c56a55d23fc7aa9a9ffad61631cf7d1ae6",
"exchangeProxy": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"exchangeProxyTransformerDeployer": "0xe6d9207df11c55bce2f7a189ae95e3222d5484d3",
"exchangeProxyFlashWallet": "0xdb6f1920a889355780af7570773609bd8cb1f498",
"exchangeProxyLiquidityProviderSandbox": "0x4dd97080adf36103bd3db822f9d3c0e44890fd69",
"transformers": {
"wethTransformer": "0xe309d011cc6f189a3e8dcba85922715a019fed38",
"payTakerTransformer": "0x5ba7b9be86cda01cfbf56e0fb97184783be9dda1",
"affiliateFeeTransformer": "0xbed27284b42e5684e987169cf1da09c5d6c49fa8",
"fillQuoteTransformer": "0x2a0b60642d58ca819a6f3a3b4a6066be0df0486c",
"positiveSlippageFeeTransformer": "0x4cd8f1c0df4d40fcc1e073845d5f6f4ed5cc8dab"
}
},
"80001": {
"erc20Proxy": "0x0000000000000000000000000000000000000000",
"erc721Proxy": "0x0000000000000000000000000000000000000000",
"zrxToken": "0x0000000000000000000000000000000000000000",
"etherToken": "0x9c3c9283d3e44854697cd22d3faa240cfb032889",
"exchangeV2": "0x0000000000000000000000000000000000000000",
"exchange": "0x0000000000000000000000000000000000000000",
"assetProxyOwner": "0x0000000000000000000000000000000000000000",
"zeroExGovernor": "0x0000000000000000000000000000000000000000",
"forwarder": "0x0000000000000000000000000000000000000000",
"coordinatorRegistry": "0x0000000000000000000000000000000000000000",
"coordinator": "0x0000000000000000000000000000000000000000",
"multiAssetProxy": "0x0000000000000000000000000000000000000000",
"staticCallProxy": "0x0000000000000000000000000000000000000000",
"erc1155Proxy": "0x0000000000000000000000000000000000000000",
"devUtils": "0x0000000000000000000000000000000000000000",
"zrxVault": "0x0000000000000000000000000000000000000000",
"staking": "0x0000000000000000000000000000000000000000",
"stakingProxy": "0x0000000000000000000000000000000000000000",
"erc20BridgeProxy": "0x0000000000000000000000000000000000000000",
"erc20BridgeSampler": "0x0000000000000000000000000000000000000000",
"chaiBridge": "0x0000000000000000000000000000000000000000",
"dydxBridge": "0x0000000000000000000000000000000000000000",
"godsUnchainedValidator": "0x0000000000000000000000000000000000000000",
"broker": "0x0000000000000000000000000000000000000000",
"chainlinkStopLimit": "0x0000000000000000000000000000000000000000",
"maximumGasPrice": "0x0000000000000000000000000000000000000000",
"dexForwarderBridge": "0x0000000000000000000000000000000000000000",
"exchangeProxyGovernor": "0x4cf19577bcb5e784f315e952f97a6dc247f03140",
"exchangeProxy": "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"exchangeProxyTransformerDeployer": "0xa8220408bcb5b327875fd82145d379a83dfd7d61",
"exchangeProxyFlashWallet": "0xdb6f1920a889355780af7570773609bd8cb1f498",
"exchangeProxyLiquidityProviderSandbox": "0xe6f76f5090f8d64015113841a0c9bc5d14755d6f",
"transformers": {
"wethTransformer": "0x44a65ee6b33f70eda7b854abe8d81e925984c932",
"payTakerTransformer": "0x2f4868ed9cae9a4cdba063818dce19f411be4e75",
"affiliateFeeTransformer": "0x843c0ac5b1b373be51800c8f1caffe54cc29dd22",
"fillQuoteTransformer": "0x750cb81ee6d64e29e1e358ba155925000bf044d4",
"positiveSlippageFeeTransformer": "0x30aebc4c68effa70e21612b39b94299a8778d0cb"
}
}
}

View File

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

View File

@@ -49,6 +49,8 @@ export enum ChainId {
Kovan = 42,
Ganache = 1337,
BSC = 56,
Polygon = 137,
PolygonMumbai = 80001,
}
/**

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contract-wrappers-test",
"version": "12.2.46",
"version": "12.2.47",
"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.2",
"@0x/contracts-test-utils": "^5.4.1",
"@0x/contract-wrappers": "^13.16.3",
"@0x/contracts-test-utils": "^5.4.2",
"@0x/dev-utils": "^4.2.7",
"@0x/migrations": "^8.0.7",
"@0x/order-utils": "^10.4.22",
"@0x/migrations": "^8.0.8",
"@0x/order-utils": "^10.4.23",
"@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": 1621944788,
"version": "13.16.3",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1621600614,
"version": "13.16.2",

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/migrations",
"version": "8.0.7",
"version": "8.0.8",
"engines": {
"node": ">=6.12"
},
@@ -68,20 +68,20 @@
},
"dependencies": {
"@0x/base-contract": "^6.4.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/contract-addresses": "^6.3.0",
"@0x/contracts-asset-proxy": "^3.7.13",
"@0x/contracts-coordinator": "^3.1.32",
"@0x/contracts-dev-utils": "^1.3.30",
"@0x/contracts-erc1155": "^2.1.31",
"@0x/contracts-erc20": "^3.3.10",
"@0x/contracts-erc721": "^3.1.31",
"@0x/contracts-exchange": "^3.2.32",
"@0x/contracts-exchange-forwarder": "^4.2.32",
"@0x/contracts-extensions": "^6.2.26",
"@0x/contracts-multisig": "^4.1.32",
"@0x/contracts-staking": "^2.0.39",
"@0x/contracts-utils": "^4.7.10",
"@0x/contracts-zero-ex": "^0.24.1",
"@0x/sol-compiler": "^4.7.3",
"@0x/subproviders": "^6.5.3",
"@0x/typescript-typings": "^5.2.0",

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/protocol-utils",
"version": "1.6.1",
"version": "1.6.2",
"engines": {
"node": ">=6.12"
},
@@ -63,8 +63,8 @@
},
"dependencies": {
"@0x/assert": "^3.0.27",
"@0x/contract-addresses": "^6.2.0",
"@0x/contract-wrappers": "^13.16.2",
"@0x/contract-addresses": "^6.3.0",
"@0x/contract-wrappers": "^13.16.3",
"@0x/json-schemas": "^6.1.3",
"@0x/subproviders": "^6.5.3",
"@0x/utils": "^6.4.3",